Add restart button to running addons

https://www.pivotaltracker.com/story/show/145295371
This commit is contained in:
Paulus Schoutsen 2017-05-11 21:05:32 -07:00
parent 031e2af311
commit 95b2fa0ad3

View File

@ -51,6 +51,11 @@
>Start</ha-call-api-button>
</template>
<template is='dom-if' if='[[isRunning]]'>
<ha-call-api-button
class='warning'
hass='[[hass]]'
path="[[pathRestart(addon)]]"
>Restart</ha-call-api-button>
<ha-call-api-button
class='warning'
hass='[[hass]]'
@ -119,6 +124,10 @@ Polymer({
return 'hassio/addons/' + addon + '/stop';
},
pathRestart: function (addon) {
return 'hassio/addons/' + addon + '/restart';
},
pathInstall: function (addon) {
return 'hassio/addons/' + addon + '/install';
},