Browse Source

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

master
lefteris 3 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" :sort-order="sortOrder"
:show-sort-icons="true" :show-sort-icons="true"
:multi-sort="multiSort" :multi-sort="multiSort"
data-path=""
pagination-path=""
:per-page="perpage" :per-page="perpage"
pagination-path="links.pagination"
detail-row-id="id"
wrapper-class="vuetable-wrapper" wrapper-class="vuetable-wrapper"
loading-class="loading" loading-class="loading"
@vuetable:pagination-data="onPaginationData"
@vuetable:load-success="loadsuccess"
@vuetable:load-error="onLoadError"
:css="css.table" :css="css.table"
> >
</vuetable> </vuetable>
<!-- <div class="vuetable-pagination ui basic segment grid"> </div>
<vuetable-pagination-info <div class="vuetable-pagination ui basic segment grid">
ref="paginationInfo" <vuetable-pagination-info
ref="paginationInfo"
> :css="css.paginationInfo"
</vuetable-pagination-info> >
<vuetable-pagination </vuetable-pagination-info>
ref="pagination" <vuetable-pagination
@vuetable-pagination:change-page="onChangePage" :css="css.pagination"
> ref="pagination"
</vuetable-pagination> @vuetable-pagination:change-page="onChangePage"
</div> --> >
</vuetable-pagination>
</div> </div>
</div> </div>
</b-col> </b-col>
@ -125,7 +129,9 @@
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 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 CssConfig from "vuetable-2/src/components/VuetableCssConfig.js";
import { codemirror } from "vue-codemirror"; import { codemirror } from "vue-codemirror";
@ -170,6 +176,9 @@ export default {
components: { components: {
codemirror, codemirror,
Vuetable, Vuetable,
VuetablePagination,
VuetablePaginationInfo,
VuetablePaginationDropdown,
}, },
data() { data() {
return { return {
@ -383,6 +392,38 @@ export default {
this.history = false; 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() { clear() {
this.tryConsole = false; this.tryConsole = false;
this.code = ""; this.code = "";
@ -606,6 +647,7 @@ export default {
<style> <style>
.table { .table {
overflow: auto; overflow: auto;
min-height: 500px;
} }
.CodeMirror { .CodeMirror {
font-family: monospace; font-family: monospace;

2
src/components/doclive/runLlo.vue

@ -512,7 +512,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=02e3f74c54156a2a1f2f5b957c73eecf2f30ec56" "https://api-client.swarmlab.io:8088/?token=cb35ebd3def20d0217cff437acc42e51b80b103a"
).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