zebra-day 1.0.2__py3-none-any.whl → 2.1.4__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.
Files changed (174) hide show
  1. zebra_day/__init__.py +7 -2
  2. zebra_day/_version.py +1 -0
  3. zebra_day/cli/__init__.py +80 -30
  4. zebra_day/cli/cognito.py +15 -9
  5. zebra_day/cli/gui.py +101 -13
  6. zebra_day/cli/printer.py +34 -27
  7. zebra_day/cli/template.py +19 -15
  8. zebra_day/cmd_mgr.py +3 -6
  9. zebra_day/docs/gx420d-gx430d-ug-en.pdf +0 -0
  10. zebra_day/docs/hardware_config_guide.md +149 -0
  11. zebra_day/docs/programatic_guide.md +181 -0
  12. zebra_day/docs/qln420_zebra_manual.pdf +0 -0
  13. zebra_day/docs/uid_screed_light.md +38 -0
  14. zebra_day/docs/zd620-zd420-ug-en.pdf +0 -0
  15. zebra_day/docs/zebra_day_ui_guide.md +194 -0
  16. zebra_day/etc/printer_config.json +5 -11
  17. zebra_day/etc/printer_config.template.json +5 -11
  18. zebra_day/etc/tmp_printers120.json +10 -0
  19. zebra_day/etc/tmp_printers139.json +10 -0
  20. zebra_day/etc/tmp_printers145.json +10 -0
  21. zebra_day/etc/tmp_printers147.json +10 -0
  22. zebra_day/etc/tmp_printers207.json +10 -0
  23. zebra_day/etc/tmp_printers34.json +10 -0
  24. zebra_day/etc/tmp_printers389.json +10 -0
  25. zebra_day/etc/tmp_printers398.json +10 -0
  26. zebra_day/etc/tmp_printers437.json +10 -0
  27. zebra_day/etc/tmp_printers439.json +10 -0
  28. zebra_day/etc/tmp_printers440.json +10 -0
  29. zebra_day/etc/tmp_printers469.json +10 -0
  30. zebra_day/etc/tmp_printers485.json +10 -0
  31. zebra_day/etc/tmp_printers508.json +10 -0
  32. zebra_day/etc/tmp_printers531.json +10 -0
  33. zebra_day/etc/tmp_printers540.json +10 -0
  34. zebra_day/etc/tmp_printers542.json +10 -0
  35. zebra_day/etc/tmp_printers543.json +10 -0
  36. zebra_day/etc/tmp_printers552.json +10 -0
  37. zebra_day/etc/tmp_printers715.json +10 -0
  38. zebra_day/etc/tmp_printers835.json +10 -0
  39. zebra_day/etc/tmp_printers842.json +10 -0
  40. zebra_day/etc/tmp_printers931.json +10 -0
  41. zebra_day/etc/tmp_printers969.json +10 -0
  42. zebra_day/etc/tmp_printers972.json +10 -0
  43. zebra_day/exceptions.py +1 -1
  44. zebra_day/files/blank_preview.png +0 -0
  45. zebra_day/files/corners_20cmX30cm_preview.png +0 -0
  46. zebra_day/files/corners_smallTube_preview.png +0 -0
  47. zebra_day/files/generic_2inX1in_preview.png +0 -0
  48. zebra_day/files/test_png_12020.png +0 -0
  49. zebra_day/files/test_png_12352.png +0 -0
  50. zebra_day/files/test_png_15472.png +0 -0
  51. zebra_day/files/test_png_24493.png +0 -0
  52. zebra_day/files/test_png_2897.png +0 -0
  53. zebra_day/files/test_png_30069.png +0 -0
  54. zebra_day/files/test_png_31690.png +0 -0
  55. zebra_day/files/test_png_33804.png +0 -0
  56. zebra_day/files/test_png_34737.png +0 -0
  57. zebra_day/files/test_png_4161.png +0 -0
  58. zebra_day/files/test_png_44748.png +0 -0
  59. zebra_day/files/test_png_4635.png +0 -0
  60. zebra_day/files/test_png_47791.png +0 -0
  61. zebra_day/files/test_png_47799.png +0 -0
  62. zebra_day/files/test_png_55588.png +0 -0
  63. zebra_day/files/test_png_56349.png +0 -0
  64. zebra_day/files/test_png_58809.png +0 -0
  65. zebra_day/files/test_png_5936.png +0 -0
  66. zebra_day/files/test_png_64110.png +0 -0
  67. zebra_day/files/test_png_64891.png +0 -0
  68. zebra_day/files/test_png_67242.png +0 -0
  69. zebra_day/files/test_png_69002.png +0 -0
  70. zebra_day/files/test_png_70065.png +0 -0
  71. zebra_day/files/test_png_72366.png +0 -0
  72. zebra_day/files/test_png_77793.png +0 -0
  73. zebra_day/files/test_png_89893.png +0 -0
  74. zebra_day/files/test_png_9572.png +0 -0
  75. zebra_day/files/tube_20mmX30mmA_preview.png +0 -0
  76. zebra_day/imgs/.hold +0 -0
  77. zebra_day/imgs/bar_ltpurp.png +0 -0
  78. zebra_day/imgs/bar_purp.png +0 -0
  79. zebra_day/imgs/bar_purp3.png +0 -0
  80. zebra_day/imgs/bar_red.png +0 -0
  81. zebra_day/imgs/legacy/UBC_gantt_chart.png +0 -0
  82. zebra_day/imgs/legacy/gx420d_network_config.png +0 -0
  83. zebra_day/imgs/legacy/gx420d_printer_config.png +0 -0
  84. zebra_day/imgs/legacy/ngrok.png +0 -0
  85. zebra_day/imgs/legacy/printer_details.png +0 -0
  86. zebra_day/imgs/legacy/quick_start_test_label.png +0 -0
  87. zebra_day/imgs/legacy/quick_start_test_label2.png +0 -0
  88. zebra_day/imgs/legacy/zd620_network_config.png +0 -0
  89. zebra_day/imgs/legacy/zd620_printer_config.png +0 -0
  90. zebra_day/imgs/legacy/zday_quick_gui.png +0 -0
  91. zebra_day/imgs/legacy/zebra_day_alt_css_dog.png +0 -0
  92. zebra_day/imgs/legacy/zebra_day_alt_css_flower.png +0 -0
  93. zebra_day/imgs/legacy/zebra_day_alt_css_main.png +0 -0
  94. zebra_day/imgs/legacy/zebra_day_available_zpl_templates.png +0 -0
  95. zebra_day/imgs/legacy/zebra_day_bkup_pconfig.png +0 -0
  96. zebra_day/imgs/legacy/zebra_day_home.png +0 -0
  97. zebra_day/imgs/legacy/zebra_day_manual_print.png +0 -0
  98. zebra_day/imgs/legacy/zebra_day_printer_fleet_json.png +0 -0
  99. zebra_day/imgs/legacy/zebra_day_quick_ex.png +0 -0
  100. zebra_day/imgs/legacy/zebra_day_zpl_template_IRLa.png +0 -0
  101. zebra_day/imgs/legacy/zebra_day_zpl_template_IRLb.png +0 -0
  102. zebra_day/imgs/ui_api_docs.png +0 -0
  103. zebra_day/imgs/ui_config.png +0 -0
  104. zebra_day/imgs/ui_dashboard.png +0 -0
  105. zebra_day/imgs/ui_print_request.png +0 -0
  106. zebra_day/imgs/ui_printers.png +0 -0
  107. zebra_day/imgs/ui_templates.png +0 -0
  108. zebra_day/logging_config.py +4 -9
  109. zebra_day/mkcert.py +157 -0
  110. zebra_day/paths.py +1 -2
  111. zebra_day/print_mgr.py +261 -185
  112. zebra_day/templates/modern/config.html +7 -0
  113. zebra_day/templates/modern/config_backups.html +59 -0
  114. zebra_day/templates/modern/config_editor.html +95 -0
  115. zebra_day/templates/modern/config_new.html +93 -0
  116. zebra_day/templates/modern/print_request.html +70 -8
  117. zebra_day/templates/modern/printer_detail.html +161 -34
  118. zebra_day/templates/modern/printers.html +17 -6
  119. zebra_day/templates/modern/template_editor.html +7 -4
  120. zebra_day/web/__init__.py +1 -1
  121. zebra_day/web/app.py +99 -17
  122. zebra_day/web/auth.py +17 -15
  123. zebra_day/web/middleware.py +8 -5
  124. zebra_day/web/routers/__init__.py +0 -1
  125. zebra_day/web/routers/api.py +330 -31
  126. zebra_day/web/routers/ui.py +174 -591
  127. zebra_day/zpl_renderer.py +45 -34
  128. {zebra_day-1.0.2.dist-info → zebra_day-2.1.4.dist-info}/METADATA +144 -74
  129. zebra_day-2.1.4.dist-info/RECORD +240 -0
  130. zebra_day/bin/fetch_zebra_config.py +0 -15
  131. zebra_day/bin/generate_coord_grid_zpl.py +0 -50
  132. zebra_day/bin/print_zpl_from_file.py +0 -21
  133. zebra_day/bin/probe_new_label_dimensions.py +0 -75
  134. zebra_day/bin/scan_for_networed_zebra_printers.py +0 -23
  135. zebra_day/bin/scan_for_networed_zebra_printers_arp_scan.sh +0 -1
  136. zebra_day/bin/scan_for_networed_zebra_printers_curl.sh +0 -30
  137. zebra_day/bin/zserve.py +0 -1062
  138. zebra_day/templates/base.html +0 -36
  139. zebra_day/templates/bpr.html +0 -72
  140. zebra_day/templates/build_new_config.html +0 -36
  141. zebra_day/templates/build_print_request.html +0 -32
  142. zebra_day/templates/chg_ui_style.html +0 -19
  143. zebra_day/templates/edit_template.html +0 -128
  144. zebra_day/templates/edit_zpl.html +0 -37
  145. zebra_day/templates/index.html +0 -82
  146. zebra_day/templates/legacy/base.html +0 -37
  147. zebra_day/templates/legacy/bpr.html +0 -72
  148. zebra_day/templates/legacy/build_new_config.html +0 -36
  149. zebra_day/templates/legacy/build_print_request.html +0 -32
  150. zebra_day/templates/legacy/chg_ui_style.html +0 -19
  151. zebra_day/templates/legacy/edit_template.html +0 -128
  152. zebra_day/templates/legacy/edit_zpl.html +0 -37
  153. zebra_day/templates/legacy/index.html +0 -82
  154. zebra_day/templates/legacy/list_prior_configs.html +0 -24
  155. zebra_day/templates/legacy/print_result.html +0 -30
  156. zebra_day/templates/legacy/printer_details.html +0 -25
  157. zebra_day/templates/legacy/printer_status.html +0 -70
  158. zebra_day/templates/legacy/save_result.html +0 -17
  159. zebra_day/templates/legacy/send_print_request.html +0 -34
  160. zebra_day/templates/legacy/simple_print.html +0 -94
  161. zebra_day/templates/legacy/view_pstation_json.html +0 -29
  162. zebra_day/templates/list_prior_configs.html +0 -24
  163. zebra_day/templates/print_result.html +0 -30
  164. zebra_day/templates/printer_details.html +0 -25
  165. zebra_day/templates/printer_status.html +0 -70
  166. zebra_day/templates/save_result.html +0 -17
  167. zebra_day/templates/send_print_request.html +0 -34
  168. zebra_day/templates/simple_print.html +0 -94
  169. zebra_day/templates/view_pstation_json.html +0 -29
  170. zebra_day-1.0.2.dist-info/RECORD +0 -179
  171. {zebra_day-1.0.2.dist-info → zebra_day-2.1.4.dist-info}/WHEEL +0 -0
  172. {zebra_day-1.0.2.dist-info → zebra_day-2.1.4.dist-info}/entry_points.txt +0 -0
  173. {zebra_day-1.0.2.dist-info → zebra_day-2.1.4.dist-info}/licenses/LICENSE +0 -0
  174. {zebra_day-1.0.2.dist-info → zebra_day-2.1.4.dist-info}/top_level.txt +0 -0
