updat
This commit is contained in:
@@ -172,8 +172,28 @@ export let cases = {
|
|||||||
keys: {},
|
keys: {},
|
||||||
paged: dt.paged
|
paged: dt.paged
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
debugVars(data) {
|
||||||
|
var params;
|
||||||
|
if (data.filter === "all") {
|
||||||
|
return axios.get(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`cases/debug_vars`);
|
||||||
|
} else {
|
||||||
|
params = new URLSearchParams();
|
||||||
|
params.append('filter', data.filter);
|
||||||
|
return axios.post(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`cases/debug_vars`, params);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
debugVarsTriggers(data) {
|
||||||
|
let dc = _.random(0, 10000000000),
|
||||||
|
r = _.random(1.0, 100.0);
|
||||||
|
return axios.get(window.config.SYS_SERVER +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`cases/debug_triggers?r=${r}&_dc=${dc}`);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export let casesHeader = {
|
export let casesHeader = {
|
||||||
|
|||||||
@@ -7,65 +7,60 @@
|
|||||||
role="toolbar"
|
role="toolbar"
|
||||||
aria-label="Toolbar with button groups"
|
aria-label="Toolbar with button groups"
|
||||||
>
|
>
|
||||||
<div
|
<b-form-radio-group
|
||||||
class="btn-group"
|
@change="changeOption"
|
||||||
role="group"
|
v-model="optionsDebugVars.selected"
|
||||||
aria-label="Basic radio toggle button group"
|
:options="optionsDebugVars.options"
|
||||||
>
|
button-variant="outline-secondary"
|
||||||
<input
|
name="radio-btn-outline"
|
||||||
type="radio"
|
size="sm"
|
||||||
class="btn-check"
|
buttons
|
||||||
name="btnradio"
|
></b-form-radio-group>
|
||||||
id="btnradio1"
|
</div>
|
||||||
autocomplete="off"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label class="btn btn-outline-secondary" for="btnradio1"
|
|
||||||
>Radio 1</label
|
|
||||||
>
|
|
||||||
|
|
||||||
<input
|
<div>
|
||||||
type="radio"
|
<v-client-table
|
||||||
class="btn-check"
|
@row-click="onRowClicked"
|
||||||
name="btnradio"
|
:data="dataTable"
|
||||||
id="btnradio2"
|
:columns="columns"
|
||||||
autocomplete="off"
|
:options="options"
|
||||||
/>
|
ref="vueTable"
|
||||||
<label class="btn btn-outline-secondary" for="btnradio2"
|
/>
|
||||||
>Radio 2</label
|
</div>
|
||||||
>
|
</tab>
|
||||||
|
<tab name="Triggers">
|
||||||
<input
|
<div>
|
||||||
type="radio"
|
<v-client-table
|
||||||
class="btn-check"
|
:data="dataTableTriggers"
|
||||||
name="btnradio"
|
:columns="columns"
|
||||||
id="btnradio3"
|
:options="options"
|
||||||
autocomplete="off"
|
ref="vueTableTriggers"
|
||||||
/>
|
/>
|
||||||
<label class="btn btn-outline-secondary" for="btnradio3"
|
|
||||||
>Radio 3</label
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-text" id="btnGroupAddon2">@</div>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
placeholder="Input group example"
|
|
||||||
aria-label="Input group example"
|
|
||||||
aria-describedby="btnGroupAddon2"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</tab>
|
</tab>
|
||||||
<tab name="Triggers"> </tab>
|
|
||||||
</tabs>
|
</tabs>
|
||||||
|
<br />
|
||||||
|
<div class="card">
|
||||||
|
<div class="container">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="exampleFormControlTextarea1" class="form-label"
|
||||||
|
>Example textarea</label
|
||||||
|
>
|
||||||
|
<textarea
|
||||||
|
class="form-control"
|
||||||
|
id="exampleFormControlTextarea1"
|
||||||
|
rows="3"
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</b-modal>
|
</b-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Tabs from "../../../components/tabs/Tabs.vue";
|
import Tabs from "../../../components/tabs/Tabs.vue";
|
||||||
import Tab from "../../../components/tabs/Tab.vue";
|
import Tab from "../../../components/tabs/Tab.vue";
|
||||||
|
import api from "../../../api/index";
|
||||||
export default {
|
export default {
|
||||||
name: "ModalDebugger",
|
name: "ModalDebugger",
|
||||||
components: {
|
components: {
|
||||||
@@ -85,6 +80,33 @@ export default {
|
|||||||
variableTabs: [],
|
variableTabs: [],
|
||||||
debugSearch: "",
|
debugSearch: "",
|
||||||
isRTL: false,
|
isRTL: false,
|
||||||
|
dataTable: [],
|
||||||
|
dataTableTriggers: [],
|
||||||
|
columns: ["key", "value"],
|
||||||
|
options: {
|
||||||
|
selectable: {
|
||||||
|
mode: "single", // or 'multiple'
|
||||||
|
only: function (row) {
|
||||||
|
console.log("asd jonas");
|
||||||
|
return true; // any condition
|
||||||
|
},
|
||||||
|
selectAllMode: "all", // or 'page'
|
||||||
|
programmatic: false,
|
||||||
|
},
|
||||||
|
filterable: false,
|
||||||
|
headings: {
|
||||||
|
key: this.$i18n.t("ID_NAME"),
|
||||||
|
value: this.$i18n.t("ID_VALUE"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
optionsDebugVars: {
|
||||||
|
selected: "all",
|
||||||
|
options: [
|
||||||
|
{ text: this.$i18n.t("ID_OPT_ALL"), value: "all" },
|
||||||
|
{ text: this.$i18n.t("ID_DYNAFORM"), value: "dyn" },
|
||||||
|
{ text: this.$i18n.t("ID_SYSTEM"), value: "sys" },
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -92,45 +114,51 @@ export default {
|
|||||||
return "btn v-btn-request " + cls;
|
return "btn v-btn-request " + cls;
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
|
this.getDebugVars({ filter: "all" });
|
||||||
|
this.getDebugVarsTriggers();
|
||||||
this.$refs["modal-debugger"].show();
|
this.$refs["modal-debugger"].show();
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs["modal-debugger"].hide();
|
this.$refs["modal-debugger"].hide();
|
||||||
},
|
},
|
||||||
unpauseCase() {},
|
getDebugVars(data) {
|
||||||
|
let that = this,
|
||||||
|
dt = [];
|
||||||
|
api.cases.debugVars(data).then((response) => {
|
||||||
|
_.forIn(response.data.data[0], function (value, key) {
|
||||||
|
dt.push({
|
||||||
|
key,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.dataTable = dt;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDebugVarsTriggers(data) {
|
||||||
|
let that = this,
|
||||||
|
dt = [];
|
||||||
|
api.cases.debugVarsTriggers(data).then((response) => {
|
||||||
|
console.log("asdasd");
|
||||||
|
if (response.data.length > 0) {
|
||||||
|
_.forIn(response.data.data[0], function (value, key) {
|
||||||
|
dt.push({
|
||||||
|
key,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.dataTableTriggers = dt;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializate debug menu
|
* Change Radio option [All, Dynaform, System]
|
||||||
*/
|
*/
|
||||||
initializeDebugTab() {
|
changeOption(opt) {
|
||||||
this.debugTabs = [
|
this.getDebugVars({ filter: opt });
|
||||||
{
|
},
|
||||||
id: "this.language.ID_VARIABLES",
|
onRowClicked() {
|
||||||
title: "this.language.ID_VARIABLES",
|
console.log("asdsa sad aslllllllll");
|
||||||
function: "",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "this.language.ID_TRIGGERS",
|
|
||||||
title: "this.language.ID_TRIGGERS",
|
|
||||||
function: "",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
this.variableTabs = [
|
|
||||||
{
|
|
||||||
id: "this.language.ID_ALL",
|
|
||||||
title: "this.language.ID_ALL",
|
|
||||||
function: "",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "this.language.ID_DYNAFORMS",
|
|
||||||
title: "this.language.ID_DYNAFORMS",
|
|
||||||
function: "",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "this.language.ID_SYSTEM",
|
|
||||||
title: "this.language.ID_SYSTEM",
|
|
||||||
function: "",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -228,6 +256,12 @@ input[type="radio"] {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-outline-secondary-active {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #6c757d;
|
||||||
|
border-color: #6c757d;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import VueRouter from "vue-router";
|
|||||||
import VueSidebarMenu from "vue-sidebar-menu";
|
import VueSidebarMenu from "vue-sidebar-menu";
|
||||||
import VueI18n from 'vue-i18n';
|
import VueI18n from 'vue-i18n';
|
||||||
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
|
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
|
||||||
import { ServerTable, Event} from 'vue-tables-2';
|
import { ServerTable, Event, ClientTable} from 'vue-tables-2';
|
||||||
import "@fortawesome/fontawesome-free/css/all.css";
|
import "@fortawesome/fontawesome-free/css/all.css";
|
||||||
import "@fortawesome/fontawesome-free/js/all.js";
|
import "@fortawesome/fontawesome-free/js/all.js";
|
||||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
import 'bootstrap/dist/css/bootstrap-grid.css';
|
||||||
@@ -18,6 +18,7 @@ Vue.use(BootstrapVue);
|
|||||||
Vue.use(BootstrapVueIcons);
|
Vue.use(BootstrapVueIcons);
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
||||||
|
Vue.use(ClientTable, {}, false, 'bootstrap3', {});
|
||||||
window.ProcessMaker = {
|
window.ProcessMaker = {
|
||||||
apiClient: require('axios')
|
apiClient: require('axios')
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user