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
29 KiB
2 lines
29 KiB
(function(t){function e(e){for(var o,i,r=e[0],l=e[1],c=e[2],u=0,p=[];u<r.length;u++)i=r[u],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(t[o]=l[o]);d&&d(e);while(p.length)p.shift()();return a.push.apply(a,c||[]),s()}function s(){for(var t,e=0;e<a.length;e++){for(var s=a[e],o=!0,r=1;r<s.length;r++){var l=s[r];0!==n[l]&&(o=!1)}o&&(a.splice(e--,1),t=i(i.s=s[0]))}return t}var o={},n={app:0},a=[];function i(e){if(o[e])return o[e].exports;var s=o[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=o,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(s,o,function(e){return t[e]}.bind(null,o));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],l=r.push.bind(r);r.push=e,r=r.slice();for(var c=0;c<r.length;c++)e(r[c]);var d=l;a.push([0,"chunk-vendors"]),s()})({0:function(t,e,s){t.exports=s("56d7")},"034f":function(t,e,s){"use strict";s("85ec")},"0390":function(t,e,s){"use strict";s("b721")},"0b43":function(t,e,s){"use strict";s("778e")},"0ed5":function(t,e,s){t.exports=s.p+"img/docker.7b56657d.png"},"4cf0":function(t,e,s){"use strict";s("5dec")},"56d7":function(t,e,s){"use strict";s.r(e);var o=s("2b0e"),n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"app"}},[s("nav",{staticClass:"navbar navbar-light navbar-expand-md bg-light justify-content-md-center justify-content-start"},[s("b-navbar-brand",{staticClass:"logo simple-text ti-swarmlab text-secondary"},[t._v(" Swarmlab.io ")]),s("div",{staticClass:"navbar-collapse collapse justify-content-between align-items-center w-100",attrs:{id:"collapsingNavbar2"}},[s("ul",{staticClass:"navbar-nav mx-auto text-md-center text-left"},[t._m(0),s("li",{staticClass:"nav-item"},[s("a",{staticClass:"nav-link",attrs:{href:"#"},on:{click:function(e){return t.hybrid("bootstrap")}}},[t._v("myNetwork")])]),t._m(1),t._m(2),t._m(3)]),s("ul",{staticClass:"nav navbar-nav flex-row justify-content-md-center justify-content-start flex-nowrap"},[s("b-nav-item",{attrs:{href:"https://git.swarmlab.io:3000",target:"_swarmlabgit"}},[t._v(" Swarmlab_git ")]),s("b-nav-item",[t._v(" | ")]),s("b-nav-item",{attrs:{href:"https://api-client.swarmlab.io:8088/?token="+t.token,target:"_swarmlab"}},[t._v(" Lab_onDemand ")]),s("b-nav-item")],1)])],1),s("b-row",[s("b-col",{attrs:{cols:"12"}},[s("network-table",{staticStyle:{"background-color":"#f8f9fa"}})],1)],1),s("b-row",[s("b-col",{attrs:{cols:"12"}})],1)],1)},a=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("li",{staticClass:"nav-item"},[s("a",{staticClass:"nav-link",attrs:{href:"#"}},[t._v("Link")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("li",{staticClass:"nav-item my-auto"},[s("a",{staticClass:"nav-link navbar-brand mx-0 d-none d-md-inline",attrs:{href:""}},[t._v("Hybrid")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("li",{staticClass:"nav-item"},[s("a",{staticClass:"nav-link",attrs:{href:"#"}},[t._v("Link")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("li",{staticClass:"nav-item"},[s("a",{staticClass:"nav-link",attrs:{href:"#"}},[t._v("Link")])])}],i=(s("e454"),function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"row"},[s("div",{staticClass:"col-7 order-first pr-md-1"},[s("br"),s("view-network"),s("docker-services")],1),s("div",{staticClass:"col-5 order-first pr-md-1"},[s("br"),s("adhoc-view")],1)])])}),r=[],l=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("card",{staticClass:"card-user",staticStyle:{"max-height":"100%"}},[o("div",{staticClass:"author"},[o("img",{staticClass:"avatar border-white",attrs:{src:s("0ed5"),alt:"..."}})]),o("v-wait",{attrs:{for:"myRunInstancetutor"}},[o("template",{slot:"waiting"},[o("div",[o("img",{attrs:{src:s("cf1c")}}),t._v(" Enter Lab_room... ")])])],2),o("b-container",{staticClass:"bv-example-row",attrs:{fluid:""}},[o("div",{staticClass:"input-group input-group-sm sm-3"},[o("div",{staticClass:"input-group-prepend"},[t.$socket.disconnected?o("button",{staticClass:"ti-unlink btn btn-outline-danger",attrs:{round:"",type:"button",title:"You are disconnected from Swarmlab-hybrid",disabled:""}}):o("button",{staticClass:"ti-link btn btn-outline-success",attrs:{round:"",type:"button",title:"You are connected swarmlab-hybrid",disabled:""}})]),o("div",{staticClass:"input-group-prepend"},[o("button",{staticClass:"btn btn-outline-primary",attrs:{round:"",type:"button"},on:{click:function(e){return t.onAction("start")}}},[t._v(" Start")])]),o("div",{staticClass:"input-group-prepend"},[o("button",{staticClass:"btn btn-outline-primary",attrs:{round:"",type:"button"},on:{click:function(e){return t.onAction("stop")}}},[t._v(" Stop")])]),o("div",{staticClass:"input-group-prepend"},[o("button",{staticClass:"btn btn-outline-primary",attrs:{round:"",type:"button"},on:{click:function(e){return t.onAction("kill")}}},[t._v(" Kill")])]),o("input",{directives:[{name:"model",rawName:"v-model",value:t.searchFor,expression:"searchFor"}],staticClass:"form-control",attrs:{type:"text","aria-label":"Small","aria-describedby":"inputGroup-sizing-sm",placeholder:"Search"},domProps:{value:t.searchFor},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.searchFor=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")])])])])],1)},c=[],d=s("2f62"),u=s("5f5b"),p=s("bc3a"),h=s.n(p),f={namespaced:!0,state:{token:""},getters:{gettoken(t,e){return t.token},getlog(t,e){return t.log}},mutations:{set_token(t,e){t.token=e},add_log(t,e){t.log.push(e)}},actions:{addlog({commit:t},e){var s={};s.message=e.log.log.message,s.tailed_path=e.log.log.tailed_path,s.date=e.log.date,t("add_log",s)},settoken({commit:t},e){t("set_token",e.token)},async swarmlabstart({commit:t,rootGetters:e},s){console.log("from "+JSON.stringify(s));try{var o=s.token,n={action:s.action},a={headers:{"content-type":"application/x-www-form-urlencoded",Authorization:"Bearer "+o}},i=await h.a.post("http://localhost:8084/run",n,a);console.log(JSON.stringify(i))}catch(l){if("Request failed with status code 401"!=l.message&&!/401/i.test(l.message)){var r={ERROR_str:l,ERROR:"yes"};return r}window.location.href="https://api-login.swarmlab.io:8089"}},async swarmlabhybridrm({commit:t,rootGetters:e},s){try{var o=s.token,n={action:s.action,nodename:s.nodename,nodeip:s.nodeip,nodeid:s.nodeid,noderole:s.noderole,nodezones:s.nodezones,nodedesc:s.nodedesc},a={headers:{"content-type":"application/x-www-form-urlencoded",Authorization:"Bearer "+o}},i=await h.a.post("https://api.swarmlab.io/swarmlabhybridrm",n,a);"invalid_token"==i.error&&(console.log(i),console.log(JSON.stringify(i))),console.log(JSON.stringify(i))}catch(l){if("Request failed with status code 401"!=l.message&&!/401/i.test(l.message)){var r={ERROR_str:l,ERROR:"yes"};return r}window.location.href="https://api-login.swarmlab.io:8089"}},async swarmlabstartget({commit:t,rootGetters:e},s){console.log("value "+JSON.stringify(s));try{var o=s.token,n={action:s.action},a={params:n,headers:{"content-type":"application/x-www-form-urlencoded",Authorization:"Bearer "+o}},i=await h.a.get("http://localhost:8084/run",a);return i}catch(l){if("Request failed with status code 401"!=l.message&&!/401/i.test(l.message)){var r={ERROR_str:l,ERROR:"yes"};return r}window.location.href="https://api-login.swarmlab.io:8089"}}}},m=s("ecee"),g=s("c074"),b=s("f2d1"),v=s("ad3d");s("f9e3"),s("2dd8");o["default"].use(d["a"]),o["default"].use(u["a"]),o["default"].component("font-awesome-icon",v["a"]),m["d"].add(g["d"],g["e"],g["c"],g["b"],g["a"],b["b"],b["c"],b["d"],g["f"],b["a"]),m["b"].watch();var y=new d["a"].Store({modules:{pipelineLLO:f},state:{},getters:{},mutations:{}}),k=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"card"},[t.$slots.image?s("div",{staticClass:"card-image"},[t._t("image")],2):t._e(),t.$slots.header||t.title?s("div",{staticClass:"card-header"},[t._t("header",[s("h4",{staticClass:"card-title"},[t._v(t._s(t.title))]),t.subTitle?s("p",{staticClass:"card-category"},[t._v(t._s(t.subTitle))]):t._e()])],2):t._e(),t.$slots.default?s("div",{staticClass:"card-body"},[t._t("default")],2):t._e(),t._t("raw-content"),t.$slots.footer?s("div",{staticClass:"card-footer"},[s("hr"),t._t("footer")],2):t._e()],2)},w=[],_={name:"card",props:{title:String,subTitle:String}},C=_,x=s("2877"),O=Object(x["a"])(C,k,w,!1,null,null,null),S=O.exports;const $={url_80:"https://localhost:3000",url_443:"https://localhost:3000"};var L=s("7bb1"),R=s("4c93");Object(L["b"])("alpha_num",R["a"]),Object(L["b"])("required",{...R["b"],message:"This field is required"});var N={components:{card:S},props:{},data(){return{issocket:"close",setFilter:{},searchFor:{},resetFilter:{}}},beforeMount(){this.socketopen(),this.socketauthenticate(),console.log("send")},mounted(){},created(){var t=window.location.href,e=new URL(t);this.token=e.searchParams.get("token"),console.log("token "+this.token);y.dispatch("pipelineLLO/settoken",{token:this.token});this.socketopen()},beforeDestroy(){},computed:{httpOptions(){var t=this.token;return{headers:{Authorization:"Bearer "+t}}}},methods:{async onAction(t){if("start"==t){var e={action:"up"};e.token=this.token,this.$socket.client.open(),this.$socket.client.emit("start","test"),console.log("startobj "+JSON.stringify(e))}else"stop"==t?this.$socket.client.emit("stop","test"):"kill"==t&&this.$socket.client.emit("kill","test")},async socketopen(){this.$socket.client.open(),this.$socket.client.connect()},async socketauthenticate(){this.$socket.client.emit("authenticate",this.token)},async socketreconnect(){await this.socketopen();this.socketauthenticate()},async socketclose(){this.$socket.client.close()}},sockets:{connect(){console.log("socket connected socketdatasend"),this.issocket="open"},error(t){console.log("socket error "+JSON.stringify(t)),this.issocket="close"},connect_error(t){console.log("socket connect_error "+JSON.stringify(t)),this.issocket="close",this.socketopen(),this.socketreconnect()},disconnect(t){console.log("socket disconnect "+JSON.stringify(t)),this.issocket="close",this.socketreconnect()},connect_timeout(t){console.log("socket timeout "+JSON.stringify(t)),this.issocket="close",this.socketreconnect()},reconnect(t){console.log("socket reconnect attemptNumber "+JSON.stringify(t)),this.socketreconnect()},reconnect_attempt(t){console.log("socket reconnect_attempt "+JSON.stringify(t)),this.socketreconnect()},reconnecting(t){console.log("socket reconnecting "+JSON.stringify(t)),this.socketreconnect()},reconnect_error(t){console.log("socket reconnect_error "+JSON.stringify(t)),this.issocket="close",this.socketreconnect()},unauthorized(t){console.log("socket unauthorized "+JSON.stringify(t)),this.issocket="close"},socket_id_emit(t){console.log("socket id from server "+JSON.stringify(t)),this.issocket="open"},async logdata(t){console.log(" socket from logdata "+JSON.stringify(t));y.dispatch("pipelineLLO/addlog",{log:t});var e=y.getters["pipelineLLO/getlog"];this.log_path=[...new Set(e.map(t=>t.tailed_path))];var s="";for(let n of this.log_path)if(s=e.filter(t=>t.tailed_path===n).length,o["default"].set(this.log_path_lenght,n,s),s>this.loglenghttotal)y.dispatch("pipelineLLO/taillog",{path:n})},async message(t){console.log(" socket message "+JSON.stringify(t))},async message_out(t){console.log(" socket out "+JSON.stringify(t)),this.$root.$emit("hybrid_log_in",t)},async message_err(t){console.log(" socket err "+JSON.stringify(t)),this.$root.$emit("hybrid_log_in",t)},async message_close(t){console.log(" socket close "+JSON.stringify(t)),this.$root.$emit("hybrid_log_in",t)}},actions:{}},F=N,A=(s("4cf0"),Object(x["a"])(F,l,c,!1,null,null,null)),P=A.exports,E=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.showlloedit?s("b-row",{attrs:{"no-gutters":"","w-100":"","h-100":""}},[s("b-col",{attrs:{cols:"12",sm:"12",md:"12"}},[s("b-row",[s("b-col",{attrs:{cols:"4"}},[s("div",{staticClass:"input-group input-group-sm sm-3"})]),s("b-col",{attrs:{cols:"3"}},[s("div",{staticClass:"input-group input-group-sm sm-3"},[t.socketonline?s("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()])]),s("b-col",{attrs:{cols:"5"}},[s("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"}),s("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"},[s("div",{staticClass:"input-group-append"},[t.socketonline?s("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()]),s("div",{staticClass:"input-group-append"},[t.tryConsole?s("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.clear()}}},[t._v(" Clear")]):t._e()]),s("div",{staticClass:"input-group-append"},["sublime"==t.cmOptions.keyMap?s("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:t.infoFilter}},[t._v(" i")]):t._e()])])])],1),s("div",{staticClass:"codemirror"},[s("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)},j=[],T=s("8f94"),D=(s("c4e3"),s("21a6"),s("a7be"),s("bbca"),s("281e"),s("31c5"),s("9b74"),s("f6b6"),s("3c98"),s("9c7b"),s("715d"),s("b933"),s("23de"),s("02f0"),s("8c33"),s("7289"),s("2aed"),s("d72f"),s("0b6c"),s("9a48"),s("75f8"),s("697e"),s("aedd"),s("164b"),s("4895"),s("cbc8"),s("8d70"),s("9f09"),s("a2c1"),s("56b3"),s("d7d5"),{components:{codemirror:T["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 y.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,s){},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>',s=(t="","");this.$swal({title:"<strong>Key bindings</strong>",type:"info",html:e+t+s,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1})},async hotreload(){this.getinfo,await y.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("hybrid_log_in",t=>{this.code+=t.data,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("hybrid_log_in")},created(){this.token=new URL(location.href).searchParams.get("token"),this.swarmlabname=new URL(location.href).searchParams.get("pipelinename")}}),B=D,J=(s("0b43"),Object(x["a"])(B,E,j,!1,null,null,null)),I=J.exports,M=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"card",staticStyle:{"max-height":"100%"}},[o("v-wait",{attrs:{for:"myRunInstancetutor"}},[o("template",{slot:"waiting"},[o("div",[o("img",{attrs:{src:s("cf1c")}}),t._v(" Enter Lab_room... ")])])],2),o("div",{staticClass:"input-group input-group-sm sm-3"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.searchFor,expression:"searchFor"}],staticClass:"form-control",attrs:{type:"text","aria-label":"Small","aria-describedby":"inputGroup-sizing-sm",placeholder:"Search"},domProps:{value:t.searchFor},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.searchFor=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")])])]),o("vuetable",{key:t.vuetablekey,ref:"vuetable",attrs:{"api-url":t.apiurl,"api-mode":!0,"http-options":t.httpOptions,fields:t.fields,"item-actions":t.itemActions,"sort-order":t.sortOrder,"show-sort-icons":!0,"multi-sort":t.multiSort,"per-page":t.perpage,"pagination-path":"links.pagination","pagination-component":t.paginationComponent,"append-params":t.moreParams,"wrapper-class":"vuetable-wrapper","loading-class":"loading","detail-row-id":"id",css:t.css.table},on:{"vuetable:pagination-data":t.onPaginationData,"vuetable:load-success":t.loadsuccess},scopedSlots:t._u([{key:"action-slot",fn:function(e){return o("div",{},[o("button",{staticClass:"ti-thought btn btn-outline-secondary btn-sm",attrs:{round:""},on:{click:function(s){return t.onAction("run-item",e.rowData,e.rowIndex)}}})])}}])}),o("div",{staticClass:"vuetable-pagination ui basic segment grid"},[o("vuetable-pagination-info",{ref:"paginationInfo",attrs:{css:t.css.paginationInfo}}),o("vuetable-pagination",{ref:"pagination",attrs:{css:t.css.pagination},on:{"vuetable-pagination:change-page":t.onChangePage}})],1)],1)},V=[],z=s("af52"),K=s("127e"),U=s("3568"),q=s("b3c5"),G={components:{Vuetable:z["Vuetable"],VuetablePagination:U["a"],VuetablePaginationInfo:K["a"],VuetablePaginationDropdown:z["VuetablePaginationDropdown"]},props:{},data(){return{playbookInfo:{},token:"",playbook:{title:"",name:"",description:""},container:{name:"",view:0},pipeline:{},selected:"",options:[{text:"Packages",value:"packages"},{text:"Images",value:"images"},{text:"Scripts",value:"scripts"}],showModal:!1,visibility:[],active:!1,vuetablekey:0,fielddata:{},fields:[{name:"Names",title:'<span class="orange"></span>Name',sortField:"Names",visible:!0,dataClass:"left aligned col-3",width:"20%"},{name:"Image",title:'<span class="orange"></span>Image',sortField:"Image",visible:!0,dataClass:"left aligned col-3",width:"10%",formatter(t){const e=/^ondemand_playground/.test(t);if(e){var s='<p class="text-warning">Playground</p>';return s}s='<p class="text-info">Lab</p>';return s}},{name:"_id",title:'<span class="orange"></span>mongo',visible:!1},{name:"ID",sortField:"ID",titleClass:"center aligned",dataClass:"left aligned w-25",visible:!0,width:"10%"},{name:"gitrepoFullName",sortField:"gitrepoFullName",titleClass:"center aligned",dataClass:"left aligned w-25",visible:!1,width:"15%"},{name:"action-slot",title:"Actions",titleClass:"center aligned",dataClass:"center aligned",width:"20%"}],apiurl:$.url_80+"/dockerservices",css:q["a"],perpage:5,searchFor:"",sortOrder:[{field:"pipelinename",direction:"asc"}],multiSort:!0,paginationComponent:"vuetable-pagination",itemActions:[{name:"view-item",label:"",icon:"glyphicon glyphicon-zoom-in",class:"btn btn-info",extra:{title:"View","data-toggle":"tooltip","data-placement":"left"}},{name:"edit-item",label:"",icon:"glyphicon glyphicon-pencil",class:"btn btn-warning",extra:{title:"Edit","data-toggle":"tooltip","data-placement":"top"}},{name:"delete-item",label:"",icon:"glyphicon glyphicon-remove",class:"btn btn-danger",extra:{title:"Delete","data-toggle":"tooltip","data-placement":"right"}}],moreParams:{filter:"",type:"scripts",tutor:"yes"}}},mounted(){},created(){var t=window.location.href,e=new URL(t);this.token=e.searchParams.get("token"),console.log("token "+this.token)},beforeDestroy(){},computed:{httpOptions(){var t=this.token;return{headers:{Authorization:"Bearer "+t}}}},methods:{onError(t,e){var s=e,o="<h5>Bootstrap "+t+"</h5>";this.$swal({type:t,html:o+s,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1,cancelButtonText:"No, cancel!",showCancelButton:!1,showLoaderOnConfirm:!1,reverseButtons:!0,focusCancel:!0,confirmButtonText:"Ok!"})},setFilter(){this.moreParams={filter:this.searchFor,type:this.selected},o["default"].nextTick(()=>this.$refs.vuetable.refresh())},resetFilter(){this.moreParams={},this.searchFor="",o["default"].nextTick(()=>this.$refs.vuetable.refresh())},onPaginationData(t){this.$refs.pagination.setPaginationData(t),this.$refs.paginationInfo.setPaginationData(t)},onChangePage(t){this.$refs.vuetable.changePage(t)},editRow(t){alert("You clicked edit on"+JSON.stringify(t))},async onAction(t,e,s){"view-item"==t||"delete-item"==t&&this.$swal({type:"info",html:info+winfo,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1,cancelButtonText:"No, cancel!",showCancelButton:!0,showLoaderOnConfirm:!1,reverseButtons:!0,focusCancel:!0,confirmButtonText:"Yes, Delete it!"})},refreshVuetable(){this.$nextTick(()=>{this.vuetablekey+=1})},playbookinfoShow(t){return this.visibility[t]=!0},playbookinfo(t){return this.playbookInfo=t},rowClicked(t,e){return{html:!0,title:()=>"Hello <b>Popover:</b> "+ ++this.counter,content:()=>"The date is:<br><em>"+new Date+"</em>"}},loadsuccess(t){var e=t.data.data;this.fielddata=e;e.length}},actions:{}},H=G,Y=(s("0390"),Object(x["a"])(H,M,V,!1,null,null,null)),W=Y.exports,Q={components:{ViewNetwork:P,AdhocView:I,DockerServices:W},data(){return{loading:!1,consoleView:"off",productIndex:1}},mounted(){},beforeDestroy(){},created(){}},X=Q,Z=Object(x["a"])(X,i,r,!1,null,null,null),tt=Z.exports,et={name:"app",components:{NetworkTable:tt},data(){return{show:!0,token:"",SwarmabAsciiLabTemplate:""}},mounted(){},created(){},methods:{hybrid(t){console.log(t)}}},st=et,ot=(s("034f"),Object(x["a"])(st,n,a,!1,null,null,null)),nt=ot.exports,at=s("5886"),it=s("f2d6"),rt=s.n(it),lt=(s("c059"),s("f87c")),ct=s("8e27");o["default"].use(at["default"]),o["default"].use(rt.a);const dt=Object(ct["io"])("https://localhost:3000",{autoConnect:!1,reconnection:!0,reconnectionDelay:500,maxReconnectionAttempts:1/0,pingInterval:25e3,pingTimeout:6e4,transports:["websocket","polling"],secure:!0});o["default"].use(lt["a"],dt),o["default"].use(u["b"]);o["default"].component("ValidationProvider",L["a"]),o["default"].config.productionTip=!1,new o["default"]({el:"#app",store:y,wait:new rt.a,render:t=>t(nt)})},"5dec":function(t,e,s){},"778e":function(t,e,s){},"85ec":function(t,e,s){},b721:function(t,e,s){},c059:function(t,e,s){},cf1c:function(t,e,s){t.exports=s.p+"img/loading.f4404720.gif"},e454:function(t,e,s){}});
|
|
//# sourceMappingURL=app.a72e0553.js.map
|