|
@ -1,15 +1,11 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
|
|
|
<b-row no-gutters w-100 h-100 v-if="showlloedit"> |
|
|
<b-row no-gutters w-100 h-100 |
|
|
<b-col cols="12" sm="12" md="12"> |
|
|
v-if="showlloedit" |
|
|
<b-row> |
|
|
> |
|
|
|
|
|
<b-col cols="12" sm="12" md="12" > |
|
|
|
|
|
|
|
|
|
|
|
<b-row > |
|
|
|
|
|
<b-col cols="4"> |
|
|
<b-col cols="4"> |
|
|
<div class="input-group input-group-sm sm-3"> |
|
|
<div class="input-group input-group-sm sm-3"> |
|
|
<!-- |
|
|
<!-- |
|
|
<select |
|
|
<select |
|
|
class="custom-select custom-select-sm " |
|
|
class="custom-select custom-select-sm " |
|
|
@change="setKeymap" |
|
|
@change="setKeymap" |
|
@ -34,59 +30,76 @@ |
|
|
|
|
|
|
|
|
<b-col cols="3"> |
|
|
<b-col cols="3"> |
|
|
<div class="input-group input-group-sm sm-3"> |
|
|
<div class="input-group input-group-sm sm-3"> |
|
|
<button type="button" |
|
|
<button |
|
|
|
|
|
type="button" |
|
|
round |
|
|
round |
|
|
disable |
|
|
disable |
|
|
class="btn btn-outline-info btn-sm" |
|
|
class="btn btn-outline-info btn-sm" |
|
|
v-if="socketonline" |
|
|
v-if="socketonline" |
|
|
@click="socketconnect" |
|
|
@click="socketconnect" |
|
|
> |
|
|
> |
|
|
online </button> |
|
|
online |
|
|
<button type="button" |
|
|
</button> |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
round |
|
|
round |
|
|
class="btn btn-outline-info btn-sm" |
|
|
class="btn btn-outline-info btn-sm" |
|
|
v-else |
|
|
v-else |
|
|
@click="socketconnect" |
|
|
@click="socketconnect" |
|
|
> |
|
|
> |
|
|
socket disconnected</button> |
|
|
socket disconnected |
|
|
<button type="button" |
|
|
</button> |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
round |
|
|
round |
|
|
class="btn btn-outline-info btn-sm" |
|
|
class="btn btn-outline-info btn-sm" |
|
|
v-if="socketonline" |
|
|
v-if="socketonline" |
|
|
@click="hotreload()"> |
|
|
@click="hotreload()" |
|
|
Hot_Reload</button> |
|
|
> |
|
|
|
|
|
Hot_Reload |
|
|
|
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
</b-col> |
|
|
|
|
|
|
|
|
<b-col cols="5" > |
|
|
<b-col cols="5"> |
|
|
<div class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<div |
|
|
</div> |
|
|
class="input-group input-group-sm d-flex justify-content-end" |
|
|
|
|
|
></div> |
|
|
<div class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<div class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<div class="input-group-append"> |
|
|
<div class="input-group-append"> |
|
|
<button type="button" |
|
|
<button |
|
|
|
|
|
type="button" |
|
|
round |
|
|
round |
|
|
class="btn btn-outline-warning btn-sm" |
|
|
class="btn btn-outline-warning btn-sm" |
|
|
v-if="socketonline" |
|
|
v-if="socketonline" |
|
|
@click="infoHotreload()"> |
|
|
@click="infoHotreload()" |
|
|
Hot_Reload_HowTo</button> |
|
|
> |
|
|
|
|
|
Hot_Reload_HowTo |
|
|
|
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="input-group-append"> |
|
|
<div class="input-group-append"> |
|
|
<button type="button" |
|
|
<button |
|
|
|
|
|
type="button" |
|
|
round |
|
|
round |
|
|
class="btn btn-outline-warning btn-sm" |
|
|
class="btn btn-outline-warning btn-sm" |
|
|
v-if="tryConsole" |
|
|
v-if="tryConsole" |
|
|
@click="clear()"> |
|
|
@click="clear()" |
|
|
Clear</button> |
|
|
> |
|
|
|
|
|
Clear |
|
|
|
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="input-group-append"> |
|
|
<div class="input-group-append"> |
|
|
<button type="button" |
|
|
<button |
|
|
|
|
|
type="button" |
|
|
round |
|
|
round |
|
|
class="btn btn-outline-info btn-sm" |
|
|
class="btn btn-outline-info btn-sm" |
|
|
v-if="cmOptions.keyMap == 'sublime'" |
|
|
v-if="cmOptions.keyMap == 'sublime'" |
|
|
@click="infoFilter"> |
|
|
@click="infoFilter" |
|
|
i</button> |
|
|
> |
|
|
|
|
|
i |
|
|
|
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
<!-- |
|
|
<!-- |
|
|
<div class="input-group-append"> |
|
|
<div class="input-group-append"> |
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
@ -100,7 +113,7 @@ |
|
|
</b-col> |
|
|
</b-col> |
|
|
</b-row> |
|
|
</b-row> |
|
|
|
|
|
|
|
|
<div class="codemirror" > |
|
|
<div class="codemirror"> |
|
|
<codemirror |
|
|
<codemirror |
|
|
ref="myCm" |
|
|
ref="myCm" |
|
|
:value="code" |
|
|
:value="code" |
|
@ -113,258 +126,253 @@ |
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
</b-col> |
|
|
</b-row> |
|
|
</b-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import {mapState, mapGetters, mapActions,dispatch} from 'vuex' |
|
|
import { mapState, mapGetters, mapActions, dispatch } from "vuex"; |
|
|
import Vue from 'vue' |
|
|
import Vue from "vue"; |
|
|
import store from '@/store/index' |
|
|
import store from "@/store/index"; |
|
|
|
|
|
|
|
|
|
|
|
import { codemirror } from "vue-codemirror"; |
|
|
import { codemirror } from 'vue-codemirror' |
|
|
import JSZip from "jszip"; |
|
|
import JSZip from 'jszip'; |
|
|
import FileSaver from "file-saver"; |
|
|
import FileSaver from 'file-saver'; |
|
|
import "codemirror/lib/codemirror.css"; |
|
|
import 'codemirror/lib/codemirror.css' |
|
|
import "codemirror/theme/neat.css"; |
|
|
import 'codemirror/theme/neat.css' |
|
|
import "codemirror/theme/paraiso-light.css"; |
|
|
import 'codemirror/theme/paraiso-light.css' |
|
|
import "codemirror/addon/selection/active-line.js"; |
|
|
import'codemirror/addon/selection/active-line.js' |
|
|
|
|
|
|
|
|
import "codemirror/addon/hint/show-hint.js"; |
|
|
import'codemirror/addon/hint/show-hint.js' |
|
|
import "codemirror/addon/hint/show-hint.css"; |
|
|
import'codemirror/addon/hint/show-hint.css' |
|
|
import "codemirror/addon/hint/javascript-hint.js"; |
|
|
import'codemirror/addon/hint/javascript-hint.js' |
|
|
import "codemirror/addon/selection/active-line.js"; |
|
|
import'codemirror/addon/selection/active-line.js' |
|
|
import "codemirror/addon/scroll/annotatescrollbar.js"; |
|
|
import'codemirror/addon/scroll/annotatescrollbar.js' |
|
|
import "codemirror/addon/search/matchesonscrollbar.js"; |
|
|
import'codemirror/addon/search/matchesonscrollbar.js' |
|
|
import "codemirror/addon/search/searchcursor.js"; |
|
|
import'codemirror/addon/search/searchcursor.js' |
|
|
import "codemirror/addon/search/match-highlighter.js"; |
|
|
import'codemirror/addon/search/match-highlighter.js' |
|
|
|
|
|
|
|
|
import "codemirror/mode/shell/shell.js"; |
|
|
import'codemirror/mode/shell/shell.js' |
|
|
import "codemirror/addon/edit/matchbrackets.js"; |
|
|
import'codemirror/addon/edit/matchbrackets.js' |
|
|
import "codemirror/addon/comment/comment.js"; |
|
|
import'codemirror/addon/comment/comment.js' |
|
|
import "codemirror/addon/dialog/dialog.js"; |
|
|
import'codemirror/addon/dialog/dialog.js' |
|
|
import "codemirror/addon/dialog/dialog.css"; |
|
|
import'codemirror/addon/dialog/dialog.css' |
|
|
import "codemirror/addon/search/searchcursor.js"; |
|
|
import'codemirror/addon/search/searchcursor.js' |
|
|
import "codemirror/addon/search/search.js"; |
|
|
import'codemirror/addon/search/search.js' |
|
|
import "codemirror/keymap/sublime.js"; |
|
|
import'codemirror/keymap/sublime.js' |
|
|
import "codemirror/keymap/vim.js"; |
|
|
import'codemirror/keymap/vim.js' |
|
|
|
|
|
|
|
|
import "codemirror/addon/fold/foldgutter.css"; |
|
|
import'codemirror/addon/fold/foldgutter.css' |
|
|
import "codemirror/addon/fold/brace-fold.js"; |
|
|
import'codemirror/addon/fold/brace-fold.js' |
|
|
import "codemirror/addon/fold/comment-fold.js"; |
|
|
import'codemirror/addon/fold/comment-fold.js' |
|
|
import "codemirror/addon/fold/foldcode.js"; |
|
|
import'codemirror/addon/fold/foldcode.js' |
|
|
import "codemirror/addon/fold/foldgutter.js"; |
|
|
import'codemirror/addon/fold/foldgutter.js' |
|
|
import "codemirror/addon/fold/indent-fold.js"; |
|
|
import'codemirror/addon/fold/indent-fold.js' |
|
|
import "codemirror/addon/fold/markdown-fold.js"; |
|
|
import'codemirror/addon/fold/markdown-fold.js' |
|
|
import "codemirror/addon/fold/xml-fold.js"; |
|
|
import'codemirror/addon/fold/xml-fold.js' |
|
|
import "codemirror/lib/codemirror"; |
|
|
import 'codemirror/lib/codemirror'; |
|
|
import "codemirror/addon/display/placeholder"; |
|
|
import 'codemirror/addon/display/placeholder'; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
codemirror |
|
|
codemirror, |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
socketonline:false, |
|
|
socketonline: false, |
|
|
tryConsole:false, |
|
|
tryConsole: false, |
|
|
ssl:{}, |
|
|
ssl: {}, |
|
|
getinfo:'', |
|
|
getinfo: "", |
|
|
token:'', |
|
|
token: "", |
|
|
swarmlabname:'', |
|
|
swarmlabname: "", |
|
|
|
|
|
|
|
|
code: '', |
|
|
code: "", |
|
|
editchoice: '', |
|
|
editchoice: "", |
|
|
optionsedit: [ |
|
|
optionsedit: [ |
|
|
{ text: 'code', value: 'code' }, |
|
|
{ text: "code", value: "code" }, |
|
|
{ text: 'text', value: 'text' } |
|
|
{ text: "text", value: "text" }, |
|
|
|
|
|
], |
|
|
|
|
|
llodesc: [ |
|
|
|
|
|
{ |
|
|
|
|
|
llo_url: "", |
|
|
|
|
|
llo_name: "", |
|
|
|
|
|
llo_author: "", |
|
|
|
|
|
llo_intro: "", |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
llo: [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: 0, |
|
|
|
|
|
rm: false, |
|
|
|
|
|
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: "", |
|
|
|
|
|
}, |
|
|
], |
|
|
], |
|
|
llodesc:[{ |
|
|
|
|
|
llo_url : '', |
|
|
|
|
|
llo_name : '', |
|
|
|
|
|
llo_author : '', |
|
|
|
|
|
llo_intro : '' |
|
|
|
|
|
}], |
|
|
|
|
|
llo:[{ |
|
|
|
|
|
id : 0, |
|
|
|
|
|
rm : false, |
|
|
|
|
|
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: [], |
|
|
searchLLO: [], |
|
|
searchLLOactive : false, |
|
|
searchLLOactive: false, |
|
|
ADOC_html_code:'', |
|
|
ADOC_html_code: "", |
|
|
challenge:[], |
|
|
challenge: [], |
|
|
action:'', |
|
|
action: "", |
|
|
tryLLO:[], |
|
|
tryLLO: [], |
|
|
service:'os2', |
|
|
service: "os2", |
|
|
active:0, |
|
|
active: 0, |
|
|
activecount:0, |
|
|
activecount: 0, |
|
|
remove:'', |
|
|
remove: "", |
|
|
activeField:'', |
|
|
activeField: "", |
|
|
bootstrap:false, |
|
|
bootstrap: false, |
|
|
firstbootstrap:0, |
|
|
firstbootstrap: 0, |
|
|
htmlasciitmp:'', |
|
|
htmlasciitmp: "", |
|
|
datafile: 'https://git.swarmlab.io:3000/labs/examples-mpi2/raw/branch/master/0_netstat/data', |
|
|
datafile: |
|
|
datadir: '0_netstat/data', |
|
|
"https://git.swarmlab.io:3000/labs/examples-mpi2/raw/branch/master/0_netstat/data", |
|
|
LearningObject:'', |
|
|
datadir: "0_netstat/data", |
|
|
showllo:true, |
|
|
LearningObject: "", |
|
|
showlloedit:true, |
|
|
showllo: true, |
|
|
selected: 'sublime', |
|
|
showlloedit: true, |
|
|
|
|
|
selected: "sublime", |
|
|
options: [ |
|
|
options: [ |
|
|
{ text: 'vim', value: 'vim' }, |
|
|
{ text: "vim", value: "vim" }, |
|
|
{ text: 'sublime', value: 'sublime' } |
|
|
{ text: "sublime", value: "sublime" }, |
|
|
], |
|
|
], |
|
|
optionsmime: [ |
|
|
optionsmime: [ |
|
|
{ text: 'sh', value: 'bash' }, |
|
|
{ text: "sh", value: "bash" }, |
|
|
{ text: 'javascript', value: 'javascript' }, |
|
|
{ text: "javascript", value: "javascript" }, |
|
|
{ text: 'python', value: 'python' }, |
|
|
{ text: "python", value: "python" }, |
|
|
{ text: 'php', value: 'php' }, |
|
|
{ text: "php", value: "php" }, |
|
|
{ text: 'sql', value: 'sq;' }, |
|
|
{ text: "sql", value: "sq;" }, |
|
|
{ text: 'xml', value: 'xml' }, |
|
|
{ text: "xml", value: "xml" }, |
|
|
{ text: 'c', value: 'c' } |
|
|
{ text: "c", value: "c" }, |
|
|
], |
|
|
], |
|
|
pValidate: false, |
|
|
pValidate: false, |
|
|
cmOptions: { |
|
|
cmOptions: { |
|
|
tabSize: 2, |
|
|
tabSize: 2, |
|
|
styleActiveLine: true, |
|
|
styleActiveLine: true, |
|
|
lineNumbers: true, |
|
|
lineNumbers: true, |
|
|
lineSeparator:'\n', |
|
|
lineSeparator: "\n", |
|
|
line: true, |
|
|
line: true, |
|
|
foldGutter: true, |
|
|
foldGutter: true, |
|
|
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], |
|
|
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], |
|
|
highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: true }, |
|
|
highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: true }, |
|
|
styleSelectedText: true, |
|
|
styleSelectedText: true, |
|
|
mode: 'shell', |
|
|
mode: "shell", |
|
|
hintOptions:{ |
|
|
hintOptions: { |
|
|
completeSingle: false |
|
|
completeSingle: false, |
|
|
}, |
|
|
}, |
|
|
keyMap: "sublime", |
|
|
keyMap: "sublime", |
|
|
//keyMap: "vim", |
|
|
//keyMap: "vim", |
|
|
matchBrackets: true, |
|
|
matchBrackets: true, |
|
|
showCursorWhenSelecting: true, |
|
|
showCursorWhenSelecting: true, |
|
|
indentUnit:this.ADOC_html_code, |
|
|
indentUnit: this.ADOC_html_code, |
|
|
lineWrapping: true, |
|
|
lineWrapping: true, |
|
|
//theme: 'neat', |
|
|
//theme: 'neat', |
|
|
theme: 'paraiso-light', |
|
|
theme: "paraiso-light", |
|
|
refresh:true, |
|
|
refresh: true, |
|
|
readOnly: true, |
|
|
readOnly: true, |
|
|
autofocus: false, |
|
|
autofocus: false, |
|
|
extraKeys: { "Ctrl": "autocomplete" } |
|
|
extraKeys: { Ctrl: "autocomplete" }, |
|
|
}, |
|
|
}, |
|
|
ADOC_html:[] |
|
|
ADOC_html: [], |
|
|
} |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
socketconnect() { |
|
|
socketconnect () { |
|
|
|
|
|
// send to runLLO |
|
|
// send to runLLO |
|
|
this.$root.$emit('SERVER_socket_connect') |
|
|
this.$root.$emit("SERVER_socket_connect"); |
|
|
}, |
|
|
}, |
|
|
clear () { |
|
|
clear() { |
|
|
this.tryConsole = false |
|
|
this.tryConsole = false; |
|
|
this.code = '' |
|
|
this.code = ""; |
|
|
}, |
|
|
}, |
|
|
async getdata () { |
|
|
async getdata() { |
|
|
|
|
|
var field = this.getinfo; |
|
|
var field = this.getinfo |
|
|
var log = await store.dispatch("pipelineLLO/get_data", { |
|
|
var log = await store.dispatch("pipelineLLO/get_data",{ |
|
|
code: field, |
|
|
code:field |
|
|
}); |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async showactive(index) { |
|
|
async showactive(index) { |
|
|
this.topwindow(index) |
|
|
this.topwindow(index); |
|
|
}, |
|
|
}, |
|
|
onCmReady(cm) { |
|
|
onCmReady(cm) { |
|
|
cm.on('change', (cm, chg) => { |
|
|
cm.on("change", (cm, chg) => {}), |
|
|
}), |
|
|
cm.on("keypress", () => { |
|
|
cm.on('keypress', () => { |
|
|
cm.showHint({ completeSingle: false }); |
|
|
cm.showHint({completeSingle:false}) |
|
|
}); |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onCmCursorActivity(a, b, c) { |
|
|
|
|
|
}, |
|
|
|
|
|
onCmFocus(cm) { |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
onCmCursorActivity(a, b, c) {}, |
|
|
|
|
|
onCmFocus(cm) {}, |
|
|
onCmCodeChange(newCode) { |
|
|
onCmCodeChange(newCode) { |
|
|
this.code = newCode |
|
|
this.code = newCode; |
|
|
//this.$root.$emit('socket_add',this.code) |
|
|
//this.$root.$emit('socket_add',this.code) |
|
|
}, |
|
|
}, |
|
|
handleChange() { |
|
|
handleChange() {}, |
|
|
}, |
|
|
setKeymap() { |
|
|
setKeymap () { |
|
|
this.cmOptions.keyMap = this.selected; |
|
|
this.cmOptions.keyMap = this.selected |
|
|
|
|
|
}, |
|
|
}, |
|
|
infoFilter() { |
|
|
infoFilter() { |
|
|
var title1='<h3>Playbook Images</h3>' |
|
|
var title1 = "<h3>Playbook Images</h3>"; |
|
|
var winfop='<table class="table table-striped table-sm ">'+ |
|
|
var winfop = |
|
|
'<tr><td class="text-left">Shift-Tab</td> <td class="text-left">indentLess</td></tr>'+ |
|
|
'<table class="table table-striped table-sm ">' + |
|
|
'<tr><td class="text-left">Alt-Q</td> <td class="text-left">wrapLines</td></tr>'+ |
|
|
'<tr><td class="text-left">Shift-Tab</td> <td class="text-left">indentLess</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-Up</td> <td class="text-left">scrollLineUp</td></tr>'+ |
|
|
'<tr><td class="text-left">Alt-Q</td> <td class="text-left">wrapLines</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-Down</td> <td class="text-left">scrollLineDown</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-Up</td> <td class="text-left">scrollLineUp</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-L</td> <td class="text-left">selectLine</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-Down</td> <td class="text-left">scrollLineDown</td></tr>' + |
|
|
'<tr><td class="text-left">Esc</td> <td class="text-left">singleSelectionTop</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-L</td> <td class="text-left">selectLine</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-Enter</td> <td class="text-left">insertLineAfter</td></tr>'+ |
|
|
'<tr><td class="text-left">Esc</td> <td class="text-left">singleSelectionTop</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-D</td> <td class="text-left">selectNextOccurrence</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-Enter</td> <td class="text-left">insertLineAfter</td></tr>' + |
|
|
'<tr><td class="text-left">Shift-Ctrl-Space</td> <td class="text-left">selectScope</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-D</td> <td class="text-left">selectNextOccurrence</td></tr>' + |
|
|
'<tr><td class="text-left">Shift-Ctrl-M</td> <td class="text-left">selectBetweenBrackets</td></tr>'+ |
|
|
'<tr><td class="text-left">Shift-Ctrl-Space</td> <td class="text-left">selectScope</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-M</td> <td class="text-left">goToBracket</td></tr>'+ |
|
|
'<tr><td class="text-left">Shift-Ctrl-M</td> <td class="text-left">selectBetweenBrackets</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-M</td> <td class="text-left">goToBracket</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-Y</td> <td class="text-left">sublimeYank</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-C</td> <td class="text-left">showInCenter</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-G</td> <td class="text-left">clearBookmarks</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-Backspace</td> <td class="text-left">delLineLeft</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-K Ctrl-0</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-K Ctrl-J</td> <td class="text-left">unfoldAll</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-Alt-Down</td> <td class="text-left">addCursorToNextLine</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-Alt-Up</td> <td class="text-left">addCursorToPrevLine</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-F3</td> <td class="text-left">findUnder</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-Alt-Down</td> <td class="text-left">addCursorToNextLine</td></tr>' + |
|
|
'<tr><td class="text-left">Shift-Ctrl-F3</td> <td class="text-left">findUnderPrevious</td></tr>'+ |
|
|
'<tr><td class="text-left">Ctrl-F3</td> <td class="text-left">findUnder</td></tr>' + |
|
|
'<tr><td class="text-left">Shift-Ctrl-[</td> <td class="text-left">fold</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">unfold</td></tr>'+ |
|
|
'<tr><td class="text-left">Shift-Ctrl-[</td> <td class="text-left">fold</td></tr>' + |
|
|
'<tr><td class="text-left">Ctrl-F</td> <td class="text-left">find</td></tr>'+ |
|
|
'<tr><td class="text-left">Shift-Ctrl-]</td> <td class="text-left">unfold</td></tr>' + |
|
|
'</table>' |
|
|
'<tr><td class="text-left">Ctrl-F</td> <td class="text-left">find</td></tr>' + |
|
|
|
|
|
"</table>"; |
|
|
var title1='' |
|
|
|
|
|
var winfo='' |
|
|
var title1 = ""; |
|
|
|
|
|
var winfo = ""; |
|
|
this.$swal({ |
|
|
this.$swal({ |
|
|
title: '<strong>Key bindings</strong>', |
|
|
title: "<strong>Key bindings</strong>", |
|
|
type: 'info', |
|
|
type: "info", |
|
|
html: winfop+title1+winfo, |
|
|
html: winfop + title1 + winfo, |
|
|
showCloseButton: true, |
|
|
showCloseButton: true, |
|
|
showLoaderOnConfirm: false, |
|
|
showLoaderOnConfirm: false, |
|
|
allowOutsideClick: false |
|
|
allowOutsideClick: false, |
|
|
}) |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
async hotreload() { |
|
|
async hotreload() { |
|
|
var field = this.getinfo |
|
|
var field = this.getinfo; |
|
|
var log = await store.dispatch("pipelineLLO/hotreload",{ |
|
|
var log = await store.dispatch("pipelineLLO/hotreload", { |
|
|
token:this.token, |
|
|
token: this.token, |
|
|
swarmlabname:this.swarmlabname |
|
|
swarmlabname: this.swarmlabname, |
|
|
}) |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
infoHotreload() { |
|
|
infoHotreload() { |
|
|
var html1 = ` <div style="overflow-x: auto;"> <table class="table table-striped table-sm "> |
|
|
var html1 = ` <div style="overflow-x: auto;"> <table class="table table-striped table-sm "> |
|
@ -406,61 +414,55 @@ export default { |
|
|
<td class="text-left" colspan="2"><i>Execute script every time you run git push</i></td> |
|
|
<td class="text-left" colspan="2"><i>Execute script every time you run git push</i></td> |
|
|
</tr> |
|
|
</tr> |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table></div>` |
|
|
</table></div>`; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$swal({ |
|
|
this.$swal({ |
|
|
title: '<strong>HowTo</strong>', |
|
|
title: "<strong>HowTo</strong>", |
|
|
type: 'info', |
|
|
type: "info", |
|
|
html: html1, |
|
|
html: html1, |
|
|
showCloseButton: true, |
|
|
showCloseButton: true, |
|
|
showLoaderOnConfirm: false, |
|
|
showLoaderOnConfirm: false, |
|
|
allowOutsideClick: false |
|
|
allowOutsideClick: false, |
|
|
}) |
|
|
}); |
|
|
} |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
codemirror() { |
|
|
codemirror() { |
|
|
return this.$refs.myCm.codemirror |
|
|
return this.$refs.myCm.codemirror; |
|
|
} |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
// from runLLO |
|
|
// from runLLO |
|
|
this.$root.$on('SERVER_socket_status', (v) => { |
|
|
this.$root.$on("SERVER_socket_status", (v) => { |
|
|
this.$nextTick(function () { |
|
|
this.$nextTick(function() { |
|
|
if(v == 'off'){ |
|
|
if (v == "off") { |
|
|
this.socketonline = false |
|
|
this.socketonline = false; |
|
|
}else if(v == 'on'){ |
|
|
} else if (v == "on") { |
|
|
this.socketonline = true |
|
|
this.socketonline = true; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
// from runLLO |
|
|
// from runLLO |
|
|
this.$root.$on('playground_log_in', (path) => { |
|
|
this.$root.$on("playground_log_in", (path) => { |
|
|
//this.$nextTick(function () { |
|
|
//this.$nextTick(function () { |
|
|
var restapi = store.getters['pipelineLLO/getrestapi']; |
|
|
var restapi = store.getters["pipelineLLO/getrestapi"]; |
|
|
if(restapi == "off"){ // rest off ara socket |
|
|
if (restapi == "off") { |
|
|
var logtmp = store.getters['pipelineLLO/getlog']; |
|
|
// rest off ara socket |
|
|
}else if(restapi == "on"){ // rest on ara read from rest not from socket |
|
|
var logtmp = store.getters["pipelineLLO/getlog"]; |
|
|
var logtmp = store.getters['pipelineLLO/getmongolog']; |
|
|
} else if (restapi == "on") { |
|
|
|
|
|
// rest on ara read from rest not from socket |
|
|
|
|
|
var logtmp = store.getters["pipelineLLO/getmongolog"]; |
|
|
} |
|
|
} |
|
|
console.log('logtmp-roi '+ JSON.stringify(logtmp)) |
|
|
console.log("logtmp-roi " + JSON.stringify(logtmp)); |
|
|
var itemlog = '' |
|
|
var itemlog = ""; |
|
|
this.code = '' |
|
|
this.code = ""; |
|
|
itemlog = logtmp.filter(item1 => item1.tailed_path === path); |
|
|
itemlog = logtmp.filter((item1) => item1.tailed_path === path); |
|
|
//Vue.set(this.log_path_lenght, item, loglenght); |
|
|
//Vue.set(this.log_path_lenght, item, loglenght); |
|
|
console.log('logtmp22 '+ JSON.stringify(itemlog)) |
|
|
console.log("logtmp22 " + JSON.stringify(itemlog)); |
|
|
for (let iteml of itemlog) { |
|
|
for (let iteml of itemlog) { |
|
|
this.code += iteml.message |
|
|
this.code += iteml.message + " " + iteml.tailed_path + " " + iteml.date; |
|
|
+ ' ' |
|
|
|
|
|
+ iteml.tailed_path |
|
|
|
|
|
+ ' ' |
|
|
|
|
|
+ iteml.date |
|
|
|
|
|
|
|
|
|
|
|
this.code += "\n" |
|
|
this.code += "\n"; |
|
|
} |
|
|
} |
|
|
/* |
|
|
/* |
|
|
for (let itemlog of logtmp) { |
|
|
for (let itemlog of logtmp) { |
|
@ -489,30 +491,34 @@ export default { |
|
|
|
|
|
|
|
|
//this.code += v |
|
|
//this.code += v |
|
|
//this.code += "\n" |
|
|
//this.code += "\n" |
|
|
this.$refs.myCm.codemirror.setCursor(this.$refs.myCm.codemirror.lineCount(), 0); |
|
|
this.$refs.myCm.codemirror.setCursor( |
|
|
this.tryConsole=true |
|
|
this.$refs.myCm.codemirror.lineCount(), |
|
|
|
|
|
0 |
|
|
|
|
|
); |
|
|
|
|
|
this.tryConsole = true; |
|
|
//}) |
|
|
//}) |
|
|
}) |
|
|
}); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
beforeDestroy () { |
|
|
beforeDestroy() { |
|
|
this.$root.$off('SERVER_socket_status') |
|
|
this.$root.$off("SERVER_socket_status"); |
|
|
this.$root.$off('playground_log_in') |
|
|
this.$root.$off("playground_log_in"); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created () { |
|
|
created() { |
|
|
this.token = new URL(location.href).searchParams.get('token'); |
|
|
//LEFOS TOKEN ==== |
|
|
this.swarmlabname = new URL(location.href).searchParams.get('pipelinename'); |
|
|
//this.token = new URL(location.href).searchParams.get("token"); |
|
|
} |
|
|
this.token = new URL( |
|
|
|
|
|
"https://api-client.swarmlab.io:8088/?token=8ee68923f567ad2fb5835f579c4d74f0cad6b1d1" |
|
|
|
|
|
).searchParams.get("token"); |
|
|
|
|
|
|
|
|
|
|
|
this.swarmlabname = new URL(location.href).searchParams.get("pipelinename"); |
|
|
|
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
.CodeMirror { |
|
|
.CodeMirror { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
font-family: monospace; |
|
|
font-family: monospace; |
|
|
height: 550px; |
|
|
height: 550px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |
|
|