zebra-day 0.0.32__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zebra_day/__init__.py +35 -0
- zebra_day/bin/fetch_zebra_config.py +15 -0
- zebra_day/bin/generate_coord_grid_zpl.py +50 -0
- zebra_day/bin/print_zpl_from_file.py +21 -0
- zebra_day/bin/probe_new_label_dimensions.py +75 -0
- zebra_day/bin/scan_for_networed_zebra_printers_curl.sh +2 -1
- zebra_day/bin/zserve.py +701 -259
- zebra_day/cli/__init__.py +240 -0
- zebra_day/cli/cognito.py +121 -0
- zebra_day/cli/gui.py +255 -0
- zebra_day/cli/printer.py +168 -0
- zebra_day/cli/template.py +176 -0
- zebra_day/cmd_mgr.py +35 -0
- zebra_day/etc/label_styles/blank.zpl +0 -0
- zebra_day/etc/label_styles/cornersStripOf4Squares_1inX1in.zpl +55 -0
- zebra_day/etc/label_styles/corners_1inX2in.zpl +28 -0
- zebra_day/etc/label_styles/corners_20cmX30cm.zpl +6 -0
- zebra_day/etc/label_styles/corners_smallTube.zpl +7 -0
- zebra_day/etc/label_styles/corners_unspecifiedDimensions.zpl +15 -0
- zebra_day/etc/label_styles/plate_1inX0.25inHD.zpl +9 -0
- zebra_day/etc/label_styles/smallTubeWdotHD_prod.zpl +8 -0
- zebra_day/etc/label_styles/smallTubeWdot_corners.zpl +7 -0
- zebra_day/etc/label_styles/smallTubeWdot_prod.zpl +8 -0
- zebra_day/etc/label_styles/smallTubeWdot_prodAlt1.zpl +6 -0
- zebra_day/etc/label_styles/smallTubeWdot_prodAlt1b.zpl +3 -0
- zebra_day/etc/label_styles/smallTubeWdot_prodV2.zpl +8 -0
- zebra_day/etc/label_styles/smallTubeWdot_reagent.zpl +29 -0
- zebra_day/etc/label_styles/stripOf4Squares_1inX1in.zpl +32 -0
- zebra_day/etc/label_styles/test_800dX800dCoordinateArray.zpl +1 -0
- zebra_day/etc/label_styles/tmps/tmp_zpl_templates.here +0 -0
- zebra_day/etc/label_styles/tube_20mmX30mmA.zpl +7 -0
- zebra_day/etc/label_styles/tube_2inX0.5in.zpl +15 -0
- zebra_day/etc/label_styles/tube_2inX0.5inHD.zpl +15 -0
- zebra_day/etc/label_styles/tube_2inX1inHD.zpl +22 -0
- zebra_day/etc/label_styles/tube_2inX1inHDv3.zpl +21 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:50:25.022846_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:50:25.033657_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:50:25.039597_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:50:25.047295_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:50:25.055804_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:50:25.061337_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.073326_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.081950_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.088251_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.096501_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.104767_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.110364_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.118239_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.125950_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.349866_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.361085_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.558323_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:24.565756_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/{2023-10-25_02:19:04.139607_printer_config.json → 2026-02-01_01:51:29.739070_printer_config.json} +4 -3
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.753796_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.760201_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.768747_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.775312_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.782533_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.789287_printer_config.json +1 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.794230_printer_config.json +3 -0
- zebra_day/etc/old_printer_config/2026-02-01_01:51:29.800021_printer_config.json +5 -0
- zebra_day/etc/printer_config.json +3 -54
- zebra_day/etc/printer_config.template.json +3 -2
- zebra_day/etc/tmp_printers0.json +5 -0
- zebra_day/etc/tmp_printers374.json +5 -0
- zebra_day/etc/tmp_printers383.json +5 -0
- zebra_day/etc/tmp_printers450.json +5 -0
- zebra_day/etc/tmp_printers504.json +5 -0
- zebra_day/etc/tmp_printers608.json +5 -0
- zebra_day/etc/tmp_printers657.json +5 -0
- zebra_day/etc/tmp_printers838.json +5 -0
- zebra_day/etc/tmp_printers839.json +5 -0
- zebra_day/etc/tmp_printers933.json +5 -0
- zebra_day/etc/tmp_printers957.json +5 -0
- zebra_day/exceptions.py +88 -0
- zebra_day/files/hold +0 -0
- zebra_day/files/test_png_17696.png +0 -0
- zebra_day/files/test_png_23477.png +0 -0
- zebra_day/files/test_png_28157.png +0 -0
- zebra_day/files/test_png_35832.png +0 -0
- zebra_day/files/test_png_36400.png +0 -0
- zebra_day/files/test_png_40816.png +0 -0
- zebra_day/files/test_png_49564.png +0 -0
- zebra_day/files/test_png_53848.png +0 -0
- zebra_day/files/test_png_62542.png +0 -0
- zebra_day/files/test_png_91597.png +0 -0
- zebra_day/files/test_png_93633.png +0 -0
- zebra_day/files/tmpbjo3k7q1.png +0 -0
- zebra_day/files/tmpigtr4pwy.png +0 -0
- zebra_day/files/zpl_label_tube_2inX1in_2026-02-01_01:51:24.370964.png +0 -0
- zebra_day/logging_config.py +74 -0
- zebra_day/logs/.hold +0 -0
- zebra_day/logs/print_requests.log +2 -0
- zebra_day/paths.py +143 -0
- zebra_day/print_mgr.py +489 -103
- zebra_day/static/datschund.css +63 -43
- zebra_day/static/datschund.png +0 -0
- zebra_day/static/daylily.png +0 -0
- zebra_day/static/favicon.svg +20 -0
- zebra_day/static/general.css +99 -0
- zebra_day/static/js/zebra_modern.js +172 -0
- zebra_day/static/lsmc.css +354 -0
- zebra_day/static/moon.jpeg +0 -0
- zebra_day/static/oakland.css +0 -32
- zebra_day/static/popday_daylily.css +1 -1
- zebra_day/static/style.css +39 -0
- zebra_day/static/zebra_modern.css +771 -0
- zebra_day/templates/base.html +36 -0
- zebra_day/templates/bpr.html +72 -0
- zebra_day/templates/build_new_config.html +36 -0
- zebra_day/templates/build_print_request.html +32 -0
- zebra_day/templates/chg_ui_style.html +19 -0
- zebra_day/templates/edit_template.html +128 -0
- zebra_day/templates/edit_zpl.html +37 -0
- zebra_day/templates/index.html +82 -0
- zebra_day/templates/legacy/base.html +37 -0
- zebra_day/templates/legacy/bpr.html +72 -0
- zebra_day/templates/legacy/build_new_config.html +36 -0
- zebra_day/templates/legacy/build_print_request.html +32 -0
- zebra_day/templates/legacy/chg_ui_style.html +19 -0
- zebra_day/templates/legacy/edit_template.html +128 -0
- zebra_day/templates/legacy/edit_zpl.html +37 -0
- zebra_day/templates/legacy/index.html +82 -0
- zebra_day/templates/legacy/list_prior_configs.html +24 -0
- zebra_day/templates/legacy/print_result.html +30 -0
- zebra_day/templates/legacy/printer_details.html +25 -0
- zebra_day/templates/legacy/printer_status.html +70 -0
- zebra_day/templates/legacy/save_result.html +17 -0
- zebra_day/templates/legacy/send_print_request.html +34 -0
- zebra_day/templates/legacy/simple_print.html +94 -0
- zebra_day/templates/legacy/view_pstation_json.html +29 -0
- zebra_day/templates/list_prior_configs.html +24 -0
- zebra_day/templates/modern/base.html +98 -0
- zebra_day/templates/modern/config.html +141 -0
- zebra_day/templates/modern/dashboard.html +160 -0
- zebra_day/templates/modern/print_request.html +141 -0
- zebra_day/templates/modern/print_result.html +88 -0
- zebra_day/templates/modern/printer_detail.html +117 -0
- zebra_day/templates/modern/printers.html +133 -0
- zebra_day/templates/modern/save_result.html +46 -0
- zebra_day/templates/modern/template_editor.html +172 -0
- zebra_day/templates/modern/templates.html +122 -0
- zebra_day/templates/print_result.html +30 -0
- zebra_day/templates/printer_details.html +25 -0
- zebra_day/templates/printer_status.html +70 -0
- zebra_day/templates/save_result.html +17 -0
- zebra_day/templates/send_print_request.html +34 -0
- zebra_day/templates/simple_print.html +94 -0
- zebra_day/templates/view_pstation_json.html +29 -0
- zebra_day/web/__init__.py +9 -0
- zebra_day/web/app.py +171 -0
- zebra_day/web/auth.py +172 -0
- zebra_day/web/middleware.py +159 -0
- zebra_day/web/routers/__init__.py +2 -0
- zebra_day/web/routers/api.py +163 -0
- zebra_day/web/routers/ui.py +1051 -0
- zebra_day/zpl_renderer.py +273 -0
- zebra_day-1.0.2.dist-info/METADATA +786 -0
- zebra_day-1.0.2.dist-info/RECORD +179 -0
- {zebra_day-0.0.32.dist-info → zebra_day-1.0.2.dist-info}/WHEEL +1 -1
- zebra_day-1.0.2.dist-info/entry_points.txt +4 -0
- zebra_day/etc/.blind +0 -1
- zebra_day/etc/current_style.txt +0 -1
- zebra_day/etc/label_styles/test_2inX1in.zpl +0 -22
- zebra_day/etc/label_styles/tmps/labware_2inX1in.na.2023-10-24_12:49:21.045127.zpl +0 -21
- zebra_day/etc/label_styles/tmps/labware_2inX1in.naggg.2023-10-24_16:02:04.704814.8888.2023-10-24_16:02:16.443911.zpl +0 -21
- zebra_day/etc/label_styles/tmps/labware_2inX1in.naggg.2023-10-24_16:02:04.704814.zpl +0 -21
- zebra_day/etc/label_styles/tmps/test_2inX1in.na.2023-10-24_12:45:37.002774.zpl +0 -22
- zebra_day/etc/old_printer_config/2023-10-24_16:06:06.931764_printer_config.json +0 -67
- zebra_day/etc/printer_config.json~ +0 -67
- zebra_day/files/tmp_2olihg4.png +0 -0
- zebra_day/files/tmpveojoyvn.png +0 -0
- zebra_day/files/zpl_label_labware_2inX1in_2023-10-25_02:30:08.093631.png +0 -0
- zebra_day/files/zpl_label_test_2inX1in_2023-10-24_15:54:29.343124.png +0 -0
- zebra_day/files/zpl_label_test_2inX1in_2023-10-24_16:01:45.670132.png +0 -0
- zebra_day/static/beyonce.css +0 -227
- zebra_day/static/datschund_on_moon.css +0 -164
- zebra_day/static/medicalsci.css +0 -144
- zebra_day/static/moar_zebra.css +0 -133
- zebra_day/static/popday.css +0 -140
- zebra_day/static/popday_dark.css +0 -140
- zebra_day/static/popday_dog.css +0 -140
- zebra_day-0.0.32.dist-info/METADATA +0 -14
- zebra_day-0.0.32.dist-info/RECORD +0 -53
- zebra_day-0.0.32.dist-info/entry_points.txt +0 -2
- /zebra_day/{etc/label_styles/blank_0inX0in.zpl → bin/__init__.py} +0 -0
- /zebra_day/etc/label_styles/{labware_2inX1in.zpl → generic_2inX1in.zpl} +0 -0
- {zebra_day-0.0.32.dist-info → zebra_day-1.0.2.dist-info/licenses}/LICENSE +0 -0
- {zebra_day-0.0.32.dist-info → zebra_day-1.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{% extends "modern/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ printer_name }} - Zebra Day{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<div class="page-header">
|
|
7
|
+
<h1 class="page-title">{{ printer_name }}</h1>
|
|
8
|
+
<p class="page-subtitle">Printer details for {{ lab }}</p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Breadcrumb -->
|
|
12
|
+
<div class="mb-lg">
|
|
13
|
+
<a href="/" class="text-muted">Dashboard</a>
|
|
14
|
+
<span class="text-muted"> / </span>
|
|
15
|
+
<a href="/printers">Printers</a>
|
|
16
|
+
<span class="text-muted"> / </span>
|
|
17
|
+
<a href="/printers/{{ lab }}">{{ lab }}</a>
|
|
18
|
+
<span class="text-muted"> / </span>
|
|
19
|
+
<span>{{ printer_name }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="grid grid-2">
|
|
23
|
+
<!-- Printer Info -->
|
|
24
|
+
<div class="card">
|
|
25
|
+
<div class="card-header">
|
|
26
|
+
<h3 class="card-title">Printer Information</h3>
|
|
27
|
+
{% if printer_info.ip_address != 'dl_png' %}
|
|
28
|
+
<a href="http://{{ printer_info.ip_address }}" target="_blank" class="btn btn-outline btn-sm">
|
|
29
|
+
<i class="fas fa-external-link-alt"></i> Web Interface
|
|
30
|
+
</a>
|
|
31
|
+
{% endif %}
|
|
32
|
+
</div>
|
|
33
|
+
<table class="table" style="background: transparent; box-shadow: none;">
|
|
34
|
+
<tbody>
|
|
35
|
+
{% for key, value in printer_info.items() %}
|
|
36
|
+
<tr>
|
|
37
|
+
<td style="width: 40%;"><strong>{{ key }}</strong></td>
|
|
38
|
+
<td>
|
|
39
|
+
{% if key == 'ip_address' and value != 'dl_png' %}
|
|
40
|
+
<a href="http://{{ value }}" target="_blank">{{ value }}</a>
|
|
41
|
+
{% elif key == 'status' %}
|
|
42
|
+
{% if value == 'online' %}
|
|
43
|
+
<span class="badge badge-success">Online</span>
|
|
44
|
+
{% else %}
|
|
45
|
+
<span class="badge badge-error">Offline</span>
|
|
46
|
+
{% endif %}
|
|
47
|
+
{% elif key == 'label_zpl_styles' %}
|
|
48
|
+
{% for style in value %}
|
|
49
|
+
<span class="badge badge-primary">{{ style }}</span>
|
|
50
|
+
{% endfor %}
|
|
51
|
+
{% else %}
|
|
52
|
+
{{ value }}
|
|
53
|
+
{% endif %}
|
|
54
|
+
</td>
|
|
55
|
+
</tr>
|
|
56
|
+
{% endfor %}
|
|
57
|
+
</tbody>
|
|
58
|
+
</table>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<!-- Quick Actions -->
|
|
62
|
+
<div class="card">
|
|
63
|
+
<div class="card-header">
|
|
64
|
+
<h3 class="card-title">Quick Actions</h3>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="quick-actions">
|
|
67
|
+
<a href="/print?lab={{ lab }}&printer={{ printer_name }}" class="action-card">
|
|
68
|
+
<i class="fas fa-print"></i>
|
|
69
|
+
<div>
|
|
70
|
+
<strong>Print Label</strong>
|
|
71
|
+
<small class="text-muted d-block">Send a print request</small>
|
|
72
|
+
</div>
|
|
73
|
+
</a>
|
|
74
|
+
<a href="/templates" class="action-card">
|
|
75
|
+
<i class="fas fa-file-code"></i>
|
|
76
|
+
<div>
|
|
77
|
+
<strong>View Templates</strong>
|
|
78
|
+
<small class="text-muted d-block">Available label styles</small>
|
|
79
|
+
</div>
|
|
80
|
+
</a>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- Printer Configuration -->
|
|
86
|
+
{% if printer_config %}
|
|
87
|
+
<div class="card mt-lg">
|
|
88
|
+
<div class="card-header">
|
|
89
|
+
<h3 class="card-title">Printer Configuration</h3>
|
|
90
|
+
<button class="btn btn-outline btn-sm" onclick="copyToClipboard(document.getElementById('printer-config').textContent)">
|
|
91
|
+
<i class="fas fa-copy"></i> Copy
|
|
92
|
+
</button>
|
|
93
|
+
</div>
|
|
94
|
+
<pre id="printer-config">{{ printer_config }}</pre>
|
|
95
|
+
</div>
|
|
96
|
+
{% endif %}
|
|
97
|
+
|
|
98
|
+
<!-- Test Print Section -->
|
|
99
|
+
<div class="card mt-lg">
|
|
100
|
+
<div class="card-header">
|
|
101
|
+
<h3 class="card-title">Test Print</h3>
|
|
102
|
+
</div>
|
|
103
|
+
<p class="text-muted mb-lg">Send a test label to verify the printer is working correctly.</p>
|
|
104
|
+
<div class="grid grid-3">
|
|
105
|
+
{% for style in printer_info.label_zpl_styles[:6] %}
|
|
106
|
+
<a href="/print?lab={{ lab }}&printer={{ printer_name }}&template={{ style }}&test=1" class="action-card">
|
|
107
|
+
<i class="fas fa-tag"></i>
|
|
108
|
+
<div>
|
|
109
|
+
<strong>{{ style }}</strong>
|
|
110
|
+
<small class="text-muted d-block">Test print</small>
|
|
111
|
+
</div>
|
|
112
|
+
</a>
|
|
113
|
+
{% endfor %}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
{% endblock %}
|
|
117
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{% extends "modern/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}Printers - Zebra Day{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<div class="page-header">
|
|
7
|
+
<h1 class="page-title">{% if lab %}{{ lab }} Printers{% else %}All Printers{% endif %}</h1>
|
|
8
|
+
<p class="page-subtitle">View and manage Zebra printers</p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Labs Navigation -->
|
|
12
|
+
{% if not lab and labs %}
|
|
13
|
+
<div class="card mb-lg">
|
|
14
|
+
<div class="card-header">
|
|
15
|
+
<h3 class="card-title">Select a Lab</h3>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="grid grid-4">
|
|
18
|
+
{% for lab_name in labs %}
|
|
19
|
+
<a href="/printers/{{ lab_name }}" class="action-card">
|
|
20
|
+
<i class="fas fa-building"></i>
|
|
21
|
+
<div>
|
|
22
|
+
<strong>{{ lab_name }}</strong>
|
|
23
|
+
<small class="text-muted d-block">View printers</small>
|
|
24
|
+
</div>
|
|
25
|
+
</a>
|
|
26
|
+
{% endfor %}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
<!-- Printers Table -->
|
|
32
|
+
{% if printers %}
|
|
33
|
+
<div class="card">
|
|
34
|
+
<div class="card-header">
|
|
35
|
+
<h3 class="card-title">Printers{% if lab %} in {{ lab }}{% endif %}</h3>
|
|
36
|
+
<a href="/config?action=scan&lab={{ lab | default('') }}" class="btn btn-outline btn-sm">
|
|
37
|
+
<i class="fas fa-sync"></i> Rescan
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="table-container" style="box-shadow: none;">
|
|
41
|
+
<table class="table">
|
|
42
|
+
<thead>
|
|
43
|
+
<tr>
|
|
44
|
+
<th>Printer</th>
|
|
45
|
+
<th>IP Address</th>
|
|
46
|
+
<th>Status</th>
|
|
47
|
+
<th>Label Styles</th>
|
|
48
|
+
<th>Actions</th>
|
|
49
|
+
</tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
{% for printer in printers %}
|
|
53
|
+
<tr>
|
|
54
|
+
<td>
|
|
55
|
+
<strong>{{ printer.name }}</strong><br>
|
|
56
|
+
<small class="text-muted">{{ printer.model | default('Unknown model') }}</small>
|
|
57
|
+
</td>
|
|
58
|
+
<td>
|
|
59
|
+
{% if printer.ip_address != 'dl_png' %}
|
|
60
|
+
<a href="http://{{ printer.ip_address }}" target="_blank">{{ printer.ip_address }}</a>
|
|
61
|
+
{% else %}
|
|
62
|
+
<span class="text-muted">{{ printer.ip_address }}</span>
|
|
63
|
+
{% endif %}
|
|
64
|
+
</td>
|
|
65
|
+
<td>
|
|
66
|
+
{% if printer.status == 'online' %}
|
|
67
|
+
<span class="badge badge-success">Online</span>
|
|
68
|
+
{% else %}
|
|
69
|
+
<span class="badge badge-error">Offline</span>
|
|
70
|
+
{% endif %}
|
|
71
|
+
</td>
|
|
72
|
+
<td>
|
|
73
|
+
{% for style in printer.label_zpl_styles[:3] %}
|
|
74
|
+
<span class="badge badge-primary">{{ style }}</span>
|
|
75
|
+
{% endfor %}
|
|
76
|
+
{% if printer.label_zpl_styles | length > 3 %}
|
|
77
|
+
<span class="text-muted">+{{ printer.label_zpl_styles | length - 3 }} more</span>
|
|
78
|
+
{% endif %}
|
|
79
|
+
</td>
|
|
80
|
+
<td>
|
|
81
|
+
<a href="/printers/{{ lab }}/{{ printer.name }}" class="btn btn-sm btn-outline">
|
|
82
|
+
<i class="fas fa-info-circle"></i> Details
|
|
83
|
+
</a>
|
|
84
|
+
<a href="/print?lab={{ lab }}&printer={{ printer.name }}" class="btn btn-sm btn-primary">
|
|
85
|
+
<i class="fas fa-print"></i> Print
|
|
86
|
+
</a>
|
|
87
|
+
</td>
|
|
88
|
+
</tr>
|
|
89
|
+
{% endfor %}
|
|
90
|
+
</tbody>
|
|
91
|
+
</table>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
{% elif lab %}
|
|
95
|
+
<div class="card">
|
|
96
|
+
<div class="empty-state">
|
|
97
|
+
<i class="fas fa-print"></i>
|
|
98
|
+
<p>No printers found in {{ lab }}</p>
|
|
99
|
+
<a href="/config?action=scan&lab={{ lab }}" class="btn btn-primary">
|
|
100
|
+
<i class="fas fa-wifi"></i> Scan Network
|
|
101
|
+
</a>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
{% endif %}
|
|
105
|
+
|
|
106
|
+
<!-- Scan Network Card -->
|
|
107
|
+
<div class="card mt-lg">
|
|
108
|
+
<div class="card-header">
|
|
109
|
+
<h3 class="card-title">Scan Network for Printers</h3>
|
|
110
|
+
</div>
|
|
111
|
+
<form action="/config/scan" method="get" class="grid grid-3">
|
|
112
|
+
<div class="form-group mb-0">
|
|
113
|
+
<label class="form-label">IP Range</label>
|
|
114
|
+
<input type="text" name="ip_stub" class="form-control" value="{{ ip_root | default('192.168.1') }}" placeholder="192.168.1">
|
|
115
|
+
</div>
|
|
116
|
+
<div class="form-group mb-0">
|
|
117
|
+
<label class="form-label">Lab Name</label>
|
|
118
|
+
<input type="text" name="lab" class="form-control" list="lab_names" value="{{ lab | default('') }}" placeholder="Enter lab name">
|
|
119
|
+
<datalist id="lab_names">
|
|
120
|
+
{% for lab_name in labs %}
|
|
121
|
+
<option value="{{ lab_name }}">
|
|
122
|
+
{% endfor %}
|
|
123
|
+
</datalist>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="form-group mb-0" style="display: flex; align-items: flex-end;">
|
|
126
|
+
<button type="submit" class="btn btn-primary">
|
|
127
|
+
<i class="fas fa-search"></i> Scan Network
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
</form>
|
|
131
|
+
</div>
|
|
132
|
+
{% endblock %}
|
|
133
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{% extends "modern/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ title }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<div class="page-header">
|
|
7
|
+
<h1 class="page-title">Template Saved</h1>
|
|
8
|
+
<p class="page-subtitle">Your changes have been saved to a draft file</p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="card">
|
|
12
|
+
<div class="card-header">
|
|
13
|
+
<span class="card-icon text-success"><i class="fas fa-check-circle"></i></span>
|
|
14
|
+
<h3 class="card-title">Success</h3>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<p>Your changes have been saved to a new draft file:</p>
|
|
18
|
+
|
|
19
|
+
<div class="alert alert-info mt-md">
|
|
20
|
+
<i class="fas fa-file-code"></i>
|
|
21
|
+
<code>{{ new_filename }}</code>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<p class="text-muted mt-md">
|
|
25
|
+
Draft files are saved in the <code>tmps/</code> directory. To promote a draft to stable,
|
|
26
|
+
rename the file and move it to the main label_styles directory.
|
|
27
|
+
</p>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="card mt-lg">
|
|
31
|
+
<div class="d-flex" style="justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--spacing-md);">
|
|
32
|
+
<a href="/templates" class="btn btn-outline">
|
|
33
|
+
<i class="fas fa-arrow-left"></i> Back to Templates
|
|
34
|
+
</a>
|
|
35
|
+
<div class="d-flex gap-md">
|
|
36
|
+
<a href="/templates/edit?filename={{ new_filename }}&dtype=tmps" class="btn btn-primary">
|
|
37
|
+
<i class="fas fa-edit"></i> Continue Editing
|
|
38
|
+
</a>
|
|
39
|
+
<a href="/" class="btn btn-outline">
|
|
40
|
+
<i class="fas fa-home"></i> Dashboard
|
|
41
|
+
</a>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
{% endblock %}
|
|
46
|
+
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{% extends "modern/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}Edit: {{ filename }} - Zebra Day{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block extra_head %}
|
|
6
|
+
<style>
|
|
7
|
+
.editor-container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); }
|
|
8
|
+
.editor-textarea { min-height: 500px; font-family: var(--font-mono); font-size: 14px; }
|
|
9
|
+
.preview-frame { background: var(--color-white); border-radius: var(--radius-md); padding: var(--spacing-lg); min-height: 300px; }
|
|
10
|
+
@media (max-width: 1024px) { .editor-container { grid-template-columns: 1fr; } }
|
|
11
|
+
</style>
|
|
12
|
+
{% endblock %}
|
|
13
|
+
|
|
14
|
+
{% block content %}
|
|
15
|
+
<div class="page-header">
|
|
16
|
+
<h1 class="page-title">Edit: {{ filename }}</h1>
|
|
17
|
+
<p class="page-subtitle">{% if dtype %}Draft template{% else %}Stable template{% endif %}</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Breadcrumb -->
|
|
21
|
+
<div class="mb-lg">
|
|
22
|
+
<a href="/" class="text-muted">Dashboard</a>
|
|
23
|
+
<span class="text-muted"> / </span>
|
|
24
|
+
<a href="/templates">Templates</a>
|
|
25
|
+
<span class="text-muted"> / </span>
|
|
26
|
+
<span>{{ filename }}</span>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<form id="editor-form" action="/save" method="post">
|
|
30
|
+
<input type="hidden" name="filename" value="{{ filename }}">
|
|
31
|
+
|
|
32
|
+
<div class="editor-container">
|
|
33
|
+
<!-- Editor Panel -->
|
|
34
|
+
<div class="card">
|
|
35
|
+
<div class="card-header">
|
|
36
|
+
<h3 class="card-title"><i class="fas fa-code"></i> ZPL Code</h3>
|
|
37
|
+
<button type="button" class="btn btn-outline btn-sm" onclick="previewTemplate()">
|
|
38
|
+
<i class="fas fa-eye"></i> Preview
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
<textarea name="content" id="zpl-editor" class="form-control editor-textarea">{{ content }}</textarea>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<!-- Preview Panel -->
|
|
45
|
+
<div class="card">
|
|
46
|
+
<div class="card-header">
|
|
47
|
+
<h3 class="card-title"><i class="fas fa-image"></i> Preview</h3>
|
|
48
|
+
<span class="badge badge-info" id="preview-status">Ready</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="preview-frame" id="preview-container">
|
|
51
|
+
<div class="empty-state">
|
|
52
|
+
<i class="fas fa-image"></i>
|
|
53
|
+
<p>Click Preview to generate</p>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- Save Options -->
|
|
60
|
+
<div class="card mt-lg">
|
|
61
|
+
<div class="card-header">
|
|
62
|
+
<h3 class="card-title">Save Options</h3>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="grid grid-3">
|
|
65
|
+
<div class="form-group mb-0">
|
|
66
|
+
<label class="form-label">Draft Tag</label>
|
|
67
|
+
<input type="text" name="ftag" class="form-control" value="draft" placeholder="Tag for draft version">
|
|
68
|
+
</div>
|
|
69
|
+
<div class="form-group mb-0">
|
|
70
|
+
<label class="form-label">Test Lab</label>
|
|
71
|
+
<select name="lab" class="form-control" id="test-lab" onchange="updateTestPrinters()">
|
|
72
|
+
<option value="">Select lab...</option>
|
|
73
|
+
{% for lab in labs %}
|
|
74
|
+
<option value="{{ lab }}">{{ lab }}</option>
|
|
75
|
+
{% endfor %}
|
|
76
|
+
</select>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="form-group mb-0">
|
|
79
|
+
<label class="form-label">Test Printer</label>
|
|
80
|
+
<select name="printer" class="form-control" id="test-printer">
|
|
81
|
+
<option value="">Select printer...</option>
|
|
82
|
+
</select>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<!-- Actions -->
|
|
88
|
+
<div class="card mt-lg">
|
|
89
|
+
<div class="d-flex" style="justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--spacing-md);">
|
|
90
|
+
<a href="/templates" class="btn btn-outline">
|
|
91
|
+
<i class="fas fa-arrow-left"></i> Cancel
|
|
92
|
+
</a>
|
|
93
|
+
<div class="d-flex gap-md">
|
|
94
|
+
<button type="button" class="btn btn-outline" onclick="testPrint()">
|
|
95
|
+
<i class="fas fa-print"></i> Test Print
|
|
96
|
+
</button>
|
|
97
|
+
<button type="submit" class="btn btn-primary">
|
|
98
|
+
<i class="fas fa-save"></i> Save as Draft
|
|
99
|
+
</button>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</form>
|
|
104
|
+
{% endblock %}
|
|
105
|
+
|
|
106
|
+
{% block extra_scripts %}
|
|
107
|
+
<script>
|
|
108
|
+
var labsDict = {{ labs_dict | safe }};
|
|
109
|
+
|
|
110
|
+
function updateTestPrinters() {
|
|
111
|
+
var labSelect = document.getElementById('test-lab');
|
|
112
|
+
var printerSelect = document.getElementById('test-printer');
|
|
113
|
+
var lab = labSelect.value;
|
|
114
|
+
|
|
115
|
+
printerSelect.innerHTML = '<option value="">Select printer...</option>';
|
|
116
|
+
if (lab && labsDict[lab]) {
|
|
117
|
+
for (var printer in labsDict[lab]) {
|
|
118
|
+
var option = document.createElement('option');
|
|
119
|
+
option.value = printer;
|
|
120
|
+
option.text = printer;
|
|
121
|
+
printerSelect.appendChild(option);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async function previewTemplate() {
|
|
127
|
+
var statusBadge = document.getElementById('preview-status');
|
|
128
|
+
var container = document.getElementById('preview-container');
|
|
129
|
+
var content = document.getElementById('zpl-editor').value;
|
|
130
|
+
|
|
131
|
+
statusBadge.textContent = 'Loading...';
|
|
132
|
+
statusBadge.className = 'badge badge-warning';
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
var response = await fetch('/api/v1/preview_zpl', {
|
|
136
|
+
method: 'POST',
|
|
137
|
+
headers: { 'Content-Type': 'application/json' },
|
|
138
|
+
body: JSON.stringify({ zpl_content: content })
|
|
139
|
+
});
|
|
140
|
+
var data = await response.json();
|
|
141
|
+
if (data.png_url) {
|
|
142
|
+
container.innerHTML = '<img src="' + data.png_url + '" alt="Preview" style="max-width: 100%;">';
|
|
143
|
+
statusBadge.textContent = 'Ready';
|
|
144
|
+
statusBadge.className = 'badge badge-success';
|
|
145
|
+
} else {
|
|
146
|
+
throw new Error(data.error || 'Preview failed');
|
|
147
|
+
}
|
|
148
|
+
} catch (err) {
|
|
149
|
+
container.innerHTML = '<div class="empty-state"><i class="fas fa-exclamation-triangle"></i><p>' + err.message + '</p></div>';
|
|
150
|
+
statusBadge.textContent = 'Error';
|
|
151
|
+
statusBadge.className = 'badge badge-error';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function testPrint() {
|
|
156
|
+
var lab = document.getElementById('test-lab').value;
|
|
157
|
+
var printer = document.getElementById('test-printer').value;
|
|
158
|
+
if (!lab || !printer) {
|
|
159
|
+
showToast('warning', 'Select Printer', 'Please select a lab and printer for test print.');
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
var content = document.getElementById('zpl-editor').value;
|
|
163
|
+
var form = document.createElement('form');
|
|
164
|
+
form.method = 'POST';
|
|
165
|
+
form.action = '/api/v1/print_raw_zpl';
|
|
166
|
+
form.innerHTML = '<input name="lab" value="' + lab + '"><input name="printer" value="' + printer + '"><textarea name="zpl_content">' + content + '</textarea>';
|
|
167
|
+
document.body.appendChild(form);
|
|
168
|
+
form.submit();
|
|
169
|
+
}
|
|
170
|
+
</script>
|
|
171
|
+
{% endblock %}
|
|
172
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{% extends "modern/base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}Templates - Zebra Day{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<div class="page-header">
|
|
7
|
+
<h1 class="page-title">ZPL Templates</h1>
|
|
8
|
+
<p class="page-subtitle">Manage label templates and styles</p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="grid grid-2">
|
|
12
|
+
<!-- Stable Templates -->
|
|
13
|
+
<div class="card">
|
|
14
|
+
<div class="card-header">
|
|
15
|
+
<h3 class="card-title">
|
|
16
|
+
<i class="fas fa-check-circle text-success"></i> Stable Templates
|
|
17
|
+
</h3>
|
|
18
|
+
<span class="badge badge-success">{{ stable_templates | length }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
{% if stable_templates %}
|
|
21
|
+
<div class="table-container" style="box-shadow: none;">
|
|
22
|
+
<table class="table">
|
|
23
|
+
<thead>
|
|
24
|
+
<tr>
|
|
25
|
+
<th>Template Name</th>
|
|
26
|
+
<th>Actions</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</thead>
|
|
29
|
+
<tbody>
|
|
30
|
+
{% for template in stable_templates %}
|
|
31
|
+
<tr>
|
|
32
|
+
<td>
|
|
33
|
+
<i class="fas fa-file-code text-muted"></i>
|
|
34
|
+
<strong>{{ template }}</strong>
|
|
35
|
+
</td>
|
|
36
|
+
<td>
|
|
37
|
+
<a href="/templates/edit?filename={{ template }}" class="btn btn-sm btn-outline">
|
|
38
|
+
<i class="fas fa-edit"></i> Edit
|
|
39
|
+
</a>
|
|
40
|
+
<a href="/templates/preview?filename={{ template }}" class="btn btn-sm btn-primary">
|
|
41
|
+
<i class="fas fa-eye"></i> Preview
|
|
42
|
+
</a>
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
{% endfor %}
|
|
46
|
+
</tbody>
|
|
47
|
+
</table>
|
|
48
|
+
</div>
|
|
49
|
+
{% else %}
|
|
50
|
+
<div class="empty-state">
|
|
51
|
+
<i class="fas fa-file-code"></i>
|
|
52
|
+
<p>No stable templates found</p>
|
|
53
|
+
</div>
|
|
54
|
+
{% endif %}
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- Draft Templates -->
|
|
58
|
+
<div class="card">
|
|
59
|
+
<div class="card-header">
|
|
60
|
+
<h3 class="card-title">
|
|
61
|
+
<i class="fas fa-pencil-alt text-warning"></i> Draft Templates
|
|
62
|
+
</h3>
|
|
63
|
+
<span class="badge badge-warning">{{ draft_templates | length }}</span>
|
|
64
|
+
</div>
|
|
65
|
+
{% if draft_templates %}
|
|
66
|
+
<div class="table-container" style="box-shadow: none;">
|
|
67
|
+
<table class="table">
|
|
68
|
+
<thead>
|
|
69
|
+
<tr>
|
|
70
|
+
<th>Template Name</th>
|
|
71
|
+
<th>Actions</th>
|
|
72
|
+
</tr>
|
|
73
|
+
</thead>
|
|
74
|
+
<tbody>
|
|
75
|
+
{% for template in draft_templates %}
|
|
76
|
+
<tr>
|
|
77
|
+
<td>
|
|
78
|
+
<i class="fas fa-file-alt text-muted"></i>
|
|
79
|
+
<strong>{{ template }}</strong>
|
|
80
|
+
</td>
|
|
81
|
+
<td>
|
|
82
|
+
<a href="/templates/edit?filename={{ template }}&dtype=tmps" class="btn btn-sm btn-outline">
|
|
83
|
+
<i class="fas fa-edit"></i> Edit
|
|
84
|
+
</a>
|
|
85
|
+
<a href="/templates/preview?filename={{ template }}&dtype=tmps" class="btn btn-sm btn-primary">
|
|
86
|
+
<i class="fas fa-eye"></i> Preview
|
|
87
|
+
</a>
|
|
88
|
+
</td>
|
|
89
|
+
</tr>
|
|
90
|
+
{% endfor %}
|
|
91
|
+
</tbody>
|
|
92
|
+
</table>
|
|
93
|
+
</div>
|
|
94
|
+
{% else %}
|
|
95
|
+
<div class="empty-state">
|
|
96
|
+
<i class="fas fa-pencil-alt"></i>
|
|
97
|
+
<p>No draft templates yet</p>
|
|
98
|
+
<small class="text-muted">Edit a stable template to create a draft</small>
|
|
99
|
+
</div>
|
|
100
|
+
{% endif %}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<!-- Format Keys Reference -->
|
|
105
|
+
<div class="card mt-lg">
|
|
106
|
+
<div class="card-header">
|
|
107
|
+
<h3 class="card-title">Template Format Keys</h3>
|
|
108
|
+
</div>
|
|
109
|
+
<p class="text-muted mb-lg">Use these placeholders in your ZPL templates to insert dynamic data:</p>
|
|
110
|
+
<div class="grid grid-4">
|
|
111
|
+
<div><code>{uid_barcode}</code> - Barcode value</div>
|
|
112
|
+
<div><code>{alt_a}</code> - Custom field A</div>
|
|
113
|
+
<div><code>{alt_b}</code> - Custom field B</div>
|
|
114
|
+
<div><code>{alt_c}</code> - Custom field C</div>
|
|
115
|
+
<div><code>{alt_d}</code> - Custom field D</div>
|
|
116
|
+
<div><code>{alt_e}</code> - Custom field E</div>
|
|
117
|
+
<div><code>{alt_f}</code> - Custom field F</div>
|
|
118
|
+
<div><code>{rec_date}</code> - Record date</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
{% endblock %}
|
|
122
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ title }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<h1>Label Print Request Sent</h1>
|
|
7
|
+
<small><a href="/">home</a></small>
|
|
8
|
+
<hr>
|
|
9
|
+
|
|
10
|
+
{% if success %}
|
|
11
|
+
{% if png_url %}
|
|
12
|
+
<h2>Successfully Created PNG</h2>
|
|
13
|
+
<img src="{{ png_url }}" alt="Label Preview">
|
|
14
|
+
<br><br>
|
|
15
|
+
<a href="{{ png_url }}" download>Download PNG</a>
|
|
16
|
+
{% else %}
|
|
17
|
+
<h2>Success - Label Printed</h2>
|
|
18
|
+
{% endif %}
|
|
19
|
+
{% else %}
|
|
20
|
+
<h2 style="color: red;">Error Printing Label</h2>
|
|
21
|
+
{% endif %}
|
|
22
|
+
|
|
23
|
+
<hr>
|
|
24
|
+
<p><small>The URL for this print request (which you can edit and use in curl) is:</small></p>
|
|
25
|
+
<code>{{ full_url }}</code>
|
|
26
|
+
|
|
27
|
+
<br><br>
|
|
28
|
+
<a href="/">Home</a>
|
|
29
|
+
{% endblock %}
|
|
30
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}{{ title }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<h1>Printer Information For {{ printer_name }} In Lab {{ lab }}</h1>
|
|
7
|
+
<ul>
|
|
8
|
+
<small><a href="/">HOME</a> ... <a href="/printer_status?lab={{ lab }}">printer status report</a></small>
|
|
9
|
+
<hr>
|
|
10
|
+
|
|
11
|
+
<h2>JSON Stored Data</h2>
|
|
12
|
+
<ul>
|
|
13
|
+
{% for key, value in printer_info.items() %}
|
|
14
|
+
<li><strong>{{ key }}</strong>: {{ value }}</li>
|
|
15
|
+
{% endfor %}
|
|
16
|
+
</ul>
|
|
17
|
+
|
|
18
|
+
<br>
|
|
19
|
+
<h2>Configuration Retrieved From The Zebra Printer</h2>
|
|
20
|
+
<ul>
|
|
21
|
+
<pre>{{ printer_config }}</pre>
|
|
22
|
+
</ul>
|
|
23
|
+
</ul>
|
|
24
|
+
{% endblock %}
|
|
25
|
+
|