You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
34 KiB
2 lines
34 KiB
(function(t){function e(e){for(var s,a,r=e[0],i=e[1],c=e[2],u=0,h=[];u<r.length;u++)a=r[u],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&h.push(n[a][0]),n[a]=0;for(s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s]);d&&d(e);while(h.length)h.shift()();return l.push.apply(l,c||[]),o()}function o(){for(var t,e=0;e<l.length;e++){for(var o=l[e],s=!0,r=1;r<o.length;r++){var i=o[r];0!==n[i]&&(s=!1)}s&&(l.splice(e--,1),t=a(a.s=o[0]))}return t}var s={},n={app:0},l=[];function a(e){if(s[e])return s[e].exports;var o=s[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=t,a.c=s,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)a.d(o,s,function(e){return t[e]}.bind(null,s));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],i=r.push.bind(r);r.push=e,r=r.slice();for(var c=0;c<r.length;c++)e(r[c]);var d=i;l.push([0,"chunk-vendors"]),o()})({0:function(t,e,o){t.exports=o("56d7")},"034f":function(t,e,o){"use strict";o("85ec")},"0f03":function(t,e,o){"use strict";o("e086")},"56d7":function(t,e,o){"use strict";o.r(e);var s=o("2b0e"),n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"app"}},[o("b-navbar",{staticClass:"navbar-secondary",attrs:{toggleable:"md"}},[o("b-navbar-toggle",{attrs:{target:"nav_collapse"}}),o("b-navbar-brand",{staticClass:"logo simple-text ti-swarmlab text-secondary"},[t._v(" Swarmlab.io Playground ")]),o("b-collapse",{attrs:{"is-nav":"",id:"nav_collapse"}},[o("b-navbar-nav"),o("b-navbar-nav",{staticClass:"ml-auto"},[o("b-nav-item",{attrs:{href:"https://git.swarmlab.io:3000",target:"_swarmlabgit"}},[t._v(" Swarmlab_git ")]),o("b-nav-item",[t._v(" | ")]),o("b-nav-item",{attrs:{href:"https://api-client.swarmlab.io:8088/?token="+t.token,target:"_swarmlab"}},[t._v(" Lab_onDemand ")]),o("b-nav-item",[t._v(" | ")])],1)],1)],1),o("b-row",[o("b-col",{attrs:{cols:"12"}},[o("doc-live",{staticStyle:{"background-color":"#f8f9fa"}})],1)],1),o("b-row",[o("b-col",{attrs:{cols:"12"}},[o("doc-grep",{staticStyle:{"background-color":"#f8f9fa"}})],1)],1)],1)},l=[],a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{directives:[{name:"show",rawName:"v-show",value:1==t.showmenou,expression:"showmenou == 1"}],staticClass:"row"},[o("div",{staticClass:"col-3"},[o("div",{staticClass:"input-group-append"},["0"==t.columnviewdefault?o("button",{staticClass:"ti-layout-sidebar-none btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.fullscreen("max")}}},[t._v(" Max-Notebook View ")]):t._e(),"1"==t.columnviewdefault?o("button",{staticClass:"ti-layout-sidebar-right btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.fullscreen("min")}}},[t._v(" Min-Notebook View")]):t._e()])]),t._m(0),o("div",{staticClass:"col-3"},[o("div",{staticClass:"input-group-prepend"},["0"==t.columncodedefault?o("button",{staticClass:"ti-layout-sidebar-none btn btn-outline-info btn-sm",staticStyle:{float:"right"},attrs:{type:"button",round:""},on:{click:function(e){return t.fullscreen("codemax")}}},[t._v(" Max-Code View ")]):t._e(),"1"==t.columncodedefault?o("button",{staticClass:"ti-layout-sidebar-left btn btn-outline-info btn-sm",staticStyle:{float:"right"},attrs:{type:"button",round:""},on:{click:function(e){return t.fullscreen("codemin")}}},[t._v(" Min-Code View")]):t._e()])])]),o("div",{staticClass:"row"},[o("div",{class:t.columnview},[o("ad-hoc",{staticStyle:{"background-color":"#f8f9fa"}})],1),o("div",{class:t.columncode},[o("run-llo",{staticStyle:{"background-color":"#f8f9fa"}})],1)])])},r=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"col-6"},[o("span")])}],i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t._m(0),o("div",{staticClass:"row"},[o("div",{staticClass:"col-6"},[o("div",{staticClass:"input-group input-group-sm sm-6"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.tag,expression:"search.tag"}],staticClass:"form-control",attrs:{type:"text","aria-label":"Small","aria-describedby":"inputGroup-sizing-sm",placeholder:"Filter your LOG searches by tags"},domProps:{value:t.search.tag},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setFilter(e)},input:function(e){e.target.composing||t.$set(t.search,"tag",e.target.value)}}})])]),t._v(" "),o("div",{staticClass:"col-6"},[o("div",{staticClass:"input-group input-group-sm sm-6"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.file,expression:"search.file"}],staticClass:"form-control",attrs:{type:"text","aria-label":"Small","aria-describedby":"inputGroup-sizing-sm",placeholder:"Filter your LOG searches by files"},domProps:{value:t.search.file},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setFilter(e)},input:function(e){e.target.composing||t.$set(t.search,"file",e.target.value)}}})])])]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-12"},[o("div",{staticClass:"input-group input-group-sm sm-6"},[t._m(1),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.app,expression:"search.app"}],staticClass:"form-control",attrs:{type:"text","aria-label":"Small","aria-describedby":"inputGroup-sizing-sm",placeholder:"Search"},domProps:{value:t.search.app},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setFilter(e)},input:function(e){e.target.composing||t.$set(t.search,"app",e.target.value)}}}),o("div",{staticClass:"input-group-append"},[o("button",{staticClass:"btn btn-outline-primary",attrs:{round:"",type:"button"},on:{click:t.setFilter}},[t._v(" Go")])]),o("div",{staticClass:"input-group-append"},[o("button",{staticClass:"btn btn-outline-secondary",attrs:{round:"",type:"button"},on:{click:t.resetFilter}},[t._v(" Reset")])])])])]),t._v(" "),o("div",{staticClass:"row"},t._l(t.log_path,(function(e){return o("div",{staticClass:"col-12"},[o("b-row",{staticClass:"border-bottom"},[o("b-col",{attrs:{cols:"2"}},[o("span",{staticClass:"badge badge-danger badge-pill",staticStyle:{cursor:"pointer"},on:{click:function(o){return t.clearLog(e)}}},[t._v("Clear")])]),o("b-col",{staticStyle:{cursor:"pointer"},attrs:{cols:"8"},on:{click:function(o){return t.selectPath(e)}}},[t._v(" "+t._s(e)+" ")]),o("b-col",{attrs:{cols:"2"}},[t.log_path_lenght[e]==t.log_path_lenghtstatus[e]?o("span",{staticClass:"badge badge-secondary badge-pill"},[t._v(t._s(t.log_path_lenght[e]))]):o("span",{staticClass:"badge badge-primary badge-pill"},[t._v(t._s(t.log_path_lenght[e]))])])],1)],1)})),0)])},c=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 d-flex justify-content-center text-center"},[o("h4",{staticClass:"text-info"},[t._v(" Search ")])])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("button",{staticClass:"btn btn-outline-secondary",attrs:{round:"",type:"button"}},[t._v(" Search ")])])}],d=o("2f62"),u=o("5f5b"),h=o("bc3a"),m=o.n(h),p={namespaced:!0,state:{token:"",llo:{},log:[],socketid:""},getters:{getlog(t,e){return t.log},gettoken(t,e){return t.token},getllosrc(t,e){return t.llo},getsocketid(t,e){return t.socketid}},mutations:{add_log(t,e){t.log.push(e)},set_token(t,e){t.token=e},rm_log(t,e){t.log=t.log.filter(t=>t.tailed_path!==e),console.log("js1 setrm "+JSON.stringify(t.log))},tail_log(t,e){t.log=t.log.filter(t=>t.tailed_path!==e).splice(0,4),console.log("js1 setrmrmrmrmrmrmrmrm "+JSON.stringify(t.log))},setllo(t,e){t.llo=e},setsocketid(t,e){t.socketid=e}},actions:{addlog({commit:t},e){var o={};o.message=e.log.log.message,o.tailed_path=e.log.log.tailed_path,o.date=e.log.date,t("add_log",o)},settoken({commit:t},e){t("set_token",e.token)},rmlog({commit:t},e){t("rm_log",e.path)},taillog({commit:t},e){console.log("containerirm "+e),t("tail_log",e.path)},async get_data({commit:t,rootGetters:e},o){try{let t=await m.a.get("https://factory.swarmlab.io:55527/run",{timeout:45e3,params:{code:o.code}});return console.log("paramp "+JSON.stringify(t)),_.dispatch("pipelineLLO/setScriptllo",t),t}catch(n){if("invalid_token"!=n.error){var s={ERROR_str:n,ERROR:"yes"};return s}window.location.href="https://api-login.swarmlab.io:8089"}},async hotreload({commit:t,rootGetters:e},o){console.log(o.token),console.log(o.swarmlabname)},setScriptllo({commit:t},e){t("setllo",e)},setsocketllo({commit:t},e){t("setsocketid",e)},setScriptCodlogAction({commit:t},e){t("setScriptCodelog",e)}}},f=o("ecee"),g=o("c074"),v=o("f2d1"),b=o("ad3d");o("f9e3"),o("2dd8");s["default"].use(d["a"]),s["default"].use(u["a"]),s["default"].component("font-awesome-icon",b["a"]),f["d"].add(g["d"],g["e"],g["c"],g["b"],g["a"],v["b"],v["c"],v["d"],g["f"],v["a"]),f["b"].watch();var _=new d["a"].Store({modules:{pipelineLLO:p},state:{},getters:{},mutations:{}}),y=(o("c4e3"),o("21a6"),{components:{},data(){return{log_path:[],log_path_lenght:[],log_path_lenghtstatus:[],loglenghttotal:32,search:{tag:"",file:"",app:""},showlloedit:!0,issocket:"close",socketdata:"",logintoken:"",code:[],logdata:[]}},methods:{async selectPath(t){console.log("path "+JSON.stringify(t));var e=this.log_path_lenght[t];s["default"].set(this.log_path_lenghtstatus,t,e),this.$root.$emit("playground_log_in",t)},async clearLog(t){console.log("path "+JSON.stringify(t)),s["default"].set(this.log_path_lenght,t,0),s["default"].set(this.log_path_lenghtstatus,t,0);_.dispatch("pipelineLLO/rmlog",{path:t})},async setFilter(){console.log(JSON.stringify(this.logdata))},async resetFilter(){console.log(JSON.stringify(this.logdata))},async socketopen(){this.$socket.client.open()},async socketauthenticate(){var t=_.getters["pipelineLLO/gettoken"];this.$socket.client.emit("authenticate",t)},async socketreconnect(){await this.socketopen();this.socketauthenticate()},async socketclose(){this.$socket.client.close()}},computed:{},beforeMount(){this.socketauthenticate(),console.log("send")},mounted(){this.$root.$on("SERVER_socket_connect",t=>{this.$nextTick((function(){this.socketreconnect()}))})},beforeDestroy(){this.$root.$off("SERVER_socket_socket")},created(){this.socketopen();var t=new URL(location.href).searchParams.get("token");_.dispatch("pipelineLLO/settoken",{token:t})},sockets:{connect(){this.$socket.client.emit("authenticate","logintoken"),this.$socket.client.emit("socket_id_get","socketdatasend"),console.log("socket connected socketdatasend"),this.issocket="open",this.$root.$emit("SERVER_socket_status","on")},error(t){console.log("socket error "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off")},connect_error(t){console.log("socket connect_error "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},disconnect(t){console.log("socket disconnect "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},connect_timeout(t){console.log("socket timeout "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnect(t){console.log("socket reconnect attemptNumber "+JSON.stringify(t)),this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnect_attempt(t){console.log("socket reconnect_attempt "+JSON.stringify(t)),this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnecting(t){console.log("socket reconnecting "+JSON.stringify(t)),this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnect_error(t){console.log("socket reconnect_error "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},unauthorized(t){console.log("socket unauthorized "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off")},socket_id_emit(t){console.log("socket id from server "+JSON.stringify(t)),console.log("socket id from serveri saved "+JSON.stringify(socketsave)),this.issocket="open"},async logdata(t){console.log(" socket from logdata "+JSON.stringify(t));_.dispatch("pipelineLLO/addlog",{log:t});this.$root.$emit("GREP_on_data",t),this.$root.$emit("SERVER_socket_status","on");var e=_.getters["pipelineLLO/getlog"];this.log_path=[...new Set(e.map(t=>t.tailed_path))];var o="";for(let n of this.log_path)if(o=e.filter(t=>t.tailed_path===n).length,s["default"].set(this.log_path_lenght,n,o),o>this.loglenghttotal)_.dispatch("pipelineLLO/taillog",{path:n})},async message(t){console.log(" socket message "+JSON.stringify(t))}}}),k=y,w=(o("0f03"),o("2877")),C=Object(w["a"])(k,i,c,!1,null,null,null),x=C.exports,$=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t.showlloedit?o("b-row",{attrs:{"no-gutters":"","w-100":"","h-100":""}},[o("b-col",{attrs:{cols:"12",sm:"12",md:"12"}},[o("b-row",[o("b-col",{attrs:{cols:"4"}},[o("div",{staticClass:"input-group input-group-sm sm-3"})]),o("b-col",{attrs:{cols:"3"}},[o("div",{staticClass:"input-group input-group-sm sm-3"},[t.socketonline?o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:"",disable:""},on:{click:t.socketconnect}},[t._v(" online ")]):o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:t.socketconnect}},[t._v(" socket disconnected")]),t.socketonline?o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.hotreload()}}},[t._v(" Hot_Reload")]):t._e()])]),o("b-col",{attrs:{cols:"5"}},[o("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"}),o("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"},[o("div",{staticClass:"input-group-append"},[t.socketonline?o("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.infoHotreload()}}},[t._v(" Hot_Reload_HowTo")]):t._e()]),o("div",{staticClass:"input-group-append"},[t.tryConsole?o("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.clear()}}},[t._v(" Clear")]):t._e()]),o("div",{staticClass:"input-group-append"},["sublime"==t.cmOptions.keyMap?o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:t.infoFilter}},[t._v(" i")]):t._e()])])])],1),o("div",{staticClass:"codemirror"},[o("codemirror",{ref:"myCm",attrs:{value:t.code,options:t.cmOptions},on:{cursorActivity:t.onCmCursorActivity,ready:t.onCmReady,focus:t.onCmFocus,input:t.onCmCodeChange}})],1)],1)],1):t._e()],1)},S=[],O=o("8f94"),L=(o("a7be"),o("bbca"),o("281e"),o("31c5"),o("9b74"),o("f6b6"),o("3c98"),o("9c7b"),o("715d"),o("b933"),o("23de"),o("02f0"),o("8c33"),o("7289"),o("2aed"),o("d72f"),o("0b6c"),o("9a48"),o("75f8"),o("697e"),o("aedd"),o("164b"),o("4895"),o("cbc8"),o("8d70"),o("9f09"),o("a2c1"),o("56b3"),o("d7d5"),{components:{codemirror:O["codemirror"]},data(){return{socketonline:!1,tryConsole:!1,ssl:{},getinfo:"",token:"",swarmlabname:"",code:"",editchoice:"",optionsedit:[{text:"code",value:"code"},{text:"text",value:"text"}],llodesc:[{llo_url:"",llo_name:"",llo_author:"",llo_intro:""}],llo:[{id:0,rm:!1,data_info:"Asciidoc \n",data_code:"#Your source code",data_service:"",code_datafile:"url",code_name:"",code_exec:"",code_options:"",code_mime:"",code_info:"",code_code:"",code_codeout:"",code_codeoutput:"console",points:"",challenge_question:"",code_challenge_question:"",challenge_answer:"",challenge_answer_hint:"",code_challenge_answer_hint:"",challenge_answer_source:"",challenge_answer_code_out:"",challenge_answer_code:"",code_challenge_answer_code:""}],searchLLO:[],searchLLOactive:!1,ADOC_html_code:"",challenge:[],action:"",tryLLO:[],service:"os2",active:0,activecount:0,remove:"",activeField:"",bootstrap:!1,firstbootstrap:0,htmlasciitmp:"",datafile:"https://git.swarmlab.io:3000/labs/examples-mpi2/raw/branch/master/0_netstat/data",datadir:"0_netstat/data",LearningObject:"",showllo:!0,showlloedit:!0,selected:"sublime",options:[{text:"vim",value:"vim"},{text:"sublime",value:"sublime"}],optionsmime:[{text:"sh",value:"bash"},{text:"javascript",value:"javascript"},{text:"python",value:"python"},{text:"php",value:"php"},{text:"sql",value:"sq;"},{text:"xml",value:"xml"},{text:"c",value:"c"}],pValidate:!1,cmOptions:{tabSize:2,styleActiveLine:!0,lineNumbers:!0,lineSeparator:"\n",line:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0},styleSelectedText:!0,mode:"shell",hintOptions:{completeSingle:!1},keyMap:"sublime",matchBrackets:!0,showCursorWhenSelecting:!0,indentUnit:this.ADOC_html_code,lineWrapping:!0,theme:"paraiso-light",refresh:!0,readOnly:!0,autofocus:!1,extraKeys:{Ctrl:"autocomplete"}},ADOC_html:[]}},methods:{socketconnect(){this.$root.$emit("SERVER_socket_connect")},clear(){this.tryConsole=!1,this.code=""},async getdata(){var t=this.getinfo;await _.dispatch("pipelineLLO/get_data",{code:t})},async showactive(t){this.topwindow(t)},onCmReady(t){t.on("change",(t,e)=>{}),t.on("keypress",()=>{t.showHint({completeSingle:!1})})},onCmCursorActivity(t,e,o){},onCmFocus(t){},onCmCodeChange(t){this.code=t},handleChange(){},setKeymap(){this.cmOptions.keyMap=this.selected},infoFilter(){var t="<h3>Playbook Images</h3>",e='<table class="table table-striped table-sm "><tr><td class="text-left">Shift-Tab</td> <td class="text-left">indentLess</td></tr><tr><td class="text-left">Alt-Q</td> <td class="text-left">wrapLines</td></tr><tr><td class="text-left">Ctrl-Up</td> <td class="text-left">scrollLineUp</td></tr><tr><td class="text-left">Ctrl-Down</td> <td class="text-left">scrollLineDown</td></tr><tr><td class="text-left">Ctrl-L</td> <td class="text-left">selectLine</td></tr><tr><td class="text-left">Esc</td> <td class="text-left">singleSelectionTop</td></tr><tr><td class="text-left">Ctrl-Enter</td> <td class="text-left">insertLineAfter</td></tr><tr><td class="text-left">Ctrl-D</td> <td class="text-left">selectNextOccurrence</td></tr><tr><td class="text-left">Shift-Ctrl-Space</td> <td class="text-left">selectScope</td></tr><tr><td class="text-left">Shift-Ctrl-M</td> <td class="text-left">selectBetweenBrackets</td></tr><tr><td class="text-left">Ctrl-M</td> <td class="text-left">goToBracket</td></tr><tr><td class="text-left">Ctrl-K Ctrl-Y</td> <td class="text-left">sublimeYank</td></tr><tr><td class="text-left">Ctrl-K Ctrl-C</td> <td class="text-left">showInCenter</td></tr><tr><td class="text-left">Ctrl-K Ctrl-G</td> <td class="text-left">clearBookmarks</td></tr><tr><td class="text-left">Ctrl-K Ctrl-Backspace</td> <td class="text-left">delLineLeft</td></tr><tr><td class="text-left">Ctrl-K Ctrl-0</td> <td class="text-left">unfoldAll</td></tr><tr><td class="text-left">Ctrl-K Ctrl-J</td> <td class="text-left">unfoldAll</td></tr><tr><td class="text-left">Ctrl-Alt-Up</td> <td class="text-left">addCursorToPrevLine</td></tr><tr><td class="text-left">Ctrl-Alt-Down</td> <td class="text-left">addCursorToNextLine</td></tr><tr><td class="text-left">Ctrl-F3</td> <td class="text-left">findUnder</td></tr><tr><td class="text-left">Shift-Ctrl-F3</td> <td class="text-left">findUnderPrevious</td></tr><tr><td class="text-left">Shift-Ctrl-[</td> <td class="text-left">fold</td></tr><tr><td class="text-left">Shift-Ctrl-]</td> <td class="text-left">unfold</td></tr><tr><td class="text-left">Ctrl-F</td> <td class="text-left">find</td></tr></table>',o=(t="","");this.$swal({title:"<strong>Key bindings</strong>",type:"info",html:e+t+o,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1})},async hotreload(){this.getinfo,await _.dispatch("pipelineLLO/hotreload",{token:this.token,swarmlabname:this.swarmlabname})},infoHotreload(){var t=` <div style="overflow-x: auto;"> <table class="table table-striped table-sm ">\n <thead>\n <tr>\n <th></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class="text-left" >Download</td>\n <td class="text-left">https://git.swarmlab.io:3000/labs/swarmlab-playground-client/raw/branch/master/hot_reload.sh</td>\n </tr>\n <tr>\n <td class="text-center" colspan="2"><b>and add the proper values</b></td> \n </tr>\n <tr>\n <td class="text-left">token</td> \n <td class="text-left">${this.token}</td>\n </tr>\n <tr>\n <td class="text-left">swarmlabname</td> \n <td class="text-left">${this.swarmlabname}</td>\n </tr>\n <tr>\n <td class="text-center" colspan="2"><b>OR set the variables before exec</b></td> \n </tr>\n <tr>\n <td class="text-left" colspan="2">export SWARMLAB_token=${this.token}</td>\n </tr>\n <tr>\n <td class="text-left" colspan="2">export SWARMLAB_name=${this.swarmlabname}</td>\n </tr>\n <tr>\n <td class="text-center" colspan="2"><b>Ready!</b<</td> \n </tr>\n <tr>\n <td class="text-left" colspan="2"><i>Execute script every time you run git push</i></td>\n </tr>\n</tbody>\n</table></div>`;this.$swal({title:"<strong>HowTo</strong>",type:"info",html:t,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1})}},computed:{codemirror(){return this.$refs.myCm.codemirror}},mounted(){this.$root.$on("SERVER_socket_status",t=>{this.$nextTick((function(){"off"==t?this.socketonline=!1:"on"==t&&(this.socketonline=!0)}))}),this.$root.$on("playground_log_in",t=>{var e=_.getters["pipelineLLO/getlog"],o="";this.code="",o=e.filter(e=>e.tailed_path===t),console.log("logtmp22 "+JSON.stringify(o));for(let s of o)this.code+=s.message+" "+s.tailed_path+" "+s.date,this.code+="\n";this.$refs.myCm.codemirror.setCursor(this.$refs.myCm.codemirror.lineCount(),0),this.tryConsole=!0})},beforeDestroy(){this.$root.$off("SERVER_socket_status"),this.$root.$off("playground_log_in")},created(){this.token=new URL(location.href).searchParams.get("token"),this.swarmlabname=new URL(location.href).searchParams.get("swarmlabname")}}),R=L,E=(o("9767"),Object(w["a"])(R,$,S,!1,null,null,null)),A=E.exports,N={name:"DocLive",props:{},components:{RunLlo:x,AdHoc:A},data(){return{loading:!1,showhistory:0,productIndex:1,showmenou:1,columnviewdefault:0,columncodedefault:0,columnview:"col-7 order-first",columncode:"col-5 order-last",tutorMenou:"student"}},created:function(){},mounted(){this.$root.$on("LLOshowmenounotebooks",()=>{this.showmenou=1}),this.$root.$on("lloshowchallengehistory",(t,e)=>{this.showhistory=1})},beforeDestroy(){this.$root.$off("LLOshowmenounotebooks"),this.$root.$off("lloshowchallengehistory")},methods:{fullscreen(t){"max"==t?(this.columnview="col-11 order-first",this.columncode="col-1 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","max"),console.log(this.columnview)):"min"==t?(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=0,this.columncodedefault=1,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview)):"codemax"==t?(this.columnview="col-1 order-first",this.columncode="col-11 order-last",this.columnviewdefault=0,this.columncodedefault=1,console.log(this.columnview)):"codemin"==t&&(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview))},async onAction(t){this.tutorMenou="tutor"}}},j=N,M=Object(w["a"])(j,a,r,!1,null,"8e77a300",null),P=M.exports,D=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"row"},[o("div",{class:t.columnview},[o("ad-grep",{staticStyle:{"background-color":"#f8f9fa"}})],1),o("div",{class:t.columncode},[o("run-grep",{staticStyle:{"background-color":"#f8f9fa"}})],1)])])},G=[],J=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"runGrep"},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12"},[o("div",{staticClass:"input-group mb-2"},[t._m(0),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.regex,expression:"search.regex"}],staticClass:"form-control",attrs:{type:"text",placeholder:"regex"},domProps:{value:t.search.regex},on:{input:function(e){e.target.composing||t.$set(t.search,"regex",e.target.value)}}}),o("div",{staticClass:"input-group-append"},[o("div",{staticClass:"input-group-text"},[t._v("/")]),o("div",{staticClass:"form-control custom-switch"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.case,expression:"search.case"}],staticClass:"custom-control-input",attrs:{id:"customSwitch1",type:"checkbox"},domProps:{checked:Array.isArray(t.search.case)?t._i(t.search.case,null)>-1:t.search.case},on:{change:function(e){var o=t.search.case,s=e.target,n=!!s.checked;if(Array.isArray(o)){var l=null,a=t._i(o,l);s.checked?a<0&&t.$set(t.search,"case",o.concat([l])):a>-1&&t.$set(t.search,"case",o.slice(0,a).concat(o.slice(a+1)))}else t.$set(t.search,"case",n)}}}),o("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}},[t._v("Ignore case")])])])])])]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-9"},[o("div",{staticClass:"input-group mb-2"},[t._m(1),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.log,expression:"search.log"}],staticClass:"form-control",attrs:{type:"text",placeholder:"file"},domProps:{value:t.search.log},on:{input:function(e){e.target.composing||t.$set(t.search,"log",e.target.value)}}}),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.desc,expression:"search.desc"}],staticClass:"form-control",attrs:{type:"text",placeholder:"desc"},domProps:{value:t.search.desc},on:{input:function(e){e.target.composing||t.$set(t.search,"desc",e.target.value)}}})])]),t._v(" "),o("div",{staticClass:"col-3"},[o("button",{staticClass:"btn btn-outline-secondary",attrs:{round:"",type:"button"},on:{click:t.setregex}},[t._v(" Search ")])])]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 viewGrep"},[o("table",{staticClass:"table table-hover"},[t._m(2),t._l(t.log,(function(e){return o("tbody",[o("tr",[o("td",[o("span",{staticClass:"badge badge-danger badge-pill",staticStyle:{cursor:"pointer"},on:{click:function(o){return t.removeregex(e.id)}}},[t._v("Remove")])]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.log))]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.regex))]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.case))]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.desc))])])])}))],2)])])])},V=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("div",{staticClass:"input-group-text"},[t._v("/")])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("div",{staticClass:"input-group-text"},[t._v("Log")])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("thead",[o("tr",[o("th",{attrs:{scope:"col"}},[t._v("Action")]),o("th",{attrs:{scope:"col"}},[t._v("Log")]),o("th",{attrs:{scope:"col"}},[t._v("Regex")]),o("th",{attrs:{scope:"col"}},[t._v("IC")]),o("th",{attrs:{scope:"col"}},[t._v("Desc")])])])}],T={components:{},data(){return{search:{log:"",regex:"",desc:"",case:!0},obj:1,log:[]}},methods:{removeregex(t){let e=this.log.map(t=>t.id).indexOf(t);this.log.splice(e,1)},setregex(){var t={};t.id=this.obj++,t.log=this.search.log,t.regex=this.search.regex,t.case=this.search.case,t.desc=this.search.desc,this.log.push(t)}},mounted(){this.$root.$on("GREP_on_data",t=>{this.$nextTick((function(){var e=this.log.filter(e=>e.log===t.log.tailed_path),o="",s=!1;if(s=!(!Array.isArray(e)||!e.length),s){var n=t.log.message;o+="";for(let s of e){if(s.case)var l=new RegExp(s.regex,"i");else l=new RegExp(s.regex);l.test(n)?(o+=n+" "+t.log.tailed_path,o+="\n",this.$root.$emit("GREP_view_data",o)):console.log("Not found")}}}))})},beforeDestroy(){this.$root.$off("GREP_on_data")}},F=T,z=(o("61e9"),Object(w["a"])(F,J,V,!1,null,null,null)),U=z.exports,B=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t.showlloedit?o("b-row",{attrs:{"no-gutters":"","w-100":"","h-100":""}},[o("b-col",{attrs:{cols:"12",sm:"12",md:"12"}},[t.tryConsole?t._e():o("hr"),o("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"},[o("div",{staticClass:"input-group-append"},[t.tryConsole?o("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.clear()}}},[t._v(" Clear")]):t._e()])]),o("div",{staticClass:"CodeMirrorGrep"},[o("codemirror",{ref:"myCm",attrs:{value:t.code,options:t.cmOptions},on:{cursorActivity:t.onCmCursorActivity,ready:t.onCmReady,focus:t.onCmFocus,input:t.onCmCodeChange}})],1)])],1):t._e()],1)},K=[],H={components:{codemirror:O["codemirror"]},data(){return{tryConsole:!1,getinfo:"",code:"",optionsedit:[{text:"code",value:"code"},{text:"text",value:"text"}],searchLLO:[],searchLLOactive:!1,showllo:!0,showlloedit:!0,selected:"sublime",options:[{text:"vim",value:"vim"},{text:"sublime",value:"sublime"}],optionsmime:[{text:"sh",value:"bash"},{text:"javascript",value:"javascript"},{text:"python",value:"python"},{text:"php",value:"php"},{text:"sql",value:"sq;"},{text:"xml",value:"xml"},{text:"c",value:"c"}],pValidate:!1,cmOptions:{tabSize:2,styleActiveLine:!0,lineNumbers:!0,lineSeparator:"\n",line:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0},styleSelectedText:!0,mode:"shell",hintOptions:{completeSingle:!1},keyMap:"sublime",matchBrackets:!0,showCursorWhenSelecting:!0,indentUnit:this.ADOC_html_code,lineWrapping:!0,theme:"paraiso-light",refresh:!0,readOnly:!0,autofocus:!1,extraKeys:{Ctrl:"autocomplete"}},ADOC_html_code:""}},methods:{socketconnect(){},clear(){this.tryConsole=!1,this.code=""},async getdata(){},async showactive(t){this.topwindow(t)},onCmReady(t){t.on("change",(t,e)=>{}),t.on("keypress",()=>{t.showHint({completeSingle:!1})})},onCmCursorActivity(t,e,o){},onCmFocus(t){},onCmCodeChange(t){this.code=t},handleChange(){},setKeymap(){this.cmOptions.keyMap=this.selected}},computed:{codemirror(){return this.$refs.myCm.codemirror}},mounted(){this.$root.$on("GREP_view_data",t=>{this.$nextTick((function(){this.code+=t,this.tryConsole=!0}))}),this.$refs.myCm.codemirror.setSize(null,"350")},beforeDestroy(){this.$root.$off("GREP_view_data")},created(){}},I=H,q=Object(w["a"])(I,B,K,!1,null,null,null),W=q.exports,Y={name:"DocGrep",props:{},components:{RunGrep:U,AdGrep:W},data(){return{loading:!1,showhistory:0,productIndex:1,showmenou:1,columnviewdefault:0,columncodedefault:0,columnview:"col-7 order-first",columncode:"col-5 order-last",tutorMenou:"student"}},created:function(){},mounted(){this.$root.$on("LLOshowmenounotebooks",()=>{this.showmenou=1}),this.$root.$on("lloshowchallengehistory",(t,e)=>{this.showhistory=1})},beforeDestroy(){this.$root.$off("LLOshowmenounotebooks"),this.$root.$off("lloshowchallengehistory")},methods:{fullscreen(t){"max"==t?(this.columnview="col-11 order-first",this.columncode="col-1 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","max"),console.log(this.columnview)):"min"==t?(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=0,this.columncodedefault=1,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview)):"codemax"==t?(this.columnview="col-1 order-first",this.columncode="col-11 order-last",this.columnviewdefault=0,this.columncodedefault=1,console.log(this.columnview)):"codemin"==t&&(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview))},async onAction(t){this.tutorMenou="tutor"}}},Q=Y,X=Object(w["a"])(Q,D,G,!1,null,"bbfc2d24",null),Z=X.exports,tt=(o("e454"),{name:"app",components:{DocLive:P,DocGrep:Z},data(){return{show:!0,token:"",SwarmabAsciiLabTemplate:""}},mounted(){},created(){var t=window.location.href,e=new URL(t);this.token=e.searchParams.get("token"),console.log("token "+this.token)},methods:{saveDocLive(){this.$root.$emit("asciilive_save","save")},async connect_to_iot(t){"mesh"==t&&(this.SwarmabAsciiLabTemplate={iot5:{id:5,name:"auto5",img:"rinse.png",Servicios:[{model:"Sentra",doors:4},{model:"Maxima",doors:4},{model:"Skyline",doors:2}]}})}}}),et=tt,ot=(o("034f"),Object(w["a"])(et,n,l,!1,null,null,null)),st=ot.exports,nt=o("5886"),lt=o("f87c"),at=o("8e27"),rt=o.n(at);s["default"].use(nt["default"]);const it=rt()("https://factory.swarmlab.io:55527",{autoConnect:!1,reconnection:!0,reconnectionDelay:500,maxReconnectionAttempts:1/0,pingInterval:25e3,pingTimeout:6e4,transports:["websocket","polling"],secure:!0,rejectUnauthorized:!1});s["default"].use(lt["a"],it),s["default"].use(u["b"]),s["default"].config.productionTip=!1,new s["default"]({el:"#app",store:_,render:t=>t(st)})},"61e9":function(t,e,o){"use strict";o("ad34")},"85ec":function(t,e,o){},9767:function(t,e,o){"use strict";o("e1be")},ad34:function(t,e,o){},e086:function(t,e,o){},e1be:function(t,e,o){},e454:function(t,e,o){}});
|
|
//# sourceMappingURL=app.0911d2ad.js.map
|