From 43d8da036a820d6cc978c8520e31d0a4e24bda42 Mon Sep 17 00:00:00 2001 From: Cat Date: Tue, 9 May 2017 16:27:26 +0200 Subject: [PATCH] LSP: fixes on Overview --- lsp/minified.js | 4 ++-- lsp/mist.js | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lsp/minified.js b/lsp/minified.js index 34b8f6c1..9c79ee8c 100644 --- a/lsp/minified.js +++ b/lsp/minified.js @@ -76,11 +76,11 @@ type:"password",validate:["required",function(a,c){return a!=$(".match_password" delete mist.user.rawpassword}}]}]));break;case "Account created":UI.elements.menu.addClass("hide");d.append($("

").text("Your account has been created succesfully.")).append(UI.buildUI([{type:"text",text:"Would you like to enable all (currently) available protocols with their default settings?"},{type:"buttons",buttons:[{label:"Enable protocols",type:"save","function":function(){if(mist.data.config.protocols)d.append("Unable to enable all protocols as protocol settings already exist.
");else{d.append("Retrieving available protocols..
"); mist.send(function(a){var c=[],b;for(b in a.capabilities.connectors)if(a.capabilities.connectors[b].required)d.append('Could not enable protocol "'+b+'" because it has required settings.
');else{c.push({connector:b});d.append('Enabled protocol "'+b+'".
')}d.append("Saving protocol settings..
");mist.send(function(){d.append("Protocols enabled. Redirecting..");setTimeout(function(){UI.navto("Overview")},5E3)},{config:{protocols:c}})},{capabilities:true})}}},{label:"Skip",type:"cancel","function":function(){UI.navto("Overview")}}]}])); break;case "Overview":var h=$("").text("Loading.."),q=$(""),p=$("").addClass("logs"),l=$(""),t=$(""),f=$("").text("Unknown"),i=$(""),j=$("");d.append(UI.buildUI([{type:"help",help:"You can find most basic information about your MistServer here.
You can also set the debug level and force a save to the config.json file that MistServer uses to save your settings. "},{type:"span",label:"Version",pointer:{main:mist.data.config,index:"version"}},{type:"span", -label:"Version check",value:h,LTSonly:!0},{type:"span",label:"Server time",value:t},{type:"span",label:"Licensed to","default":"unknown",pointer:{main:mist.data.config.license,index:"user"},LTSonly:!0},{type:"span",label:"Active products",value:f,LTSonly:!0},{type:"span",label:"Configured streams",value:mist.data.streams?Object.keys(mist.data.streams).length:0},{type:"span",label:"Active streams",value:q},{type:"span",label:"Current connections",value:l},{type:"span",label:"Enabled protocols",value:i}, +label:"Version check",value:h,LTSonly:!0},{type:"span",label:"Server time",value:t},{type:"span",label:"Licensed to",value:"license"in mist.data.config?mist.data.config.license.name:"",LTSonly:!0},{type:"span",label:"Active products",value:f,LTSonly:!0},{type:"span",label:"Configured streams",value:mist.data.streams?Object.keys(mist.data.streams).length:0},{type:"span",label:"Active streams",value:q},{type:"span",label:"Current connections",value:l},{type:"span",label:"Enabled protocols",value:i}, {type:"span",label:"Disabled protocols",value:j},{type:"span",label:"Recent problems",value:p},$("
"),{type:"str",label:"Human readable name",pointer:{main:mist.data.config,index:"name"},help:"You can name your MistServer here for personal use. You'll still need to set host name within your network yourself."},{type:"debug",label:"Debug level",pointer:{main:mist.data.config,index:"debug"},help:"You can set the amount of debug information MistServer saves in the log. A full reboot of MistServer is required before some components of MistServer can post debug information."}, {type:"checkbox",label:"Force configurations save",pointer:{main:mist.data,index:"save"},help:"Tick the box in order to force an immediate save to the config.json MistServer uses to save your settings. Saving will otherwise happen upon closing MistServer. Don't forget to press save after ticking the box."},{type:"buttons",buttons:[{type:"save",label:"Save","function":function(){var a={config:mist.data.config};if(mist.data.save)a.save=mist.data.save;mist.send(function(){UI.navto("Overview")},a)}}]}])); if(mist.data.LTS){var k=function(a){function c(a){if(a.update){var b="";"progress"in a.update&&(b=" ("+a.update.progress+"%)");h.text("Updating.."+b);setTimeout(function(){mist.send(function(a){c(a)},{update:true})},5E3)}else UI.showTab("Overview")}if(!a.update||!("uptodate"in a.update)){h.text("Unknown, checking..");setTimeout(function(){mist.send(function(a){k(a)},{checkupdate:true})},5E3)}else if(a.update.error)h.addClass("red").text(a.update.error);else if(a.update.uptodate)h.text("Your version is up to date.").addClass("green"); -else if(a.update.progress){h.addClass("orange").removeClass("red").text("Updating..");c(a)}else h.addClass("red").text("Version outdated!").append($("