mirror of
https://github.com/unraid/webgui.git
synced 2026-01-29 21:19:07 -06:00
Merge pull request #166 from bergware/6.4-wip
Include transition phases "Array Starting / Array Stopping" in footer
This commit is contained in:
@@ -40,11 +40,9 @@ var ask2 = <?=$confirm['down'] ? 'true' : 'false'?>;
|
||||
var ctrl = "<span class='status'><a style='cursor:pointer' class='tooltip_diskio' title='Toggle reads/writes display' onclick='toggle_diskio();return false'><i class='toggle fa'></i></a></span>";
|
||||
|
||||
function verify(form) {
|
||||
swal({title:'Found wrong encryption key',text:'Format unmountable disk(s) and ERASE ALL data?',type:'warning',showCancelButton:true},function(p){
|
||||
if (p) {
|
||||
$(form).append('<input type="hidden" name="cmdFormat" value="Format">');
|
||||
form.submit();
|
||||
}
|
||||
swal({title:'Found wrong encryption key',text:'Format unmountable disk(s) and ERASE ALL data?',type:'warning',showCancelButton:true},function(){
|
||||
$(form).append('<input type="hidden" name="cmdFormat" value="Format">');
|
||||
form.submit();
|
||||
});
|
||||
}
|
||||
function tab0() {
|
||||
|
||||
@@ -513,14 +513,16 @@ $(function() {
|
||||
var watchdog = new NchanSubscriber('/sub/var');
|
||||
watchdog.on('message', function(data){
|
||||
var ini=parseINI(data);
|
||||
var progress=ini['fsProgress'];
|
||||
var status;
|
||||
if (ini['fsProgress']) {
|
||||
var flux=$.cookie('flux')||(ini['fsProgress'].search(/^Mount/)==0 ? 'Starting' : (ini['fsProgress'].search(/^Spin/)==0 ? 'Stopping' : null));
|
||||
if (progress) {
|
||||
var flux=$.cookie('flux')||(progress.search(/^(Open|Mount)/)==0 ? 'Starting' : (progress.search(/^Spin/)==0 ? 'Stopping' : null));
|
||||
if ($.cookie('flux')==null && flux) $.cookie('flux',flux);
|
||||
if (flux) {
|
||||
if (flux && progress.search(/^Fail/)==-1) {
|
||||
status="<span class='orange strong'>Array "+flux+"</span>•<span class='blue strong'>"+ini['fsProgress']+"</span>";
|
||||
} else {
|
||||
status=(ini['fsState']=="Stopped" ? "<span class='red strong'>Array Stopped</span>" : "<span class='green strong'>Array Started</span>")+"•<span class='orange strong'>"+ini['fsProgress']+"</span>";
|
||||
$.removeCookie('flux');
|
||||
}
|
||||
} else if (ini['fsState']=="Stopped") {
|
||||
status=$.cookie('flux')=="Starting" ? "<span class='green strong'>Array Started</span>" : "<span class='red strong'>Array Stopped</span>";
|
||||
|
||||
Reference in New Issue
Block a user