@openc3/vue-common 6.9.0 → 6.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ var Ke = (t) => {
|
|
|
5
5
|
var it = (t, e, s) => e in t ? tt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
6
|
var Be = (t, e, s) => it(t, typeof e != "symbol" ? e + "" : e, s), We = (t, e, s) => e.has(t) || Ke("Cannot " + s);
|
|
7
7
|
var B = (t, e, s) => (We(t, e, "read from private field"), s ? s.call(t) : e.get(t)), W = (t, e, s) => e.has(t) ? Ke("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), ne = (t, e, s, r) => (We(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
|
|
8
|
-
import { h as
|
|
8
|
+
import { h as M, g as Te, p as st } from "../UpgradeToEnterpriseDialog.vue_vue_type_style_index_0_scoped_2c757408_lang-JEZNdnan.js";
|
|
9
9
|
import { resolveComponent as a, createElementBlock as P, openBlock as S, createVNode as n, createBlock as D, createCommentVNode as U, withCtx as l, createTextVNode as y, createElementVNode as x, withDirectives as nt, vShow as ot, toDisplayString as L, mergeProps as X, normalizeClass as Xe, inject as oe, getCurrentInstance as lt, computed as Y, ref as ae, watch as Ve, onMounted as Qe, onBeforeUnmount as $e, normalizeStyle as Ee, unref as rt, renderSlot as at, useSlots as dt, provide as $, resolveDynamicComponent as ut, nextTick as Ne, h as ct, withModifiers as ue, Fragment as de, renderList as qe, normalizeProps as le, guardReactiveProps as re } from "vue";
|
|
10
10
|
import { _ as j } from "../CustomIcon-h5X7369N.js";
|
|
11
11
|
import { T as mt } from "../timeFilters-BKnCM4rv.js";
|
|
@@ -117,7 +117,7 @@ const Et = {
|
|
|
117
117
|
getRunningScripts: function() {
|
|
118
118
|
this.runningLoading = !0;
|
|
119
119
|
const t = (this.runningPage - 1) * this.runningItemsPerPage;
|
|
120
|
-
|
|
120
|
+
M.get(
|
|
121
121
|
`/script-api/running-script?scope=DEFAULT&offset=${t}&limit=${this.runningItemsPerPage}`
|
|
122
122
|
).then((e) => {
|
|
123
123
|
const s = e.data.items || [], r = /* @__PURE__ */ new Date();
|
|
@@ -159,7 +159,7 @@ const Et = {
|
|
|
159
159
|
getCompletedScripts: function() {
|
|
160
160
|
this.completedLoading = !0;
|
|
161
161
|
const t = (this.completedPage - 1) * this.completedItemsPerPage;
|
|
162
|
-
|
|
162
|
+
M.get(
|
|
163
163
|
`/script-api/completed-scripts?scope=DEFAULT&offset=${t}&limit=${this.completedItemsPerPage}`
|
|
164
164
|
).then((e) => {
|
|
165
165
|
const s = e.data.items || [];
|
|
@@ -221,7 +221,7 @@ const Et = {
|
|
|
221
221
|
okText: "Stop",
|
|
222
222
|
cancelText: "Cancel"
|
|
223
223
|
}
|
|
224
|
-
).then((e) =>
|
|
224
|
+
).then((e) => M.post(`/script-api/running-script/${t.name}/delete`)).then((e) => {
|
|
225
225
|
this.$notify.normal({
|
|
226
226
|
body: `Stopped script: ${t.name} ${t.filename}`
|
|
227
227
|
}), this.getRunningScripts();
|
|
@@ -233,7 +233,7 @@ const Et = {
|
|
|
233
233
|
},
|
|
234
234
|
viewScriptLog: function(t, e) {
|
|
235
235
|
let s = null;
|
|
236
|
-
e === "report" ? (this.dialogName = "Report", s = t.report) : (this.dialogName = "Log", s = t.log),
|
|
236
|
+
e === "report" ? (this.dialogName = "Report", s = t.report) : (this.dialogName = "Log", s = t.log), M.get(
|
|
237
237
|
`/openc3-api/storage/download_file/${encodeURIComponent(
|
|
238
238
|
s
|
|
239
239
|
)}?bucket=OPENC3_LOGS_BUCKET`
|
|
@@ -244,7 +244,7 @@ const Et = {
|
|
|
244
244
|
},
|
|
245
245
|
downloadScriptLog: function(t, e, s = "text") {
|
|
246
246
|
let r = null;
|
|
247
|
-
e === "report" ? (this.dialogName = "Report", r = t.report) : (this.dialogName = "Log", r = t.log), this.downloadScript = t, s === "ctrf" && e === "report" ?
|
|
247
|
+
e === "report" ? (this.dialogName = "Report", r = t.report) : (this.dialogName = "Log", r = t.log), this.downloadScript = t, s === "ctrf" && e === "report" ? M.get(
|
|
248
248
|
`/openc3-api/storage/download_file/${encodeURIComponent(
|
|
249
249
|
r
|
|
250
250
|
)}?bucket=OPENC3_LOGS_BUCKET&format=ctrf`
|
|
@@ -258,7 +258,7 @@ const Et = {
|
|
|
258
258
|
title: `Unable to download log ${r}`,
|
|
259
259
|
body: `You may be able to download this log manually from the 'logs' bucket at ${r}`
|
|
260
260
|
}), this.downloadScript = null;
|
|
261
|
-
}) :
|
|
261
|
+
}) : M.get(
|
|
262
262
|
`/openc3-api/storage/download/${encodeURIComponent(
|
|
263
263
|
r
|
|
264
264
|
)}?bucket=OPENC3_LOGS_BUCKET`
|
|
@@ -273,8 +273,8 @@ const Et = {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
}, Rt = { key: 0 },
|
|
277
|
-
function
|
|
276
|
+
}, Rt = { key: 0 }, Mt = { key: 1 };
|
|
277
|
+
function Ot(t, e, s, r, i, o) {
|
|
278
278
|
const d = a("v-tab"), h = a("v-tabs"), c = a("v-spacer"), b = a("v-btn"), k = a("v-text-field"), V = a("v-row"), w = a("v-card-title"), R = a("v-icon"), E = a("v-data-table-server"), T = a("v-window-item"), _ = a("v-list-item-title"), z = a("v-list-item"), G = a("v-list"), Q = a("v-menu"), te = a("v-window"), K = a("v-card"), ie = a("output-dialog");
|
|
279
279
|
return S(), P("div", null, [
|
|
280
280
|
n(K, {
|
|
@@ -493,7 +493,7 @@ function Mt(t, e, s, r, i, o) {
|
|
|
493
493
|
}, null, 8, ["disabled", "loading", "onClick"])
|
|
494
494
|
]),
|
|
495
495
|
"item.report": l(({ item: I }) => [
|
|
496
|
-
I.report ? (S(), P("div",
|
|
496
|
+
I.report ? (S(), P("div", Mt, [
|
|
497
497
|
n(b, {
|
|
498
498
|
color: "primary",
|
|
499
499
|
density: "comfortable",
|
|
@@ -572,7 +572,7 @@ function Mt(t, e, s, r, i, o) {
|
|
|
572
572
|
}, null, 8, ["modelValue", "content", "name", "filename"])) : U("", !0)
|
|
573
573
|
]);
|
|
574
574
|
}
|
|
575
|
-
const Tt = /* @__PURE__ */ j(Et, [["render",
|
|
575
|
+
const Tt = /* @__PURE__ */ j(Et, [["render", Ot]]), It = {
|
|
576
576
|
props: {
|
|
577
577
|
modelValue: {
|
|
578
578
|
type: Array,
|
|
@@ -754,8 +754,8 @@ const Ut = /* @__PURE__ */ j(It, [["render", Dt]]), Pt = {
|
|
|
754
754
|
}, T = (u, p) => {
|
|
755
755
|
const v = u.target.closest(".splitpanes__splitter");
|
|
756
756
|
if (v) {
|
|
757
|
-
const { left: f, top: g } = v.getBoundingClientRect(), { clientX: C, clientY:
|
|
758
|
-
k.value.cursorOffset = r.horizontal ?
|
|
757
|
+
const { left: f, top: g } = v.getBoundingClientRect(), { clientX: C, clientY: O } = "ontouchstart" in window && u.touches ? u.touches[0] : u;
|
|
758
|
+
k.value.cursorOffset = r.horizontal ? O - g : C - f;
|
|
759
759
|
}
|
|
760
760
|
R(), k.value.mouseDown = !0, k.value.activeSplitter = p;
|
|
761
761
|
}, _ = (u) => {
|
|
@@ -798,7 +798,7 @@ const Ut = /* @__PURE__ */ j(It, [["render", Dt]]), Pt = {
|
|
|
798
798
|
nextReachedMinPanes: 0
|
|
799
799
|
};
|
|
800
800
|
const f = 0 + (r.pushOtherPanes ? 0 : v.prevPanesSize), g = 100 - (r.pushOtherPanes ? 0 : v.nextPanesSize), C = Math.max(Math.min(ie(u), g), f);
|
|
801
|
-
let
|
|
801
|
+
let O = [p, p + 1], A = o.value[O[0]] || null, H = o.value[O[1]] || null;
|
|
802
802
|
const m = A.max < 100 && C >= A.max + v.prevPanesSize, J = H.max < 100 && C <= 100 - (H.max + Z(p + 1));
|
|
803
803
|
if (m || J) {
|
|
804
804
|
m ? (A.size = A.max, H.size = Math.max(100 - A.max - v.prevPanesSize - v.nextPanesSize, 0)) : (A.size = Math.max(100 - H.max - v.prevPanesSize - Z(p + 1), 0), H.size = H.max);
|
|
@@ -807,7 +807,7 @@ const Ut = /* @__PURE__ */ j(It, [["render", Dt]]), Pt = {
|
|
|
807
807
|
if (r.pushOtherPanes) {
|
|
808
808
|
const je = F(v, C);
|
|
809
809
|
if (!je) return;
|
|
810
|
-
({ sums: v, panesToResize:
|
|
810
|
+
({ sums: v, panesToResize: O } = je), A = o.value[O[0]] || null, H = o.value[O[1]] || null;
|
|
811
811
|
}
|
|
812
812
|
A !== null && (A.size = Math.min(Math.max(C - v.prevPanesSize - v.prevReachedMinPanes, A.min), A.max)), H !== null && (H.size = Math.min(Math.max(100 - C - v.nextPanesSize - v.nextReachedMinPanes, H.min), H.max));
|
|
813
813
|
}, F = (u, p) => {
|
|
@@ -882,22 +882,22 @@ const Ut = /* @__PURE__ */ j(It, [["render", Dt]]), Pt = {
|
|
|
882
882
|
let v = 100 / h.value, f = 0;
|
|
883
883
|
const g = [], C = [];
|
|
884
884
|
((u == null ? void 0 : u.givenSize) ?? null) !== null && (v = (100 - u.givenSize) / (h.value - 1));
|
|
885
|
-
for (const
|
|
886
|
-
f -=
|
|
885
|
+
for (const O of o.value)
|
|
886
|
+
f -= O.size, O.size >= O.max && g.push(O.id), O.size <= O.min && C.push(O.id);
|
|
887
887
|
if (!(Math.abs(f) < 0.1)) {
|
|
888
|
-
for (const
|
|
889
|
-
(u == null ? void 0 : u.givenSize) !== null && (u == null ? void 0 : u.id) ===
|
|
888
|
+
for (const O of o.value)
|
|
889
|
+
(u == null ? void 0 : u.givenSize) !== null && (u == null ? void 0 : u.id) === O.id || (O.size = Math.max(Math.min(v, O.max), O.min)), f -= O.size, O.size >= O.max && g.push(O.id), O.size <= O.min && C.push(O.id);
|
|
890
890
|
f > 0.1 && he(f, g, C);
|
|
891
891
|
}
|
|
892
892
|
}, he = (u, p, v) => {
|
|
893
893
|
let f;
|
|
894
894
|
u > 0 ? f = u / (h.value - p.length) : f = u / (h.value - v.length), o.value.forEach((g, C) => {
|
|
895
895
|
if (u > 0 && !p.includes(g.id)) {
|
|
896
|
-
const
|
|
897
|
-
u -= A, g.size =
|
|
896
|
+
const O = Math.max(Math.min(g.size + f, g.max), g.min), A = O - g.size;
|
|
897
|
+
u -= A, g.size = O;
|
|
898
898
|
} else if (!v.includes(g.id)) {
|
|
899
|
-
const
|
|
900
|
-
u -= A, g.size =
|
|
899
|
+
const O = Math.max(Math.min(g.size + f, g.max), g.min), A = O - g.size;
|
|
900
|
+
u -= A, g.size = O;
|
|
901
901
|
}
|
|
902
902
|
}), Math.abs(u) > 0.1 && Ne(() => {
|
|
903
903
|
b.value && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
|
|
@@ -2006,10 +2006,10 @@ const wi = /* @__PURE__ */ j(vi, [["render", bi]]), yi = {
|
|
|
2006
2006
|
this.suites = Object.keys(this.suiteMap), this.suiteChanged(this.suites[0]);
|
|
2007
2007
|
},
|
|
2008
2008
|
suiteChanged(t) {
|
|
2009
|
-
this.suite = t, this.group = "", this.script = "", this.groups = Object.keys(this.suiteMap[t].groups), this.groupChanged(this.groups[0]);
|
|
2009
|
+
!t || this.suiteMap[t] == null || (this.suite = t, this.group = "", this.script = "", this.groups = Object.keys(this.suiteMap[t].groups), this.groupChanged(this.groups[0]));
|
|
2010
2010
|
},
|
|
2011
2011
|
groupChanged(t) {
|
|
2012
|
-
this.group = t, this.script = "", this.scripts = this.suiteMap[this.suite].groups[t].scripts, this.scriptChanged(this.scripts[0]);
|
|
2012
|
+
!t || this.suiteMap[this.suite] == null || this.suiteMap[this.suite].groups[t] == null || (this.group = t, this.script = "", this.scripts = this.suiteMap[this.suite].groups[t].scripts, this.scriptChanged(this.scripts[0]));
|
|
2013
2013
|
},
|
|
2014
2014
|
scriptChanged(t) {
|
|
2015
2015
|
this.script = t;
|
|
@@ -2473,7 +2473,7 @@ function Si(t, e, s, r, i, o) {
|
|
|
2473
2473
|
])
|
|
2474
2474
|
]);
|
|
2475
2475
|
}
|
|
2476
|
-
const xi = /* @__PURE__ */ j(yi, [["render", Si], ["__scopeId", "data-v-
|
|
2476
|
+
const xi = /* @__PURE__ */ j(yi, [["render", Si], ["__scopeId", "data-v-6be22c34"]]), Ge = (t) => M.get(`/openc3-api/autocomplete/keywords/${t}`), Ci = (t) => M.get(`/openc3-api/autocomplete/data/${t}`), Je = (t, e) => t.reduce((s, r) => {
|
|
2477
2477
|
const i = e(r);
|
|
2478
2478
|
return s[i] ? s[i].push(r) : s[i] = [r], s;
|
|
2479
2479
|
}, {}), Vi = (t) => {
|
|
@@ -2548,7 +2548,7 @@ class Ri extends et {
|
|
|
2548
2548
|
const Ye = (t) => {
|
|
2549
2549
|
const e = "(^|[{\\(\\s])", s = "((\\s.+)|(\\(.+\\)))";
|
|
2550
2550
|
return new RegExp(`${e}${t}${s}`);
|
|
2551
|
-
},
|
|
2551
|
+
}, Mi = /\{/, Oi = /['"],\s?['"]/;
|
|
2552
2552
|
class Ti {
|
|
2553
2553
|
constructor() {
|
|
2554
2554
|
this.api = new Te(), this.targets = {}, this.api.get_target_names().then((e) => {
|
|
@@ -2576,9 +2576,9 @@ class Ti {
|
|
|
2576
2576
|
let k = c || b, V = k.length;
|
|
2577
2577
|
k = k[V - 1];
|
|
2578
2578
|
const w = k.substring(k.match(/[\(\s)]/).index + 1).replace(/\)+.*$/, "");
|
|
2579
|
-
if (w.match(
|
|
2579
|
+
if (w.match(Mi))
|
|
2580
2580
|
return o.linesToSkip.push(h + 1), o;
|
|
2581
|
-
const R = !!w.match(
|
|
2581
|
+
const R = !!w.match(Oi), E = w.split(
|
|
2582
2582
|
R ? "," : " "
|
|
2583
2583
|
);
|
|
2584
2584
|
if (E.length < 2)
|
|
@@ -2672,7 +2672,7 @@ class Ti {
|
|
|
2672
2672
|
return s;
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
|
-
var ee, ge, ve, _e, be,
|
|
2675
|
+
var ee, ge, ve, _e, be, Me, we, ye, Oe;
|
|
2676
2676
|
class Ii {
|
|
2677
2677
|
constructor(e, { pattern: s, text: r, type: i }) {
|
|
2678
2678
|
// TODO: the eslint parser errors on these because of the #
|
|
@@ -2685,7 +2685,7 @@ class Ii {
|
|
|
2685
2685
|
// Re-annotate the entire document
|
|
2686
2686
|
Be(this, "refresh", () => {
|
|
2687
2687
|
const e = B(this, ge).session;
|
|
2688
|
-
B(this,
|
|
2688
|
+
B(this, Oe).call(this, e);
|
|
2689
2689
|
const s = {
|
|
2690
2690
|
lines: e.doc.$lines,
|
|
2691
2691
|
action: "insert",
|
|
@@ -2708,7 +2708,7 @@ class Ii {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
for (let o = e.start.row; o <= e.end.row; o++) {
|
|
2710
2710
|
let d = (i = (r = s.doc.$lines[o]) == null ? void 0 : r.match(B(this, ve))) == null ? void 0 : i.index;
|
|
2711
|
-
d !== void 0 ? (d !== 0 && (d += 1), B(this,
|
|
2711
|
+
d !== void 0 ? (d !== 0 && (d += 1), B(this, Me).call(this, s, {
|
|
2712
2712
|
row: o,
|
|
2713
2713
|
column: d,
|
|
2714
2714
|
// I don't think our editor theme shows the column for annotations, but others do
|
|
@@ -2718,7 +2718,7 @@ class Ii {
|
|
|
2718
2718
|
})) : e.action === "remove" && B(this, we).call(this, s, o);
|
|
2719
2719
|
}
|
|
2720
2720
|
});
|
|
2721
|
-
W(this,
|
|
2721
|
+
W(this, Me, (e, s) => {
|
|
2722
2722
|
B(this, we).call(this, e, s.row), e.setAnnotations([...e.getAnnotations(), s]);
|
|
2723
2723
|
});
|
|
2724
2724
|
W(this, we, (e, s) => {
|
|
@@ -2733,7 +2733,7 @@ class Ii {
|
|
|
2733
2733
|
e.getAnnotations().map((i) => (i.row > s && (i.row += r), i))
|
|
2734
2734
|
);
|
|
2735
2735
|
});
|
|
2736
|
-
W(this,
|
|
2736
|
+
W(this, Oe, (e) => {
|
|
2737
2737
|
e.setAnnotations(
|
|
2738
2738
|
e.getAnnotations().filter((s) => s.openc3Id !== B(this, ee))
|
|
2739
2739
|
);
|
|
@@ -2741,7 +2741,7 @@ class Ii {
|
|
|
2741
2741
|
ne(this, ee, `regexAnnotator-${Math.floor(Math.random() * 1e7)}`), ne(this, ge, e), ne(this, ve, s), ne(this, _e, r), ne(this, be, i);
|
|
2742
2742
|
}
|
|
2743
2743
|
}
|
|
2744
|
-
ee = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), _e = new WeakMap(), be = new WeakMap(),
|
|
2744
|
+
ee = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), _e = new WeakMap(), be = new WeakMap(), Me = new WeakMap(), we = new WeakMap(), ye = new WeakMap(), Oe = new WeakMap();
|
|
2745
2745
|
class Di extends Ii {
|
|
2746
2746
|
constructor(e) {
|
|
2747
2747
|
const s = "(^|[{\\s])", r = "sleep", i = "[\\(\\s]";
|
|
@@ -3224,7 +3224,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3224
3224
|
let t = OpenC3Auth.user(), e = OpenC3Auth.userroles();
|
|
3225
3225
|
this.readOnlyUser = !0, this.executeUser = !1;
|
|
3226
3226
|
for (let s of e)
|
|
3227
|
-
s != "viewer" && (s == "admin" || s == "operator" ? (this.readOnlyUser = !1, this.executeUser = !0) : s == "runner" ? this.executeUser = !0 : await
|
|
3227
|
+
s != "viewer" && (s == "admin" || s == "operator" ? (this.readOnlyUser = !1, this.executeUser = !0) : s == "runner" ? this.executeUser = !0 : await M.get(`/openc3-api/roles/${s}`).then((r) => {
|
|
3228
3228
|
r.data !== null && r.data.permissions !== void 0 && (r.data.permissions.some(
|
|
3229
3229
|
(i) => i.permission == "script_edit"
|
|
3230
3230
|
) && (this.readOnlyUser = !1), r.data.permissions.some(
|
|
@@ -3240,7 +3240,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3240
3240
|
let s = `User ${t.preferred_username} is read only`;
|
|
3241
3241
|
this.executeUser && (s += " but can execute scripts"), this.alertText = s, this.showAlert = !0;
|
|
3242
3242
|
}
|
|
3243
|
-
|
|
3243
|
+
M.get("/openc3-api/autocomplete/keywords/screen").then((s) => {
|
|
3244
3244
|
this.screenKeywords = s.data;
|
|
3245
3245
|
}), this.inline && (this.readOnly = !0);
|
|
3246
3246
|
},
|
|
@@ -3334,7 +3334,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3334
3334
|
this.subscription && (this.subscription.unsubscribe(), this.subscription = null), this.receivedEvents.length = 0;
|
|
3335
3335
|
},
|
|
3336
3336
|
showMetadata() {
|
|
3337
|
-
|
|
3337
|
+
M.get("/openc3-api/metadata").then((t) => {
|
|
3338
3338
|
this.inputMetadata.events = t.data.map((e) => ({
|
|
3339
3339
|
name: "Metadata",
|
|
3340
3340
|
start: new Date(e.start * 1e3),
|
|
@@ -3364,7 +3364,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3364
3364
|
), this.editor.gotoLine(this.files[t].lineNo);
|
|
3365
3365
|
},
|
|
3366
3366
|
tryLoadRunningScript: function(t) {
|
|
3367
|
-
return
|
|
3367
|
+
return M.get(`/script-api/running-script/${t}`).then((e) => {
|
|
3368
3368
|
if (e.data) {
|
|
3369
3369
|
let s = e.data.state;
|
|
3370
3370
|
s !== "completed" && s !== "completed_errors" && s !== "stopped" && s !== "crashed" && s !== "killed" ? (this.filename = e.data.filename, this.tryLoadSuites(e), this.initScriptStart(), this.scriptStart(t)) : (this.$notify.caution({
|
|
@@ -3381,7 +3381,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3381
3381
|
});
|
|
3382
3382
|
},
|
|
3383
3383
|
tryLoadSuites: function(t) {
|
|
3384
|
-
t.data.
|
|
3384
|
+
t.data.suites && (this.startOrGoDisabled = !0, this.suiteRunner = !0, this.suiteMap = JSON.parse(t.data.suites)), this.doResize();
|
|
3385
3385
|
},
|
|
3386
3386
|
showExecuteSelectionMenu: function(t) {
|
|
3387
3387
|
this.menuX = t.pageX, this.menuY = t.pageY;
|
|
@@ -3398,7 +3398,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3398
3398
|
},
|
|
3399
3399
|
runFromCursor: function() {
|
|
3400
3400
|
const t = this.editor.getCursorPosition().row + 1;
|
|
3401
|
-
this.scriptId ?
|
|
3401
|
+
this.scriptId ? M.post(
|
|
3402
3402
|
`/script-api/running-script/${this.scriptId}/executewhilepaused`,
|
|
3403
3403
|
{
|
|
3404
3404
|
data: {
|
|
@@ -3410,7 +3410,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3410
3410
|
executeSelection: function() {
|
|
3411
3411
|
const t = this.editor.getSelectionRange();
|
|
3412
3412
|
let e = t.start.row + 1, s = t.end.row + 1;
|
|
3413
|
-
t.end.column === 0 && (s -= 1), this.scriptId ?
|
|
3413
|
+
t.end.column === 0 && (s -= 1), this.scriptId ? M.post(
|
|
3414
3414
|
`/script-api/running-script/${this.scriptId}/executewhilepaused`,
|
|
3415
3415
|
{
|
|
3416
3416
|
data: {
|
|
@@ -3462,7 +3462,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3462
3462
|
this.$dialog.confirm("Permanently delete all breakpoints for ALL scripts?", {
|
|
3463
3463
|
okText: "Delete",
|
|
3464
3464
|
cancelText: "Cancel"
|
|
3465
|
-
}).then((t) =>
|
|
3465
|
+
}).then((t) => M.delete("/script-api/breakpoints/delete/all")).then((t) => {
|
|
3466
3466
|
this.clearBreakpoints();
|
|
3467
3467
|
});
|
|
3468
3468
|
},
|
|
@@ -3477,7 +3477,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3477
3477
|
},
|
|
3478
3478
|
checkMnemonics: function() {
|
|
3479
3479
|
let t = this.filename;
|
|
3480
|
-
this.filename !== q && (t.endsWith(".rb") || t.endsWith(".py") ||
|
|
3480
|
+
this.filename !== q && (t.endsWith(".rb") || t.endsWith(".py") || M.post(`/script-api/scripts/${this.filename}/mnemonics`, {
|
|
3481
3481
|
data: this.editor.getValue(),
|
|
3482
3482
|
headers: {
|
|
3483
3483
|
Accept: "application/json",
|
|
@@ -3535,23 +3535,23 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3535
3535
|
let h = {
|
|
3536
3536
|
environment: d
|
|
3537
3537
|
};
|
|
3538
|
-
e && (h.suiteRunner = t), s !== null && (h.line_no = s), r !== null && (h.end_line_no = r),
|
|
3538
|
+
e && (h.suiteRunner = t), s !== null && (h.line_no = s), r !== null && (h.end_line_no = r), M.post(o, { data: h }).then((c) => {
|
|
3539
3539
|
this.scriptStart(c.data);
|
|
3540
3540
|
}).catch((c) => {
|
|
3541
3541
|
this.scriptComplete();
|
|
3542
3542
|
});
|
|
3543
3543
|
},
|
|
3544
3544
|
go() {
|
|
3545
|
-
this.filenameSelect = this.currentFilename, this.fileNameChanged(this.currentFilename),
|
|
3545
|
+
this.filenameSelect = this.currentFilename, this.fileNameChanged(this.currentFilename), M.post(`/script-api/running-script/${this.scriptId}/go`);
|
|
3546
3546
|
},
|
|
3547
3547
|
pauseOrRetry() {
|
|
3548
|
-
this.pauseOrRetryButton === fe ?
|
|
3548
|
+
this.pauseOrRetryButton === fe ? M.post(`/script-api/running-script/${this.scriptId}/pause`) : (this.pauseOrRetryButton = fe, M.post(`/script-api/running-script/${this.scriptId}/retry`));
|
|
3549
3549
|
},
|
|
3550
3550
|
stop() {
|
|
3551
|
-
this.fatal ? (this.removeAllMarkers(), this.scriptComplete()) :
|
|
3551
|
+
this.fatal ? (this.removeAllMarkers(), this.scriptComplete()) : M.post(`/script-api/running-script/${this.scriptId}/stop`);
|
|
3552
3552
|
},
|
|
3553
3553
|
step() {
|
|
3554
|
-
|
|
3554
|
+
M.post(`/script-api/running-script/${this.scriptId}/step`);
|
|
3555
3555
|
},
|
|
3556
3556
|
// This is called by processLine no matter the current state
|
|
3557
3557
|
handleWaiting() {
|
|
@@ -3567,7 +3567,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3567
3567
|
this.waitingTime = 0, clearInterval(this.waitingInterval), this.waitingInterval = null;
|
|
3568
3568
|
},
|
|
3569
3569
|
processLine(t) {
|
|
3570
|
-
t.filename && t.filename !== this.currentFilename && (this.files[t.filename] ? (this.currentFilename = t.filename, this.editor.setValue(this.files[t.filename].content), this.restoreBreakpoints(t.filename), this.editor.clearSelection()) : (this.files[t.filename] = { content: "", lineNo: 0 },
|
|
3570
|
+
t.filename && t.filename !== this.currentFilename && (this.files[t.filename] ? (this.currentFilename = t.filename, this.editor.setValue(this.files[t.filename].content), this.restoreBreakpoints(t.filename), this.editor.clearSelection()) : (this.files[t.filename] = { content: "", lineNo: 0 }, M.get(`/script-api/scripts/${t.filename}`).then((s) => {
|
|
3571
3571
|
this.files[t.filename] = {
|
|
3572
3572
|
content: s.data.contents,
|
|
3573
3573
|
lineNo: 0
|
|
@@ -3673,7 +3673,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3673
3673
|
this.cable.recordPing(), this.receivedEvents.push(t);
|
|
3674
3674
|
},
|
|
3675
3675
|
promptDialogCallback(t) {
|
|
3676
|
-
this.prompt.show = !1,
|
|
3676
|
+
this.prompt.show = !1, M.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3677
3677
|
data: {
|
|
3678
3678
|
method: this.prompt.method,
|
|
3679
3679
|
answer: t,
|
|
@@ -3691,14 +3691,14 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3691
3691
|
case "ask":
|
|
3692
3692
|
case "ask_string":
|
|
3693
3693
|
this.ask.default = null, this.ask.answerRequired = !0, this.ask.password = !1, this.ask.question = t.args[0], t.args[1] && t.args[1] !== !0 && t.args[1] !== !1 ? this.ask.default = t.args[1].toString() : t.args[1] === !0 && (this.ask.answerRequired = !1), t.args[2] === !0 && (this.ask.password = !0), this.ask.callback = (e) => {
|
|
3694
|
-
this.ask.show = !1, this.ask.password ?
|
|
3694
|
+
this.ask.show = !1, this.ask.password ? M.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3695
3695
|
data: {
|
|
3696
3696
|
method: t.method,
|
|
3697
3697
|
password: e,
|
|
3698
3698
|
// Using password as a key automatically filters it from rails logs
|
|
3699
3699
|
prompt_id: this.activePromptId
|
|
3700
3700
|
}
|
|
3701
|
-
}) :
|
|
3701
|
+
}) : M.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3702
3702
|
data: {
|
|
3703
3703
|
method: t.method,
|
|
3704
3704
|
answer: e,
|
|
@@ -3732,7 +3732,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3732
3732
|
break;
|
|
3733
3733
|
case "metadata_input":
|
|
3734
3734
|
this.inputMetadata.callback = (e) => {
|
|
3735
|
-
this.inputMetadata.show = !1,
|
|
3735
|
+
this.inputMetadata.show = !1, M.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3736
3736
|
data: {
|
|
3737
3737
|
method: t.method,
|
|
3738
3738
|
answer: e,
|
|
@@ -3752,7 +3752,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3752
3752
|
let e = "Cancel", s = [];
|
|
3753
3753
|
t != "Cancel" && (e = [], t.forEach((r) => {
|
|
3754
3754
|
e.push(r.name), s.push(
|
|
3755
|
-
|
|
3755
|
+
M.get(
|
|
3756
3756
|
`/openc3-api/storage/upload/${encodeURIComponent(
|
|
3757
3757
|
`${window.openc3Scope}/tmp/${r.name}`
|
|
3758
3758
|
)}?bucket=OPENC3_CONFIG_BUCKET`
|
|
@@ -3766,7 +3766,7 @@ const Ze = "__TEMP__", q = "<Untitled>", He = "Start", Ui = "Go", fe = "Pause",
|
|
|
3766
3766
|
})
|
|
3767
3767
|
);
|
|
3768
3768
|
})), Promise.all(s).then((r) => {
|
|
3769
|
-
|
|
3769
|
+
M.post(`/script-api/running-script/${this.scriptId}/prompt`, {
|
|
3770
3770
|
data: {
|
|
3771
3771
|
method: this.file.multiple ? "open_files_dialog" : "open_file_dialog",
|
|
3772
3772
|
answer: e,
|
|
@@ -3888,7 +3888,7 @@ class TestSuite(Suite):
|
|
|
3888
3888
|
this.fileOpen = !0;
|
|
3889
3889
|
},
|
|
3890
3890
|
async reloadFile(t = !0) {
|
|
3891
|
-
this.saveAllowed = !1, this.startOrGoDisabled = !0, await
|
|
3891
|
+
this.saveAllowed = !1, this.startOrGoDisabled = !0, await M.get(`/script-api/scripts/${this.filename}`, {
|
|
3892
3892
|
headers: {
|
|
3893
3893
|
Accept: "application/json",
|
|
3894
3894
|
"Ignore-Errors": "404"
|
|
@@ -3970,7 +3970,7 @@ class TestSuite(Suite):
|
|
|
3970
3970
|
this.filename = this.tempFilename, this.addToRecent(this.filename);
|
|
3971
3971
|
}
|
|
3972
3972
|
}
|
|
3973
|
-
this.showSave = !0, await
|
|
3973
|
+
this.showSave = !0, await M.post(`/script-api/scripts/${this.filename}`, {
|
|
3974
3974
|
data: {
|
|
3975
3975
|
text: this.editor.getValue(),
|
|
3976
3976
|
// Pass in the raw file text
|
|
@@ -3990,14 +3990,14 @@ class TestSuite(Suite):
|
|
|
3990
3990
|
this.showSaveAs = !0;
|
|
3991
3991
|
},
|
|
3992
3992
|
async saveAsFilename(t) {
|
|
3993
|
-
this.filename = t.split("*")[0], this.currentFilename = null, this.tempFilename && (
|
|
3993
|
+
this.filename = t.split("*")[0], this.currentFilename = null, this.tempFilename && (M.post(`/script-api/scripts/${this.tempFilename}/delete`), this.tempFilename = null), await this.saveFile("menu");
|
|
3994
3994
|
},
|
|
3995
3995
|
delete() {
|
|
3996
3996
|
let t = this.filename;
|
|
3997
3997
|
this.tempFilename && (t = this.tempFilename), this.$dialog.confirm(`Permanently delete file: ${t}`, {
|
|
3998
3998
|
okText: "Delete",
|
|
3999
3999
|
cancelText: "Cancel"
|
|
4000
|
-
}).then((e) =>
|
|
4000
|
+
}).then((e) => M.post(`/script-api/scripts/${t}/delete`, {
|
|
4001
4001
|
data: {}
|
|
4002
4002
|
})).then((e) => {
|
|
4003
4003
|
this.removeFromRecent(t), this.newFile();
|
|
@@ -4019,7 +4019,7 @@ class TestSuite(Suite):
|
|
|
4019
4019
|
},
|
|
4020
4020
|
// ScriptRunner Script menu actions
|
|
4021
4021
|
syntaxCheck() {
|
|
4022
|
-
|
|
4022
|
+
M.post(`/script-api/scripts/${this.filename}/syntax`, {
|
|
4023
4023
|
data: this.editor.getValue(),
|
|
4024
4024
|
headers: {
|
|
4025
4025
|
Accept: "application/json",
|
|
@@ -4030,7 +4030,7 @@ class TestSuite(Suite):
|
|
|
4030
4030
|
});
|
|
4031
4031
|
},
|
|
4032
4032
|
showInstrumented() {
|
|
4033
|
-
|
|
4033
|
+
M.post(`/script-api/scripts/${this.filename}/instrumented`, {
|
|
4034
4034
|
data: this.editor.getValue(),
|
|
4035
4035
|
headers: {
|
|
4036
4036
|
Accept: "application/json",
|
|
@@ -4041,7 +4041,7 @@ class TestSuite(Suite):
|
|
|
4041
4041
|
});
|
|
4042
4042
|
},
|
|
4043
4043
|
showCallStack() {
|
|
4044
|
-
|
|
4044
|
+
M.post(`/script-api/running-script/${this.scriptId}/backtrace`);
|
|
4045
4045
|
},
|
|
4046
4046
|
toggleDebug() {
|
|
4047
4047
|
this.showDebug = !this.showDebug, this.showDebug && this.$nextTick(() => {
|
|
@@ -4052,7 +4052,7 @@ class TestSuite(Suite):
|
|
|
4052
4052
|
this.showDisconnect = !this.showDisconnect;
|
|
4053
4053
|
},
|
|
4054
4054
|
debugKeydown(t) {
|
|
4055
|
-
t.key === "Escape" ? (this.debug = "", this.debugHistoryIndex = this.debugHistory.length) : t.key === "Enter" ? (this.debugHistory.push(this.debug), this.debugHistoryIndex = this.debugHistory.length,
|
|
4055
|
+
t.key === "Escape" ? (this.debug = "", this.debugHistoryIndex = this.debugHistory.length) : t.key === "Enter" ? (this.debugHistory.push(this.debug), this.debugHistoryIndex = this.debugHistory.length, M.post(`/script-api/running-script/${this.scriptId}/debug`, {
|
|
4056
4056
|
data: {
|
|
4057
4057
|
args: this.debug
|
|
4058
4058
|
}
|
|
@@ -4073,10 +4073,10 @@ class TestSuite(Suite):
|
|
|
4073
4073
|
},
|
|
4074
4074
|
lockFile: function() {
|
|
4075
4075
|
if (!this.readOnlyUser)
|
|
4076
|
-
return
|
|
4076
|
+
return M.post(`/script-api/scripts/${this.filename}/lock`);
|
|
4077
4077
|
},
|
|
4078
4078
|
unlockFile: function() {
|
|
4079
|
-
this.filename !== q && !this.readOnly && !this.readOnlyUser &&
|
|
4079
|
+
this.filename !== q && !this.readOnly && !this.readOnlyUser && M.post(`/script-api/scripts/${this.filename}/unlock`);
|
|
4080
4080
|
},
|
|
4081
4081
|
backToNewScript: async function() {
|
|
4082
4082
|
this.scriptDisconnect(), this.removeAllMarkers(), await this.scriptComplete(), this.newFile();
|
|
@@ -4111,7 +4111,7 @@ class TestSuite(Suite):
|
|
|
4111
4111
|
class: "error-message"
|
|
4112
4112
|
}, $i = { class: "flex-grow-1" };
|
|
4113
4113
|
function es(t, e, s, r, i, o) {
|
|
4114
|
-
const d = a("top-bar"), h = a("v-icon"), c = a("v-btn"), b = a("v-snackbar"), k = a("openc3-screen"), V = a("suite-runner"), w = a("v-tooltip"), R = a("v-select"), E = a("v-text-field"), T = a("v-progress-circular"), _ = a("v-spacer"), z = a("v-badge"), G = a("v-row"), Q = a("v-card-text"), te = a("v-card"), K = a("v-list-item"), ie = a("v-divider"), I = a("v-list"), F = a("v-menu"), ce = a("pane"), Z = a("script-log-messages"), Ie = a("splitpanes"), ke = a("v-tab"), De = a("v-tabs"), me = a("v-col"), Se = a("v-tabs-window-item"), se = a("v-tabs-window"), xe = a("file-open-save-dialog"), Ue = a("environment-dialog"), Pe = a("ask-dialog"), pe = a("file-dialog"), ze = a("information-dialog"), Le = a("event-list-dialog"), Ae = a("overrides-dialog"), he = a("prompt-dialog"), N = a("results-dialog"), Fe = a("script-environment-dialog"), u = a("simple-text-dialog"), p = a("critical-cmd-dialog"), v = a("v-card-title"), f = a("command-editor"), g = a("v-card-actions"), C = a("v-dialog"),
|
|
4114
|
+
const d = a("top-bar"), h = a("v-icon"), c = a("v-btn"), b = a("v-snackbar"), k = a("openc3-screen"), V = a("suite-runner"), w = a("v-tooltip"), R = a("v-select"), E = a("v-text-field"), T = a("v-progress-circular"), _ = a("v-spacer"), z = a("v-badge"), G = a("v-row"), Q = a("v-card-text"), te = a("v-card"), K = a("v-list-item"), ie = a("v-divider"), I = a("v-list"), F = a("v-menu"), ce = a("pane"), Z = a("script-log-messages"), Ie = a("splitpanes"), ke = a("v-tab"), De = a("v-tabs"), me = a("v-col"), Se = a("v-tabs-window-item"), se = a("v-tabs-window"), xe = a("file-open-save-dialog"), Ue = a("environment-dialog"), Pe = a("ask-dialog"), pe = a("file-dialog"), ze = a("information-dialog"), Le = a("event-list-dialog"), Ae = a("overrides-dialog"), he = a("prompt-dialog"), N = a("results-dialog"), Fe = a("script-environment-dialog"), u = a("simple-text-dialog"), p = a("critical-cmd-dialog"), v = a("v-card-title"), f = a("command-editor"), g = a("v-card-actions"), C = a("v-dialog"), O = a("running-scripts"), A = a("v-sheet"), H = a("v-bottom-sheet");
|
|
4115
4115
|
return S(), P(de, null, [
|
|
4116
4116
|
s.inline ? U("", !0) : (S(), P(de, { key: 0 }, [
|
|
4117
4117
|
n(d, {
|
|
@@ -4848,7 +4848,7 @@ function es(t, e, s, r, i, o) {
|
|
|
4848
4848
|
default: l(() => [
|
|
4849
4849
|
n(A, { class: "pb-11 pt-5 px-5" }, {
|
|
4850
4850
|
default: l(() => [
|
|
4851
|
-
i.showScripts ? (S(), D(
|
|
4851
|
+
i.showScripts ? (S(), D(O, {
|
|
4852
4852
|
key: 0,
|
|
4853
4853
|
"connect-in-new-tab": !!i.fileModified,
|
|
4854
4854
|
onDisconnect: o.scriptDisconnect,
|
|
@@ -4864,7 +4864,7 @@ function es(t, e, s, r, i, o) {
|
|
|
4864
4864
|
}, 8, ["modelValue"])
|
|
4865
4865
|
], 64);
|
|
4866
4866
|
}
|
|
4867
|
-
const bs = /* @__PURE__ */ j(zi, [["render", es], ["__scopeId", "data-v-
|
|
4867
|
+
const bs = /* @__PURE__ */ j(zi, [["render", es], ["__scopeId", "data-v-257947f6"]]);
|
|
4868
4868
|
export {
|
|
4869
4869
|
Tt as RunningScripts,
|
|
4870
4870
|
Ut as ScriptLogMessages,
|