@@ -1,128 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h2>Editing: {{ filename }}</h2>
7
- <small>
8
- <a href="/legacy">home</a> ///
9
- <a href="/legacy/edit_zpl">back to label list</a> ///
10
- <a href="https://labelary.com/zpl.html" target="_blank">ZPL intro</a>
11
- </small>
12
- <hr>
13
-
14
- <table border="1" width="100%">
15
- <tr>
16
- <td style="vertical-align: top; width: 40%;">
17
- <form method="post" action="/legacy/save" id="textForm">
18
- <textarea name="content" rows="26" cols="45">{{ content }}</textarea>
19
- <br>
20
- <input type="hidden" name="filename" value="{{ filename }}">
21
- <br>
22
- <label>TMP File Tag:</label>
23
- <input style="width: 100px;" type="text" name="ftag" value="na">
24
- <br><br>
25
- <input type="submit" value="Save Draft">
26
- <input type="button" value="Render PNG" onclick="submitToPNGrenderer();">
27
-
28
- <hr>
29
- <h3>Print IRL:</h3>
30
- <select id="labsDropdown" name="lab" onchange="populatePrinters()">
31
- <option value="">Select Lab</option>
32
- {% for lab in labs %}
33
- <option value="{{ lab }}">{{ lab }}</option>
34
- {% endfor %}
35
- </select>
36
- <select id="printersDropdown" name="printer">
37
- <option value="">Select Printer</option>
38
- </select>
39
- <br><br>
40
- <input type="button" value="Print with format keys" onclick="submitToRealPrint();">
41
- <input type="button" value="Print with data" onclick="submitToLocPrint();">
42
- </form>
43
- </td>
44
- <td style="vertical-align: top; width: 60%;">
45
- <div id="pngContainer" style="text-align: center;">
46
- <p><em>Click "Render PNG" to preview label</em></p>
47
- </div>
48
- <hr>
49
- <h3>Format Keys</h3>
50
- <p>Use these placeholders in your ZPL template:</p>
51
- <ul>
52
- <li><code>{uid_barcode}</code> - UID for barcode</li>
53
- <li><code>{alt_a}</code> through <code>{alt_f}</code> - Additional fields</li>
54
- </ul>
55
- </td>
56
- </tr>
57
- </table>
58
- {% endblock %}
59
-
60
- {% block extra_scripts %}
61
- <script>
62
- var labs = {{ labs_dict | safe }};
63
-
64
- function populatePrinters() {
65
- var lab = document.getElementById("labsDropdown").value;
66
- var printersDropdown = document.getElementById("printersDropdown");
67
- printersDropdown.innerHTML = '<option value="">Select Printer</option>';
68
-
69
- if (lab && labs[lab]) {
70
- for (var printer in labs[lab]) {
71
- var option = document.createElement("option");
72
- option.text = printer;
73
- option.value = printer;
74
- printersDropdown.add(option);
75
- }
76
- }
77
- }
78
-
79
- function submitToLocPrint() {
80
- var form = document.getElementById('textForm');
81
- form.action = '/legacy/build_print_request';
82
- form.submit();
83
- }
84
-
85
- function submitToRealPrint() {
86
- var form = document.getElementById('textForm');
87
- var formData = new FormData(form);
88
-
89
- fetch('/legacy/build_and_send_raw_print_request', {
90
- method: 'POST',
91
- body: formData
92
- })
93
- .then(response => response.json())
94
- .then(data => {
95
- console.log('Print request sent:', data);
96
- alert('Print request sent!');
97
- })
98
- .catch(error => {
99
- console.error('Error:', error);
100
- });
101
- }
102
-
103
- function submitToPNGrenderer() {
104
- var form = document.getElementById('textForm');
105
- var formData = new FormData(form);
106
-
107
- fetch('/legacy/png_renderer', {
108
- method: 'POST',
109
- body: formData
110
- })
111
- .then(response => response.text())
112
- .then(pngPath => {
113
- const pngImage = document.createElement('img');
114
- pngImage.src = pngPath;
115
- pngImage.style.maxWidth = '100%';
116
- const container = document.getElementById('pngContainer');
117
- container.innerHTML = '';
118
- container.appendChild(pngImage);
119
- })
120
- .catch(error => {
121
- console.error('Error:', error);
122
- });
123
-
124
- event.preventDefault();
125
- }
126
- </script>
127
- {% endblock %}
128
-
@@ -1,37 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Edit ZPL Templates</h1>
7
- <ul>
8
- <small><a href="/legacy">home</a></small>
9
- <hr>
10
-
11
- <p>To specify a template to use (via the programmatic API or the GUI), use the file name string (not including the path prefix) and remove the trailing '.zpl'.</p>
12
- <p>Example: <b>tube_2inX1in</b></p>
13
-
14
- <hr>
15
-
16
- <h2>Stable ZPL Templates</h2>
17
- <ul>
18
- {% for template in stable_templates %}
19
- <li><a href="/legacy/edit?filename={{ template }}">{{ template }}</a></li>
20
- {% else %}
21
- <li>No stable templates found</li>
22
- {% endfor %}
23
- </ul>
24
-
25
- <hr>
26
-
27
- <h2>Draft ZPL Templates</h2>
28
- <ul>
29
- {% for template in draft_templates %}
30
- <li><a href="/legacy/edit?dtype=tmps&filename={{ template }}">{{ template }}</a></li>
31
- {% else %}
32
- <li>No draft templates found</li>
33
- {% endfor %}
34
- </ul>
35
- </ul>
36
- {% endblock %}
37
-
@@ -1,82 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Daylily Zebra Printer And Print Request Manager (Legacy)</h1>
7
- <ul>
8
- <small>IP address detected: {{ local_ip }}</small>
9
- <hr>
10
-
11
- <h2>Zebra Printer Fleet Status, By Site</h2>
12
- <ul>
13
- <p>Detected sites:</p>
14
- <ul>
15
- {% for lab in labs %}
16
- <li><a href="/legacy/printer_status?lab={{ lab }}">{{ lab }} Zebra Printer Status</a></li>
17
- {% else %}
18
- <li>No labs found. Try scanning and resetting printers.json</li>
19
- {% endfor %}
20
- </ul>
21
- </ul>
22
- <hr>
23
-
24
- <h2>Print Labels Manually</h2>
25
- <ul>
26
- <p>This tool is meant for infrequent use. The intention of zebra_day is to be used to create more fully featured tools/systems.</p>
27
- <ul>
28
- <li><a href="/legacy/simple_print_request">Print labels manually</a></li>
29
- </ul>
30
- </ul>
31
- <hr>
32
-
33
- <h2>Zebra Printer JSON Config</h2>
34
- <ul>
35
- <p>This JSON file defines the zebra printers available to the package.</p>
36
- <ul>
37
- <li><a href="/legacy/view_pstation_json">View and edit JSON</a></li>
38
- <li><a href="/legacy/list_prior_printer_config_files">View backed up config files</a></li>
39
- <li><a href="/legacy/build_new_printers_config_json">Build a new printers config JSON</a></li>
40
- </ul>
41
- </ul>
42
- <hr>
43
-
44
- <h2>Send Print Requests</h2>
45
- <ul>
46
- <p>To accessible zebra printers:</p>
47
- <ul>
48
- <li><a href="/legacy/bpr">Select lab + printer + label style</a></li>
49
- <li><a href="/legacy/send_print_request">Same as above, but only stable label templates</a></li>
50
- </ul>
51
- </ul>
52
- <hr>
53
-
54
- <h2>Edit Label Templates</h2>
55
- <ul>
56
- <p>Modify existing templates, create new templates, preview changes & test print new designs.</p>
57
- <ul>
58
- <li><a href="/legacy/edit_zpl">Edit ZPL files</a></li>
59
- </ul>
60
- </ul>
61
- <hr>
62
-
63
- <h2>API Documentation</h2>
64
- <ul>
65
- <ul>
66
- <li><a href="/docs">OpenAPI Documentation (Swagger UI)</a></li>
67
- <li><a href="/redoc">ReDoc Documentation</a></li>
68
- </ul>
69
- </ul>
70
- <hr>
71
-
72
- <h2>GitHub Docs</h2>
73
- <ul>
74
- <small>
75
- <li><a href="https://github.com/Daylily-Informatics/zebra_day">zebra_day</a></li>
76
- <li><a href="https://github.com/Daylily-Informatics/fedex_tracking_day">fedex_tracking_day</a></li>
77
- <li><a href="https://github.com/Daylily-Informatics/yaml_config_day">yaml_config_day</a></li>
78
- </small>
79
- </ul>
80
- </ul>
81
- {% endblock %}
82
-
@@ -1,24 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Saved Printer Config JSON Files</h1>
7
- <small><a href="/legacy">home</a></small>
8
- <hr>
9
-
10
- <p>If you wish to restore from one of these files, download the one you'd like, open in a text editor,
11
- then copy the contents of the file into <a href="/legacy/view_pstation_json">the printers json editing form</a>
12
- and save a new json file.</p>
13
- <small><i>Note: the existing file will have a backup created and accessible here</i></small>
14
-
15
- <hr>
16
- <ul>
17
- {% for file in backup_files %}
18
- <li><a href="/etc/old_printer_config/{{ file }}">{{ file }}</a></li>
19
- {% else %}
20
- <li>No backup files found</li>
21
- {% endfor %}
22
- </ul>
23
- {% endblock %}
24
-
@@ -1,30 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Label Print Request Sent</h1>
7
- <small><a href="/legacy">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="/legacy">Home</a>
29
- {% endblock %}
30
-
@@ -1,25 +0,0 @@
1
- {% extends "legacy/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="/legacy">HOME</a> ... <a href="/legacy/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
-
@@ -1,70 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Printer Status Summary For {{ lab }}</h1>
7
- <small><a href="/legacy">BACK HOME</a></small>
8
- <ul>
9
- <hr>
10
- <br>
11
- <table border="1">
12
- <tr>
13
- <th>Printer Name</th>
14
- <th>Printer IP</th>
15
- <th>Label Styles Available</th>
16
- <th>Status on Network</th>
17
- </tr>
18
- {% for printer in printers %}
19
- <tr>
20
- <td>
21
- {{ printer.name }}<br>
22
- <small>{{ printer.model }}<br>{{ printer.serial }}</small>
23
- </td>
24
- <td>
25
- {% if printer.ip_address != 'dl_png' %}
26
- <a href="http://{{ printer.ip_address }}" target="_blank">{{ printer.ip_address }}</a>
27
- {% else %}
28
- {{ printer.ip_address }}
29
- {% endif %}
30
- <br><small>{{ printer.arp_data }}</small>
31
- </td>
32
- <td>
33
- {% for style in printer.label_zpl_styles %}
34
- <small>
35
- <a href="/legacy/edit_zpl">{{ style }}</a>
36
- (<a href="/legacy/_print_label?lab={{ lab }}&printer={{ printer.name }}&label_zpl_style={{ style }}&uid_barcode={{ printer.ip_address }}&alt_a={{ printer.model }}&alt_b={{ printer.serial }}&alt_c={{ lab }}&alt_d={{ lab }}" target="_blank">test</a>)
37
- </small><br>
38
- {% endfor %}
39
- </td>
40
- <td>
41
- {{ printer.status }}
42
- <br><small><a href="/legacy/printer_details?printer_name={{ printer.name }}&lab={{ lab }}" target="_blank">...printer details</a></small>
43
- </td>
44
- </tr>
45
- {% endfor %}
46
- </table>
47
- </ul>
48
-
49
- <br><hr>
50
- <h2>Build New Printers Config JSON // Scan Network</h2>
51
- <ul>
52
- <p>This will probe for printers, and with all discovered printers will create a new printers JSON and overwrite the current fleet data for this lab.</p>
53
- <form id="myForm" action="/legacy/probe_zebra_printers_add_to_printers_json">
54
- <label>Enter IP Root To Scan:</label>
55
- <input type="text" value="{{ ip_root }}" name="ip_stub">
56
- <br>
57
- <label>Select (or enter new) lab:</label>
58
- <input type="text" name="lab" list="lab_names" value="{{ lab }}">
59
- <datalist id="lab_names">
60
- {% for lab_name in labs %}
61
- <option value="{{ lab_name }}">{{ lab_name }}</option>
62
- {% endfor %}
63
- </datalist>
64
- <br>
65
- <input type="submit" value="Scan Network">
66
- </form>
67
- <small><a href="/legacy/list_prior_printer_config_files">The current printers JSON will be backed up and can be found here.</a></small>
68
- </ul>
69
- {% endblock %}
70
-
@@ -1,17 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Template Saved</h1>
7
- <small><a href="/legacy">home</a></small>
8
- <hr>
9
-
10
- <p>Changes saved to temp file: <strong>{{ new_filename }}</strong></p>
11
-
12
- <ul>
13
- <li><a href="/legacy/edit_zpl">Go back to the ZPL file list</a></li>
14
- <li><a href="/legacy">Go home</a></li>
15
- </ul>
16
- {% endblock %}
17
-
@@ -1,34 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Send Print Request</h1>
7
- <small><a href="/legacy">home</a></small>
8
- <hr>
9
-
10
- {% for lab_name, printers in labs.items() %}
11
- <h2>Lab: {{ lab_name }}</h2>
12
- <table border="1" width="90%">
13
- <tr>
14
- <th>Printer</th>
15
- <th>Available Label Styles</th>
16
- </tr>
17
- {% for printer_name, printer_info in printers.items() %}
18
- <tr>
19
- <td>
20
- <strong>{{ printer_name }}</strong><br>
21
- <small>{{ printer_info.ip_address }}</small>
22
- </td>
23
- <td>
24
- {% for style in printer_info.label_zpl_styles %}
25
- <a href="/legacy/build_print_request?lab={{ lab_name }}&printer={{ printer_name }}&printer_ip={{ printer_info.ip_address }}&label_zpl_style={{ style }}">{{ style }}</a><br>
26
- {% endfor %}
27
- </td>
28
- </tr>
29
- {% endfor %}
30
- </table>
31
- <br>
32
- {% endfor %}
33
- {% endblock %}
34
-
@@ -1,94 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Send Label Print Request</h1>
7
- <ul>
8
- <small><a href="/legacy">home</a></small>
9
- <hr>
10
-
11
- <form id="myForm" action="/legacy/_print_label" method="get">
12
- <ul>
13
- <li>
14
- <label>UID for Barcode:</label>
15
- <input type="text" name="uid_barcode">
16
- </li>
17
- <li>
18
- <label>ALT-A:</label>
19
- <input type="text" name="alt_a">
20
- </li>
21
- <li>
22
- <label>ALT-B:</label>
23
- <input type="text" name="alt_b">
24
- </li>
25
- <li>
26
- <label>ALT-C:</label>
27
- <input type="text" name="alt_c">
28
- </li>
29
- <li>
30
- <label>ALT-D:</label>
31
- <input type="text" name="alt_d">
32
- </li>
33
- <li>
34
- <label>ALT-E:</label>
35
- <input type="text" name="alt_e">
36
- </li>
37
- <li>
38
- <label>ALT-F:</label>
39
- <input type="text" name="alt_f">
40
- </li>
41
- <li>
42
- <label>Select Lab:</label>
43
- <select id="labSelect" name="lab" onchange="updatePrinters()">
44
- <option value="">Select a Lab</option>
45
- {% for lab in labs %}
46
- <option value="{{ lab }}">{{ lab }}</option>
47
- {% endfor %}
48
- </select>
49
- </li>
50
- <li>
51
- <label>Select Printer:</label>
52
- <select id="printerSelect" name="printer">
53
- <option value="">Select a Printer</option>
54
- </select>
55
- </li>
56
- <li>
57
- <label>Label ZPL Style:</label>
58
- <select name="label_zpl_style">
59
- {% for template in templates %}
60
- <option value="{{ template }}">{{ template }}</option>
61
- {% endfor %}
62
- </select>
63
- </li>
64
- </ul>
65
- <br>
66
- <input type="submit" value="Print Label">
67
- </form>
68
- </ul>
69
- {% endblock %}
70
-
71
- {% block extra_scripts %}
72
- <script>
73
- var labsAndPrinters = {{ labs_and_printers | safe }};
74
-
75
- function updatePrinters() {
76
- var labSelect = document.getElementById('labSelect');
77
- var printerSelect = document.getElementById('printerSelect');
78
- var selectedLab = labSelect.value;
79
-
80
- // Clear current printer options
81
- printerSelect.innerHTML = '<option value="">Select a Printer</option>';
82
-
83
- if (selectedLab in labsAndPrinters) {
84
- labsAndPrinters[selectedLab].forEach(function(printer) {
85
- var option = document.createElement('option');
86
- option.value = printer;
87
- option.text = printer;
88
- printerSelect.appendChild(option);
89
- });
90
- }
91
- }
92
- </script>
93
- {% endblock %}
94
-
@@ -1,29 +0,0 @@
1
- {% extends "legacy/base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>View and Edit Printer Config JSON</h1>
7
- <small><a href="/legacy">home</a></small>
8
- <hr>
9
-
10
- {% if error_msg %}
11
- <p style="color: red; font-weight: bold;">{{ error_msg }}</p>
12
- {% endif %}
13
-
14
- <form action="/legacy/save_pstation_json" method="post">
15
- <textarea name="json_data" rows="45" cols="80">{{ config_data }}</textarea>
16
- <br>
17
- <input type="submit" value="Save New Printers Config JSON & Make Active">
18
- </form>
19
-
20
- <hr>
21
- <ul>
22
- <li><a href="/legacy/list_prior_printer_config_files">View backed up printers JSON config files</a></li>
23
- <hr>
24
- <li><a href="/legacy/reset_pstation_json">Restore Printer Settings From Default JSON (THIS WILL DELETE YOUR CURRENT FILE!)</a></li>
25
- <hr>
26
- <li><a href="/legacy/clear_printers_json">CLEAR contents of current printers.json file (This Cannot Be Undone)</a></li>
27
- </ul>
28
- {% endblock %}
29
-
@@ -1,24 +0,0 @@
1
- {% extends "base.html" %}
2
-
3
- {% block title %}{{ title }}{% endblock %}
4
-
5
- {% block content %}
6
- <h1>Saved Printer Config JSON Files</h1>
7
- <small><a href="/">home</a></small>
8
- <hr>
9
-
10
- <p>If you wish to restore from one of these files, download the one you'd like, open in a text editor,
11
- then copy the contents of the file into <a href="/view_pstation_json">the printers json editing form</a>
12
- and save a new json file.</p>
13
- <small><i>Note: the existing file will have a backup created and accessible here</i></small>
14
-
15
- <hr>
16
- <ul>
17
- {% for file in backup_files %}
18
- <li><a href="/etc/old_printer_config/{{ file }}">{{ file }}</a></li>
19
- {% else %}
20
- <li>No backup files found</li>
21
- {% endfor %}
22
- </ul>
23
- {% endblock %}
24
-
@@ -1,30 +0,0 @@
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
-
@@ -1,25 +0,0 @@
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
-