|
@ -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> |
|
|