Browse Source

Merge branch 'master' of git.swarmlab.io:Lefteris/playground-client

master
lefteris 4 years ago
parent
commit
1890887ad7
  1. 72
      src/components/doclive/AdhocView.vue
  2. 2
      src/components/doclive/runLlo.vue

72
src/components/doclive/AdhocView.vue

@ -95,26 +95,30 @@
:sort-order="sortOrder"
:show-sort-icons="true"
:multi-sort="multiSort"
data-path=""
pagination-path=""
:per-page="perpage"
pagination-path="links.pagination"
detail-row-id="id"
wrapper-class="vuetable-wrapper"
loading-class="loading"
@vuetable:pagination-data="onPaginationData"
@vuetable:load-success="loadsuccess"
@vuetable:load-error="onLoadError"
:css="css.table"
>
</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 class="vuetable-pagination ui basic segment grid">
<vuetable-pagination-info
ref="paginationInfo"
:css="css.paginationInfo"
>
</vuetable-pagination-info>
<vuetable-pagination
:css="css.pagination"
ref="pagination"
@vuetable-pagination:change-page="onChangePage"
>
</vuetable-pagination>
</div>
</div>
</b-col>
@ -125,7 +129,9 @@
import { mapState, mapGetters, mapActions, dispatch } from "vuex";
import Vue from "vue";
import store from "@/store/index";
import Vuetable from "vuetable-2";
import { Vuetable, VuetablePaginationDropdown } from "vuetable-2";
import VuetablePaginationInfo from "vuetable-2/src/components/VuetablePaginationInfo";
import VuetablePagination from "vuetable-2/src/components/VuetablePagination";
import CssConfig from "vuetable-2/src/components/VuetableCssConfig.js";
import { codemirror } from "vue-codemirror";
@ -170,6 +176,9 @@ export default {
components: {
codemirror,
Vuetable,
VuetablePagination,
VuetablePaginationInfo,
VuetablePaginationDropdown,
},
data() {
return {
@ -383,6 +392,38 @@ export default {
this.history = false;
}
},
onPaginationData(paginationData) {
this.$refs.pagination.setPaginationData(paginationData);
this.$refs.paginationInfo.setPaginationData(paginationData);
},
loadsuccess(response) {
var data = response.data.data;
this.fielddata = data;
//console.log(this.fielddata);
var n = data.length;
n = n - 1;
},
onChangePage(page) {
this.$refs.vuetable.changePage(page);
},
onLoadError(payload) {
/*
//error2 "invalid_token" join-service.vue:684
//error2 "The access token provided has expired" join-service.vue:685
//error2 "Unauthorized" join-service.vue:686
//error2 401
console.log('error2 '+JSON.stringify(payload.response.data.error))
console.log('error2 '+JSON.stringify(payload.response.data.error_description))
console.log('error2 '+JSON.stringify(payload.response.statusText))
console.log('error2 '+JSON.stringify(payload.response.status))
*/
if (payload.response.status == "401") {
window.location.href = "https://api-login.swarmlab.io:8089";
Vue.nextTick(
() => (window.location.href = "https://api-login.swarmlab.io:8089")
);
}
},
clear() {
this.tryConsole = false;
this.code = "";
@ -606,6 +647,7 @@ export default {
<style>
.table {
overflow: auto;
min-height: 500px;
}
.CodeMirror {
font-family: monospace;

2
src/components/doclive/runLlo.vue

@ -512,7 +512,7 @@ export default {
created() {
//var logintoken = new URL(location.href).searchParams.get("token");
var logintoken = new URL(
"https://api-client.swarmlab.io:8088/?token=02e3f74c54156a2a1f2f5b957c73eecf2f30ec56"
"https://api-client.swarmlab.io:8088/?token=cb35ebd3def20d0217cff437acc42e51b80b103a"
).searchParams.get("token");
this.logintoken = logintoken;
// === We get the user + check for the token if exists

Loading…
Cancel
Save