From 11cb4c1c7630c84bc8c051ee9c1eafc929a41680 Mon Sep 17 00:00:00 2001 From: Balder Date: Fri, 2 Oct 2015 13:51:30 +0200 Subject: [PATCH] Changed triggers names, changed descriptions --- lsp/minified.js | 55 +++++++++++++++++++++++++------------------------ lsp/mist.js | 33 ++++++++++++++--------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lsp/minified.js b/lsp/minified.js index 1a653a15..b0986dd0 100644 --- a/lsp/minified.js +++ b/lsp/minified.js @@ -122,33 +122,34 @@ UI.buildUI([b]);c.replaceWith(a.children())}},{type:"buttons",buttons:[{type:"ca [];mist.data.config.limits.push(m);a={config:{limits:mist.data.config.limits}};break;case "stream":if(typeof mist.data.streams[b[1]].limits=="undefined")mist.data.streams[b[1]].limits=[];mist.data.streams[b[1]].limits.push(m);if(mist.data.LTS){a={addstream:{}};a.addstream[b[1]]=mist.data.streams[b[1]]}else a={streams:mist.data.streams}}}mist.send(function(){UI.navto(UI.returnTab[0],UI.returnTab[1])},a)}}]}]),u=UI.buildUI(i);b.append(u);u.find(".limit_type").closest("label").after(u.find(".limit_value").closest("label")); u.find(".limit_type").trigger("change");break;case "Triggers":"triggers"in mist.data.config||(mist.data.config.triggers={});h=$("");p=$("").html($("").html($("").html($("").attr("data-index",q+","+w).append($("").css("font-size","0.9em");b.append($("
").text("Trigger on").attr("data-sort-type","string").addClass("sorting-asc")).append($("").text("Applies to").attr("data-sort-type","string")).append($("").text("Handler").attr("data-sort-type","string")).append($("")))).append(h);b.append(UI.buildUI([{type:"help",help:"Triggers are the system you can use to react to events that occur inside MistServer. These allow you to block specific users, redirect streams, keep tabs on what is being pushed where, etcetera. For full documentation, please refer to the developer documentation section on the MistServer website."}])).append($("
").text(q)).append($("").text(i[q][w][2].join(", "))).append($("").text(i[q][w][0])).append($("").html($("
").append(h));var W=function(a){var b=$("").text(a);switch(a){case "WARN":b.addClass("orange"); -break;case "ERROR":case "FAIL":b.addClass("red")}return b},U=function(){var a=mist.data.log;if(a){a.length>=2&&a[0][0]").html($("
").text(UI.format.dateTime(a[b][0],"long")).css("white-space","nowrap")).append($("").html(W(a[b][1])).css("text-align","center")).append($("").text(a[b][2]).css("text-align","left")))}};U();break;case "Statistics":u=$("").text("Loading..");b.append(u);var m={},s=mist.stored.get().graphs? -$.extend(!0,{},mist.stored.get().graphs):{},z={};for(q in mist.data.streams)z[q]=!0;for(q in mist.data.active_streams)z[mist.data.active_streams[q]]=!0;var z=Object.keys(z).sort(),M=[];for(q in mist.data.config.protocols)M.push(mist.data.config.protocols[q].connector);M.sort();mist.send(function(){UI.plot.datatype.templates.cpuload.cores=0;for(var a in mist.data.capabilities.cpu)UI.plot.datatype.templates.cpuload.cores=UI.plot.datatype.templates.cpuload.cores+mist.data.capabilities.cpu[a].cores;u.html(UI.buildUI([{type:"help", -help:"Here you will find the MistServer stream statistics, you can select various categories yourself. All statistics are live: up to five minutes are saved."},$("

").text("Select the data to display"),{label:"Add to",type:"select",select:[["new","New graph"]],pointer:{main:m,index:"graph"},classes:["graph_ids"],"function":function(){if($(this).val()){var a=u.find(".graph_xaxis"),b=u.find(".graph_id");if($(this).val()=="new"){a.children("option").prop("disabled",false);b.setval("Graph "+(Object.keys(s).length+ -1)).closest("label").show()}else{var c=s[$(this).val()].xaxis;a.children("option").prop("disabled",true).filter('[value="'+c+'"]').prop("disabled",false);b.closest("label").hide()}a.children('option[value="'+a.val()+'"]:disabled').length&&a.val(a.children("option:enabled").first().val());a.trigger("change")}}},{label:"Graph id",type:"str",pointer:{main:m,index:"id"},classes:["graph_id"],validate:[function(a){return a in s?{msg:"This graph id has already been used. Please enter something else.",classes:["red"]}: -false}]},{label:"Axis type",type:"select",select:[["time","Time line"],["coords","Geographical"]],pointer:{main:m,index:"xaxis"},classes:["graph_xaxis"],"function":function(){$s=u.find(".graph_datatype");switch($(this).getval()){case "coords":$s.children("option").prop("disabled",true).filter('[value="coords"]').prop("disabled",false);break;case "time":$s.children("option").prop("disabled",false).filter('[value="coords"]').prop("disabled",true)}if(!$s.val()||$s.children('option[value="'+$s.val()+ -'"]:disabled').length){$s.val($s.children("option:enabled").first().val());$s.trigger("change")}}},{label:"Data type",type:"select",select:[["clients","Connections"],["upbps","Bandwidth (up)"],["downbps","Bandwidth (down)"],["cpuload","CPU load"],["memload","Memory load"],["coords","Client location"]],pointer:{main:m,index:"datatype"},classes:["graph_datatype"],"function":function(){$s=u.find(".graph_origin");switch($(this).getval()){case "cpuload":case "memload":$s.find("input[type=radio]").not('[value="total"]').prop("disabled", -true);$s.find('input[type=radio][value="total"]').prop("checked",true);break;default:$s.find("input[type=radio]").prop("disabled",false)}}},{label:"Data origin",type:"radioselect",radioselect:[["total","All"],["stream","The stream:",z],["protocol","The protocol:",M]],pointer:{main:m,index:"origin"},value:["total"],classes:["graph_origin"]},{type:"buttons",buttons:[{label:"Add data set",type:"save","function":function(){var a;if(m.graph=="new"){a=UI.plot.addGraph(m,c);s[a.id]=a;u.find("select.graph_ids").append($("