Start & unblock all buttons
This commit is contained in:
parent
a264ceee51
commit
163b4821f3
2 changed files with 24 additions and 1 deletions
|
@ -32,6 +32,11 @@
|
||||||
<span :id="'change-lang-' + lang.code" class='switch btn lang--btn' @click="changeLanguageForAvailable(lang.code)">Switch free</span>
|
<span :id="'change-lang-' + lang.code" class='switch btn lang--btn' @click="changeLanguageForAvailable(lang.code)">Switch free</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div class='hvactions'>
|
||||||
|
<span class='btn' id='unblock-all' @click="unblockAll">Unblock all</span>
|
||||||
|
<span class='btn' id='start-all' @click="startAll">Start all</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class='hugvey' v-for="hv in hugveys"
|
<div class='hugvey' v-for="hv in hugveys"
|
||||||
|
|
|
@ -86,7 +86,25 @@ class Panopticon {
|
||||||
panopticon.hugveys.logbook = [];
|
panopticon.hugveys.logbook = [];
|
||||||
panopticon.hugveys.logbookId = null;
|
panopticon.hugveys.logbookId = null;
|
||||||
panopticon.updateSelectedHugvey();
|
panopticon.updateSelectedHugvey();
|
||||||
}
|
},
|
||||||
|
unblockAll: function(){
|
||||||
|
for(let hv of panopticon.hugveys.hugveys) {
|
||||||
|
console.log(hv, this);
|
||||||
|
if(hv.status == 'blocked') {
|
||||||
|
hv.status = "loading";
|
||||||
|
return panopticon.unblock(hv.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
startAll: function(){
|
||||||
|
for(let hv of panopticon.hugveys.hugveys) {
|
||||||
|
console.log(hv, this);
|
||||||
|
if(hv.status == 'available') {
|
||||||
|
hv.status = "loading";
|
||||||
|
return panopticon.restart(hv.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue