|
@ -18,48 +18,63 @@ |
|
|
> |
|
|
> |
|
|
online |
|
|
online |
|
|
</button> |
|
|
</button> |
|
|
<div v-if="socketonline"> |
|
|
<div v-if="socketonline"></div> |
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
|
round |
|
|
round |
|
|
disable |
|
|
|
|
|
class="btn btn-outline-info btn-sm" |
|
|
class="btn btn-outline-info btn-sm" |
|
|
v-if="socketonline" |
|
|
v-else |
|
|
@click="showHistory" |
|
|
@click="socketconnect" |
|
|
> |
|
|
> |
|
|
{{ this.alllogs }} |
|
|
socket disconnected |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</b-col> |
|
|
|
|
|
|
|
|
|
|
|
<b-col cols="3"> |
|
|
|
|
|
<div class="input-group input-group-sm sm-3"> |
|
|
|
|
|
<div v-if="socketonline" class="search-wrapper"> |
|
|
|
|
|
<label class="filters" for="search">Search a log:</label> |
|
|
|
|
|
<input |
|
|
|
|
|
id="search" |
|
|
|
|
|
type="text" |
|
|
|
|
|
v-model="searchparam" |
|
|
|
|
|
placeholder="Log" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<label class="filters" for="list">Pick a service:</label> |
|
|
|
|
|
<select class="filters" id="list" v-model="selected"> |
|
|
|
|
|
<option selected value="All">All</option> |
|
|
|
|
|
<option v-for="item in this.items" v-bind:value="item.name"> |
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
</option> |
|
|
|
|
|
</select> |
|
|
<button |
|
|
<button |
|
|
type="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="showChart" |
|
|
@click="showHistory" |
|
|
> |
|
|
> |
|
|
{{ this.chartbut }} |
|
|
{{ this.alllogs }} |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</b-col> |
|
|
|
|
|
|
|
|
|
|
|
<b-col cols="5"> |
|
|
|
|
|
<div class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
|
round |
|
|
round |
|
|
|
|
|
disable |
|
|
class="btn btn-outline-info btn-sm" |
|
|
class="btn btn-outline-info btn-sm" |
|
|
v-else |
|
|
v-if="socketonline" |
|
|
@click="socketconnect" |
|
|
@click="showChart" |
|
|
> |
|
|
> |
|
|
socket disconnected |
|
|
{{ this.chartbut }} |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
|
|
|
|
|
|
|
|
|
<b-col cols="3"> |
|
|
|
|
|
<div class="input-group input-group-sm sm-3"></div> |
|
|
|
|
|
</b-col> |
|
|
|
|
|
|
|
|
|
|
|
<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 class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<div class="input-group-append"> |
|
|
<div class="input-group-append"> |
|
|
<button |
|
|
<button |
|
@ -89,6 +104,8 @@ |
|
|
:show-sort-icons="true" |
|
|
:show-sort-icons="true" |
|
|
:multi-sort="multiSort" |
|
|
:multi-sort="multiSort" |
|
|
:per-page="perpage" |
|
|
:per-page="perpage" |
|
|
|
|
|
:append-params="extraparams" |
|
|
|
|
|
table-height="300px" |
|
|
pagination-path="links.pagination" |
|
|
pagination-path="links.pagination" |
|
|
detail-row-id="id" |
|
|
detail-row-id="id" |
|
|
wrapper-class="vuetable-wrapper" |
|
|
wrapper-class="vuetable-wrapper" |
|
@ -209,6 +226,11 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
items: [], |
|
|
|
|
|
extraparams: { |
|
|
|
|
|
logtext: "", |
|
|
|
|
|
}, |
|
|
|
|
|
searchparam: "", |
|
|
chartstatus: false, |
|
|
chartstatus: false, |
|
|
chartbut: "Show HighChart", |
|
|
chartbut: "Show HighChart", |
|
|
chartOptions: { |
|
|
chartOptions: { |
|
@ -240,12 +262,13 @@ export default { |
|
|
title: "Log", |
|
|
title: "Log", |
|
|
sortField: "message", |
|
|
sortField: "message", |
|
|
visible: true, |
|
|
visible: true, |
|
|
|
|
|
width: "45%%", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "timestamp", |
|
|
name: "timestamp", |
|
|
title: "Time", |
|
|
title: "Time", |
|
|
sortField: "time", |
|
|
sortField: "time", |
|
|
width: "20%", |
|
|
width: "25%", |
|
|
visible: true, |
|
|
visible: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -256,13 +279,16 @@ export default { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "process_id", |
|
|
name: "process_id", |
|
|
|
|
|
title: "P_ID", |
|
|
visible: true, |
|
|
visible: true, |
|
|
|
|
|
width: "5%", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "app_name", |
|
|
name: "app_name", |
|
|
visible: true, |
|
|
visible: true, |
|
|
sortField: "app_name", |
|
|
sortField: "app_name", |
|
|
title: '<span class="orange"></span>App Name', |
|
|
title: '<span class="orange"></span>App Name', |
|
|
|
|
|
width: "15%", |
|
|
}, |
|
|
}, |
|
|
// 'timestamp', |
|
|
// 'timestamp', |
|
|
// 'type', |
|
|
// 'type', |
|
@ -314,7 +340,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
alllogs: "Show app logs", |
|
|
alllogs: "Search", |
|
|
socketonline: false, |
|
|
socketonline: false, |
|
|
tryConsole: false, |
|
|
tryConsole: false, |
|
|
history: false, |
|
|
history: false, |
|
@ -385,7 +411,7 @@ export default { |
|
|
LearningObject: "", |
|
|
LearningObject: "", |
|
|
showllo: true, |
|
|
showllo: true, |
|
|
showlloedit: true, |
|
|
showlloedit: true, |
|
|
selected: "sublime", |
|
|
selected: "All", |
|
|
options: [ |
|
|
options: [ |
|
|
{ text: "vim", value: "vim" }, |
|
|
{ text: "vim", value: "vim" }, |
|
|
{ text: "sublime", value: "sublime" }, |
|
|
{ text: "sublime", value: "sublime" }, |
|
@ -481,13 +507,26 @@ export default { |
|
|
this.chartbut = "Show HighChart"; |
|
|
this.chartbut = "Show HighChart"; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
async getServices() { |
|
|
|
|
|
await axios.get("http://localhost:3000/services").then((res) => { |
|
|
|
|
|
res.data.forEach((val) => { |
|
|
|
|
|
//console.log(val); |
|
|
|
|
|
this.items.push({ |
|
|
|
|
|
name: val, |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
// this.items.push({ |
|
|
|
|
|
// name: "All", |
|
|
|
|
|
// }); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
showHistory() { |
|
|
showHistory() { |
|
|
|
|
|
this.extraparams.logtext = this.searchparam; |
|
|
|
|
|
this.extraparams.selected = this.selected; |
|
|
if (this.history == false) { |
|
|
if (this.history == false) { |
|
|
this.history = true; |
|
|
this.history = true; |
|
|
this.alllogs = "Hide app logs"; |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.alllogs = "Show app logs"; |
|
|
this.$refs.vuetable.refresh(); |
|
|
this.history = false; |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onPaginationData(paginationData) { |
|
|
onPaginationData(paginationData) { |
|
@ -740,6 +779,8 @@ export default { |
|
|
).searchParams.get("token"); |
|
|
).searchParams.get("token"); |
|
|
|
|
|
|
|
|
this.swarmlabname = new URL(location.href).searchParams.get("pipelinename"); |
|
|
this.swarmlabname = new URL(location.href).searchParams.get("pipelinename"); |
|
|
|
|
|
|
|
|
|
|
|
this.getServices(); |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
@ -756,11 +797,6 @@ h2 { |
|
|
padding-top: 50px; |
|
|
padding-top: 50px; |
|
|
max-width: 100%; |
|
|
max-width: 100%; |
|
|
} |
|
|
} |
|
|
.table3 { |
|
|
|
|
|
min-height: 320px; |
|
|
|
|
|
max-width: 100%; |
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
} |
|
|
|
|
|
.CodeMirror { |
|
|
.CodeMirror { |
|
|
font-family: monospace; |
|
|
font-family: monospace; |
|
|
max-width: 900px; |
|
|
max-width: 900px; |
|
@ -788,4 +824,12 @@ h2 { |
|
|
.pagi { |
|
|
.pagi { |
|
|
height: 40px; |
|
|
height: 40px; |
|
|
} |
|
|
} |
|
|
|
|
|
#search { |
|
|
|
|
|
padding: 0px 5px 5px 5px; |
|
|
|
|
|
|
|
|
|
|
|
margin: 0px 0px 10px 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.filters { |
|
|
|
|
|
margin: 0px 0px 0px 10px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|