Skip to content

Commit e38f79d

Browse files
committed
work on windows shutdown
1 parent 1d654cb commit e38f79d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

WebPageProcessor/webPageProcessor.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ def createWebPage(self, pageID, isMobile, args):
241241
enableHoley = False
242242
else:
243243
enableHoley = True
244-
page = render_template("actions.html", customFirmwareVersion=self.data.customFirmwareVersion, stockFirmwareVersion=self.data.stockFirmwareVersion, holeyFirmwareVersion=self.data.holeyFirmwareVersion, enableCustom=enableCustom, enableHoley=enableHoley)
244+
if self.data.platform == "RPI":
245+
docker = True
246+
else:
247+
docker = False
248+
page = render_template("actions.html", docker=docker, customFirmwareVersion=self.data.customFirmwareVersion, stockFirmwareVersion=self.data.stockFirmwareVersion, holeyFirmwareVersion=self.data.holeyFirmwareVersion, enableCustom=enableCustom, enableHoley=enableHoley)
245249
return page, "Actions", False, "large", "content", False
246250
elif pageID == "zAxis":
247251
socketio.emit("closeModals", {"data": {"title": "Actions"}}, namespace="/MaslowCNC")

templates/actions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h4 class="card-title">Diagnostics</h4>
2222
<button type="button" class="btn btn-lg btn-block btn-secondary" onclick="action('queryCamera');$('#contentModal').modal('hide');">Query Camera</button>
2323
<a class="btn btn-lg btn-block btn-secondary" href="downloadDiagnostics?rnd=1" onClick="this.href=this.href.split('?')[0]+'?rnd='+new Date().getTime()" target="_blank">Download Diagnostics File</a>
2424
<button type="button" class="btn btn-lg btn-block btn-secondary" onclick="action('clearLogs');$('#contentModal').modal('hide');">Clear Log Files</button>
25-
<button type="button" class="btn btn-lg btn-block btn-danger" onclick="action('shutdown');$('#contentModal').modal('hide');">Shutdown WebControl/WebMCP</button>
25+
<button type="button" class="btn btn-lg btn-block btn-danger" onclick="action('shutdown');$('#contentModal').modal('hide');">{{'Shutdown WebControl/WebMCP' if docker else 'Shutdown WebControl'}}</button>
2626
</div>
2727
</div>
2828
</div>

0 commit comments

Comments
 (0)