From 77aecca4f5a437324c8f06eaf8382366f24d38e7 Mon Sep 17 00:00:00 2001 From: ntoff Date: Thu, 20 Apr 2017 01:36:10 +1000 Subject: [PATCH] attempt software update check testing testing is this thing on --- octoprint_estop/__init__.py | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/octoprint_estop/__init__.py b/octoprint_estop/__init__.py index 70615c3..efc1669 100644 --- a/octoprint_estop/__init__.py +++ b/octoprint_estop/__init__.py @@ -13,10 +13,33 @@ class EstopPlugin(octoprint.plugin.AssetPlugin, ) def get_template_configs(self): return [ - dict(type="sidebar", name="Emergency STOP!", icon="fa fa-times", template="estop_sidebar.jinja2", styles=["display: none"], data_bind="visible: loginState.isUser") + dict(type="sidebar", name="Emergency STOP!", icon="fa icon-print", template="estop_sidebar.jinja2", styles=["display: none"], data_bind="visible: loginState.isUser") ] - -__plugin_name__ = "Emergency Stop Button" -__plugin_implementation__ = EstopPlugin() + + def get_update_information(self): + + return dict( + skeleton=dict( + displayName="Emergency Stop Button", + displayVersion=self._plugin_version, - \ No newline at end of file + # version check: github repository + type="github_release", + user="ntoff", + repo="OctoPrint-Estop", + current=self._plugin_version, + + # update method: pip + pip="https://github.com/ntoff/OctoPrint-Estop/archive/{target_version}.zip" + ) + ) +__plugin_name__ = "Emergency Stop Button" + +def __plugin_load__(): + global __plugin_implementation__ + __plugin_implementation__ = __plugin_implementation__ = EstopPlugin() + + global __plugin_hooks__ + __plugin_hooks__ = { + "octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information + } \ No newline at end of file