Browse Source

test

master
lefteris 4 years ago
parent
commit
36324422ea
  1. 113
      src/components/doclive/AdhocView.vue
  2. 5
      src/components/doclive/runLlo.vue

113
src/components/doclive/AdhocView.vue

@ -88,19 +88,33 @@
<div v-if="history" class="table"> <div v-if="history" class="table">
<vuetable <vuetable
ref="vuetable" ref="vuetable"
api-url="http://localhost:3000/test" :api-url="api_url"
:api-mode="true" :api-mode="true"
:fields="[ :fields="fields"
'message', :item-actions="itemActions"
'timestamp', :sort-order="sortOrder"
'type', :show-sort-icons="true"
'process_id', :multi-sort="multiSort"
'app_name',
]"
data-path="" data-path=""
pagination-path="" pagination-path=""
:per-page="perpage"
wrapper-class="vuetable-wrapper"
loading-class="loading"
:css="css.table"
> >
</vuetable> </vuetable>
<!-- <div class="vuetable-pagination ui basic segment grid">
<vuetable-pagination-info
ref="paginationInfo"
>
</vuetable-pagination-info>
<vuetable-pagination
ref="pagination"
@vuetable-pagination:change-page="onChangePage"
>
</vuetable-pagination>
</div> -->
</div> </div>
</div> </div>
</b-col> </b-col>
@ -112,6 +126,7 @@ 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 Vuetable from "vuetable-2"; import Vuetable from "vuetable-2";
import CssConfig from "vuetable-2/src/components/VuetableCssConfig.js";
import { codemirror } from "vue-codemirror"; import { codemirror } from "vue-codemirror";
import JSZip from "jszip"; import JSZip from "jszip";
@ -158,6 +173,85 @@ export default {
}, },
data() { data() {
return { return {
api_url: "http://localhost:3000/test2",
fields: [
{
name: "message",
title: "Log",
sortField: "message",
visible: true,
},
{
name: "timestamp",
title: "Time",
width: "20%",
visible: true,
},
{
name: "type",
sortField: "type",
titleClass: "center aligned",
width: "10%",
},
{
name: "process_id",
visible: true,
},
{
name: "app_name",
visible: true,
title: '<span class="orange"></span>App Name',
},
// 'timestamp',
// 'type',
// 'process_id',
// 'app_name',
],
sortOrder: [
{
field: "type",
direction: "asc",
},
],
perpage: 5,
multiSort: true,
paginationComponent: "vuetable-pagination",
css: CssConfig,
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",
},
},
],
alllogs: "Show all logs", alllogs: "Show all logs",
socketonline: false, socketonline: false,
tryConsole: false, tryConsole: false,
@ -516,4 +610,7 @@ export default {
font-family: monospace; font-family: monospace;
height: 550px; height: 550px;
} }
.orange {
color: rgb(167, 110, 6);
}
</style> </style>

5
src/components/doclive/runLlo.vue

@ -188,6 +188,7 @@
:api-mode="false" :api-mode="false"
:data="localData" :data="localData"
:fields="['message', 'timestamp', 'type', 'process_id', 'app_name']" :fields="['message', 'timestamp', 'type', 'process_id', 'app_name']"
:css="css.table"
> >
</vuetable> </vuetable>
</div> </div>
@ -206,6 +207,7 @@ import { DateTime } from "luxon";
import FileSaver from "file-saver"; import FileSaver from "file-saver";
import Vuetable from "vuetable-2"; import Vuetable from "vuetable-2";
import axios from "axios"; import axios from "axios";
import CssConfig from "vuetable-2/src/components/VuetableCssConfig.js";
export default { export default {
components: { components: {
@ -214,6 +216,7 @@ export default {
}, },
data() { data() {
return { return {
css: CssConfig,
log_path: [], log_path: [],
log_path_lenght: [], log_path_lenght: [],
log_path_lenghtstatus: [], log_path_lenghtstatus: [],
@ -478,7 +481,7 @@ export default {
created() { created() {
//var logintoken = new URL(location.href).searchParams.get("token"); //var logintoken = new URL(location.href).searchParams.get("token");
var logintoken = new URL( var logintoken = new URL(
"https://api-client.swarmlab.io:8088/?token=1a4a350776b73bcb2e80194716bc90d4e78ae9dc" "https://api-client.swarmlab.io:8088/?token=c82ba76a758a518f5c3072d53b359bf3e9bfcf18"
).searchParams.get("token"); ).searchParams.get("token");
this.logintoken = logintoken; this.logintoken = logintoken;
// === We get the user + check for the token if exists // === We get the user + check for the token if exists

Loading…
Cancel
Save