@davra/ui-core 1.0.5 → 1.0.6
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.
- package/dist/ui-core.es.js +154 -152
- package/package.json +1 -1
package/dist/ui-core.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance as be, ref as b, watch as J, computed as
|
|
1
|
+
import { getCurrentInstance as be, ref as b, watch as J, computed as T, defineComponent as L, onMounted as ue, resolveComponent as p, openBlock as A, createBlock as C, withCtx as i, createVNode as d, unref as u, isRef as R, readonly as q, createTextVNode as E, toDisplayString as B, createCommentVNode as P, mergeProps as F, withDirectives as he, vShow as ge, createElementVNode as de, createElementBlock as pe, Fragment as Ae, renderList as Ee, renderSlot as z, inject as Ce, normalizeProps as Ie, guardReactiveProps as Te, useCssVars as Se, normalizeClass as Ue } from "vue";
|
|
2
2
|
import De from "axios";
|
|
3
3
|
import { defineStore as N, storeToRefs as K } from "pinia";
|
|
4
4
|
const ee = {
|
|
@@ -35,14 +35,14 @@ const ee = {
|
|
|
35
35
|
return [];
|
|
36
36
|
}
|
|
37
37
|
}, $e = async (e, t) => {
|
|
38
|
-
const
|
|
39
|
-
Object.entries(
|
|
40
|
-
t && t.includes(l) && delete
|
|
38
|
+
const s = { ...e };
|
|
39
|
+
Object.entries(s).forEach(([l, n]) => {
|
|
40
|
+
t && t.includes(l) && delete s[l], (!n || /[^a-zA-Z_0-9\-+]/g.test(n)) && delete s[l];
|
|
41
41
|
});
|
|
42
42
|
try {
|
|
43
43
|
return await f().post(
|
|
44
44
|
"/api/v1/tags",
|
|
45
|
-
|
|
45
|
+
s,
|
|
46
46
|
{
|
|
47
47
|
headers: {
|
|
48
48
|
Accept: "application/json"
|
|
@@ -56,11 +56,11 @@ const ee = {
|
|
|
56
56
|
getLabels: ke,
|
|
57
57
|
createLabel: $e,
|
|
58
58
|
getValuesByKey: Ve
|
|
59
|
-
}, Re = async (e = 0, t = 1e3,
|
|
59
|
+
}, Re = async (e = 0, t = 1e3, s, l) => {
|
|
60
60
|
const n = [];
|
|
61
|
-
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`),
|
|
61
|
+
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`), s && n.push(`sort=${s}`), l && n.push(l);
|
|
62
62
|
try {
|
|
63
|
-
const { data: r, headers:
|
|
63
|
+
const { data: r, headers: o } = await f().get(
|
|
64
64
|
`/api/v1/twins?${n.join("&")}`,
|
|
65
65
|
{
|
|
66
66
|
headers: {
|
|
@@ -68,13 +68,13 @@ const ee = {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
return { totalRecords: parseInt(
|
|
71
|
+
return { totalRecords: parseInt(o["com-davra-total-results"]), records: r };
|
|
72
72
|
} catch {
|
|
73
73
|
throw new Error("Twins API Error");
|
|
74
74
|
}
|
|
75
75
|
}, Oe = async (e) => {
|
|
76
76
|
try {
|
|
77
|
-
const { data: t, headers:
|
|
77
|
+
const { data: t, headers: s } = await f().post(
|
|
78
78
|
"/api/v1/twins/query",
|
|
79
79
|
e,
|
|
80
80
|
{
|
|
@@ -83,13 +83,13 @@ const ee = {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
return { totalRecords: parseInt(
|
|
86
|
+
return { totalRecords: parseInt(s["com-davra-total-results"]), records: t };
|
|
87
87
|
} catch {
|
|
88
88
|
throw new Error("Twins API Error");
|
|
89
89
|
}
|
|
90
90
|
}, je = async (e) => {
|
|
91
91
|
try {
|
|
92
|
-
const { data: t, headers:
|
|
92
|
+
const { data: t, headers: s } = await f().get(
|
|
93
93
|
`/api/v1/twins?arrayUUIDs=${e.join(",")}`,
|
|
94
94
|
{
|
|
95
95
|
headers: {
|
|
@@ -97,15 +97,15 @@ const ee = {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
return { totalRecords: parseInt(
|
|
100
|
+
return { totalRecords: parseInt(s["com-davra-total-results"]), records: t };
|
|
101
101
|
} catch {
|
|
102
102
|
throw new Error("Twins API Error");
|
|
103
103
|
}
|
|
104
|
-
}, Me = async (e, t = 0,
|
|
105
|
-
const r = [`digitalTwinTypeName=${e}`, `limit=${
|
|
104
|
+
}, Me = async (e, t = 0, s = 1e3, l, n) => {
|
|
105
|
+
const r = [`digitalTwinTypeName=${e}`, `limit=${s}`, `start=${t}`];
|
|
106
106
|
l && r.push(`sort=${l}`), n && r.push(`name=~${n}`);
|
|
107
107
|
try {
|
|
108
|
-
const { data:
|
|
108
|
+
const { data: o, headers: a } = await f().get(
|
|
109
109
|
`/api/v1/twins/?${r.join("&")}`,
|
|
110
110
|
{
|
|
111
111
|
headers: {
|
|
@@ -113,7 +113,7 @@ const ee = {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
|
-
return { totalRecords: parseInt(a["com-davra-total-results"]), records:
|
|
116
|
+
return { totalRecords: parseInt(a["com-davra-total-results"]), records: o };
|
|
117
117
|
} catch {
|
|
118
118
|
throw new Error("Twins API Error");
|
|
119
119
|
}
|
|
@@ -164,16 +164,16 @@ function ze(e) {
|
|
|
164
164
|
}
|
|
165
165
|
const ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ne = "__vueuse_ssr_handlers__";
|
|
166
166
|
ae[ne] = ae[ne] || {};
|
|
167
|
-
var
|
|
167
|
+
var oe;
|
|
168
168
|
(function(e) {
|
|
169
169
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
170
|
-
})(
|
|
171
|
-
var Fe = Object.defineProperty,
|
|
172
|
-
for (var
|
|
173
|
-
Qe.call(t,
|
|
174
|
-
if (
|
|
175
|
-
for (var
|
|
176
|
-
We.call(t,
|
|
170
|
+
})(oe || (oe = {}));
|
|
171
|
+
var Fe = Object.defineProperty, se = Object.getOwnPropertySymbols, Qe = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, re = (e, t, s) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, Je = (e, t) => {
|
|
172
|
+
for (var s in t || (t = {}))
|
|
173
|
+
Qe.call(t, s) && re(e, s, t[s]);
|
|
174
|
+
if (se)
|
|
175
|
+
for (var s of se(t))
|
|
176
|
+
We.call(t, s) && re(e, s, t[s]);
|
|
177
177
|
return e;
|
|
178
178
|
};
|
|
179
179
|
const Ke = {
|
|
@@ -205,37 +205,37 @@ const Ke = {
|
|
|
205
205
|
Je({
|
|
206
206
|
linear: qe
|
|
207
207
|
}, Ke);
|
|
208
|
-
function H(e, t,
|
|
209
|
-
var n, r,
|
|
208
|
+
function H(e, t, s, l = {}) {
|
|
209
|
+
var n, r, o;
|
|
210
210
|
const {
|
|
211
211
|
clone: a = !1,
|
|
212
212
|
passive: c = !1,
|
|
213
213
|
eventName: v,
|
|
214
214
|
deep: _ = !1,
|
|
215
215
|
defaultValue: h
|
|
216
|
-
} = l, w = be(), I =
|
|
217
|
-
let
|
|
218
|
-
t || (t = "modelValue"),
|
|
216
|
+
} = l, w = be(), I = s || (w == null ? void 0 : w.emit) || ((n = w == null ? void 0 : w.$emit) == null ? void 0 : n.bind(w)) || ((o = (r = w == null ? void 0 : w.proxy) == null ? void 0 : r.$emit) == null ? void 0 : o.bind(w == null ? void 0 : w.proxy));
|
|
217
|
+
let S = v;
|
|
218
|
+
t || (t = "modelValue"), S = v || S || `update:${t.toString()}`;
|
|
219
219
|
const O = (D) => a ? Ne(a) ? a(D) : ze(D) : D, U = () => Le(e[t]) ? O(e[t]) : h;
|
|
220
220
|
if (c) {
|
|
221
221
|
const D = U(), j = b(D);
|
|
222
222
|
return J(() => e[t], (m) => j.value = O(m)), J(j, (m) => {
|
|
223
|
-
(m !== e[t] || _) && I(
|
|
223
|
+
(m !== e[t] || _) && I(S, m);
|
|
224
224
|
}, { deep: _ }), j;
|
|
225
225
|
} else
|
|
226
|
-
return
|
|
226
|
+
return T({
|
|
227
227
|
get() {
|
|
228
228
|
return U();
|
|
229
229
|
},
|
|
230
230
|
set(D) {
|
|
231
|
-
I(
|
|
231
|
+
I(S, D);
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function He(e, t,
|
|
235
|
+
function He(e, t, s = {}) {
|
|
236
236
|
const l = {};
|
|
237
237
|
for (const n in e)
|
|
238
|
-
l[n] = H(e, n, t,
|
|
238
|
+
l[n] = H(e, n, t, s);
|
|
239
239
|
return l;
|
|
240
240
|
}
|
|
241
241
|
const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("span", null, null, -1), ve = /* @__PURE__ */ L({
|
|
@@ -249,14 +249,14 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
249
249
|
},
|
|
250
250
|
emits: ["update:labelkey", "update:labelvalue", "removelabel"],
|
|
251
251
|
setup(e, { emit: t }) {
|
|
252
|
-
const
|
|
252
|
+
const s = e, l = T(() => [
|
|
253
253
|
{ header: "Keys", color: "blue", icon: "mdi-label" },
|
|
254
|
-
...
|
|
254
|
+
...s.labels,
|
|
255
255
|
{ header: "Digital Twin Types", color: "purple", icon: "mdi-content-duplicate" },
|
|
256
|
-
...
|
|
257
|
-
]), { labelkey: n, labelvalue: r } = He(
|
|
256
|
+
...s.twintypes
|
|
257
|
+
]), { labelkey: n, labelvalue: r } = He(s, t), o = b(""), a = b(""), c = b([]), v = b([]), _ = b(!1), h = (m) => s.twintypes.find((g) => g === m) ? "twintypes" : "labels", w = T(() => h(n.value)), I = () => {
|
|
258
258
|
document.activeElement.blur();
|
|
259
|
-
},
|
|
259
|
+
}, S = (m) => {
|
|
260
260
|
m.key === "Enter" && I();
|
|
261
261
|
}, O = async (m) => {
|
|
262
262
|
const g = h(m);
|
|
@@ -279,7 +279,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
279
279
|
J(n, async (m, g) => {
|
|
280
280
|
m !== g && (O(m), g !== "" && (r.value = ""));
|
|
281
281
|
});
|
|
282
|
-
const U = b(), D =
|
|
282
|
+
const U = b(), D = T(() => {
|
|
283
283
|
var m;
|
|
284
284
|
return (m = U.value) == null ? void 0 : m.isFocused;
|
|
285
285
|
}), j = {
|
|
@@ -305,8 +305,8 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
305
305
|
d(X, {
|
|
306
306
|
modelValue: u(n),
|
|
307
307
|
"onUpdate:modelValue": g[0] || (g[0] = (y) => R(n) ? n.value = y : null),
|
|
308
|
-
search: u(
|
|
309
|
-
"onUpdate:search": g[1] || (g[1] = (y) => R(
|
|
308
|
+
search: u(o),
|
|
309
|
+
"onUpdate:search": g[1] || (g[1] = (y) => R(o) ? o.value = y : null),
|
|
310
310
|
"item-value": "value",
|
|
311
311
|
"data-testid": "label-key-selector",
|
|
312
312
|
readonly: "readonly" in m ? m.readonly : u(q),
|
|
@@ -320,13 +320,13 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
320
320
|
density: "compact",
|
|
321
321
|
rules: [j.alphanumericAndDash, j.specialNames],
|
|
322
322
|
"menu-props": { maxHeight: "400px", zIndex: 9999999 },
|
|
323
|
-
onKeydown:
|
|
323
|
+
onKeydown: S
|
|
324
324
|
}, {
|
|
325
325
|
"no-data": i(() => [
|
|
326
326
|
Ye
|
|
327
327
|
]),
|
|
328
328
|
"prepend-item": i(() => [
|
|
329
|
-
u(
|
|
329
|
+
u(o) && !u(l).includes(u(o)) ? (A(), C(M, {
|
|
330
330
|
key: 0,
|
|
331
331
|
class: "bg-blue-lighten-5",
|
|
332
332
|
onClick: I
|
|
@@ -345,7 +345,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
345
345
|
start: "",
|
|
346
346
|
icon: "mdi-label"
|
|
347
347
|
}),
|
|
348
|
-
E(" " + B(u(
|
|
348
|
+
E(" " + B(u(o)), 1)
|
|
349
349
|
]),
|
|
350
350
|
_: 1
|
|
351
351
|
})
|
|
@@ -560,7 +560,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
560
560
|
}, Xe = {
|
|
561
561
|
getTwinTypes: Ze
|
|
562
562
|
}, me = N("twinTypes", () => {
|
|
563
|
-
const e = b([]), t =
|
|
563
|
+
const e = b([]), t = T(() => e.value.map((n) => n.name)), s = T(() => e.value.map((n) => ({ value: n.UUID, label: n.name }))), l = async () => {
|
|
564
564
|
try {
|
|
565
565
|
const n = await Xe.getTwinTypes();
|
|
566
566
|
e.value = n;
|
|
@@ -571,7 +571,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
571
571
|
twinTypes: e,
|
|
572
572
|
pullTwinTypes: l,
|
|
573
573
|
twinTypeNames: t,
|
|
574
|
-
twinTypeSelectArray:
|
|
574
|
+
twinTypeSelectArray: s
|
|
575
575
|
};
|
|
576
576
|
}), et = N("labels", () => {
|
|
577
577
|
const e = b([]), t = async () => {
|
|
@@ -580,7 +580,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
580
580
|
e.value = l;
|
|
581
581
|
} catch {
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, s = async (l) => {
|
|
584
584
|
const { twinTypeNames: n } = K(me());
|
|
585
585
|
try {
|
|
586
586
|
await Z.createLabel(l, n.value), await t();
|
|
@@ -590,7 +590,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
590
590
|
return t(), {
|
|
591
591
|
labels: e,
|
|
592
592
|
pullLabels: t,
|
|
593
|
-
updateLabels:
|
|
593
|
+
updateLabels: s
|
|
594
594
|
};
|
|
595
595
|
}), tt = /* @__PURE__ */ L({
|
|
596
596
|
__name: "LabelsSelector",
|
|
@@ -600,7 +600,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
600
600
|
},
|
|
601
601
|
emits: ["update:modelValue"],
|
|
602
602
|
setup(e, { emit: t }) {
|
|
603
|
-
const
|
|
603
|
+
const s = e, { labels: l } = K(et()), { twinTypeNames: n } = K(me()), r = b([]), o = T(() => (_) => l.value.filter((h) => !n.value.includes(h) && (_.key === h || !r.value.find(({ key: w }) => w === h)))), a = T(() => (_) => n.value.filter((h) => _.key === h || !r.value.find(({ key: w }) => w === h))), c = () => {
|
|
604
604
|
r.value.push({ key: "", value: "" });
|
|
605
605
|
}, v = (_) => {
|
|
606
606
|
r.value.splice(_, 1);
|
|
@@ -609,9 +609,9 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
609
609
|
const h = _.reduce((w, I) => (I.key && I.value && (w[I.key] = I.value), w), {});
|
|
610
610
|
t("update:modelValue", h);
|
|
611
611
|
}, { deep: !0 }), ue(() => {
|
|
612
|
-
|
|
612
|
+
s.modelValue && (r.value = Object.entries(s.modelValue).map(([_, h]) => ({ key: _, value: h })));
|
|
613
613
|
}), (_, h) => {
|
|
614
|
-
const w = p("v-spacer"), I = p("v-btn"),
|
|
614
|
+
const w = p("v-spacer"), I = p("v-btn"), S = p("v-row"), O = p("v-card-title"), U = p("v-list-subheader"), D = p("v-col"), j = p("v-divider"), m = ve, g = p("v-card-text"), k = p("v-sheet");
|
|
615
615
|
return A(), C(k, {
|
|
616
616
|
class: "pa-3",
|
|
617
617
|
variant: "tonal",
|
|
@@ -622,7 +622,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
622
622
|
default: i(() => [
|
|
623
623
|
d(O, { class: "text-primary" }, {
|
|
624
624
|
default: i(() => [
|
|
625
|
-
d(
|
|
625
|
+
d(S, { "no-gutters": "" }, {
|
|
626
626
|
default: i(() => [
|
|
627
627
|
E(" Labels "),
|
|
628
628
|
d(w),
|
|
@@ -648,7 +648,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
648
648
|
}),
|
|
649
649
|
u(r).length ? (A(), C(g, { key: 0 }, {
|
|
650
650
|
default: i(() => [
|
|
651
|
-
d(
|
|
651
|
+
d(S, { "no-gutters": "" }, {
|
|
652
652
|
default: i(() => [
|
|
653
653
|
d(D, null, {
|
|
654
654
|
default: i(() => [
|
|
@@ -683,7 +683,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
683
683
|
labelvalue: u(r)[V].value,
|
|
684
684
|
"onUpdate:labelvalue": (M) => u(r)[V].value = M,
|
|
685
685
|
readonly: "readonly" in _ ? _.readonly : u(q),
|
|
686
|
-
labels: u(
|
|
686
|
+
labels: u(o)(u(r)[V]),
|
|
687
687
|
twintypes: u(a)(u(r)[V]),
|
|
688
688
|
"data-lab-key": $.key,
|
|
689
689
|
onRemovelabel: (M) => v(V)
|
|
@@ -704,10 +704,10 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
704
704
|
},
|
|
705
705
|
emits: ["confirm", "update:modelValue"],
|
|
706
706
|
setup(e, { emit: t }) {
|
|
707
|
-
const
|
|
707
|
+
const s = e, l = s.parentActivator ? b(!1) : H(s, "modelValue", t);
|
|
708
708
|
return (n, r) => {
|
|
709
|
-
const
|
|
710
|
-
return A(), C(
|
|
709
|
+
const o = p("v-dialog");
|
|
710
|
+
return A(), C(o, {
|
|
711
711
|
modelValue: u(l),
|
|
712
712
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => R(l) ? l.value = a : null),
|
|
713
713
|
activator: n.parentActivator ? "parent" : void 0
|
|
@@ -720,13 +720,13 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
720
720
|
};
|
|
721
721
|
}
|
|
722
722
|
}), nt = Symbol.for("vuetify:display");
|
|
723
|
-
function
|
|
723
|
+
function ot() {
|
|
724
724
|
const e = Ce(nt);
|
|
725
725
|
if (!e)
|
|
726
726
|
throw new Error("Could not find Vuetify display injection");
|
|
727
727
|
return e;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
729
|
+
const st = /* @__PURE__ */ L({
|
|
730
730
|
__name: "ViewObjectModal",
|
|
731
731
|
props: {
|
|
732
732
|
title: {},
|
|
@@ -736,20 +736,20 @@ const ot = /* @__PURE__ */ L({
|
|
|
736
736
|
},
|
|
737
737
|
emits: ["confirm", "update:modelValue"],
|
|
738
738
|
setup(e, { emit: t }) {
|
|
739
|
-
const
|
|
739
|
+
const s = e, l = s.parentActivator ? b(!1) : H(s, "modelValue", t), n = () => {
|
|
740
740
|
t("confirm"), l.value = !1;
|
|
741
|
-
}, { mobile: r } =
|
|
742
|
-
return (
|
|
743
|
-
const c = p("v-toolbar-title"), v = p("v-btn"), _ = p("v-toolbar"), h = p("v-card-text"), w = p("v-spacer"), I = p("v-card-actions"),
|
|
741
|
+
}, { mobile: r } = ot();
|
|
742
|
+
return (o, a) => {
|
|
743
|
+
const c = p("v-toolbar-title"), v = p("v-btn"), _ = p("v-toolbar"), h = p("v-card-text"), w = p("v-spacer"), I = p("v-card-actions"), S = p("v-card"), O = p("v-dialog");
|
|
744
744
|
return A(), C(O, {
|
|
745
745
|
modelValue: u(l),
|
|
746
746
|
"onUpdate:modelValue": a[2] || (a[2] = (U) => R(l) ? l.value = U : null),
|
|
747
|
-
activator:
|
|
747
|
+
activator: o.parentActivator ? "parent" : void 0,
|
|
748
748
|
"max-width": "800px",
|
|
749
749
|
fullscreen: u(r)
|
|
750
750
|
}, {
|
|
751
751
|
default: i(() => [
|
|
752
|
-
d(
|
|
752
|
+
d(S, null, {
|
|
753
753
|
default: i(() => [
|
|
754
754
|
d(_, { color: "white" }, {
|
|
755
755
|
append: i(() => [
|
|
@@ -763,7 +763,7 @@ const ot = /* @__PURE__ */ L({
|
|
|
763
763
|
default: i(() => [
|
|
764
764
|
d(c, null, {
|
|
765
765
|
default: i(() => [
|
|
766
|
-
E(B(
|
|
766
|
+
E(B(o.title), 1)
|
|
767
767
|
]),
|
|
768
768
|
_: 1
|
|
769
769
|
})
|
|
@@ -772,13 +772,13 @@ const ot = /* @__PURE__ */ L({
|
|
|
772
772
|
}),
|
|
773
773
|
d(h, null, {
|
|
774
774
|
default: i(() => [
|
|
775
|
-
z(
|
|
775
|
+
z(o.$slots, "default")
|
|
776
776
|
]),
|
|
777
777
|
_: 3
|
|
778
778
|
}),
|
|
779
|
-
|
|
779
|
+
o.hideActions ? P("", !0) : (A(), C(I, { key: 0 }, {
|
|
780
780
|
default: i(() => [
|
|
781
|
-
z(
|
|
781
|
+
z(o.$slots, "actions", Ie(Te({ confirm: n, dialog: u(l) })), () => [
|
|
782
782
|
d(w),
|
|
783
783
|
d(v, {
|
|
784
784
|
class: "delete-modal-dismiss",
|
|
@@ -822,14 +822,14 @@ const ot = /* @__PURE__ */ L({
|
|
|
822
822
|
},
|
|
823
823
|
emits: ["confirm", "update:modelValue"],
|
|
824
824
|
setup(e, { emit: t }) {
|
|
825
|
-
const
|
|
825
|
+
const s = e, l = s.parentActivator ? b(!1) : H(s, "modelValue", t), n = () => {
|
|
826
826
|
t("confirm"), l.value = !1;
|
|
827
827
|
};
|
|
828
|
-
return (r,
|
|
828
|
+
return (r, o) => {
|
|
829
829
|
const a = p("v-card-title"), c = p("v-card-text"), v = p("v-spacer"), _ = p("v-btn"), h = p("v-card-actions"), w = p("v-card"), I = p("v-dialog");
|
|
830
830
|
return A(), C(I, {
|
|
831
831
|
modelValue: u(l),
|
|
832
|
-
"onUpdate:modelValue":
|
|
832
|
+
"onUpdate:modelValue": o[1] || (o[1] = (S) => R(l) ? l.value = S : null),
|
|
833
833
|
activator: r.parentActivator ? "parent" : void 0,
|
|
834
834
|
"max-width": "400px"
|
|
835
835
|
}, {
|
|
@@ -854,7 +854,7 @@ const ot = /* @__PURE__ */ L({
|
|
|
854
854
|
d(_, {
|
|
855
855
|
class: "delete-modal-dismiss",
|
|
856
856
|
color: "grey",
|
|
857
|
-
onClick:
|
|
857
|
+
onClick: o[0] || (o[0] = (S) => l.value = !1)
|
|
858
858
|
}, {
|
|
859
859
|
default: i(() => [
|
|
860
860
|
E(" Dismiss ")
|
|
@@ -890,21 +890,21 @@ const ot = /* @__PURE__ */ L({
|
|
|
890
890
|
},
|
|
891
891
|
emits: ["confirm"],
|
|
892
892
|
setup(e, { emit: t }) {
|
|
893
|
-
const
|
|
894
|
-
|
|
893
|
+
const s = b(!1), l = () => {
|
|
894
|
+
s.value = !1, t("confirm");
|
|
895
895
|
};
|
|
896
896
|
return (n, r) => {
|
|
897
|
-
const
|
|
897
|
+
const o = p("v-card-title"), a = p("v-card-text"), c = p("v-spacer"), v = p("v-btn"), _ = p("v-card-actions"), h = p("v-card"), w = p("v-dialog");
|
|
898
898
|
return A(), C(w, {
|
|
899
|
-
modelValue: u(
|
|
900
|
-
"onUpdate:modelValue": r[1] || (r[1] = (I) => R(
|
|
899
|
+
modelValue: u(s),
|
|
900
|
+
"onUpdate:modelValue": r[1] || (r[1] = (I) => R(s) ? s.value = I : null),
|
|
901
901
|
activator: "parent",
|
|
902
902
|
"max-width": "400px"
|
|
903
903
|
}, {
|
|
904
904
|
default: i(() => [
|
|
905
905
|
d(h, null, {
|
|
906
906
|
default: i(() => [
|
|
907
|
-
d(
|
|
907
|
+
d(o, null, {
|
|
908
908
|
default: i(() => [
|
|
909
909
|
E(B(n.title), 1)
|
|
910
910
|
]),
|
|
@@ -922,7 +922,7 @@ const ot = /* @__PURE__ */ L({
|
|
|
922
922
|
d(v, {
|
|
923
923
|
class: "confirm-modal-dismiss",
|
|
924
924
|
color: "grey",
|
|
925
|
-
onClick: r[0] || (r[0] = (I) =>
|
|
925
|
+
onClick: r[0] || (r[0] = (I) => s.value = !1)
|
|
926
926
|
}, {
|
|
927
927
|
default: i(() => [
|
|
928
928
|
E(" Cancel ")
|
|
@@ -954,51 +954,51 @@ const ot = /* @__PURE__ */ L({
|
|
|
954
954
|
}), ct = /* @__PURE__ */ L({
|
|
955
955
|
__name: "ScrollText",
|
|
956
956
|
setup(e) {
|
|
957
|
-
|
|
957
|
+
Se((o) => ({
|
|
958
958
|
"2e2ac96b": u(n),
|
|
959
959
|
e0628022: u(l)
|
|
960
960
|
}));
|
|
961
|
-
const t = b(null),
|
|
962
|
-
var
|
|
963
|
-
return t.value ? ((
|
|
964
|
-
}), l =
|
|
965
|
-
var
|
|
966
|
-
return ((
|
|
961
|
+
const t = b(null), s = T(() => {
|
|
962
|
+
var o, a;
|
|
963
|
+
return t.value ? ((o = t.value) == null ? void 0 : o.scrollWidth) - ((a = t.value) == null ? void 0 : a.offsetWidth) : 0;
|
|
964
|
+
}), l = T(() => `${-s.value - 10}px`), n = T(() => `${s.value / 30}s`), r = T(() => {
|
|
965
|
+
var o, a;
|
|
966
|
+
return ((o = t.value) == null ? void 0 : o.scrollWidth) !== ((a = t.value) == null ? void 0 : a.offsetWidth);
|
|
967
967
|
});
|
|
968
|
-
return (
|
|
968
|
+
return (o, a) => (A(), pe("div", {
|
|
969
969
|
ref_key: "text",
|
|
970
970
|
ref: t,
|
|
971
971
|
class: Ue({ "scroll-text": u(r) })
|
|
972
972
|
}, [
|
|
973
|
-
z(
|
|
973
|
+
z(o.$slots, "default", {}, void 0, !0)
|
|
974
974
|
], 2));
|
|
975
975
|
}
|
|
976
976
|
});
|
|
977
977
|
const it = (e, t) => {
|
|
978
|
-
const
|
|
978
|
+
const s = e.__vccOpts || e;
|
|
979
979
|
for (const [l, n] of t)
|
|
980
|
-
|
|
981
|
-
return
|
|
980
|
+
s[l] = n;
|
|
981
|
+
return s;
|
|
982
982
|
}, ut = /* @__PURE__ */ it(ct, [["__scopeId", "data-v-4d66a865"]]), Q = N("alertMessages", () => {
|
|
983
|
-
const e = b(!1), t = b(""),
|
|
983
|
+
const e = b(!1), t = b(""), s = b(""), l = b(5e3);
|
|
984
984
|
return {
|
|
985
985
|
snackbar: e,
|
|
986
986
|
snackbarText: t,
|
|
987
|
-
snackbarSeverity:
|
|
987
|
+
snackbarSeverity: s,
|
|
988
988
|
snackbarTimeout: l,
|
|
989
|
-
setSnackbarMessage: (r = "",
|
|
990
|
-
t.value = r,
|
|
989
|
+
setSnackbarMessage: (r = "", o = "", a = 5e3) => {
|
|
990
|
+
t.value = r, s.value = o, l.value = a, e.value = !0;
|
|
991
991
|
}
|
|
992
992
|
};
|
|
993
993
|
}), dt = /* @__PURE__ */ L({
|
|
994
994
|
__name: "Snackbar",
|
|
995
995
|
setup(e) {
|
|
996
|
-
const { snackbar: t, snackbarText:
|
|
997
|
-
return (r,
|
|
996
|
+
const { snackbar: t, snackbarText: s, snackbarTimeout: l, snackbarSeverity: n } = K(Q());
|
|
997
|
+
return (r, o) => {
|
|
998
998
|
const a = p("v-btn"), c = p("v-snackbar");
|
|
999
999
|
return A(), C(c, {
|
|
1000
1000
|
modelValue: u(t),
|
|
1001
|
-
"onUpdate:modelValue":
|
|
1001
|
+
"onUpdate:modelValue": o[1] || (o[1] = (v) => R(t) ? t.value = v : null),
|
|
1002
1002
|
style: { "margin-bottom": "50px" },
|
|
1003
1003
|
"data-testid": "snackbar",
|
|
1004
1004
|
timeout: u(l),
|
|
@@ -1009,7 +1009,7 @@ const it = (e, t) => {
|
|
|
1009
1009
|
d(a, {
|
|
1010
1010
|
color: "snackbarSeverity",
|
|
1011
1011
|
variant: "text",
|
|
1012
|
-
onClick:
|
|
1012
|
+
onClick: o[0] || (o[0] = (v) => t.value = !1)
|
|
1013
1013
|
}, {
|
|
1014
1014
|
default: i(() => [
|
|
1015
1015
|
E(" Close ")
|
|
@@ -1018,7 +1018,7 @@ const it = (e, t) => {
|
|
|
1018
1018
|
})
|
|
1019
1019
|
]),
|
|
1020
1020
|
default: i(() => [
|
|
1021
|
-
E(B(u(
|
|
1021
|
+
E(B(u(s)) + " ", 1)
|
|
1022
1022
|
]),
|
|
1023
1023
|
_: 1
|
|
1024
1024
|
}, 8, ["modelValue", "timeout", "color"]);
|
|
@@ -1033,7 +1033,7 @@ const it = (e, t) => {
|
|
|
1033
1033
|
Modal: at,
|
|
1034
1034
|
ScrollText: ut,
|
|
1035
1035
|
Snackbar: dt,
|
|
1036
|
-
ViewObjectModal:
|
|
1036
|
+
ViewObjectModal: st
|
|
1037
1037
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1038
1038
|
const pt = 100, Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1039
1039
|
__proto__: null,
|
|
@@ -1096,7 +1096,9 @@ const Bt = {
|
|
|
1096
1096
|
{ Action: "dashboards.CREATE_DASHBOARD" },
|
|
1097
1097
|
{ Action: "integrations.ACCESS" },
|
|
1098
1098
|
{ Action: "trustedcertificates.ACCESS" },
|
|
1099
|
-
{ Action: "trustedcertificates.CREATE" }
|
|
1099
|
+
{ Action: "trustedcertificates.CREATE" },
|
|
1100
|
+
{ Action: "anomalydetectors.ACCESS" },
|
|
1101
|
+
{ Action: "anomalydetectors.CREATE_DETECTOR" }
|
|
1100
1102
|
], yt = async (e = []) => {
|
|
1101
1103
|
try {
|
|
1102
1104
|
const { data: t } = await f().post(
|
|
@@ -1120,7 +1122,7 @@ const Bt = {
|
|
|
1120
1122
|
const t = [];
|
|
1121
1123
|
e && t.push(e);
|
|
1122
1124
|
try {
|
|
1123
|
-
const { data:
|
|
1125
|
+
const { data: s } = await f().get(
|
|
1124
1126
|
`/api/v1/iotdata/devices/counters/metrics?${t.join("&")}`,
|
|
1125
1127
|
{
|
|
1126
1128
|
headers: {
|
|
@@ -1128,7 +1130,7 @@ const Bt = {
|
|
|
1128
1130
|
}
|
|
1129
1131
|
}
|
|
1130
1132
|
);
|
|
1131
|
-
return
|
|
1133
|
+
return s;
|
|
1132
1134
|
} catch {
|
|
1133
1135
|
throw new Error("Devices Counters API Error");
|
|
1134
1136
|
}
|
|
@@ -1240,9 +1242,9 @@ const Bt = {
|
|
|
1240
1242
|
}, Lt = {
|
|
1241
1243
|
getTwinsCountersLatestByUUID: Et,
|
|
1242
1244
|
getTwinsCountersByUUID: At
|
|
1243
|
-
}, Ct = async (e, t,
|
|
1245
|
+
}, Ct = async (e, t, s, l) => {
|
|
1244
1246
|
const n = [];
|
|
1245
|
-
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`),
|
|
1247
|
+
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`), s && n.push(`sort=${s}`), l && n.push(l);
|
|
1246
1248
|
try {
|
|
1247
1249
|
const { data: r } = await f().get(
|
|
1248
1250
|
`/api/v1/devices?${n.join("&")}`,
|
|
@@ -1271,7 +1273,7 @@ const Bt = {
|
|
|
1271
1273
|
} catch {
|
|
1272
1274
|
throw new Error("Devices API Error");
|
|
1273
1275
|
}
|
|
1274
|
-
},
|
|
1276
|
+
}, Tt = async (e) => {
|
|
1275
1277
|
try {
|
|
1276
1278
|
const { data: t } = await f().get(
|
|
1277
1279
|
`/api/v1/devices/${e}`,
|
|
@@ -1285,7 +1287,7 @@ const Bt = {
|
|
|
1285
1287
|
} catch {
|
|
1286
1288
|
throw new Error("Devices API Error");
|
|
1287
1289
|
}
|
|
1288
|
-
},
|
|
1290
|
+
}, St = async (e) => {
|
|
1289
1291
|
try {
|
|
1290
1292
|
const { data: t } = await f().get(
|
|
1291
1293
|
`/api/v1/devices?arrayUUIDs=${e.join(",")}`,
|
|
@@ -1316,8 +1318,8 @@ const Bt = {
|
|
|
1316
1318
|
}, G = {
|
|
1317
1319
|
getDevices: Ct,
|
|
1318
1320
|
queryDevices: It,
|
|
1319
|
-
getDeviceByUUID:
|
|
1320
|
-
getDeviceByUUIDs:
|
|
1321
|
+
getDeviceByUUID: Tt,
|
|
1322
|
+
getDeviceByUUIDs: St,
|
|
1321
1323
|
getDeviceAttachements: Ut
|
|
1322
1324
|
}, Dt = async (e) => {
|
|
1323
1325
|
try {
|
|
@@ -1337,7 +1339,7 @@ const Bt = {
|
|
|
1337
1339
|
}, Nt = {
|
|
1338
1340
|
queryTimeseries: Dt
|
|
1339
1341
|
}, kt = async () => {
|
|
1340
|
-
var e, t,
|
|
1342
|
+
var e, t, s, l, n, r, o;
|
|
1341
1343
|
try {
|
|
1342
1344
|
const { data: a } = await f().get(
|
|
1343
1345
|
"/api/v1/iotdata/meta-data/metrics",
|
|
@@ -1349,11 +1351,11 @@ const Bt = {
|
|
|
1349
1351
|
);
|
|
1350
1352
|
return a.fields;
|
|
1351
1353
|
} catch (a) {
|
|
1352
|
-
const c = typeof ((t = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : t.message) == "string" ? (l = (
|
|
1353
|
-
throw new Error(`API Error ${(
|
|
1354
|
+
const c = typeof ((t = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : t.message) == "string" ? (l = (s = a == null ? void 0 : a.response) == null ? void 0 : s.data) == null ? void 0 : l.message : typeof ((n = a == null ? void 0 : a.response) == null ? void 0 : n.data) == "string" ? (r = a == null ? void 0 : a.response) == null ? void 0 : r.data : "";
|
|
1355
|
+
throw new Error(`API Error ${(o = a == null ? void 0 : a.response) == null ? void 0 : o.status} ${c}`);
|
|
1354
1356
|
}
|
|
1355
1357
|
}, Vt = async (e) => {
|
|
1356
|
-
var t,
|
|
1358
|
+
var t, s, l, n, r, o, a;
|
|
1357
1359
|
try {
|
|
1358
1360
|
const { data: c } = await f().post(
|
|
1359
1361
|
"/api/v1/iotdata/meta-data",
|
|
@@ -1373,24 +1375,24 @@ const Bt = {
|
|
|
1373
1375
|
);
|
|
1374
1376
|
return c;
|
|
1375
1377
|
} catch (c) {
|
|
1376
|
-
const v = typeof ((
|
|
1378
|
+
const v = typeof ((s = (t = c == null ? void 0 : c.response) == null ? void 0 : t.data) == null ? void 0 : s.message) == "string" ? (n = (l = c == null ? void 0 : c.response) == null ? void 0 : l.data) == null ? void 0 : n.message : typeof ((r = c == null ? void 0 : c.response) == null ? void 0 : r.data) == "string" ? (o = c == null ? void 0 : c.response) == null ? void 0 : o.data : "";
|
|
1377
1379
|
throw new Error(`API Error ${(a = c == null ? void 0 : c.response) == null ? void 0 : a.status} ${v}`);
|
|
1378
1380
|
}
|
|
1379
1381
|
}, ie = {
|
|
1380
1382
|
getMetrics: kt,
|
|
1381
1383
|
postMetric: Vt
|
|
1382
1384
|
}, qt = N("userSession", () => {
|
|
1383
|
-
const e = b(JSON.parse(localStorage.getItem("user") || "null")), t = b(JSON.parse(localStorage.getItem("user-permissions") || "[]")),
|
|
1384
|
-
var
|
|
1385
|
-
return ((
|
|
1386
|
-
}), l =
|
|
1385
|
+
const e = b(JSON.parse(localStorage.getItem("user") || "null")), t = b(JSON.parse(localStorage.getItem("user-permissions") || "[]")), s = T(() => {
|
|
1386
|
+
var o;
|
|
1387
|
+
return ((o = e.value) == null ? void 0 : o.name) || "no user";
|
|
1388
|
+
}), l = T(() => (o) => {
|
|
1387
1389
|
var a, c;
|
|
1388
|
-
return
|
|
1390
|
+
return o ? ((c = (a = t.value) == null ? void 0 : a.find((v) => v.Action === o)) == null ? void 0 : c.Allowed) || !1 : !0;
|
|
1389
1391
|
}), n = async () => {
|
|
1390
|
-
var
|
|
1392
|
+
var o, a;
|
|
1391
1393
|
try {
|
|
1392
1394
|
const c = await ce.getUser();
|
|
1393
|
-
if (e.value = c, (
|
|
1395
|
+
if (e.value = c, (o = e.value) != null && o.UUID) {
|
|
1394
1396
|
const v = await ce.getUserPermissions();
|
|
1395
1397
|
t.value = v, localStorage.setItem("user", JSON.stringify(e.value)), localStorage.setItem("user-permissions", JSON.stringify(t.value));
|
|
1396
1398
|
}
|
|
@@ -1400,19 +1402,19 @@ const Bt = {
|
|
|
1400
1402
|
}, r = () => {
|
|
1401
1403
|
e.value = null, t.value = [], localStorage.removeItem("user"), localStorage.removeItem("user-permission"), window.location.href = "/ui/logout";
|
|
1402
1404
|
};
|
|
1403
|
-
return n(), { user: e, pullUser: n, userName:
|
|
1405
|
+
return n(), { user: e, pullUser: n, userName: s, userPermissions: t, getPermission: l, logout: r };
|
|
1404
1406
|
}), zt = N("devices", () => {
|
|
1405
1407
|
const e = b({});
|
|
1406
1408
|
return {
|
|
1407
1409
|
pullDevicesByUUIDs: async (n, r = !1) => {
|
|
1408
|
-
r && n.forEach((
|
|
1409
|
-
delete e.value[
|
|
1410
|
+
r && n.forEach((o) => {
|
|
1411
|
+
delete e.value[o];
|
|
1410
1412
|
});
|
|
1411
1413
|
try {
|
|
1412
|
-
const
|
|
1413
|
-
return
|
|
1414
|
+
const o = await G.getDeviceByUUIDs(n);
|
|
1415
|
+
return o.records.forEach((a) => {
|
|
1414
1416
|
e.value[a.UUID] = a;
|
|
1415
|
-
}),
|
|
1417
|
+
}), o;
|
|
1416
1418
|
} catch {
|
|
1417
1419
|
return {
|
|
1418
1420
|
totalRecords: 0,
|
|
@@ -1420,9 +1422,9 @@ const Bt = {
|
|
|
1420
1422
|
};
|
|
1421
1423
|
}
|
|
1422
1424
|
},
|
|
1423
|
-
pullDevices: async (n, r,
|
|
1425
|
+
pullDevices: async (n, r, o, a) => {
|
|
1424
1426
|
try {
|
|
1425
|
-
const c = await G.getDevices(n, r,
|
|
1427
|
+
const c = await G.getDevices(n, r, o, a);
|
|
1426
1428
|
return c.records.forEach((v) => {
|
|
1427
1429
|
e.value[v.UUID] = v;
|
|
1428
1430
|
}), c;
|
|
@@ -1435,9 +1437,9 @@ const Bt = {
|
|
|
1435
1437
|
},
|
|
1436
1438
|
devicesCollection: e,
|
|
1437
1439
|
getDeviceFromUUID: async (n, r) => {
|
|
1438
|
-
const
|
|
1439
|
-
if (
|
|
1440
|
-
return
|
|
1440
|
+
const o = e.value[n];
|
|
1441
|
+
if (o)
|
|
1442
|
+
return o;
|
|
1441
1443
|
if (r)
|
|
1442
1444
|
return null;
|
|
1443
1445
|
try {
|
|
@@ -1453,14 +1455,14 @@ const Bt = {
|
|
|
1453
1455
|
const e = b({});
|
|
1454
1456
|
return {
|
|
1455
1457
|
pullTwinsByUUIDs: async (n, r = !1) => {
|
|
1456
|
-
r && n.forEach((
|
|
1457
|
-
delete e.value[
|
|
1458
|
+
r && n.forEach((o) => {
|
|
1459
|
+
delete e.value[o];
|
|
1458
1460
|
});
|
|
1459
1461
|
try {
|
|
1460
|
-
const
|
|
1461
|
-
return
|
|
1462
|
+
const o = await W.getTwinByUUIDs(n);
|
|
1463
|
+
return o.records.forEach((a) => {
|
|
1462
1464
|
e.value[a.UUID] = a;
|
|
1463
|
-
}),
|
|
1465
|
+
}), o;
|
|
1464
1466
|
} catch {
|
|
1465
1467
|
return {
|
|
1466
1468
|
totalRecords: 0,
|
|
@@ -1468,9 +1470,9 @@ const Bt = {
|
|
|
1468
1470
|
};
|
|
1469
1471
|
}
|
|
1470
1472
|
},
|
|
1471
|
-
pullTwins: async (n, r,
|
|
1473
|
+
pullTwins: async (n, r, o, a) => {
|
|
1472
1474
|
try {
|
|
1473
|
-
const c = await W.getTwins(n, r,
|
|
1475
|
+
const c = await W.getTwins(n, r, o, a);
|
|
1474
1476
|
return c.records.forEach((v) => {
|
|
1475
1477
|
e.value[v.UUID] = v;
|
|
1476
1478
|
}), c;
|
|
@@ -1483,9 +1485,9 @@ const Bt = {
|
|
|
1483
1485
|
},
|
|
1484
1486
|
twinsCollection: e,
|
|
1485
1487
|
getTwinFromUUID: async (n, r) => {
|
|
1486
|
-
const
|
|
1487
|
-
if (
|
|
1488
|
-
return
|
|
1488
|
+
const o = e.value[n];
|
|
1489
|
+
if (o)
|
|
1490
|
+
return o;
|
|
1489
1491
|
if (r)
|
|
1490
1492
|
return null;
|
|
1491
1493
|
try {
|
|
@@ -1514,10 +1516,10 @@ const Bt = {
|
|
|
1514
1516
|
}, Rt = {
|
|
1515
1517
|
getMetricsCounters: $t
|
|
1516
1518
|
}, Qt = N("metrics", () => {
|
|
1517
|
-
const e = b([]), t = b([]),
|
|
1519
|
+
const e = b([]), t = b([]), s = T(() => (a) => {
|
|
1518
1520
|
var c;
|
|
1519
1521
|
return (c = t.value) == null ? void 0 : c.find((v) => v.name === a);
|
|
1520
|
-
}), l =
|
|
1522
|
+
}), l = T(() => e.value.map((a) => ({ title: `${a.label} ${a.name}`, label: a.label, value: a.name }))), n = async (a) => {
|
|
1521
1523
|
if (!(a && e.value.length))
|
|
1522
1524
|
try {
|
|
1523
1525
|
const c = await ie.getMetrics();
|
|
@@ -1532,7 +1534,7 @@ const Bt = {
|
|
|
1532
1534
|
} catch (a) {
|
|
1533
1535
|
Q().setSnackbarMessage(a, "error");
|
|
1534
1536
|
}
|
|
1535
|
-
},
|
|
1537
|
+
}, o = async (a) => {
|
|
1536
1538
|
let c = !1;
|
|
1537
1539
|
try {
|
|
1538
1540
|
await ie.postMetric(a), c = !0, Q().setSnackbarMessage(`Metric ${a.name} successfully saved`, "success");
|
|
@@ -1546,8 +1548,8 @@ const Bt = {
|
|
|
1546
1548
|
metricsCounters: t,
|
|
1547
1549
|
pullMetrics: n,
|
|
1548
1550
|
pullMetricsCounters: r,
|
|
1549
|
-
getMetricCounter:
|
|
1550
|
-
saveMetric:
|
|
1551
|
+
getMetricCounter: s,
|
|
1552
|
+
saveMetric: o,
|
|
1551
1553
|
metricsArr: l
|
|
1552
1554
|
};
|
|
1553
1555
|
});
|
|
@@ -1576,7 +1578,7 @@ export {
|
|
|
1576
1578
|
Lt as TwinsCountersService,
|
|
1577
1579
|
W as TwinsService,
|
|
1578
1580
|
ce as UserSessionService,
|
|
1579
|
-
|
|
1581
|
+
st as ViewObjectModal,
|
|
1580
1582
|
Wt as installCoreComponents,
|
|
1581
1583
|
Q as useAlertMessagesStore,
|
|
1582
1584
|
zt as useDevicesStore,
|