Skip to content

Commit 234893c

Browse files
committed
Preparation of 1.17.0 release
- B #154 report link in new tab - B #194 webcam_rotator id - B reset capture-button before opening a single print job
1 parent 10fc5ee commit 234893c

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def get_createSinglePrintJobReport(self, databaseId):
762762
@octoprint.plugin.BlueprintPlugin.route("/multiPrintJobReport", methods=["GET"])
763763
def get_createMultiPrintJobReport(self):
764764

765-
tableQuery = flask.request.values
765+
tableQuery = flask.request.values.to_dict()
766766
allPrintJobModels = []
767767
if ("sample" in tableQuery):
768768
allPrintJobModels = self._createSamplePrintModels()

octoprint_PrintJobHistory/static/js/PrintJobHistory-EditJobDialog.js

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ function PrintJobHistoryEditDialog(){
226226
self.shouldPrintJobTableReload = false;
227227
// TODO Wieso this statt self????
228228
_setSnapshotImageSource(self.apiClient.getSnapshotUrl(printJobItemForEdit.snapshotFilename()));
229+
self.captureButtonText.text(reCaptureText);
229230

230231
// reset message
231232
self.snapshotSuccessMessageSpan.hide();

octoprint_PrintJobHistory/static/js/PrintJobHistory.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -659,13 +659,17 @@ $(function() {
659659
window.open(self.apiClient.callCreateSingleReportUrl("sample"), '_blank').focus();
660660
}
661661
}
662-
self.reportMultiPrintJobItem = function() {
662+
self.reportMultiPrintJobItem = function(reportAll) {
663663
var tableQuery = null;
664-
var selectedTableItems = self.printJobHistoryTableHelper.selectedTableItems();
665-
if (selectedTableItems.length > 0){
666-
tableQuery = "databaseIds="+ self.selectedDatabaseIdsAsCSV
667-
} else {
664+
if ("all" == reportAll) {
668665
tableQuery = self.printJobHistoryTableHelper.getTableQuery();
666+
} else {
667+
var selectedTableItems = self.printJobHistoryTableHelper.selectedTableItems();
668+
if (selectedTableItems.length > 0){
669+
tableQuery = "databaseIds="+ self.selectedDatabaseIdsAsCSV
670+
} else {
671+
tableQuery = self.printJobHistoryTableHelper.getTableQuery();
672+
}
669673
}
670674
return self.apiClient.callCreateMultiReportUrl(tableQuery);
671675
}

octoprint_PrintJobHistory/templates/PrintJobHistory_tab.jinja2

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626

2727
<div>
28-
<a href="#" target="_blank" data-bind="attr: {href: $root.reportMultiPrintJobItem()}"> <i class="icon-print"></i> Report</a>
29-
<span data-bind="visible: printJobHistoryTableHelper.selectedTableItems().length > 0">| <a href="#" data-bind="attr: {href: $root.reportMultiPrintJobItem()}"> only selected (<span data-bind="text: printJobHistoryTableHelper.selectedTableItems().length"></span>)</a> </span>
28+
<a href="#" target="_blank" data-bind="attr: {href: $root.reportMultiPrintJobItem('all')}"> <i class="icon-print"></i> Report</a>
29+
<span data-bind="visible: printJobHistoryTableHelper.selectedTableItems().length > 0">| <a href="#" target="_blank" data-bind="attr: {href: $root.reportMultiPrintJobItem()}"> only selected (<span data-bind="text: printJobHistoryTableHelper.selectedTableItems().length"></span>)</a> </span>
3030
</div>
3131

3232

octoprint_PrintJobHistory/templates/PrintJobHistory_tab_dialogs.jinja2

+1-3
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,7 @@
453453
</div>
454454
</div>
455455
<!-- END WEBCAM LOADER -->
456-
457-
458-
<div id="webcam_rotator" data-bind="visible: printJobEditDialog.imageDisplayMode()!='videoStreamLoading' && printJobEditDialog.imageDisplayMode()!='videoStreamError', css: { webcam_rotated: printJobEditDialog.webCamSettings.rotate90(), webcam_unrotated: !printJobEditDialog.webCamSettings.rotate90() }">
456+
<div id="printjobhistory_webcam_rotator" data-bind="visible: printJobEditDialog.imageDisplayMode()!='videoStreamLoading' && printJobEditDialog.imageDisplayMode()!='videoStreamError', css: { webcam_rotated: printJobEditDialog.webCamSettings.rotate90(), webcam_unrotated: !printJobEditDialog.webCamSettings.rotate90() }">
459457
<div class="webcam_fixed_ratio" data-bind="css: printJobEditDialog.webcamRatioClass">
460458
<div class="webcam_fixed_ratio_inner">
461459
<!--

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "Print Job History"
1515

1616
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17-
plugin_version = "1.17.0.dev1"
17+
plugin_version = "1.17.0.dev2"
1818

1919
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
2020
# module

0 commit comments

Comments
 (0)