@webx-ui/module-audit 0.1.0 → 0.2.0
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/AuditDetails.d.ts +2 -1
- package/dist/AuditOverviewPage.d.ts +2 -2
- package/dist/index.js +1084 -1020
- package/dist/index.js.map +1 -1
- package/dist/resources.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +18 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as se, ref as S, onMounted as
|
|
2
|
-
import { useAdmin as le, useTranslate as ee, useErrorText as
|
|
3
|
-
import { WxText as
|
|
4
|
-
import { useRouter as we, useRoute as
|
|
5
|
-
function
|
|
1
|
+
import { defineComponent as se, ref as S, onMounted as ve, openBlock as t, createElementBlock as b, createBlock as u, unref as e, withCtx as a, createTextVNode as n, toDisplayString as s, Fragment as L, createVNode as g, renderList as M, createCommentVNode as z, computed as D, renderSlot as Ze, watch as de, createElementVNode as I, useModel as He, mergeModels as Se, normalizeClass as Ne, withModifiers as et, onBeforeUnmount as Me, createSlots as Je } from "vue";
|
|
2
|
+
import { useAdmin as le, useTranslate as ee, useErrorText as oe, WxListScreen as tt, WxDate as ke, useDates as at, WxScreen as st } from "@webx-ui/module-admin";
|
|
3
|
+
import { WxText as P, WxSkeleton as fe, WxLink as xe, WxBadge as B, WxButton as Q, WxTable as he, WxSelect as pe, toast as X, WxDialog as Ge, WxFormItem as Te, WxInput as Ke, WxTextarea as lt, WxPopover as Qe, WxCard as ce, WxAlert as _e, WxProgress as Re, WxSegmented as Xe, WxEmpty as Fe, WxStatistic as Oe, WxDrawer as nt, WxTabs as it, WxImage as ut, WxIcon as ot, WxCheckboxGroup as rt, WxActionBar as dt } from "@webx-ui/core";
|
|
4
|
+
import { useRouter as we, useRoute as Ye } from "vue-router";
|
|
5
|
+
function Le(_) {
|
|
6
6
|
const v = {
|
|
7
|
-
search:
|
|
8
|
-
status:
|
|
9
|
-
indexable:
|
|
10
|
-
check:
|
|
11
|
-
sort:
|
|
12
|
-
page:
|
|
13
|
-
per_page:
|
|
7
|
+
search: _.search || void 0,
|
|
8
|
+
status: _.status || void 0,
|
|
9
|
+
indexable: _.indexable === null || _.indexable === void 0 ? void 0 : _.indexable ? 1 : 0,
|
|
10
|
+
check: _.check || void 0,
|
|
11
|
+
sort: _.sort || void 0,
|
|
12
|
+
page: _.page,
|
|
13
|
+
per_page: _.per_page
|
|
14
14
|
};
|
|
15
|
-
for (const
|
|
16
|
-
v[`f[${
|
|
15
|
+
for (const p of _.filters ?? [])
|
|
16
|
+
v[`f[${p.field}]`] = p.value === void 0 || p.value === "" ? p.op : `${p.op}:${p.value}`;
|
|
17
17
|
return v;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const v = `${
|
|
19
|
+
function re(_) {
|
|
20
|
+
const v = `${_.apiPath}/audit`, p = (l) => l.data, o = (l) => ({
|
|
21
21
|
check: l.check || void 0,
|
|
22
22
|
severity: l.severity || void 0,
|
|
23
23
|
group: l.group || void 0,
|
|
@@ -26,53 +26,53 @@ function oe(k) {
|
|
|
26
26
|
per_page: l.per_page
|
|
27
27
|
});
|
|
28
28
|
return {
|
|
29
|
-
latest: () =>
|
|
30
|
-
run: (l) =>
|
|
31
|
-
runs: (l = {}) =>
|
|
32
|
-
start: (l, r) =>
|
|
33
|
-
cancel: (l) =>
|
|
34
|
-
checks: (l, r = {}) =>
|
|
35
|
-
issues: (l, r = {}) =>
|
|
36
|
-
pages: (l, r = {}) =>
|
|
29
|
+
latest: () => _.http.get(`${v}/runs/latest`).then(p),
|
|
30
|
+
run: (l) => _.http.get(`${v}/runs/${l}`).then(p),
|
|
31
|
+
runs: (l = {}) => _.http.get(`${v}/runs`, { query: l }).then((r) => ({ ...r.meta, data: r.data })),
|
|
32
|
+
start: (l, r) => _.http.post(`${v}/runs`, l === "urls" ? { scope: l, urls: r } : { scope: l }).then(p),
|
|
33
|
+
cancel: (l) => _.http.post(`${v}/runs/${l}/cancel`, {}).then(p),
|
|
34
|
+
checks: (l, r = {}) => _.http.get(`${v}/runs/${l}/checks`, { query: o(r) }).then(p),
|
|
35
|
+
issues: (l, r = {}) => _.http.get(`${v}/runs/${l}/issues`, { query: o(r) }).then((d) => ({ ...d.meta, data: d.data })),
|
|
36
|
+
pages: (l, r = {}) => _.http.get(`${v}/runs/${l}/pages`, { query: Le(r) }).then((d) => ({ ...d.meta, data: d.data })),
|
|
37
37
|
pagesFile: (l, r, d) => {
|
|
38
38
|
const h = new URLSearchParams();
|
|
39
|
-
for (const [
|
|
40
|
-
...
|
|
39
|
+
for (const [k, f] of Object.entries({
|
|
40
|
+
...Le(r),
|
|
41
41
|
page: void 0,
|
|
42
42
|
per_page: void 0
|
|
43
43
|
}))
|
|
44
|
-
f !== void 0 && h.set(
|
|
44
|
+
f !== void 0 && h.set(k, String(f));
|
|
45
45
|
return h.set("columns", d.join(",")), `${v}/runs/${l}/pages/export?${h.toString()}`;
|
|
46
46
|
},
|
|
47
|
-
page: (l, r) =>
|
|
48
|
-
links: (l, r, d = {}) =>
|
|
49
|
-
resources: (l, r, d) =>
|
|
50
|
-
fixes: (l, r) =>
|
|
51
|
-
fix: (l, r, d, h = !1) =>
|
|
47
|
+
page: (l, r) => _.http.get(`${v}/runs/${l}/pages/${r}`).then(p),
|
|
48
|
+
links: (l, r, d = {}) => _.http.get(`${v}/runs/${l}/pages/${r}/links`, { query: d }).then((h) => ({ ...h.meta, data: h.data })),
|
|
49
|
+
resources: (l, r, d) => _.http.get(`${v}/runs/${l}/pages/${r}/resources`, { query: d }).then((h) => ({ ...h.meta, data: h.data })),
|
|
50
|
+
fixes: (l, r) => _.http.get(`${v}/runs/${l}/issues/${r}/fixes`).then(p),
|
|
51
|
+
fix: (l, r, d, h = !1) => _.http.post(`${v}/runs/${l}/issues/${r}/fixes/${encodeURIComponent(d)}`, {
|
|
52
52
|
dry_run: h
|
|
53
|
-
}).then(
|
|
53
|
+
}).then(p),
|
|
54
54
|
pageFile: (l, r) => `${v}/runs/${l}/pages/${r}/export`,
|
|
55
|
-
compare: (l, r) =>
|
|
56
|
-
compareIssues: (l) =>
|
|
55
|
+
compare: (l, r) => _.http.get(`${v}/runs/compare`, { query: { to: l, from: r ?? void 0 } }).then(p),
|
|
56
|
+
compareIssues: (l) => _.http.get(`${v}/runs/compare/issues`, {
|
|
57
57
|
query: { ...l, from: l.from ?? void 0, check: l.check || void 0 }
|
|
58
58
|
}).then((r) => ({ ...r.meta, data: r.data })),
|
|
59
|
-
hosts: (l = {}) =>
|
|
59
|
+
hosts: (l = {}) => _.http.get(`${v}/hosts`, {
|
|
60
60
|
query: {
|
|
61
61
|
class: l.class || void 0,
|
|
62
62
|
search: l.search || void 0,
|
|
63
63
|
host: l.host || void 0
|
|
64
64
|
}
|
|
65
|
-
}).then(
|
|
66
|
-
ignores: () =>
|
|
67
|
-
hide: (l) =>
|
|
68
|
-
hidePreview: (l) =>
|
|
69
|
-
unhide: (l) =>
|
|
65
|
+
}).then(p),
|
|
66
|
+
ignores: () => _.http.get(`${v}/ignores`).then(p),
|
|
67
|
+
hide: (l) => _.http.post(`${v}/ignores`, l).then(p),
|
|
68
|
+
hidePreview: (l) => _.http.post(`${v}/ignores`, { ...l, dry_run: !0 }).then((r) => r.data.hidden),
|
|
69
|
+
unhide: (l) => _.http.delete(`${v}/ignores/${l}`).then(() => {
|
|
70
70
|
}),
|
|
71
|
-
settings: () =>
|
|
72
|
-
saveSettings: (l) =>
|
|
71
|
+
settings: () => _.http.get(`${v}/settings`).then((l) => l.data.values),
|
|
72
|
+
saveSettings: (l) => _.http.put(`${v}/settings`, { values: l }).then((r) => r.data.values)
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const ct = {
|
|
76
76
|
module: {
|
|
77
77
|
title: "Audit"
|
|
78
78
|
},
|
|
@@ -97,6 +97,10 @@ const rt = {
|
|
|
97
97
|
notices: "Notices",
|
|
98
98
|
new: "New",
|
|
99
99
|
fixed: "Fixed",
|
|
100
|
+
"health-pages": "Pages without errors: :clean of :pages",
|
|
101
|
+
"health-site": "Errors of the whole site: :count",
|
|
102
|
+
"health-warnings": "Checks with warnings: :count",
|
|
103
|
+
"health-help": "The share of pages without errors, minus 10 points for each error of the whole site and 2 for each check with warnings — the warnings take 20 at most.",
|
|
100
104
|
"last-run": "Last run",
|
|
101
105
|
"base-url": "Address",
|
|
102
106
|
"status-queued": "Waiting in the queue",
|
|
@@ -306,37 +310,37 @@ const rt = {
|
|
|
306
310
|
dismiss: "Cancel",
|
|
307
311
|
"view-full": "View full size"
|
|
308
312
|
}
|
|
309
|
-
},
|
|
313
|
+
}, De = /* @__PURE__ */ new WeakSet();
|
|
310
314
|
function ne() {
|
|
311
315
|
try {
|
|
312
|
-
const { i18n:
|
|
313
|
-
|
|
316
|
+
const { i18n: _ } = le();
|
|
317
|
+
De.has(_) || (_.defaults("webx-audit", ct), De.add(_));
|
|
314
318
|
} catch {
|
|
315
319
|
}
|
|
316
320
|
}
|
|
317
|
-
const
|
|
321
|
+
const pt = { class: "wx-audit-places" }, gt = {
|
|
318
322
|
key: 0,
|
|
319
323
|
class: "wx-audit-places__group"
|
|
320
|
-
},
|
|
324
|
+
}, vt = {
|
|
321
325
|
key: 1,
|
|
322
326
|
class: "wx-audit-places__group"
|
|
323
|
-
},
|
|
327
|
+
}, ht = /* @__PURE__ */ se({
|
|
324
328
|
__name: "AuditHostPlaces",
|
|
325
329
|
props: {
|
|
326
330
|
host: {}
|
|
327
331
|
},
|
|
328
|
-
setup(
|
|
329
|
-
const v =
|
|
332
|
+
setup(_) {
|
|
333
|
+
const v = _, p = re(le());
|
|
330
334
|
ne();
|
|
331
|
-
const o = ee("webx-audit"), l =
|
|
332
|
-
return
|
|
335
|
+
const o = ee("webx-audit"), l = oe(), r = we(), d = S(null), h = S(null);
|
|
336
|
+
return ve(async () => {
|
|
333
337
|
try {
|
|
334
|
-
d.value = await
|
|
335
|
-
} catch (
|
|
336
|
-
h.value = l(
|
|
338
|
+
d.value = await p.hosts({ host: v.host });
|
|
339
|
+
} catch (k) {
|
|
340
|
+
h.value = l(k);
|
|
337
341
|
}
|
|
338
|
-
}), (
|
|
339
|
-
h.value ? (t(), u(e(
|
|
342
|
+
}), (k, f) => (t(), b("div", pt, [
|
|
343
|
+
h.value ? (t(), u(e(P), {
|
|
340
344
|
key: 0,
|
|
341
345
|
size: "sm",
|
|
342
346
|
tone: "danger"
|
|
@@ -345,9 +349,9 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
345
349
|
n(s(h.value), 1)
|
|
346
350
|
]),
|
|
347
351
|
_: 1
|
|
348
|
-
})) : d.value ? (t(), b(
|
|
349
|
-
d.value.pages?.length ? (t(), b("section",
|
|
350
|
-
g(e(
|
|
352
|
+
})) : d.value ? (t(), b(L, { key: 2 }, [
|
|
353
|
+
d.value.pages?.length ? (t(), b("section", gt, [
|
|
354
|
+
g(e(P), {
|
|
351
355
|
size: "sm",
|
|
352
356
|
weight: "semibold"
|
|
353
357
|
}, {
|
|
@@ -356,53 +360,53 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
356
360
|
]),
|
|
357
361
|
_: 1
|
|
358
362
|
}),
|
|
359
|
-
(t(!0), b(
|
|
360
|
-
key:
|
|
363
|
+
(t(!0), b(L, null, M(d.value.pages, (c, W) => (t(), b("div", {
|
|
364
|
+
key: W,
|
|
361
365
|
class: "wx-audit-places__row"
|
|
362
366
|
}, [
|
|
363
367
|
g(e(xe), {
|
|
364
|
-
href:
|
|
368
|
+
href: c.page,
|
|
365
369
|
target: "_blank",
|
|
366
370
|
class: "wx-audit-places__url"
|
|
367
371
|
}, {
|
|
368
372
|
default: a(() => [
|
|
369
|
-
n(s(
|
|
373
|
+
n(s(c.page), 1)
|
|
370
374
|
]),
|
|
371
375
|
_: 2
|
|
372
376
|
}, 1032, ["href"]),
|
|
373
|
-
g(e(
|
|
377
|
+
g(e(P), {
|
|
374
378
|
size: "sm",
|
|
375
379
|
tone: "muted",
|
|
376
380
|
class: "wx-audit-places__url"
|
|
377
381
|
}, {
|
|
378
382
|
default: a(() => [
|
|
379
|
-
n(s(
|
|
383
|
+
n(s(c.kind) + " → " + s(c.url), 1)
|
|
380
384
|
]),
|
|
381
385
|
_: 2
|
|
382
386
|
}, 1024),
|
|
383
|
-
|
|
387
|
+
c.anchor ? (t(), u(e(P), {
|
|
384
388
|
key: 0,
|
|
385
389
|
size: "sm"
|
|
386
390
|
}, {
|
|
387
391
|
default: a(() => [
|
|
388
|
-
n("«" + s(
|
|
392
|
+
n("«" + s(c.anchor) + "»", 1)
|
|
389
393
|
]),
|
|
390
394
|
_: 2
|
|
391
|
-
}, 1024)) :
|
|
392
|
-
|
|
395
|
+
}, 1024)) : z("", !0),
|
|
396
|
+
c.status && c.status >= 400 ? (t(), u(e(B), {
|
|
393
397
|
key: 1,
|
|
394
398
|
type: "danger",
|
|
395
399
|
size: "sm"
|
|
396
400
|
}, {
|
|
397
401
|
default: a(() => [
|
|
398
|
-
n(s(
|
|
402
|
+
n(s(c.status), 1)
|
|
399
403
|
]),
|
|
400
404
|
_: 2
|
|
401
|
-
}, 1024)) :
|
|
405
|
+
}, 1024)) : z("", !0)
|
|
402
406
|
]))), 128))
|
|
403
|
-
])) :
|
|
404
|
-
d.value.fields?.length ? (t(), b("section",
|
|
405
|
-
g(e(
|
|
407
|
+
])) : z("", !0),
|
|
408
|
+
d.value.fields?.length ? (t(), b("section", vt, [
|
|
409
|
+
g(e(P), {
|
|
406
410
|
size: "sm",
|
|
407
411
|
weight: "semibold"
|
|
408
412
|
}, {
|
|
@@ -411,26 +415,26 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
411
415
|
]),
|
|
412
416
|
_: 1
|
|
413
417
|
}),
|
|
414
|
-
(t(!0), b(
|
|
415
|
-
key:
|
|
418
|
+
(t(!0), b(L, null, M(d.value.fields, (c, W) => (t(), b("div", {
|
|
419
|
+
key: W,
|
|
416
420
|
class: "wx-audit-places__row"
|
|
417
421
|
}, [
|
|
418
|
-
g(e(
|
|
422
|
+
g(e(P), { size: "sm" }, {
|
|
419
423
|
default: a(() => [
|
|
420
|
-
n(s(
|
|
424
|
+
n(s(c.record_label), 1)
|
|
421
425
|
]),
|
|
422
426
|
_: 2
|
|
423
427
|
}, 1024),
|
|
424
|
-
g(e(
|
|
428
|
+
g(e(P), {
|
|
425
429
|
size: "sm",
|
|
426
430
|
tone: "muted"
|
|
427
431
|
}, {
|
|
428
432
|
default: a(() => [
|
|
429
|
-
n(s(
|
|
433
|
+
n(s(c.source) + " · " + s(c.field) + s(c.locale ? ` · ${c.locale}` : ""), 1)
|
|
430
434
|
]),
|
|
431
435
|
_: 2
|
|
432
436
|
}, 1024),
|
|
433
|
-
|
|
437
|
+
c.published ? z("", !0) : (t(), u(e(B), {
|
|
434
438
|
key: 0,
|
|
435
439
|
size: "sm"
|
|
436
440
|
}, {
|
|
@@ -439,60 +443,60 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
439
443
|
]),
|
|
440
444
|
_: 1
|
|
441
445
|
})),
|
|
442
|
-
g(e(
|
|
446
|
+
g(e(P), {
|
|
443
447
|
size: "sm",
|
|
444
448
|
tone: "muted",
|
|
445
449
|
class: "wx-audit-places__url"
|
|
446
450
|
}, {
|
|
447
451
|
default: a(() => [
|
|
448
|
-
n(s(
|
|
452
|
+
n(s(c.url), 1)
|
|
449
453
|
]),
|
|
450
454
|
_: 2
|
|
451
455
|
}, 1024),
|
|
452
|
-
|
|
456
|
+
c.edit_url ? (t(), u(e(Q), {
|
|
453
457
|
key: 1,
|
|
454
458
|
size: "sm",
|
|
455
459
|
variant: "text",
|
|
456
460
|
icon: "edit",
|
|
457
|
-
onClick: (
|
|
461
|
+
onClick: (C) => e(r).push(c.edit_url)
|
|
458
462
|
}, {
|
|
459
463
|
default: a(() => [
|
|
460
464
|
n(s(e(o)("page.open-editor")), 1)
|
|
461
465
|
]),
|
|
462
466
|
_: 1
|
|
463
|
-
}, 8, ["onClick"])) :
|
|
467
|
+
}, 8, ["onClick"])) : z("", !0)
|
|
464
468
|
]))), 128))
|
|
465
|
-
])) :
|
|
469
|
+
])) : z("", !0)
|
|
466
470
|
], 64)) : (t(), u(e(fe), {
|
|
467
471
|
key: 1,
|
|
468
472
|
rows: 2
|
|
469
473
|
}))
|
|
470
474
|
]));
|
|
471
475
|
}
|
|
472
|
-
}), ie = (
|
|
473
|
-
const
|
|
476
|
+
}), ie = (_, v) => {
|
|
477
|
+
const p = _.__vccOpts || _;
|
|
474
478
|
for (const [o, l] of v)
|
|
475
|
-
|
|
476
|
-
return
|
|
477
|
-
},
|
|
479
|
+
p[o] = l;
|
|
480
|
+
return p;
|
|
481
|
+
}, ft = /* @__PURE__ */ ie(ht, [["__scopeId", "data-v-1b5ca599"]]), me = /* @__PURE__ */ se({
|
|
478
482
|
__name: "AuditLayout",
|
|
479
483
|
props: {
|
|
480
484
|
base: {},
|
|
481
485
|
current: {},
|
|
482
486
|
card: { type: Boolean, default: !0 }
|
|
483
487
|
},
|
|
484
|
-
setup(
|
|
485
|
-
const v =
|
|
488
|
+
setup(_) {
|
|
489
|
+
const v = _, p = le(), o = we(), l = Ye();
|
|
486
490
|
ne();
|
|
487
|
-
const r = ee("webx-audit"), d =
|
|
488
|
-
() =>
|
|
489
|
-
), h =
|
|
491
|
+
const r = ee("webx-audit"), d = D(
|
|
492
|
+
() => p.state.manifest?.modules.find((c) => c.id === "audit")?.title ?? r("module.title")
|
|
493
|
+
), h = D(() => [
|
|
490
494
|
{ value: "overview", label: r("page.overview") },
|
|
491
495
|
{ value: "issues", label: r("page.issues") },
|
|
492
496
|
{ value: "pages", label: r("page.pages") },
|
|
493
497
|
{ value: "hosts", label: r("page.hosts") },
|
|
494
498
|
{ value: "runs", label: r("page.runs") }
|
|
495
|
-
]),
|
|
499
|
+
]), k = D(
|
|
496
500
|
() => v.current === "settings" ? [] : [
|
|
497
501
|
{
|
|
498
502
|
key: "settings",
|
|
@@ -503,81 +507,81 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
503
507
|
}
|
|
504
508
|
}
|
|
505
509
|
]
|
|
506
|
-
), f =
|
|
510
|
+
), f = D({
|
|
507
511
|
/* The settings belong to no tab; the overview's stays lit as the way back. */
|
|
508
512
|
get: () => v.current === "settings" ? "overview" : v.current,
|
|
509
|
-
set: (
|
|
510
|
-
const
|
|
511
|
-
|
|
513
|
+
set: (c) => {
|
|
514
|
+
const W = c === "overview" ? v.base : `${v.base}/${String(c)}`;
|
|
515
|
+
W !== l.path && o.push(W);
|
|
512
516
|
}
|
|
513
517
|
});
|
|
514
|
-
return (
|
|
518
|
+
return (c, W) => (t(), u(e(tt), {
|
|
515
519
|
view: f.value,
|
|
516
|
-
"onUpdate:view":
|
|
520
|
+
"onUpdate:view": W[0] || (W[0] = (C) => f.value = C),
|
|
517
521
|
title: d.value,
|
|
518
522
|
views: h.value,
|
|
519
|
-
actions:
|
|
523
|
+
actions: k.value,
|
|
520
524
|
card: v.card
|
|
521
525
|
}, {
|
|
522
526
|
default: a(() => [
|
|
523
|
-
|
|
527
|
+
Ze(c.$slots, "default")
|
|
524
528
|
]),
|
|
525
529
|
_: 3
|
|
526
530
|
}, 8, ["view", "title", "views", "actions", "card"]));
|
|
527
531
|
}
|
|
528
|
-
}),
|
|
532
|
+
}), _t = { class: "wx-audit-hosts__host" }, mt = /* @__PURE__ */ se({
|
|
529
533
|
__name: "AuditHostsPage",
|
|
530
534
|
props: {
|
|
531
535
|
base: {}
|
|
532
536
|
},
|
|
533
|
-
setup(
|
|
534
|
-
const v =
|
|
537
|
+
setup(_) {
|
|
538
|
+
const v = _, p = re(le());
|
|
535
539
|
ne();
|
|
536
|
-
const o = ee("webx-audit"), l = ee("webx-admin"), r =
|
|
540
|
+
const o = ee("webx-audit"), l = ee("webx-admin"), r = oe(), d = S(null), h = S(!1), k = S(""), f = S(null), c = S([]), W = {
|
|
537
541
|
dev: "danger",
|
|
538
542
|
own_mirror: "warning",
|
|
539
543
|
external: "info",
|
|
540
544
|
own: "success"
|
|
541
|
-
},
|
|
545
|
+
}, C = D(() => [
|
|
542
546
|
{ key: "host", label: o("page.host"), minWidth: 220 },
|
|
543
547
|
{ key: "links", label: o("page.links"), width: 90, align: "right" },
|
|
544
548
|
{ key: "pages", label: o("page.pages"), width: 90, align: "right", hideBelow: 560 },
|
|
545
549
|
{ key: "broken", label: o("page.broken"), width: 100, align: "right", hideBelow: 640 },
|
|
546
550
|
{ key: "fields", label: o("page.fields"), width: 120, align: "right" },
|
|
547
551
|
{ key: "first_seen", label: o("page.first-seen"), minWidth: 140, hideBelow: 760 }
|
|
548
|
-
]),
|
|
549
|
-
() => Object.keys(
|
|
550
|
-
value:
|
|
551
|
-
label: `${o(`page.host-${
|
|
552
|
+
]), O = D(
|
|
553
|
+
() => Object.keys(W).map((m) => ({
|
|
554
|
+
value: m,
|
|
555
|
+
label: `${o(`page.host-${m}`)}${d.value?.classes[m] ? ` · ${d.value.classes[m]}` : ""}`
|
|
552
556
|
}))
|
|
553
557
|
);
|
|
554
|
-
function i(
|
|
555
|
-
return typeof
|
|
558
|
+
function i(m) {
|
|
559
|
+
return typeof m == "string" && m in W ? m : null;
|
|
556
560
|
}
|
|
557
561
|
async function N() {
|
|
558
562
|
h.value = !0;
|
|
559
563
|
try {
|
|
560
|
-
d.value = await
|
|
561
|
-
} catch (
|
|
562
|
-
|
|
564
|
+
d.value = await p.hosts({ class: f.value, search: k.value }), c.value = [];
|
|
565
|
+
} catch (m) {
|
|
566
|
+
X.danger(r(m));
|
|
563
567
|
} finally {
|
|
564
568
|
h.value = !1;
|
|
565
569
|
}
|
|
566
570
|
}
|
|
567
|
-
return
|
|
571
|
+
return de([f, k], () => {
|
|
568
572
|
N();
|
|
569
|
-
}),
|
|
573
|
+
}), ve(N), (m, j) => (t(), u(me, {
|
|
570
574
|
base: v.base,
|
|
571
575
|
current: "hosts"
|
|
572
576
|
}, {
|
|
573
577
|
default: a(() => [
|
|
574
|
-
g(e(
|
|
575
|
-
expanded:
|
|
576
|
-
"onUpdate:expanded": j[1] || (j[1] = (
|
|
577
|
-
search:
|
|
578
|
-
"onUpdate:search": j[2] || (j[2] = (
|
|
578
|
+
g(e(he), {
|
|
579
|
+
expanded: c.value,
|
|
580
|
+
"onUpdate:expanded": j[1] || (j[1] = (x) => c.value = x),
|
|
581
|
+
search: k.value,
|
|
582
|
+
"onUpdate:search": j[2] || (j[2] = (x) => k.value = x),
|
|
579
583
|
data: d.value?.hosts ?? [],
|
|
580
|
-
columns:
|
|
584
|
+
columns: C.value,
|
|
581
585
|
"row-key": "host",
|
|
582
586
|
expandable: "",
|
|
583
587
|
flush: "",
|
|
@@ -586,72 +590,72 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
586
590
|
loading: h.value,
|
|
587
591
|
"filters-count": f.value ? 1 : 0,
|
|
588
592
|
"filters-label": e(l)("filters.title"),
|
|
589
|
-
"row-class": (
|
|
593
|
+
"row-class": (x) => x.class === "dev" ? "is-stand" : void 0,
|
|
590
594
|
"empty-text": e(o)("page.hosts-empty")
|
|
591
595
|
}, {
|
|
592
596
|
filters: a(() => [
|
|
593
|
-
g(e(
|
|
597
|
+
g(e(pe), {
|
|
594
598
|
"model-value": f.value,
|
|
595
|
-
options:
|
|
599
|
+
options: O.value,
|
|
596
600
|
placeholder: e(o)("page.any-class"),
|
|
597
601
|
clearable: "",
|
|
598
|
-
"onUpdate:modelValue": j[0] || (j[0] = (
|
|
602
|
+
"onUpdate:modelValue": j[0] || (j[0] = (x) => f.value = i(x))
|
|
599
603
|
}, null, 8, ["model-value", "options", "placeholder"])
|
|
600
604
|
]),
|
|
601
|
-
"cell-host": a(({ row:
|
|
602
|
-
|
|
605
|
+
"cell-host": a(({ row: x }) => [
|
|
606
|
+
I("span", _t, [
|
|
603
607
|
g(e(B), {
|
|
604
|
-
type:
|
|
608
|
+
type: W[x.class],
|
|
605
609
|
size: "sm"
|
|
606
610
|
}, {
|
|
607
611
|
default: a(() => [
|
|
608
|
-
n(s(e(o)(`page.host-${
|
|
612
|
+
n(s(e(o)(`page.host-${x.class}`)), 1)
|
|
609
613
|
]),
|
|
610
614
|
_: 2
|
|
611
615
|
}, 1032, ["type"]),
|
|
612
|
-
g(e(
|
|
616
|
+
g(e(P), {
|
|
613
617
|
size: "sm",
|
|
614
|
-
tone:
|
|
618
|
+
tone: x.class === "dev" ? "danger" : void 0,
|
|
615
619
|
weight: "medium"
|
|
616
620
|
}, {
|
|
617
621
|
default: a(() => [
|
|
618
|
-
n(s(
|
|
622
|
+
n(s(x.host), 1)
|
|
619
623
|
]),
|
|
620
624
|
_: 2
|
|
621
625
|
}, 1032, ["tone"])
|
|
622
626
|
])
|
|
623
627
|
]),
|
|
624
|
-
"cell-broken": a(({ row:
|
|
625
|
-
g(e(
|
|
628
|
+
"cell-broken": a(({ row: x }) => [
|
|
629
|
+
g(e(P), {
|
|
626
630
|
size: "sm",
|
|
627
|
-
tone:
|
|
631
|
+
tone: x.broken ? "danger" : "muted"
|
|
628
632
|
}, {
|
|
629
633
|
default: a(() => [
|
|
630
|
-
n(s(
|
|
634
|
+
n(s(x.broken), 1)
|
|
631
635
|
]),
|
|
632
636
|
_: 2
|
|
633
637
|
}, 1032, ["tone"])
|
|
634
638
|
]),
|
|
635
|
-
"cell-fields": a(({ row:
|
|
636
|
-
g(e(
|
|
639
|
+
"cell-fields": a(({ row: x }) => [
|
|
640
|
+
g(e(P), {
|
|
637
641
|
size: "sm",
|
|
638
|
-
tone:
|
|
642
|
+
tone: x.fields && x.class === "dev" ? "danger" : void 0
|
|
639
643
|
}, {
|
|
640
644
|
default: a(() => [
|
|
641
|
-
n(s(
|
|
645
|
+
n(s(x.fields), 1)
|
|
642
646
|
]),
|
|
643
647
|
_: 2
|
|
644
648
|
}, 1032, ["tone"])
|
|
645
649
|
]),
|
|
646
|
-
"cell-first_seen": a(({ row:
|
|
647
|
-
|
|
650
|
+
"cell-first_seen": a(({ row: x }) => [
|
|
651
|
+
x.first_seen ? (t(), u(e(ke), {
|
|
648
652
|
key: 0,
|
|
649
|
-
value:
|
|
650
|
-
}, null, 8, ["value"])) :
|
|
653
|
+
value: x.first_seen
|
|
654
|
+
}, null, 8, ["value"])) : z("", !0)
|
|
651
655
|
]),
|
|
652
|
-
expanded: a(({ row:
|
|
653
|
-
g(
|
|
654
|
-
host:
|
|
656
|
+
expanded: a(({ row: x }) => [
|
|
657
|
+
g(ft, {
|
|
658
|
+
host: x.host
|
|
655
659
|
}, null, 8, ["host"])
|
|
656
660
|
]),
|
|
657
661
|
_: 1
|
|
@@ -660,33 +664,36 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
660
664
|
_: 1
|
|
661
665
|
}, 8, ["base"]));
|
|
662
666
|
}
|
|
663
|
-
}),
|
|
667
|
+
}), yt = /* @__PURE__ */ ie(mt, [["__scopeId", "data-v-44b7e64a"]]), bt = { class: "wx-audit-details" }, kt = {
|
|
664
668
|
key: 1,
|
|
665
669
|
class: "wx-audit-details__scroll"
|
|
666
|
-
},
|
|
670
|
+
}, xt = { class: "wx-audit-details__table" }, wt = {
|
|
671
|
+
key: 5,
|
|
672
|
+
class: "wx-audit-details__code"
|
|
673
|
+
}, $t = /* @__PURE__ */ se({
|
|
667
674
|
__name: "AuditDetails",
|
|
668
675
|
props: {
|
|
669
676
|
details: {}
|
|
670
677
|
},
|
|
671
|
-
setup(
|
|
672
|
-
const v =
|
|
678
|
+
setup(_) {
|
|
679
|
+
const v = _, p = we();
|
|
673
680
|
ne();
|
|
674
681
|
const o = ee("webx-audit");
|
|
675
|
-
function l(
|
|
676
|
-
const f = Number(
|
|
682
|
+
function l(k) {
|
|
683
|
+
const f = Number(k);
|
|
677
684
|
return f >= 500 || f === 0 ? "danger" : f >= 400 ? "warning" : f >= 300 ? "info" : "success";
|
|
678
685
|
}
|
|
679
|
-
function r(
|
|
680
|
-
return
|
|
686
|
+
function r(k, f) {
|
|
687
|
+
return k[f.key];
|
|
681
688
|
}
|
|
682
|
-
function d(
|
|
683
|
-
return
|
|
689
|
+
function d(k) {
|
|
690
|
+
return k == null ? "" : o(k ? "page.yes" : "page.no");
|
|
684
691
|
}
|
|
685
|
-
function h(
|
|
686
|
-
return
|
|
692
|
+
function h(k) {
|
|
693
|
+
return k == null ? "" : String(k);
|
|
687
694
|
}
|
|
688
|
-
return (
|
|
689
|
-
v.details.summary ? (t(), u(e(
|
|
695
|
+
return (k, f) => (t(), b("div", bt, [
|
|
696
|
+
v.details.summary ? (t(), u(e(P), {
|
|
690
697
|
key: 0,
|
|
691
698
|
size: "sm"
|
|
692
699
|
}, {
|
|
@@ -694,43 +701,43 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
694
701
|
n(s(v.details.summary), 1)
|
|
695
702
|
]),
|
|
696
703
|
_: 1
|
|
697
|
-
})) :
|
|
698
|
-
v.details.table && v.details.table.rows.length ? (t(), b("div",
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
(t(!0), b(
|
|
703
|
-
key:
|
|
704
|
-
}, s(
|
|
704
|
+
})) : z("", !0),
|
|
705
|
+
v.details.table && v.details.table.rows.length ? (t(), b("div", kt, [
|
|
706
|
+
I("table", xt, [
|
|
707
|
+
I("thead", null, [
|
|
708
|
+
I("tr", null, [
|
|
709
|
+
(t(!0), b(L, null, M(v.details.table.columns, (c) => (t(), b("th", {
|
|
710
|
+
key: c.key
|
|
711
|
+
}, s(c.label), 1))), 128))
|
|
705
712
|
])
|
|
706
713
|
]),
|
|
707
|
-
|
|
708
|
-
(t(!0), b(
|
|
709
|
-
(t(!0), b(
|
|
710
|
-
key:
|
|
714
|
+
I("tbody", null, [
|
|
715
|
+
(t(!0), b(L, null, M(v.details.table.rows, (c, W) => (t(), b("tr", { key: W }, [
|
|
716
|
+
(t(!0), b(L, null, M(v.details.table.columns, (C) => (t(), b("td", {
|
|
717
|
+
key: C.key
|
|
711
718
|
}, [
|
|
712
|
-
|
|
719
|
+
C.type === "url" && h(r(c, C)) ? (t(), u(e(xe), {
|
|
713
720
|
key: 0,
|
|
714
|
-
href: h(r(
|
|
721
|
+
href: h(r(c, C)),
|
|
715
722
|
target: "_blank",
|
|
716
723
|
class: "wx-audit-details__url"
|
|
717
724
|
}, {
|
|
718
725
|
default: a(() => [
|
|
719
|
-
n(s(h(r(
|
|
726
|
+
n(s(h(r(c, C))), 1)
|
|
720
727
|
]),
|
|
721
728
|
_: 2
|
|
722
|
-
}, 1032, ["href"])) :
|
|
729
|
+
}, 1032, ["href"])) : C.type === "status" && r(c, C) !== null ? (t(), u(e(B), {
|
|
723
730
|
key: 1,
|
|
724
|
-
type: l(r(
|
|
731
|
+
type: l(r(c, C)),
|
|
725
732
|
size: "sm"
|
|
726
733
|
}, {
|
|
727
734
|
default: a(() => [
|
|
728
|
-
n(s(h(r(
|
|
735
|
+
n(s(h(r(c, C))), 1)
|
|
729
736
|
]),
|
|
730
737
|
_: 2
|
|
731
|
-
}, 1032, ["type"])) :
|
|
732
|
-
n(s(d(r(
|
|
733
|
-
], 64)) :
|
|
738
|
+
}, 1032, ["type"])) : C.type === "bool" ? (t(), b(L, { key: 2 }, [
|
|
739
|
+
n(s(d(r(c, C))), 1)
|
|
740
|
+
], 64)) : C.type === "missing" && !h(r(c, C)) ? (t(), u(e(P), {
|
|
734
741
|
key: 3,
|
|
735
742
|
size: "sm",
|
|
736
743
|
tone: "danger"
|
|
@@ -739,34 +746,34 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
739
746
|
n(s(e(o)("page.missing")), 1)
|
|
740
747
|
]),
|
|
741
748
|
_: 1
|
|
742
|
-
})) :
|
|
749
|
+
})) : C.type === "edit" && h(r(c, C)) ? (t(), u(e(Q), {
|
|
743
750
|
key: 4,
|
|
744
751
|
size: "sm",
|
|
745
752
|
variant: "text",
|
|
746
753
|
icon: "edit",
|
|
747
|
-
onClick: (
|
|
754
|
+
onClick: (O) => e(p).push(h(r(c, C)))
|
|
748
755
|
}, {
|
|
749
756
|
default: a(() => [
|
|
750
757
|
n(s(e(o)("page.open-editor")), 1)
|
|
751
758
|
]),
|
|
752
759
|
_: 1
|
|
753
|
-
}, 8, ["onClick"])) : (t(), b(
|
|
754
|
-
n(s(h(r(
|
|
760
|
+
}, 8, ["onClick"])) : C.type === "code" ? (t(), b("code", wt, s(h(r(c, C))), 1)) : (t(), b(L, { key: 6 }, [
|
|
761
|
+
n(s(h(r(c, C))), 1)
|
|
755
762
|
], 64))
|
|
756
763
|
]))), 128))
|
|
757
764
|
]))), 128))
|
|
758
765
|
])
|
|
759
766
|
])
|
|
760
|
-
])) :
|
|
767
|
+
])) : z("", !0)
|
|
761
768
|
]));
|
|
762
769
|
}
|
|
763
|
-
}),
|
|
770
|
+
}), je = /* @__PURE__ */ ie($t, [["__scopeId", "data-v-c364445d"]]), zt = { class: "wx-audit-fix" }, St = { class: "wx-audit-fix__changes" }, Ct = {
|
|
764
771
|
key: 0,
|
|
765
772
|
class: "wx-audit-fix__field"
|
|
766
|
-
},
|
|
773
|
+
}, At = { class: "wx-audit-fix__value" }, Pt = {
|
|
767
774
|
key: 0,
|
|
768
775
|
class: "wx-audit-fix__count"
|
|
769
|
-
},
|
|
776
|
+
}, Wt = { class: "wx-audit-fix__value" }, It = { class: "wx-audit-fix__actions" }, Ot = /* @__PURE__ */ se({
|
|
770
777
|
__name: "AuditFixDialog",
|
|
771
778
|
props: /* @__PURE__ */ Se({
|
|
772
779
|
run: {},
|
|
@@ -776,55 +783,55 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
776
783
|
openModifiers: {}
|
|
777
784
|
}),
|
|
778
785
|
emits: /* @__PURE__ */ Se(["fixed"], ["update:open"]),
|
|
779
|
-
setup(
|
|
780
|
-
const
|
|
786
|
+
setup(_, { emit: v }) {
|
|
787
|
+
const p = _, o = v, l = He(_, "open"), r = re(le());
|
|
781
788
|
ne();
|
|
782
|
-
const d = ee("webx-audit"), h =
|
|
783
|
-
async function
|
|
784
|
-
f.value = null,
|
|
789
|
+
const d = ee("webx-audit"), h = oe(), k = we(), f = S(null), c = S(null), W = S(null);
|
|
790
|
+
async function C() {
|
|
791
|
+
f.value = null, c.value = null;
|
|
785
792
|
try {
|
|
786
|
-
f.value = await r.fixes(
|
|
793
|
+
f.value = await r.fixes(p.run, p.issue.id);
|
|
787
794
|
} catch (N) {
|
|
788
|
-
|
|
795
|
+
c.value = h(N);
|
|
789
796
|
}
|
|
790
797
|
}
|
|
791
|
-
async function
|
|
792
|
-
|
|
798
|
+
async function O(N) {
|
|
799
|
+
W.value = N.id;
|
|
793
800
|
try {
|
|
794
|
-
await r.fix(
|
|
795
|
-
} catch (
|
|
796
|
-
|
|
801
|
+
await r.fix(p.run, p.issue.id, N.id), X.success(d("page.fix-applied")), o("fixed", N.id), l.value = !1;
|
|
802
|
+
} catch (m) {
|
|
803
|
+
X.danger(h(m));
|
|
797
804
|
} finally {
|
|
798
|
-
|
|
805
|
+
W.value = null;
|
|
799
806
|
}
|
|
800
807
|
}
|
|
801
808
|
function i(N) {
|
|
802
|
-
l.value = !1,
|
|
809
|
+
l.value = !1, k.push(N);
|
|
803
810
|
}
|
|
804
|
-
return
|
|
805
|
-
[l, () =>
|
|
811
|
+
return de(
|
|
812
|
+
[l, () => p.issue.id],
|
|
806
813
|
([N]) => {
|
|
807
|
-
N &&
|
|
814
|
+
N && C();
|
|
808
815
|
},
|
|
809
816
|
{ immediate: !0 }
|
|
810
|
-
), (N,
|
|
817
|
+
), (N, m) => (t(), u(e(Ge), {
|
|
811
818
|
open: l.value,
|
|
812
|
-
"onUpdate:open":
|
|
819
|
+
"onUpdate:open": m[0] || (m[0] = (j) => l.value = j),
|
|
813
820
|
title: e(d)("page.fix-button"),
|
|
814
821
|
width: 640
|
|
815
822
|
}, {
|
|
816
823
|
default: a(() => [
|
|
817
|
-
|
|
818
|
-
|
|
824
|
+
I("div", zt, [
|
|
825
|
+
c.value ? (t(), u(e(P), {
|
|
819
826
|
key: 0,
|
|
820
827
|
size: "sm",
|
|
821
828
|
tone: "danger"
|
|
822
829
|
}, {
|
|
823
830
|
default: a(() => [
|
|
824
|
-
n(s(
|
|
831
|
+
n(s(c.value), 1)
|
|
825
832
|
]),
|
|
826
833
|
_: 1
|
|
827
|
-
})) : f.value ? f.value.length === 0 ? (t(), u(e(
|
|
834
|
+
})) : f.value ? f.value.length === 0 ? (t(), u(e(P), {
|
|
828
835
|
key: 2,
|
|
829
836
|
size: "sm",
|
|
830
837
|
tone: "muted"
|
|
@@ -833,21 +840,21 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
833
840
|
n(s(e(d)("page.fix-none")), 1)
|
|
834
841
|
]),
|
|
835
842
|
_: 1
|
|
836
|
-
})) :
|
|
843
|
+
})) : z("", !0) : (t(), u(e(fe), {
|
|
837
844
|
key: 1,
|
|
838
845
|
rows: 3
|
|
839
846
|
})),
|
|
840
|
-
(t(!0), b(
|
|
847
|
+
(t(!0), b(L, null, M(f.value ?? [], (j) => (t(), b("section", {
|
|
841
848
|
key: j.id,
|
|
842
849
|
class: "wx-audit-fix__offer"
|
|
843
850
|
}, [
|
|
844
|
-
g(e(
|
|
851
|
+
g(e(P), { weight: "semibold" }, {
|
|
845
852
|
default: a(() => [
|
|
846
853
|
n(s(j.title), 1)
|
|
847
854
|
]),
|
|
848
855
|
_: 2
|
|
849
856
|
}, 1024),
|
|
850
|
-
j.description ? (t(), u(e(
|
|
857
|
+
j.description ? (t(), u(e(P), {
|
|
851
858
|
key: 0,
|
|
852
859
|
size: "sm",
|
|
853
860
|
tone: "muted"
|
|
@@ -856,41 +863,41 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
856
863
|
n(s(j.description), 1)
|
|
857
864
|
]),
|
|
858
865
|
_: 2
|
|
859
|
-
}, 1024)) :
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
866
|
+
}, 1024)) : z("", !0),
|
|
867
|
+
I("table", St, [
|
|
868
|
+
I("thead", null, [
|
|
869
|
+
I("tr", null, [
|
|
870
|
+
I("th", null, s(e(d)("page.fix-changes")), 1),
|
|
871
|
+
I("th", null, s(e(d)("page.fix-before")), 1),
|
|
872
|
+
I("th", null, s(e(d)("page.fix-after")), 1),
|
|
873
|
+
m[1] || (m[1] = I("th", null, null, -1))
|
|
867
874
|
])
|
|
868
875
|
]),
|
|
869
|
-
|
|
870
|
-
(t(!0), b(
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
876
|
+
I("tbody", null, [
|
|
877
|
+
(t(!0), b(L, null, M(j.changes, (x, J) => (t(), b("tr", { key: J }, [
|
|
878
|
+
I("td", null, [
|
|
879
|
+
I("div", null, s(x.label), 1),
|
|
880
|
+
x.field ? (t(), b("div", Ct, s(x.field), 1)) : z("", !0)
|
|
874
881
|
]),
|
|
875
|
-
|
|
876
|
-
n(s(
|
|
877
|
-
|
|
882
|
+
I("td", At, [
|
|
883
|
+
n(s(x.before ?? "") + " ", 1),
|
|
884
|
+
x.count ? (t(), b("span", Pt, "× " + s(x.count), 1)) : z("", !0)
|
|
878
885
|
]),
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
886
|
+
I("td", Wt, s(x.after ?? ""), 1),
|
|
887
|
+
I("td", null, [
|
|
888
|
+
x.edit_url ? (t(), u(e(Q), {
|
|
882
889
|
key: 0,
|
|
883
890
|
size: "sm",
|
|
884
891
|
variant: "text",
|
|
885
892
|
icon: "edit",
|
|
886
893
|
"aria-label": e(d)("page.open-editor"),
|
|
887
|
-
onClick: (
|
|
888
|
-
}, null, 8, ["aria-label", "onClick"])) :
|
|
894
|
+
onClick: (Y) => i(x.edit_url)
|
|
895
|
+
}, null, 8, ["aria-label", "onClick"])) : z("", !0)
|
|
889
896
|
])
|
|
890
897
|
]))), 128))
|
|
891
898
|
])
|
|
892
899
|
]),
|
|
893
|
-
j.note ? (t(), u(e(
|
|
900
|
+
j.note ? (t(), u(e(P), {
|
|
894
901
|
key: 1,
|
|
895
902
|
size: "sm",
|
|
896
903
|
tone: "muted"
|
|
@@ -899,14 +906,14 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
899
906
|
n(s(j.note), 1)
|
|
900
907
|
]),
|
|
901
908
|
_: 2
|
|
902
|
-
}, 1024)) :
|
|
903
|
-
|
|
909
|
+
}, 1024)) : z("", !0),
|
|
910
|
+
I("div", It, [
|
|
904
911
|
g(e(Q), {
|
|
905
912
|
type: "primary",
|
|
906
913
|
size: "sm",
|
|
907
|
-
loading:
|
|
908
|
-
disabled:
|
|
909
|
-
onClick: (
|
|
914
|
+
loading: W.value === j.id,
|
|
915
|
+
disabled: W.value !== null,
|
|
916
|
+
onClick: (x) => O(j)
|
|
910
917
|
}, {
|
|
911
918
|
default: a(() => [
|
|
912
919
|
n(s(e(d)("page.fix-apply")), 1)
|
|
@@ -920,7 +927,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
920
927
|
_: 1
|
|
921
928
|
}, 8, ["open", "title"]));
|
|
922
929
|
}
|
|
923
|
-
}),
|
|
930
|
+
}), Ut = /* @__PURE__ */ ie(Ot, [["__scopeId", "data-v-28525af3"]]), Vt = { class: "wx-audit-hide" }, Nt = /* @__PURE__ */ se({
|
|
924
931
|
__name: "AuditHideDialog",
|
|
925
932
|
props: /* @__PURE__ */ Se({
|
|
926
933
|
issue: {},
|
|
@@ -930,62 +937,62 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
930
937
|
openModifiers: {}
|
|
931
938
|
}),
|
|
932
939
|
emits: /* @__PURE__ */ Se(["hidden"], ["update:open"]),
|
|
933
|
-
setup(
|
|
934
|
-
const
|
|
940
|
+
setup(_, { emit: v }) {
|
|
941
|
+
const p = _, o = v, l = He(_, "open"), r = re(le());
|
|
935
942
|
ne();
|
|
936
|
-
const d = ee("webx-audit"), h =
|
|
937
|
-
let
|
|
938
|
-
function
|
|
943
|
+
const d = ee("webx-audit"), h = oe(), k = S(""), f = S(""), c = S(null), W = S(!1);
|
|
944
|
+
let C;
|
|
945
|
+
function O(j) {
|
|
939
946
|
if (!j) return "";
|
|
940
947
|
try {
|
|
941
|
-
const
|
|
942
|
-
return
|
|
948
|
+
const x = new URL(j);
|
|
949
|
+
return x.pathname + x.search;
|
|
943
950
|
} catch {
|
|
944
951
|
return j;
|
|
945
952
|
}
|
|
946
953
|
}
|
|
947
|
-
const i =
|
|
954
|
+
const i = D(() => f.value.trim() !== "");
|
|
948
955
|
function N() {
|
|
949
|
-
clearTimeout(
|
|
956
|
+
clearTimeout(C), C = setTimeout(async () => {
|
|
950
957
|
try {
|
|
951
|
-
|
|
958
|
+
c.value = await r.hidePreview({ check: p.issue.check, pattern: k.value });
|
|
952
959
|
} catch {
|
|
953
|
-
|
|
960
|
+
c.value = null;
|
|
954
961
|
}
|
|
955
962
|
}, 300);
|
|
956
963
|
}
|
|
957
|
-
async function
|
|
958
|
-
|
|
964
|
+
async function m() {
|
|
965
|
+
W.value = !0;
|
|
959
966
|
try {
|
|
960
967
|
const j = await r.hide({
|
|
961
|
-
check:
|
|
962
|
-
pattern:
|
|
968
|
+
check: p.issue.check,
|
|
969
|
+
pattern: k.value,
|
|
963
970
|
reason: f.value
|
|
964
971
|
});
|
|
965
|
-
|
|
972
|
+
X.success(d("page.hidden-done")), o("hidden", j), l.value = !1;
|
|
966
973
|
} catch (j) {
|
|
967
|
-
|
|
974
|
+
X.danger(h(j));
|
|
968
975
|
} finally {
|
|
969
|
-
|
|
976
|
+
W.value = !1;
|
|
970
977
|
}
|
|
971
978
|
}
|
|
972
|
-
return
|
|
973
|
-
[l, () =>
|
|
979
|
+
return de(
|
|
980
|
+
[l, () => p.issue.id],
|
|
974
981
|
([j]) => {
|
|
975
|
-
j && (
|
|
982
|
+
j && (k.value = O(p.issue.url), f.value = "", c.value = null, N());
|
|
976
983
|
},
|
|
977
984
|
{ immediate: !0 }
|
|
978
|
-
),
|
|
985
|
+
), de(k, () => {
|
|
979
986
|
l.value && N();
|
|
980
|
-
}), (j,
|
|
987
|
+
}), (j, x) => (t(), u(e(Ge), {
|
|
981
988
|
open: l.value,
|
|
982
|
-
"onUpdate:open":
|
|
989
|
+
"onUpdate:open": x[3] || (x[3] = (J) => l.value = J),
|
|
983
990
|
title: e(d)("page.hide-title"),
|
|
984
991
|
width: 560
|
|
985
992
|
}, {
|
|
986
993
|
footer: a(() => [
|
|
987
994
|
g(e(Q), {
|
|
988
|
-
onClick:
|
|
995
|
+
onClick: x[2] || (x[2] = (J) => l.value = !1)
|
|
989
996
|
}, {
|
|
990
997
|
default: a(() => [
|
|
991
998
|
n(s(e(d)("page.dismiss")), 1)
|
|
@@ -994,9 +1001,9 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
994
1001
|
}),
|
|
995
1002
|
g(e(Q), {
|
|
996
1003
|
type: "primary",
|
|
997
|
-
loading:
|
|
1004
|
+
loading: W.value,
|
|
998
1005
|
disabled: !i.value,
|
|
999
|
-
onClick:
|
|
1006
|
+
onClick: m
|
|
1000
1007
|
}, {
|
|
1001
1008
|
default: a(() => [
|
|
1002
1009
|
n(s(e(d)("page.hide")), 1)
|
|
@@ -1005,14 +1012,14 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1005
1012
|
}, 8, ["loading", "disabled"])
|
|
1006
1013
|
]),
|
|
1007
1014
|
default: a(() => [
|
|
1008
|
-
|
|
1009
|
-
g(e(
|
|
1015
|
+
I("div", Vt, [
|
|
1016
|
+
g(e(P), { weight: "semibold" }, {
|
|
1010
1017
|
default: a(() => [
|
|
1011
|
-
n(s(
|
|
1018
|
+
n(s(p.title), 1)
|
|
1012
1019
|
]),
|
|
1013
1020
|
_: 1
|
|
1014
1021
|
}),
|
|
1015
|
-
g(e(
|
|
1022
|
+
g(e(P), {
|
|
1016
1023
|
size: "sm",
|
|
1017
1024
|
tone: "muted"
|
|
1018
1025
|
}, {
|
|
@@ -1021,48 +1028,48 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1021
1028
|
]),
|
|
1022
1029
|
_: 1
|
|
1023
1030
|
}),
|
|
1024
|
-
g(e(
|
|
1031
|
+
g(e(Te), {
|
|
1025
1032
|
label: e(d)("page.hide-pattern"),
|
|
1026
1033
|
help: e(d)("page.hide-pattern-help")
|
|
1027
1034
|
}, {
|
|
1028
1035
|
default: a(() => [
|
|
1029
|
-
g(e(
|
|
1030
|
-
modelValue:
|
|
1031
|
-
"onUpdate:modelValue":
|
|
1036
|
+
g(e(Ke), {
|
|
1037
|
+
modelValue: k.value,
|
|
1038
|
+
"onUpdate:modelValue": x[0] || (x[0] = (J) => k.value = J),
|
|
1032
1039
|
placeholder: "/search/**"
|
|
1033
1040
|
}, null, 8, ["modelValue"])
|
|
1034
1041
|
]),
|
|
1035
1042
|
_: 1
|
|
1036
1043
|
}, 8, ["label", "help"]),
|
|
1037
|
-
g(e(
|
|
1044
|
+
g(e(Te), {
|
|
1038
1045
|
label: e(d)("page.hide-reason"),
|
|
1039
1046
|
required: ""
|
|
1040
1047
|
}, {
|
|
1041
1048
|
default: a(() => [
|
|
1042
|
-
g(e(
|
|
1049
|
+
g(e(lt), {
|
|
1043
1050
|
modelValue: f.value,
|
|
1044
|
-
"onUpdate:modelValue":
|
|
1051
|
+
"onUpdate:modelValue": x[1] || (x[1] = (J) => f.value = J),
|
|
1045
1052
|
rows: 3
|
|
1046
1053
|
}, null, 8, ["modelValue"])
|
|
1047
1054
|
]),
|
|
1048
1055
|
_: 1
|
|
1049
1056
|
}, 8, ["label"]),
|
|
1050
|
-
|
|
1057
|
+
c.value !== null ? (t(), u(e(P), {
|
|
1051
1058
|
key: 0,
|
|
1052
1059
|
size: "sm",
|
|
1053
1060
|
tone: "muted"
|
|
1054
1061
|
}, {
|
|
1055
1062
|
default: a(() => [
|
|
1056
|
-
n(s(e(d)("page.hide-count", { count:
|
|
1063
|
+
n(s(e(d)("page.hide-count", { count: c.value })), 1)
|
|
1057
1064
|
]),
|
|
1058
1065
|
_: 1
|
|
1059
|
-
})) :
|
|
1066
|
+
})) : z("", !0)
|
|
1060
1067
|
])
|
|
1061
1068
|
]),
|
|
1062
1069
|
_: 1
|
|
1063
1070
|
}, 8, ["open", "title"]));
|
|
1064
1071
|
}
|
|
1065
|
-
}),
|
|
1072
|
+
}), jt = /* @__PURE__ */ ie(Nt, [["__scopeId", "data-v-1db364c4"]]), Tt = { class: "wx-audit-issues" }, Rt = { class: "wx-audit-issues__head" }, Ft = /* @__PURE__ */ se({
|
|
1066
1073
|
__name: "AuditIssueList",
|
|
1067
1074
|
props: {
|
|
1068
1075
|
run: {},
|
|
@@ -1071,70 +1078,70 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1071
1078
|
title: {}
|
|
1072
1079
|
},
|
|
1073
1080
|
emits: ["changed"],
|
|
1074
|
-
setup(
|
|
1075
|
-
const
|
|
1081
|
+
setup(_, { emit: v }) {
|
|
1082
|
+
const p = _, o = v, l = le(), r = re(l), d = l.can("audit.manage");
|
|
1076
1083
|
ne();
|
|
1077
|
-
const h = ee("webx-audit"),
|
|
1078
|
-
function j(
|
|
1079
|
-
N.value =
|
|
1084
|
+
const h = ee("webx-audit"), k = oe(), f = S(null), c = S(!1), W = S(1), C = S(null), O = S(null), i = S(!1), N = S(null), m = S(!1);
|
|
1085
|
+
function j(A) {
|
|
1086
|
+
N.value = A, m.value = !0;
|
|
1080
1087
|
}
|
|
1081
|
-
function
|
|
1082
|
-
f.value && !
|
|
1088
|
+
function x(A) {
|
|
1089
|
+
f.value && !A.pattern ? f.value = [] : f.value && N.value && (f.value = f.value.filter((F) => F.id !== N.value?.id)), o("changed");
|
|
1083
1090
|
}
|
|
1084
|
-
async function J(
|
|
1085
|
-
if (
|
|
1091
|
+
async function J(A) {
|
|
1092
|
+
if (A.ignore)
|
|
1086
1093
|
try {
|
|
1087
|
-
await r.unhide(
|
|
1088
|
-
} catch (
|
|
1089
|
-
|
|
1094
|
+
await r.unhide(A.ignore.id), X.success(h("page.unhidden")), o("changed");
|
|
1095
|
+
} catch (F) {
|
|
1096
|
+
X.danger(k(F));
|
|
1090
1097
|
}
|
|
1091
1098
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const
|
|
1094
|
-
return
|
|
1099
|
+
function Y(A) {
|
|
1100
|
+
const F = A.ignore;
|
|
1101
|
+
return F ? F.created_by ? h("page.hidden-by", { who: F.created_by, reason: F.reason }) : h("page.hidden-reason", { reason: F.reason }) : "";
|
|
1095
1102
|
}
|
|
1096
|
-
function R(
|
|
1097
|
-
|
|
1103
|
+
function R(A) {
|
|
1104
|
+
O.value = A, i.value = !0;
|
|
1098
1105
|
}
|
|
1099
|
-
function
|
|
1100
|
-
|
|
1106
|
+
function q(A) {
|
|
1107
|
+
O.value && (O.value.fixed_with = A);
|
|
1101
1108
|
}
|
|
1102
|
-
async function
|
|
1109
|
+
async function U(A = 1) {
|
|
1103
1110
|
try {
|
|
1104
|
-
const
|
|
1105
|
-
f.value =
|
|
1106
|
-
} catch (
|
|
1107
|
-
|
|
1111
|
+
const F = await r.issues(p.run, { ...p.query, page: A, per_page: 50 });
|
|
1112
|
+
f.value = A === 1 ? F.data : [...f.value ?? [], ...F.data], W.value = F.current_page, c.value = F.current_page < F.last_page;
|
|
1113
|
+
} catch (F) {
|
|
1114
|
+
C.value = k(F);
|
|
1108
1115
|
}
|
|
1109
1116
|
}
|
|
1110
|
-
return
|
|
1111
|
-
|
|
1117
|
+
return ve(() => U()), (A, F) => (t(), b("div", Tt, [
|
|
1118
|
+
C.value ? (t(), u(e(P), {
|
|
1112
1119
|
key: 0,
|
|
1113
1120
|
size: "sm",
|
|
1114
1121
|
tone: "danger"
|
|
1115
1122
|
}, {
|
|
1116
1123
|
default: a(() => [
|
|
1117
|
-
n(s(
|
|
1124
|
+
n(s(C.value), 1)
|
|
1118
1125
|
]),
|
|
1119
1126
|
_: 1
|
|
1120
|
-
})) : f.value ? (t(), b(
|
|
1121
|
-
(t(!0), b(
|
|
1122
|
-
key:
|
|
1127
|
+
})) : f.value ? (t(), b(L, { key: 2 }, [
|
|
1128
|
+
(t(!0), b(L, null, M(f.value, (V) => (t(), b("div", {
|
|
1129
|
+
key: V.id,
|
|
1123
1130
|
class: "wx-audit-issues__item"
|
|
1124
1131
|
}, [
|
|
1125
|
-
|
|
1126
|
-
|
|
1132
|
+
I("div", Rt, [
|
|
1133
|
+
V.url ? (t(), u(e(xe), {
|
|
1127
1134
|
key: 0,
|
|
1128
|
-
href:
|
|
1135
|
+
href: V.url,
|
|
1129
1136
|
target: "_blank",
|
|
1130
1137
|
class: "wx-audit-issues__url"
|
|
1131
1138
|
}, {
|
|
1132
1139
|
default: a(() => [
|
|
1133
|
-
n(s(
|
|
1140
|
+
n(s(V.url), 1)
|
|
1134
1141
|
]),
|
|
1135
1142
|
_: 2
|
|
1136
|
-
}, 1032, ["href"])) :
|
|
1137
|
-
|
|
1143
|
+
}, 1032, ["href"])) : z("", !0),
|
|
1144
|
+
V.state === "new" ? (t(), u(e(B), {
|
|
1138
1145
|
key: 1,
|
|
1139
1146
|
type: "primary",
|
|
1140
1147
|
size: "sm"
|
|
@@ -1143,8 +1150,8 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1143
1150
|
n(s(e(h)("page.state-new")), 1)
|
|
1144
1151
|
]),
|
|
1145
1152
|
_: 1
|
|
1146
|
-
})) :
|
|
1147
|
-
|
|
1153
|
+
})) : z("", !0),
|
|
1154
|
+
V.fixed_with ? (t(), u(e(B), {
|
|
1148
1155
|
key: 2,
|
|
1149
1156
|
type: "success",
|
|
1150
1157
|
size: "sm"
|
|
@@ -1153,116 +1160,116 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1153
1160
|
n(s(e(h)("page.fix-pressed")), 1)
|
|
1154
1161
|
]),
|
|
1155
1162
|
_: 1
|
|
1156
|
-
})) :
|
|
1163
|
+
})) : _.fixable && e(d) && !V.ignored ? (t(), u(e(Q), {
|
|
1157
1164
|
key: 3,
|
|
1158
1165
|
size: "sm",
|
|
1159
1166
|
variant: "outline",
|
|
1160
1167
|
icon: "check",
|
|
1161
1168
|
class: "wx-audit-issues__fix",
|
|
1162
|
-
onClick: (
|
|
1169
|
+
onClick: (ue) => R(V)
|
|
1163
1170
|
}, {
|
|
1164
1171
|
default: a(() => [
|
|
1165
1172
|
n(s(e(h)("page.fix-button")), 1)
|
|
1166
1173
|
]),
|
|
1167
1174
|
_: 1
|
|
1168
|
-
}, 8, ["onClick"])) :
|
|
1169
|
-
e(d) &&
|
|
1175
|
+
}, 8, ["onClick"])) : z("", !0),
|
|
1176
|
+
e(d) && V.ignored && V.ignore ? (t(), u(e(Q), {
|
|
1170
1177
|
key: 4,
|
|
1171
1178
|
size: "sm",
|
|
1172
1179
|
variant: "text",
|
|
1173
1180
|
icon: "eye",
|
|
1174
1181
|
class: "wx-audit-issues__end",
|
|
1175
|
-
onClick: (
|
|
1182
|
+
onClick: (ue) => J(V)
|
|
1176
1183
|
}, {
|
|
1177
1184
|
default: a(() => [
|
|
1178
1185
|
n(s(e(h)("page.unhide")), 1)
|
|
1179
1186
|
]),
|
|
1180
1187
|
_: 1
|
|
1181
|
-
}, 8, ["onClick"])) : e(d) && !
|
|
1188
|
+
}, 8, ["onClick"])) : e(d) && !V.ignored ? (t(), u(e(Q), {
|
|
1182
1189
|
key: 5,
|
|
1183
1190
|
size: "sm",
|
|
1184
1191
|
variant: "text",
|
|
1185
1192
|
icon: "eye-off",
|
|
1186
|
-
class:
|
|
1187
|
-
onClick: (
|
|
1193
|
+
class: Ne({ "wx-audit-issues__end": !_.fixable || V.fixed_with }),
|
|
1194
|
+
onClick: (ue) => j(V)
|
|
1188
1195
|
}, {
|
|
1189
1196
|
default: a(() => [
|
|
1190
1197
|
n(s(e(h)("page.hide")), 1)
|
|
1191
1198
|
]),
|
|
1192
1199
|
_: 1
|
|
1193
|
-
}, 8, ["class", "onClick"])) :
|
|
1200
|
+
}, 8, ["class", "onClick"])) : z("", !0)
|
|
1194
1201
|
]),
|
|
1195
|
-
|
|
1202
|
+
V.ignore ? (t(), u(e(P), {
|
|
1196
1203
|
key: 0,
|
|
1197
1204
|
size: "sm",
|
|
1198
1205
|
tone: "muted"
|
|
1199
1206
|
}, {
|
|
1200
1207
|
default: a(() => [
|
|
1201
|
-
n(s(
|
|
1208
|
+
n(s(Y(V)), 1)
|
|
1202
1209
|
]),
|
|
1203
1210
|
_: 2
|
|
1204
|
-
}, 1024)) :
|
|
1205
|
-
g(
|
|
1206
|
-
details:
|
|
1211
|
+
}, 1024)) : z("", !0),
|
|
1212
|
+
g(je, {
|
|
1213
|
+
details: V.details
|
|
1207
1214
|
}, null, 8, ["details"])
|
|
1208
1215
|
]))), 128)),
|
|
1209
|
-
|
|
1216
|
+
c.value ? (t(), u(e(Q), {
|
|
1210
1217
|
key: 0,
|
|
1211
1218
|
size: "sm",
|
|
1212
1219
|
variant: "text",
|
|
1213
|
-
onClick:
|
|
1220
|
+
onClick: F[0] || (F[0] = (V) => U(W.value + 1))
|
|
1214
1221
|
}, {
|
|
1215
|
-
default: a(() => [...
|
|
1222
|
+
default: a(() => [...F[3] || (F[3] = [
|
|
1216
1223
|
n("…", -1)
|
|
1217
1224
|
])]),
|
|
1218
1225
|
_: 1
|
|
1219
|
-
})) :
|
|
1226
|
+
})) : z("", !0)
|
|
1220
1227
|
], 64)) : (t(), u(e(fe), {
|
|
1221
1228
|
key: 1,
|
|
1222
1229
|
rows: 2
|
|
1223
1230
|
})),
|
|
1224
|
-
|
|
1231
|
+
O.value ? (t(), u(Ut, {
|
|
1225
1232
|
key: 3,
|
|
1226
1233
|
open: i.value,
|
|
1227
|
-
"onUpdate:open":
|
|
1228
|
-
run:
|
|
1229
|
-
issue:
|
|
1230
|
-
onFixed:
|
|
1231
|
-
}, null, 8, ["open", "run", "issue"])) :
|
|
1232
|
-
N.value ? (t(), u(
|
|
1234
|
+
"onUpdate:open": F[1] || (F[1] = (V) => i.value = V),
|
|
1235
|
+
run: _.run,
|
|
1236
|
+
issue: O.value,
|
|
1237
|
+
onFixed: q
|
|
1238
|
+
}, null, 8, ["open", "run", "issue"])) : z("", !0),
|
|
1239
|
+
N.value ? (t(), u(jt, {
|
|
1233
1240
|
key: 4,
|
|
1234
|
-
open:
|
|
1235
|
-
"onUpdate:open":
|
|
1241
|
+
open: m.value,
|
|
1242
|
+
"onUpdate:open": F[2] || (F[2] = (V) => m.value = V),
|
|
1236
1243
|
issue: N.value,
|
|
1237
|
-
title:
|
|
1238
|
-
onHidden:
|
|
1239
|
-
}, null, 8, ["open", "issue", "title"])) :
|
|
1244
|
+
title: p.title ?? N.value.check,
|
|
1245
|
+
onHidden: x
|
|
1246
|
+
}, null, 8, ["open", "issue", "title"])) : z("", !0)
|
|
1240
1247
|
]));
|
|
1241
1248
|
}
|
|
1242
|
-
}),
|
|
1249
|
+
}), Lt = /* @__PURE__ */ ie(Ft, [["__scopeId", "data-v-23ac6ac8"]]), Dt = { class: "wx-audit-findings__filters" }, qt = { class: "wx-audit-findings__title" }, Et = { class: "wx-audit-findings__texts" }, Bt = /* @__PURE__ */ se({
|
|
1243
1250
|
__name: "AuditIssuesPage",
|
|
1244
1251
|
props: {
|
|
1245
1252
|
base: {}
|
|
1246
1253
|
},
|
|
1247
|
-
setup(
|
|
1248
|
-
const v =
|
|
1254
|
+
setup(_) {
|
|
1255
|
+
const v = _, p = re(le());
|
|
1249
1256
|
ne();
|
|
1250
|
-
const o = ee("webx-audit"), l = ee("webx-admin"), r =
|
|
1251
|
-
() => [
|
|
1257
|
+
const o = ee("webx-audit"), l = ee("webx-admin"), r = oe(), d = S(null), h = S(null), k = S(!1), f = S([]), c = S(null), W = S(null), C = S(null), O = D(() => ({ severity: c.value, group: W.value, state: C.value })), i = D(
|
|
1258
|
+
() => [c.value, W.value, C.value].filter(Boolean).length
|
|
1252
1259
|
), N = {
|
|
1253
1260
|
error: "danger",
|
|
1254
1261
|
warning: "warning",
|
|
1255
1262
|
notice: "info"
|
|
1256
|
-
},
|
|
1263
|
+
}, m = D(() => [
|
|
1257
1264
|
{ key: "severity", label: o("page.severity"), width: 130 },
|
|
1258
1265
|
{ key: "title", label: o("page.check") },
|
|
1259
1266
|
{ key: "count", label: o("page.count"), width: 110, align: "right" }
|
|
1260
|
-
]), j =
|
|
1261
|
-
() => ["error", "warning", "notice"].map((
|
|
1262
|
-
value:
|
|
1263
|
-
label: o(`page.severity-${
|
|
1267
|
+
]), j = D(
|
|
1268
|
+
() => ["error", "warning", "notice"].map((q) => ({
|
|
1269
|
+
value: q,
|
|
1270
|
+
label: o(`page.severity-${q}`)
|
|
1264
1271
|
}))
|
|
1265
|
-
),
|
|
1272
|
+
), x = D(
|
|
1266
1273
|
() => [
|
|
1267
1274
|
"config",
|
|
1268
1275
|
"host",
|
|
@@ -1274,91 +1281,91 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1274
1281
|
"images",
|
|
1275
1282
|
"a11y",
|
|
1276
1283
|
"structure"
|
|
1277
|
-
].map((
|
|
1278
|
-
), J =
|
|
1279
|
-
() => ["new", "persisting", "hidden"].map((
|
|
1280
|
-
value:
|
|
1281
|
-
label: o(`page.state-${
|
|
1284
|
+
].map((q) => ({ value: q, label: o(`page.group-${q}`) }))
|
|
1285
|
+
), J = D(
|
|
1286
|
+
() => ["new", "persisting", "hidden"].map((q) => ({
|
|
1287
|
+
value: q,
|
|
1288
|
+
label: o(`page.state-${q}`)
|
|
1282
1289
|
}))
|
|
1283
1290
|
);
|
|
1284
|
-
function
|
|
1285
|
-
return typeof
|
|
1291
|
+
function Y(q) {
|
|
1292
|
+
return typeof q == "string" && q !== "" ? q : null;
|
|
1286
1293
|
}
|
|
1287
1294
|
async function R() {
|
|
1288
|
-
|
|
1295
|
+
k.value = !0;
|
|
1289
1296
|
try {
|
|
1290
|
-
d.value === null && (d.value = (await
|
|
1291
|
-
} catch (
|
|
1292
|
-
|
|
1297
|
+
d.value === null && (d.value = (await p.latest()).done?.id ?? null), h.value = d.value === null ? [] : await p.checks(d.value, O.value), f.value = [];
|
|
1298
|
+
} catch (q) {
|
|
1299
|
+
X.danger(r(q));
|
|
1293
1300
|
} finally {
|
|
1294
|
-
|
|
1301
|
+
k.value = !1;
|
|
1295
1302
|
}
|
|
1296
1303
|
}
|
|
1297
|
-
return
|
|
1304
|
+
return de(O, () => {
|
|
1298
1305
|
R();
|
|
1299
|
-
}),
|
|
1306
|
+
}), ve(R), (q, U) => (t(), u(me, {
|
|
1300
1307
|
base: v.base,
|
|
1301
1308
|
current: "issues"
|
|
1302
1309
|
}, {
|
|
1303
1310
|
default: a(() => [
|
|
1304
|
-
g(e(
|
|
1311
|
+
g(e(he), {
|
|
1305
1312
|
expanded: f.value,
|
|
1306
|
-
"onUpdate:expanded":
|
|
1313
|
+
"onUpdate:expanded": U[4] || (U[4] = (A) => f.value = A),
|
|
1307
1314
|
data: h.value ?? [],
|
|
1308
|
-
columns:
|
|
1315
|
+
columns: m.value,
|
|
1309
1316
|
"row-key": "id",
|
|
1310
1317
|
expandable: "",
|
|
1311
1318
|
flush: "",
|
|
1312
|
-
loading:
|
|
1319
|
+
loading: k.value,
|
|
1313
1320
|
"filters-count": i.value,
|
|
1314
1321
|
"filters-label": e(l)("filters.title"),
|
|
1315
1322
|
"empty-text": d.value === null ? e(o)("page.never") : e(o)("page.empty")
|
|
1316
1323
|
}, {
|
|
1317
1324
|
filters: a(() => [
|
|
1318
|
-
|
|
1319
|
-
g(e(
|
|
1320
|
-
"model-value":
|
|
1325
|
+
I("div", Dt, [
|
|
1326
|
+
g(e(pe), {
|
|
1327
|
+
"model-value": c.value,
|
|
1321
1328
|
options: j.value,
|
|
1322
1329
|
placeholder: e(o)("page.any-severity"),
|
|
1323
1330
|
clearable: "",
|
|
1324
|
-
"onUpdate:modelValue":
|
|
1331
|
+
"onUpdate:modelValue": U[0] || (U[0] = (A) => c.value = Y(A))
|
|
1325
1332
|
}, null, 8, ["model-value", "options", "placeholder"]),
|
|
1326
|
-
g(e(
|
|
1327
|
-
"model-value":
|
|
1328
|
-
options:
|
|
1333
|
+
g(e(pe), {
|
|
1334
|
+
"model-value": W.value,
|
|
1335
|
+
options: x.value,
|
|
1329
1336
|
placeholder: e(o)("page.any-group"),
|
|
1330
1337
|
clearable: "",
|
|
1331
|
-
"onUpdate:modelValue":
|
|
1338
|
+
"onUpdate:modelValue": U[1] || (U[1] = (A) => W.value = Y(A))
|
|
1332
1339
|
}, null, 8, ["model-value", "options", "placeholder"]),
|
|
1333
|
-
g(e(
|
|
1334
|
-
"model-value":
|
|
1340
|
+
g(e(pe), {
|
|
1341
|
+
"model-value": C.value,
|
|
1335
1342
|
options: J.value,
|
|
1336
1343
|
placeholder: e(o)("page.any-state"),
|
|
1337
1344
|
clearable: "",
|
|
1338
|
-
"onUpdate:modelValue":
|
|
1345
|
+
"onUpdate:modelValue": U[2] || (U[2] = (A) => C.value = Y(A))
|
|
1339
1346
|
}, null, 8, ["model-value", "options", "placeholder"])
|
|
1340
1347
|
])
|
|
1341
1348
|
]),
|
|
1342
|
-
"cell-severity": a(({ row:
|
|
1349
|
+
"cell-severity": a(({ row: A }) => [
|
|
1343
1350
|
g(e(B), {
|
|
1344
|
-
type: N[
|
|
1351
|
+
type: N[A.severity],
|
|
1345
1352
|
dot: ""
|
|
1346
1353
|
}, {
|
|
1347
1354
|
default: a(() => [
|
|
1348
|
-
n(s(e(o)(`page.severity-${
|
|
1355
|
+
n(s(e(o)(`page.severity-${A.severity}`)), 1)
|
|
1349
1356
|
]),
|
|
1350
1357
|
_: 2
|
|
1351
1358
|
}, 1032, ["type"])
|
|
1352
1359
|
]),
|
|
1353
|
-
"cell-title": a(({ row:
|
|
1354
|
-
|
|
1355
|
-
g(e(
|
|
1360
|
+
"cell-title": a(({ row: A }) => [
|
|
1361
|
+
I("span", qt, [
|
|
1362
|
+
g(e(P), { size: "sm" }, {
|
|
1356
1363
|
default: a(() => [
|
|
1357
|
-
n(s(
|
|
1364
|
+
n(s(A.title), 1)
|
|
1358
1365
|
]),
|
|
1359
1366
|
_: 2
|
|
1360
1367
|
}, 1024),
|
|
1361
|
-
|
|
1368
|
+
A.new > 0 ? (t(), u(e(B), {
|
|
1362
1369
|
key: 0,
|
|
1363
1370
|
type: "primary",
|
|
1364
1371
|
size: "sm"
|
|
@@ -1367,9 +1374,9 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1367
1374
|
n(s(e(o)("page.state-new")), 1)
|
|
1368
1375
|
]),
|
|
1369
1376
|
_: 1
|
|
1370
|
-
})) :
|
|
1371
|
-
g(e(
|
|
1372
|
-
title:
|
|
1377
|
+
})) : z("", !0),
|
|
1378
|
+
g(e(Qe), {
|
|
1379
|
+
title: A.title,
|
|
1373
1380
|
width: "360"
|
|
1374
1381
|
}, {
|
|
1375
1382
|
trigger: a(() => [
|
|
@@ -1378,33 +1385,33 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1378
1385
|
variant: "text",
|
|
1379
1386
|
icon: "question",
|
|
1380
1387
|
"aria-label": e(o)("page.explain"),
|
|
1381
|
-
onClick:
|
|
1388
|
+
onClick: U[3] || (U[3] = et(() => {
|
|
1382
1389
|
}, ["stop"]))
|
|
1383
1390
|
}, null, 8, ["aria-label"])
|
|
1384
1391
|
]),
|
|
1385
1392
|
default: a(() => [
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
+
I("dl", Et, [
|
|
1394
|
+
I("dt", null, s(e(o)("page.found")), 1),
|
|
1395
|
+
I("dd", null, s(A.found), 1),
|
|
1396
|
+
I("dt", null, s(e(o)("page.why")), 1),
|
|
1397
|
+
I("dd", null, s(A.why), 1),
|
|
1398
|
+
I("dt", null, s(e(o)("page.fix")), 1),
|
|
1399
|
+
I("dd", null, s(A.fix), 1)
|
|
1393
1400
|
])
|
|
1394
1401
|
]),
|
|
1395
1402
|
_: 2
|
|
1396
1403
|
}, 1032, ["title"])
|
|
1397
1404
|
])
|
|
1398
1405
|
]),
|
|
1399
|
-
expanded: a(({ row:
|
|
1400
|
-
d.value !== null ? (t(), u(
|
|
1406
|
+
expanded: a(({ row: A }) => [
|
|
1407
|
+
d.value !== null ? (t(), u(Lt, {
|
|
1401
1408
|
key: 0,
|
|
1402
1409
|
run: d.value,
|
|
1403
|
-
query: { ...
|
|
1404
|
-
fixable: (
|
|
1405
|
-
title:
|
|
1410
|
+
query: { ...O.value, check: A.id },
|
|
1411
|
+
fixable: (A.fixes ?? []).length > 0,
|
|
1412
|
+
title: A.title,
|
|
1406
1413
|
onChanged: R
|
|
1407
|
-
}, null, 8, ["run", "query", "fixable", "title"])) :
|
|
1414
|
+
}, null, 8, ["run", "query", "fixable", "title"])) : z("", !0)
|
|
1408
1415
|
]),
|
|
1409
1416
|
_: 1
|
|
1410
1417
|
}, 8, ["expanded", "data", "columns", "loading", "filters-count", "filters-label", "empty-text"])
|
|
@@ -1412,30 +1419,33 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1412
1419
|
_: 1
|
|
1413
1420
|
}, 8, ["base"]));
|
|
1414
1421
|
}
|
|
1415
|
-
}),
|
|
1422
|
+
}), Ht = /* @__PURE__ */ ie(Bt, [["__scopeId", "data-v-7f790d95"]]), Mt = { class: "wx-audit-overview" }, Jt = { class: "wx-audit-overview__row" }, Gt = { class: "wx-audit-overview__row" }, Kt = { class: "wx-audit-overview__summary" }, Qt = { class: "wx-audit-overview__health" }, Xt = {
|
|
1423
|
+
key: 0,
|
|
1424
|
+
class: "wx-audit-overview__parts"
|
|
1425
|
+
}, Yt = { class: "wx-audit-overview__stats" }, Zt = { class: "wx-audit-overview__meta" }, ea = { class: "wx-audit-overview__groups" }, ta = { class: "wx-audit-overview__badges" }, aa = { class: "wx-audit-overview__badges" }, sa = {
|
|
1416
1426
|
key: 0,
|
|
1417
1427
|
class: "wx-audit-overview__missing"
|
|
1418
|
-
},
|
|
1428
|
+
}, la = 2e3, na = /* @__PURE__ */ se({
|
|
1419
1429
|
__name: "AuditOverviewPage",
|
|
1420
1430
|
props: {
|
|
1421
1431
|
base: {}
|
|
1422
1432
|
},
|
|
1423
|
-
setup(
|
|
1424
|
-
const v =
|
|
1433
|
+
setup(_) {
|
|
1434
|
+
const v = _, p = le(), o = re(p);
|
|
1425
1435
|
ne();
|
|
1426
|
-
const l = ee("webx-audit"), r =
|
|
1436
|
+
const l = ee("webx-audit"), r = oe(), d = S(null), h = S("quick"), k = S(!1);
|
|
1427
1437
|
let f;
|
|
1428
|
-
const
|
|
1438
|
+
const c = p.can("audit.run") || p.can("audit.manage"), W = D(() => d.value?.active ?? null), C = D(() => d.value?.done ?? null), O = D(() => C.value?.counts ?? null), i = D(() => [
|
|
1429
1439
|
{ value: "quick", label: l("page.scope-quick") },
|
|
1430
1440
|
{ value: "full", label: l("page.scope-full") }
|
|
1431
1441
|
]), N = [
|
|
1432
1442
|
{ key: "error", label: "page.errors", tone: "danger" },
|
|
1433
1443
|
{ key: "warning", label: "page.warnings", tone: "warning" },
|
|
1434
1444
|
{ key: "notice", label: "page.notices", tone: "info" }
|
|
1435
|
-
],
|
|
1436
|
-
const
|
|
1437
|
-
return
|
|
1438
|
-
}),
|
|
1445
|
+
], m = D(() => O.value?.health_parts ?? null), j = D(() => {
|
|
1446
|
+
const A = O.value?.health ?? 0;
|
|
1447
|
+
return A >= 90 ? "success" : A >= 60 ? "warning" : "danger";
|
|
1448
|
+
}), x = [
|
|
1439
1449
|
"config",
|
|
1440
1450
|
"host",
|
|
1441
1451
|
"hosts",
|
|
@@ -1446,136 +1456,136 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1446
1456
|
"images",
|
|
1447
1457
|
"a11y",
|
|
1448
1458
|
"structure"
|
|
1449
|
-
],
|
|
1450
|
-
() => Object.entries(
|
|
1451
|
-
id:
|
|
1452
|
-
label: l(`page.group-${
|
|
1453
|
-
bySeverity:
|
|
1459
|
+
], J = D(
|
|
1460
|
+
() => Object.entries(O.value?.groups ?? {}).map(([A, F]) => ({
|
|
1461
|
+
id: A,
|
|
1462
|
+
label: l(`page.group-${x.includes(A) ? A : "other"}`),
|
|
1463
|
+
bySeverity: F
|
|
1454
1464
|
}))
|
|
1455
1465
|
);
|
|
1456
|
-
function
|
|
1457
|
-
return
|
|
1466
|
+
function Y(A) {
|
|
1467
|
+
return A.status === "queued" ? l("page.status-queued") : A.progress.stage ? l(`page.stage-${A.progress.stage}`) : l("page.status-running");
|
|
1458
1468
|
}
|
|
1459
|
-
async function
|
|
1469
|
+
async function R() {
|
|
1460
1470
|
try {
|
|
1461
1471
|
d.value = await o.latest();
|
|
1462
|
-
} catch (
|
|
1463
|
-
|
|
1472
|
+
} catch (A) {
|
|
1473
|
+
X.danger(r(A));
|
|
1464
1474
|
}
|
|
1465
1475
|
clearTimeout(f), d.value?.active && (f = setTimeout(() => {
|
|
1466
|
-
|
|
1467
|
-
},
|
|
1476
|
+
R();
|
|
1477
|
+
}, la));
|
|
1468
1478
|
}
|
|
1469
|
-
async function
|
|
1470
|
-
|
|
1479
|
+
async function q() {
|
|
1480
|
+
k.value = !0;
|
|
1471
1481
|
try {
|
|
1472
|
-
await o.start(h.value),
|
|
1473
|
-
} catch (
|
|
1474
|
-
|
|
1482
|
+
await o.start(h.value), X.success(l("page.started")), await R();
|
|
1483
|
+
} catch (A) {
|
|
1484
|
+
X.danger(r(A));
|
|
1475
1485
|
} finally {
|
|
1476
|
-
|
|
1486
|
+
k.value = !1;
|
|
1477
1487
|
}
|
|
1478
1488
|
}
|
|
1479
|
-
async function
|
|
1489
|
+
async function U(A) {
|
|
1480
1490
|
try {
|
|
1481
|
-
await o.cancel(
|
|
1482
|
-
} catch (
|
|
1483
|
-
|
|
1491
|
+
await o.cancel(A.id), await R();
|
|
1492
|
+
} catch (F) {
|
|
1493
|
+
X.danger(r(F));
|
|
1484
1494
|
}
|
|
1485
1495
|
}
|
|
1486
|
-
return
|
|
1496
|
+
return ve(R), Me(() => clearTimeout(f)), (A, F) => (t(), u(me, {
|
|
1487
1497
|
base: v.base,
|
|
1488
1498
|
current: "overview",
|
|
1489
1499
|
card: !1
|
|
1490
1500
|
}, {
|
|
1491
1501
|
default: a(() => [
|
|
1492
|
-
|
|
1493
|
-
d.value ? (t(), b(
|
|
1494
|
-
d.value.queue.sync ? (t(), u(e(
|
|
1502
|
+
I("div", Mt, [
|
|
1503
|
+
d.value ? (t(), b(L, { key: 1 }, [
|
|
1504
|
+
d.value.queue.sync ? (t(), u(e(_e), {
|
|
1495
1505
|
key: 0,
|
|
1496
1506
|
type: "warning",
|
|
1497
1507
|
description: e(l)("page.sync-queue")
|
|
1498
|
-
}, null, 8, ["description"])) :
|
|
1499
|
-
d.value.last && d.value.last.status === "failed" ? (t(), u(e(
|
|
1508
|
+
}, null, 8, ["description"])) : z("", !0),
|
|
1509
|
+
d.value.last && d.value.last.status === "failed" ? (t(), u(e(_e), {
|
|
1500
1510
|
key: 1,
|
|
1501
1511
|
type: "danger",
|
|
1502
1512
|
description: e(l)("page.last-failed", { error: d.value.last.error ?? "" })
|
|
1503
|
-
}, null, 8, ["description"])) :
|
|
1504
|
-
|
|
1513
|
+
}, null, 8, ["description"])) : z("", !0),
|
|
1514
|
+
W.value ? (t(), u(e(ce), {
|
|
1505
1515
|
key: 2,
|
|
1506
1516
|
class: "wx-audit-overview__active"
|
|
1507
1517
|
}, {
|
|
1508
1518
|
default: a(() => [
|
|
1509
|
-
|
|
1510
|
-
g(e(
|
|
1519
|
+
I("div", Jt, [
|
|
1520
|
+
g(e(P), { weight: "semibold" }, {
|
|
1511
1521
|
default: a(() => [
|
|
1512
|
-
n(s(
|
|
1522
|
+
n(s(Y(W.value)), 1)
|
|
1513
1523
|
]),
|
|
1514
1524
|
_: 1
|
|
1515
1525
|
}),
|
|
1516
|
-
g(e(
|
|
1526
|
+
g(e(P), {
|
|
1517
1527
|
size: "sm",
|
|
1518
1528
|
tone: "muted",
|
|
1519
1529
|
class: "wx-audit-overview__url"
|
|
1520
1530
|
}, {
|
|
1521
1531
|
default: a(() => [
|
|
1522
|
-
n(s(
|
|
1532
|
+
n(s(W.value.base_url), 1)
|
|
1523
1533
|
]),
|
|
1524
1534
|
_: 1
|
|
1525
1535
|
}),
|
|
1526
|
-
e(
|
|
1536
|
+
e(c) ? (t(), u(e(Q), {
|
|
1527
1537
|
key: 0,
|
|
1528
1538
|
size: "sm",
|
|
1529
1539
|
class: "wx-audit-overview__end",
|
|
1530
|
-
onClick:
|
|
1540
|
+
onClick: F[0] || (F[0] = (V) => U(W.value))
|
|
1531
1541
|
}, {
|
|
1532
1542
|
default: a(() => [
|
|
1533
1543
|
n(s(e(l)("page.cancel")), 1)
|
|
1534
1544
|
]),
|
|
1535
1545
|
_: 1
|
|
1536
|
-
})) :
|
|
1546
|
+
})) : z("", !0)
|
|
1537
1547
|
]),
|
|
1538
|
-
g(e(
|
|
1548
|
+
g(e(Re), {
|
|
1539
1549
|
indeterminate: "",
|
|
1540
|
-
"aria-label":
|
|
1550
|
+
"aria-label": Y(W.value)
|
|
1541
1551
|
}, null, 8, ["aria-label"]),
|
|
1542
|
-
|
|
1552
|
+
W.value.progress.resources ? (t(), u(e(P), {
|
|
1543
1553
|
key: 0,
|
|
1544
1554
|
size: "sm",
|
|
1545
1555
|
tone: "muted"
|
|
1546
1556
|
}, {
|
|
1547
1557
|
default: a(() => [
|
|
1548
1558
|
n(s(e(l)("page.resources-progress", {
|
|
1549
|
-
checked:
|
|
1550
|
-
total:
|
|
1559
|
+
checked: W.value.progress.resources.checked,
|
|
1560
|
+
total: W.value.progress.resources.total
|
|
1551
1561
|
})), 1)
|
|
1552
1562
|
]),
|
|
1553
1563
|
_: 1
|
|
1554
|
-
})) :
|
|
1564
|
+
})) : W.value.progress.stage === "crawl" ? (t(), u(e(P), {
|
|
1555
1565
|
key: 1,
|
|
1556
1566
|
size: "sm",
|
|
1557
1567
|
tone: "muted"
|
|
1558
1568
|
}, {
|
|
1559
1569
|
default: a(() => [
|
|
1560
1570
|
n(s(e(l)("page.pages-progress", {
|
|
1561
|
-
crawled:
|
|
1562
|
-
limit:
|
|
1571
|
+
crawled: W.value.progress.pages.crawled,
|
|
1572
|
+
limit: W.value.progress.pages.limit
|
|
1563
1573
|
})), 1)
|
|
1564
1574
|
]),
|
|
1565
1575
|
_: 1
|
|
1566
|
-
})) :
|
|
1576
|
+
})) : z("", !0)
|
|
1567
1577
|
]),
|
|
1568
1578
|
_: 1
|
|
1569
|
-
})) : e(
|
|
1579
|
+
})) : e(c) && !d.value.queue.sync ? (t(), u(e(ce), { key: 3 }, {
|
|
1570
1580
|
default: a(() => [
|
|
1571
|
-
|
|
1572
|
-
g(e(
|
|
1581
|
+
I("div", Gt, [
|
|
1582
|
+
g(e(Xe), {
|
|
1573
1583
|
modelValue: h.value,
|
|
1574
|
-
"onUpdate:modelValue":
|
|
1584
|
+
"onUpdate:modelValue": F[1] || (F[1] = (V) => h.value = V),
|
|
1575
1585
|
options: i.value,
|
|
1576
1586
|
"aria-label": e(l)("page.scope")
|
|
1577
1587
|
}, null, 8, ["modelValue", "options", "aria-label"]),
|
|
1578
|
-
g(e(
|
|
1588
|
+
g(e(P), {
|
|
1579
1589
|
size: "sm",
|
|
1580
1590
|
tone: "muted"
|
|
1581
1591
|
}, {
|
|
@@ -1587,9 +1597,9 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1587
1597
|
g(e(Q), {
|
|
1588
1598
|
type: "primary",
|
|
1589
1599
|
icon: "refresh",
|
|
1590
|
-
loading:
|
|
1600
|
+
loading: k.value,
|
|
1591
1601
|
class: "wx-audit-overview__end",
|
|
1592
|
-
onClick:
|
|
1602
|
+
onClick: q
|
|
1593
1603
|
}, {
|
|
1594
1604
|
default: a(() => [
|
|
1595
1605
|
n(s(e(l)("page.run")), 1)
|
|
@@ -1599,68 +1609,110 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1599
1609
|
])
|
|
1600
1610
|
]),
|
|
1601
1611
|
_: 1
|
|
1602
|
-
})) :
|
|
1603
|
-
!
|
|
1612
|
+
})) : z("", !0),
|
|
1613
|
+
!C.value && !W.value ? (t(), u(e(ce), { key: 4 }, {
|
|
1604
1614
|
default: a(() => [
|
|
1605
|
-
g(e(
|
|
1615
|
+
g(e(Fe), {
|
|
1606
1616
|
icon: "check-circle",
|
|
1607
1617
|
title: e(l)("page.never"),
|
|
1608
1618
|
description: e(l)("page.never-help")
|
|
1609
1619
|
}, null, 8, ["title", "description"])
|
|
1610
1620
|
]),
|
|
1611
1621
|
_: 1
|
|
1612
|
-
})) :
|
|
1613
|
-
|
|
1614
|
-
g(e(
|
|
1622
|
+
})) : z("", !0),
|
|
1623
|
+
C.value && O.value ? (t(), b(L, { key: 5 }, [
|
|
1624
|
+
g(e(ce), null, {
|
|
1615
1625
|
default: a(() => [
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
(t(), b(
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1626
|
+
I("div", Kt, [
|
|
1627
|
+
I("div", Qt, [
|
|
1628
|
+
g(e(Re), {
|
|
1629
|
+
type: "circle",
|
|
1630
|
+
value: O.value.health,
|
|
1631
|
+
status: j.value,
|
|
1632
|
+
"show-value": "",
|
|
1633
|
+
formatter: (V) => `${V}%`,
|
|
1634
|
+
"aria-label": e(l)("page.health")
|
|
1635
|
+
}, null, 8, ["value", "status", "formatter", "aria-label"]),
|
|
1636
|
+
m.value ? (t(), b("div", Xt, [
|
|
1637
|
+
m.value.pages > 0 ? (t(), u(e(P), {
|
|
1638
|
+
key: 0,
|
|
1639
|
+
size: "sm"
|
|
1640
|
+
}, {
|
|
1641
|
+
default: a(() => [
|
|
1642
|
+
n(s(e(l)("page.health-pages", { clean: m.value.clean, pages: m.value.pages })), 1)
|
|
1643
|
+
]),
|
|
1644
|
+
_: 1
|
|
1645
|
+
})) : z("", !0),
|
|
1646
|
+
m.value.site_errors > 0 ? (t(), u(e(P), {
|
|
1647
|
+
key: 1,
|
|
1648
|
+
size: "sm",
|
|
1649
|
+
tone: "danger"
|
|
1650
|
+
}, {
|
|
1651
|
+
default: a(() => [
|
|
1652
|
+
n(s(e(l)("page.health-site", { count: m.value.site_errors })), 1)
|
|
1653
|
+
]),
|
|
1654
|
+
_: 1
|
|
1655
|
+
})) : z("", !0),
|
|
1656
|
+
m.value.warnings > 0 ? (t(), u(e(P), {
|
|
1657
|
+
key: 2,
|
|
1658
|
+
size: "sm",
|
|
1659
|
+
tone: "warning"
|
|
1660
|
+
}, {
|
|
1661
|
+
default: a(() => [
|
|
1662
|
+
n(s(e(l)("page.health-warnings", { count: m.value.warnings })), 1)
|
|
1663
|
+
]),
|
|
1664
|
+
_: 1
|
|
1665
|
+
})) : z("", !0),
|
|
1666
|
+
g(e(P), {
|
|
1667
|
+
size: "xs",
|
|
1668
|
+
tone: "muted"
|
|
1669
|
+
}, {
|
|
1670
|
+
default: a(() => [
|
|
1671
|
+
n(s(e(l)("page.health-help")), 1)
|
|
1672
|
+
]),
|
|
1673
|
+
_: 1
|
|
1674
|
+
})
|
|
1675
|
+
])) : z("", !0)
|
|
1676
|
+
]),
|
|
1677
|
+
I("div", Yt, [
|
|
1678
|
+
(t(), b(L, null, M(N, (V) => g(e(Oe), {
|
|
1679
|
+
key: V.key,
|
|
1680
|
+
title: e(l)(V.label),
|
|
1681
|
+
value: O.value.severity[V.key] ?? 0,
|
|
1682
|
+
tone: (O.value.severity[V.key] ?? 0) > 0 ? V.tone : "muted"
|
|
1631
1683
|
}, null, 8, ["title", "value", "tone"])), 64)),
|
|
1632
1684
|
g(e(Oe), {
|
|
1633
1685
|
title: e(l)("page.new"),
|
|
1634
|
-
value:
|
|
1686
|
+
value: O.value.new
|
|
1635
1687
|
}, null, 8, ["title", "value"]),
|
|
1636
1688
|
g(e(Oe), {
|
|
1637
1689
|
title: e(l)("page.fixed"),
|
|
1638
|
-
value:
|
|
1690
|
+
value: O.value.fixed,
|
|
1639
1691
|
tone: "success"
|
|
1640
1692
|
}, null, 8, ["title", "value"])
|
|
1641
1693
|
])
|
|
1642
1694
|
]),
|
|
1643
|
-
|
|
1644
|
-
g(e(
|
|
1695
|
+
I("div", Zt, [
|
|
1696
|
+
g(e(P), {
|
|
1645
1697
|
size: "sm",
|
|
1646
1698
|
tone: "muted"
|
|
1647
1699
|
}, {
|
|
1648
1700
|
default: a(() => [
|
|
1649
1701
|
n(s(e(l)("page.last-run")) + " ", 1),
|
|
1650
1702
|
g(e(ke), {
|
|
1651
|
-
value:
|
|
1703
|
+
value: C.value.finished_at
|
|
1652
1704
|
}, null, 8, ["value"]),
|
|
1653
|
-
n(" · " + s(e(l)(`page.scope-${
|
|
1705
|
+
n(" · " + s(e(l)(`page.scope-${C.value.scope}`)) + " · ", 1)
|
|
1654
1706
|
]),
|
|
1655
1707
|
_: 1
|
|
1656
1708
|
}),
|
|
1657
|
-
g(e(
|
|
1709
|
+
g(e(P), {
|
|
1658
1710
|
size: "sm",
|
|
1659
1711
|
tone: "muted",
|
|
1660
1712
|
class: "wx-audit-overview__url"
|
|
1661
1713
|
}, {
|
|
1662
1714
|
default: a(() => [
|
|
1663
|
-
n(s(
|
|
1715
|
+
n(s(C.value.base_url), 1)
|
|
1664
1716
|
]),
|
|
1665
1717
|
_: 1
|
|
1666
1718
|
})
|
|
@@ -1668,44 +1720,44 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1668
1720
|
]),
|
|
1669
1721
|
_: 1
|
|
1670
1722
|
}),
|
|
1671
|
-
|
|
1723
|
+
J.value.length ? (t(), u(e(ce), {
|
|
1672
1724
|
key: 0,
|
|
1673
1725
|
title: e(l)("page.by-group")
|
|
1674
1726
|
}, {
|
|
1675
1727
|
default: a(() => [
|
|
1676
|
-
|
|
1677
|
-
(t(!0), b(
|
|
1678
|
-
key:
|
|
1728
|
+
I("ul", ea, [
|
|
1729
|
+
(t(!0), b(L, null, M(J.value, (V) => (t(), b("li", {
|
|
1730
|
+
key: V.id
|
|
1679
1731
|
}, [
|
|
1680
|
-
g(e(
|
|
1732
|
+
g(e(P), { size: "sm" }, {
|
|
1681
1733
|
default: a(() => [
|
|
1682
|
-
n(s(
|
|
1734
|
+
n(s(V.label), 1)
|
|
1683
1735
|
]),
|
|
1684
1736
|
_: 2
|
|
1685
1737
|
}, 1024),
|
|
1686
|
-
|
|
1687
|
-
(t(), b(
|
|
1688
|
-
key:
|
|
1738
|
+
I("span", ta, [
|
|
1739
|
+
(t(), b(L, null, M(N, (ue) => (t(), b(L, {
|
|
1740
|
+
key: ue.key
|
|
1689
1741
|
}, [
|
|
1690
|
-
(
|
|
1742
|
+
(V.bySeverity[ue.key] ?? 0) > 0 ? (t(), u(e(B), {
|
|
1691
1743
|
key: 0,
|
|
1692
|
-
type:
|
|
1744
|
+
type: ue.tone,
|
|
1693
1745
|
size: "sm"
|
|
1694
1746
|
}, {
|
|
1695
1747
|
default: a(() => [
|
|
1696
|
-
n(s(e(l)(
|
|
1748
|
+
n(s(e(l)(ue.label)) + " · " + s(V.bySeverity[ue.key]), 1)
|
|
1697
1749
|
]),
|
|
1698
1750
|
_: 2
|
|
1699
|
-
}, 1032, ["type"])) :
|
|
1751
|
+
}, 1032, ["type"])) : z("", !0)
|
|
1700
1752
|
], 64))), 64))
|
|
1701
1753
|
])
|
|
1702
1754
|
]))), 128))
|
|
1703
1755
|
])
|
|
1704
1756
|
]),
|
|
1705
1757
|
_: 1
|
|
1706
|
-
}, 8, ["title"])) : (t(), u(e(
|
|
1758
|
+
}, 8, ["title"])) : (t(), u(e(ce), { key: 1 }, {
|
|
1707
1759
|
default: a(() => [
|
|
1708
|
-
g(e(
|
|
1760
|
+
g(e(Fe), {
|
|
1709
1761
|
icon: "check-circle",
|
|
1710
1762
|
title: e(l)("page.clean"),
|
|
1711
1763
|
size: "sm"
|
|
@@ -1713,23 +1765,23 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1713
1765
|
]),
|
|
1714
1766
|
_: 1
|
|
1715
1767
|
})),
|
|
1716
|
-
g(e(
|
|
1768
|
+
g(e(ce), {
|
|
1717
1769
|
title: e(l)("page.sources")
|
|
1718
1770
|
}, {
|
|
1719
1771
|
default: a(() => [
|
|
1720
|
-
|
|
1721
|
-
(t(!0), b(
|
|
1722
|
-
key:
|
|
1772
|
+
I("div", aa, [
|
|
1773
|
+
(t(!0), b(L, null, M(O.value.sources.searched, (V) => (t(), u(e(B), {
|
|
1774
|
+
key: V,
|
|
1723
1775
|
type: "success"
|
|
1724
1776
|
}, {
|
|
1725
1777
|
default: a(() => [
|
|
1726
|
-
n(s(
|
|
1778
|
+
n(s(V), 1)
|
|
1727
1779
|
]),
|
|
1728
1780
|
_: 2
|
|
1729
1781
|
}, 1024))), 128))
|
|
1730
1782
|
]),
|
|
1731
|
-
|
|
1732
|
-
g(e(
|
|
1783
|
+
O.value.sources.missing.length ? (t(), b("div", sa, [
|
|
1784
|
+
g(e(P), {
|
|
1733
1785
|
size: "sm",
|
|
1734
1786
|
tone: "warning"
|
|
1735
1787
|
}, {
|
|
@@ -1738,21 +1790,21 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1738
1790
|
]),
|
|
1739
1791
|
_: 1
|
|
1740
1792
|
}),
|
|
1741
|
-
(t(!0), b(
|
|
1742
|
-
key:
|
|
1793
|
+
(t(!0), b(L, null, M(O.value.sources.missing, (V) => (t(), u(e(B), {
|
|
1794
|
+
key: V,
|
|
1743
1795
|
type: "warning"
|
|
1744
1796
|
}, {
|
|
1745
1797
|
default: a(() => [
|
|
1746
|
-
n(s(
|
|
1798
|
+
n(s(V), 1)
|
|
1747
1799
|
]),
|
|
1748
1800
|
_: 2
|
|
1749
1801
|
}, 1024))), 128))
|
|
1750
|
-
])) :
|
|
1802
|
+
])) : z("", !0)
|
|
1751
1803
|
]),
|
|
1752
1804
|
_: 1
|
|
1753
1805
|
}, 8, ["title"])
|
|
1754
|
-
], 64)) :
|
|
1755
|
-
], 64)) : (t(), u(e(
|
|
1806
|
+
], 64)) : z("", !0)
|
|
1807
|
+
], 64)) : (t(), u(e(ce), { key: 0 }, {
|
|
1756
1808
|
default: a(() => [
|
|
1757
1809
|
g(e(fe), { rows: 4 })
|
|
1758
1810
|
]),
|
|
@@ -1763,37 +1815,41 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1763
1815
|
_: 1
|
|
1764
1816
|
}, 8, ["base"]));
|
|
1765
1817
|
}
|
|
1766
|
-
}),
|
|
1818
|
+
}), ia = /* @__PURE__ */ ie(na, [["__scopeId", "data-v-1357b2fe"]]);
|
|
1819
|
+
function Ue(_) {
|
|
1820
|
+
return _.checked && _.status !== null && _.status < 400 && _.error === null;
|
|
1821
|
+
}
|
|
1822
|
+
const ua = { class: "wx-audit-card__title" }, oa = { class: "wx-audit-card__url" }, ra = {
|
|
1767
1823
|
key: 0,
|
|
1768
1824
|
class: "wx-audit-card__extra"
|
|
1769
|
-
},
|
|
1825
|
+
}, da = {
|
|
1770
1826
|
key: 2,
|
|
1771
1827
|
class: "wx-audit-card"
|
|
1772
|
-
},
|
|
1828
|
+
}, ca = { class: "wx-audit-card__recheck" }, pa = {
|
|
1773
1829
|
key: 0,
|
|
1774
1830
|
class: "wx-audit-card__facts"
|
|
1775
|
-
},
|
|
1831
|
+
}, ga = { key: 0 }, va = {
|
|
1776
1832
|
key: 1,
|
|
1777
1833
|
class: "wx-audit-card__pairs"
|
|
1778
|
-
},
|
|
1834
|
+
}, ha = {
|
|
1779
1835
|
key: 2,
|
|
1780
1836
|
class: "wx-audit-card__tags"
|
|
1781
|
-
},
|
|
1837
|
+
}, fa = { class: "wx-audit-card__section" }, _a = { class: "wx-audit-card__code" }, ma = { class: "wx-audit-card__code" }, ya = {
|
|
1782
1838
|
key: 1,
|
|
1783
1839
|
class: "wx-audit-card__issues"
|
|
1784
|
-
},
|
|
1840
|
+
}, ba = { class: "wx-audit-card__issue-head" }, ka = {
|
|
1785
1841
|
key: 0,
|
|
1786
1842
|
class: "wx-audit-card__picture"
|
|
1787
|
-
},
|
|
1843
|
+
}, xa = { class: "wx-audit-card__url" }, wa = {
|
|
1788
1844
|
key: 1,
|
|
1789
1845
|
class: "wx-audit-card__url"
|
|
1790
|
-
},
|
|
1846
|
+
}, $a = {
|
|
1791
1847
|
key: 3,
|
|
1792
1848
|
class: "wx-audit-card__issues"
|
|
1793
|
-
},
|
|
1849
|
+
}, za = { class: "wx-audit-card__issue-head" }, Sa = {
|
|
1794
1850
|
key: 1,
|
|
1795
1851
|
class: "wx-audit-card__source"
|
|
1796
|
-
},
|
|
1852
|
+
}, Ca = { class: "wx-audit-card__url" }, Aa = 2e3, Pa = /* @__PURE__ */ se({
|
|
1797
1853
|
__name: "AuditPageCard",
|
|
1798
1854
|
props: {
|
|
1799
1855
|
run: {},
|
|
@@ -1802,59 +1858,59 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1802
1858
|
titles: {}
|
|
1803
1859
|
},
|
|
1804
1860
|
emits: ["close"],
|
|
1805
|
-
setup(
|
|
1806
|
-
const
|
|
1861
|
+
setup(_, { emit: v }) {
|
|
1862
|
+
const p = _, o = v, l = le(), r = re(l), d = we();
|
|
1807
1863
|
ne();
|
|
1808
|
-
const h = l.can("audit.run") || l.can("audit.manage"),
|
|
1809
|
-
let
|
|
1810
|
-
async function
|
|
1811
|
-
if (
|
|
1812
|
-
f.value = !0,
|
|
1864
|
+
const h = l.can("audit.run") || l.can("audit.manage"), k = S(null), f = S(!1);
|
|
1865
|
+
let c;
|
|
1866
|
+
async function W() {
|
|
1867
|
+
if (m.value) {
|
|
1868
|
+
f.value = !0, k.value = null;
|
|
1813
1869
|
try {
|
|
1814
|
-
|
|
1815
|
-
} catch (
|
|
1816
|
-
f.value = !1,
|
|
1870
|
+
C(await r.start("urls", [m.value.page.url]));
|
|
1871
|
+
} catch (w) {
|
|
1872
|
+
f.value = !1, X.danger(N(w));
|
|
1817
1873
|
}
|
|
1818
1874
|
}
|
|
1819
1875
|
}
|
|
1820
|
-
function
|
|
1821
|
-
if (clearTimeout(
|
|
1822
|
-
|
|
1876
|
+
function C(w) {
|
|
1877
|
+
if (clearTimeout(c), w.status === "queued" || w.status === "running") {
|
|
1878
|
+
c = setTimeout(async () => {
|
|
1823
1879
|
try {
|
|
1824
|
-
|
|
1880
|
+
C(await r.run(w.id));
|
|
1825
1881
|
} catch (G) {
|
|
1826
|
-
f.value = !1,
|
|
1882
|
+
f.value = !1, X.danger(N(G));
|
|
1827
1883
|
}
|
|
1828
|
-
},
|
|
1884
|
+
}, Aa);
|
|
1829
1885
|
return;
|
|
1830
1886
|
}
|
|
1831
|
-
f.value = !1,
|
|
1887
|
+
f.value = !1, k.value = w;
|
|
1832
1888
|
}
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1889
|
+
function O() {
|
|
1890
|
+
k.value && p.base && d.push({ path: `${p.base}/runs`, query: { to: String(k.value.id) } });
|
|
1835
1891
|
}
|
|
1836
|
-
|
|
1837
|
-
const i = ee("webx-audit"), N =
|
|
1838
|
-
get: () =>
|
|
1839
|
-
set: (
|
|
1840
|
-
|
|
1892
|
+
Me(() => clearTimeout(c));
|
|
1893
|
+
const i = ee("webx-audit"), N = oe(), m = S(null), j = S(null), x = S("overview"), J = S(null), Y = S(!1), R = S(null), q = S(!1), U = ["images", "css", "js"], A = D({
|
|
1894
|
+
get: () => p.pageId !== null,
|
|
1895
|
+
set: (w) => {
|
|
1896
|
+
w || o("close");
|
|
1841
1897
|
}
|
|
1842
|
-
}),
|
|
1898
|
+
}), F = D(() => [
|
|
1843
1899
|
{ value: "overview", label: i("page.card-overview") },
|
|
1844
|
-
{ value: "issues", label: i("page.card-issues"), badge:
|
|
1845
|
-
{ value: "in", label: i("page.card-incoming"), badge:
|
|
1846
|
-
{ value: "out", label: i("page.card-outgoing"), badge:
|
|
1847
|
-
{ value: "images", label: i("page.card-images"), badge:
|
|
1848
|
-
{ value: "css", label: i("page.card-css"), badge:
|
|
1849
|
-
{ value: "js", label: i("page.card-js"), badge:
|
|
1900
|
+
{ value: "issues", label: i("page.card-issues"), badge: m.value?.counts.issues || void 0 },
|
|
1901
|
+
{ value: "in", label: i("page.card-incoming"), badge: m.value?.counts.incoming || void 0 },
|
|
1902
|
+
{ value: "out", label: i("page.card-outgoing"), badge: m.value?.counts.outgoing || void 0 },
|
|
1903
|
+
{ value: "images", label: i("page.card-images"), badge: m.value?.counts.images || void 0 },
|
|
1904
|
+
{ value: "css", label: i("page.card-css"), badge: m.value?.counts.css || void 0 },
|
|
1905
|
+
{ value: "js", label: i("page.card-js"), badge: m.value?.counts.js || void 0 },
|
|
1850
1906
|
{
|
|
1851
1907
|
value: "microdata",
|
|
1852
1908
|
label: i("page.card-microdata"),
|
|
1853
|
-
badge:
|
|
1909
|
+
badge: m.value?.counts.microdata || void 0
|
|
1854
1910
|
}
|
|
1855
|
-
]),
|
|
1856
|
-
() =>
|
|
1857
|
-
),
|
|
1911
|
+
]), V = D(
|
|
1912
|
+
() => U.includes(x.value) ? x.value : null
|
|
1913
|
+
), ue = {
|
|
1858
1914
|
error: "danger",
|
|
1859
1915
|
warning: "warning",
|
|
1860
1916
|
notice: "info"
|
|
@@ -1863,68 +1919,68 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1863
1919
|
own_mirror: "warning",
|
|
1864
1920
|
dev: "danger",
|
|
1865
1921
|
external: "info"
|
|
1866
|
-
}, $e =
|
|
1922
|
+
}, $e = D(() => [
|
|
1867
1923
|
{ key: "url", label: i("page.address"), minWidth: 220 },
|
|
1868
1924
|
{ key: "status", label: i("page.field-status"), width: 80 },
|
|
1869
1925
|
{ key: "kind", label: i("page.kind"), width: 90 },
|
|
1870
1926
|
{ key: "anchor", label: i("page.anchor"), minWidth: 140 },
|
|
1871
1927
|
{ key: "host_class", label: i("page.host"), width: 120 }
|
|
1872
|
-
]),
|
|
1928
|
+
]), ge = D(() => [
|
|
1873
1929
|
{ key: "url", label: i("page.address"), minWidth: 220 },
|
|
1874
1930
|
{ key: "status", label: i("page.field-status"), width: 80 },
|
|
1875
1931
|
{ key: "bytes", label: i("page.size"), width: 110 },
|
|
1876
|
-
...
|
|
1932
|
+
...V.value === "images" ? [{ key: "alt", label: i("page.alt"), minWidth: 120 }] : [
|
|
1877
1933
|
{ key: "cache_control", label: i("page.cache"), minWidth: 120 },
|
|
1878
1934
|
{ key: "compression", label: i("page.field-compression"), width: 100 }
|
|
1879
1935
|
]
|
|
1880
1936
|
]);
|
|
1881
|
-
function Ce(
|
|
1937
|
+
function Ce(w) {
|
|
1882
1938
|
try {
|
|
1883
|
-
return JSON.stringify(JSON.parse(
|
|
1939
|
+
return JSON.stringify(JSON.parse(w), null, 2);
|
|
1884
1940
|
} catch {
|
|
1885
|
-
return
|
|
1941
|
+
return w;
|
|
1886
1942
|
}
|
|
1887
1943
|
}
|
|
1888
|
-
function Ae(
|
|
1889
|
-
if (
|
|
1890
|
-
const G =
|
|
1891
|
-
return
|
|
1944
|
+
function Ae(w) {
|
|
1945
|
+
if (w.bytes === null) return "";
|
|
1946
|
+
const G = w.bytes / 1024, y = G >= 1024 ? `${(G / 1024).toFixed(1)} MB` : `${Math.round(G)} KB`;
|
|
1947
|
+
return w.width && w.height ? `${y} · ${w.width}×${w.height}` : y;
|
|
1892
1948
|
}
|
|
1893
|
-
const Pe =
|
|
1894
|
-
const
|
|
1895
|
-
return
|
|
1896
|
-
[i("page.field-status"),
|
|
1897
|
-
[i("page.field-final_status"),
|
|
1898
|
-
[i("page.field-redirect_to"),
|
|
1899
|
-
[i("page.error"),
|
|
1900
|
-
[i("page.field-content_type"),
|
|
1901
|
-
[i("page.field-bytes"),
|
|
1902
|
-
[i("page.field-ttfb_ms"),
|
|
1903
|
-
[i("page.field-total_ms"),
|
|
1904
|
-
[i("page.field-compression"),
|
|
1905
|
-
[i("page.field-source"), i(`page.source-${
|
|
1906
|
-
[i("page.field-depth"),
|
|
1907
|
-
[i("page.field-indexable"),
|
|
1908
|
-
[i("page.field-blocked_by_robots"),
|
|
1909
|
-
[i("page.field-title"),
|
|
1910
|
-
[i("page.field-description"),
|
|
1911
|
-
[i("page.field-h1"),
|
|
1912
|
-
[i("page.field-canonical"),
|
|
1913
|
-
[i("page.field-robots_meta"),
|
|
1914
|
-
[i("page.field-x_robots_tag"),
|
|
1915
|
-
[i("page.field-lang"),
|
|
1949
|
+
const Pe = D(() => {
|
|
1950
|
+
const w = m.value?.page;
|
|
1951
|
+
return w ? [
|
|
1952
|
+
[i("page.field-status"), w.status ?? i("page.status-none")],
|
|
1953
|
+
[i("page.field-final_status"), w.redirect_to ? w.final_status : null],
|
|
1954
|
+
[i("page.field-redirect_to"), w.redirect_to],
|
|
1955
|
+
[i("page.error"), w.error],
|
|
1956
|
+
[i("page.field-content_type"), w.content_type],
|
|
1957
|
+
[i("page.field-bytes"), w.bytes],
|
|
1958
|
+
[i("page.field-ttfb_ms"), w.ttfb_ms],
|
|
1959
|
+
[i("page.field-total_ms"), w.total_ms],
|
|
1960
|
+
[i("page.field-compression"), w.compression],
|
|
1961
|
+
[i("page.field-source"), i(`page.source-${w.source}`)],
|
|
1962
|
+
[i("page.field-depth"), w.depth],
|
|
1963
|
+
[i("page.field-indexable"), w.indexable ? i("page.yes") : i("page.no")],
|
|
1964
|
+
[i("page.field-blocked_by_robots"), w.blocked_by_robots ? i("page.yes") : null],
|
|
1965
|
+
[i("page.field-title"), w.title],
|
|
1966
|
+
[i("page.field-description"), w.description],
|
|
1967
|
+
[i("page.field-h1"), w.h1.join(" · ") || null],
|
|
1968
|
+
[i("page.field-canonical"), w.canonical],
|
|
1969
|
+
[i("page.field-robots_meta"), w.robots_meta],
|
|
1970
|
+
[i("page.field-x_robots_tag"), w.x_robots_tag],
|
|
1971
|
+
[i("page.field-lang"), w.lang],
|
|
1916
1972
|
[
|
|
1917
1973
|
"hreflang",
|
|
1918
|
-
|
|
1974
|
+
w.hreflang.length ? { pairs: w.hreflang.map((y) => [y.lang, y.url]) } : null
|
|
1919
1975
|
],
|
|
1920
1976
|
[
|
|
1921
1977
|
"Open Graph",
|
|
1922
|
-
Object.keys(
|
|
1978
|
+
Object.keys(w.og).length ? { pairs: Object.entries(w.og).map(([y, H]) => [`og:${y}`, String(H)]) } : null
|
|
1923
1979
|
],
|
|
1924
1980
|
[
|
|
1925
1981
|
"Twitter",
|
|
1926
|
-
Object.keys(
|
|
1927
|
-
pairs: Object.entries(
|
|
1982
|
+
Object.keys(w.twitter).length ? {
|
|
1983
|
+
pairs: Object.entries(w.twitter).map(([y, H]) => [
|
|
1928
1984
|
`twitter:${y}`,
|
|
1929
1985
|
String(H)
|
|
1930
1986
|
])
|
|
@@ -1932,113 +1988,113 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
1932
1988
|
],
|
|
1933
1989
|
[
|
|
1934
1990
|
"JSON-LD",
|
|
1935
|
-
|
|
1936
|
-
tags:
|
|
1937
|
-
error:
|
|
1991
|
+
w.json_ld.length ? {
|
|
1992
|
+
tags: w.json_ld.flatMap((y) => y.types),
|
|
1993
|
+
error: w.json_ld.find((y) => y.error)?.error ?? null
|
|
1938
1994
|
} : null
|
|
1939
1995
|
],
|
|
1940
|
-
[i("page.field-word_count"),
|
|
1941
|
-
[i("page.field-links_in"),
|
|
1942
|
-
[i("page.field-links_out_internal"),
|
|
1943
|
-
[i("page.field-links_out_external"),
|
|
1944
|
-
[i("page.field-images"),
|
|
1945
|
-
[i("page.field-images_without_alt"),
|
|
1996
|
+
[i("page.field-word_count"), w.word_count],
|
|
1997
|
+
[i("page.field-links_in"), w.links_in],
|
|
1998
|
+
[i("page.field-links_out_internal"), w.links_out_internal],
|
|
1999
|
+
[i("page.field-links_out_external"), w.links_out_external],
|
|
2000
|
+
[i("page.field-images"), w.images],
|
|
2001
|
+
[i("page.field-images_without_alt"), w.images_without_alt || null]
|
|
1946
2002
|
].filter(([, y]) => y != null && y !== "").map(([y, H]) => [y, typeof H == "object" ? H : String(H)]) : [];
|
|
1947
2003
|
});
|
|
1948
|
-
function be(
|
|
1949
|
-
return
|
|
2004
|
+
function be(w) {
|
|
2005
|
+
return w === null || w >= 500 ? "danger" : w >= 400 ? "warning" : w >= 300 ? "info" : "success";
|
|
1950
2006
|
}
|
|
1951
|
-
async function ze(
|
|
1952
|
-
clearTimeout(
|
|
2007
|
+
async function ze(w) {
|
|
2008
|
+
clearTimeout(c), f.value = !1, k.value = null, m.value = null, j.value = null, J.value = null, R.value = null, x.value = "overview";
|
|
1953
2009
|
try {
|
|
1954
|
-
|
|
2010
|
+
m.value = await r.page(p.run, w);
|
|
1955
2011
|
} catch (G) {
|
|
1956
2012
|
j.value = N(G);
|
|
1957
2013
|
}
|
|
1958
2014
|
}
|
|
1959
|
-
async function We(
|
|
1960
|
-
if (!(
|
|
1961
|
-
|
|
2015
|
+
async function We(w) {
|
|
2016
|
+
if (!(p.pageId === null || x.value !== "in" && x.value !== "out")) {
|
|
2017
|
+
Y.value = !0;
|
|
1962
2018
|
try {
|
|
1963
|
-
J.value = await r.links(
|
|
1964
|
-
direction:
|
|
1965
|
-
page:
|
|
1966
|
-
per_page:
|
|
2019
|
+
J.value = await r.links(p.run, p.pageId, {
|
|
2020
|
+
direction: x.value,
|
|
2021
|
+
page: w.page,
|
|
2022
|
+
per_page: w.perPage
|
|
1967
2023
|
});
|
|
1968
2024
|
} catch (G) {
|
|
1969
2025
|
j.value = N(G);
|
|
1970
2026
|
} finally {
|
|
1971
|
-
|
|
2027
|
+
Y.value = !1;
|
|
1972
2028
|
}
|
|
1973
2029
|
}
|
|
1974
2030
|
}
|
|
1975
|
-
async function Ie(
|
|
1976
|
-
const G =
|
|
1977
|
-
if (!(
|
|
1978
|
-
|
|
2031
|
+
async function Ie(w) {
|
|
2032
|
+
const G = V.value;
|
|
2033
|
+
if (!(p.pageId === null || G === null)) {
|
|
2034
|
+
q.value = !0;
|
|
1979
2035
|
try {
|
|
1980
|
-
R.value = await r.resources(
|
|
2036
|
+
R.value = await r.resources(p.run, p.pageId, {
|
|
1981
2037
|
tab: G,
|
|
1982
|
-
page:
|
|
1983
|
-
per_page:
|
|
2038
|
+
page: w.page,
|
|
2039
|
+
per_page: w.perPage
|
|
1984
2040
|
});
|
|
1985
2041
|
} catch (y) {
|
|
1986
2042
|
j.value = N(y);
|
|
1987
2043
|
} finally {
|
|
1988
|
-
|
|
2044
|
+
q.value = !1;
|
|
1989
2045
|
}
|
|
1990
2046
|
}
|
|
1991
2047
|
}
|
|
1992
|
-
return
|
|
1993
|
-
() =>
|
|
1994
|
-
(
|
|
1995
|
-
|
|
2048
|
+
return de(
|
|
2049
|
+
() => p.pageId,
|
|
2050
|
+
(w) => {
|
|
2051
|
+
w !== null && ze(w);
|
|
1996
2052
|
},
|
|
1997
2053
|
{ immediate: !0 }
|
|
1998
|
-
),
|
|
2054
|
+
), de(x, () => {
|
|
1999
2055
|
J.value = null, R.value = null;
|
|
2000
|
-
}), (
|
|
2001
|
-
open:
|
|
2002
|
-
"onUpdate:open": G[1] || (G[1] = (y) =>
|
|
2056
|
+
}), (w, G) => (t(), u(e(nt), {
|
|
2057
|
+
open: A.value,
|
|
2058
|
+
"onUpdate:open": G[1] || (G[1] = (y) => A.value = y),
|
|
2003
2059
|
size: "min(1100px, 75vw)",
|
|
2004
2060
|
"min-size": 480,
|
|
2005
2061
|
resizable: "",
|
|
2006
2062
|
persist: "webx-audit.page-card-wide"
|
|
2007
2063
|
}, {
|
|
2008
2064
|
title: a(() => [
|
|
2009
|
-
|
|
2010
|
-
|
|
2065
|
+
I("span", ua, [
|
|
2066
|
+
m.value ? (t(), u(e(B), {
|
|
2011
2067
|
key: 0,
|
|
2012
|
-
type: be(
|
|
2068
|
+
type: be(m.value.page.status),
|
|
2013
2069
|
size: "sm"
|
|
2014
2070
|
}, {
|
|
2015
2071
|
default: a(() => [
|
|
2016
|
-
n(s(
|
|
2072
|
+
n(s(m.value.page.status ?? "—"), 1)
|
|
2017
2073
|
]),
|
|
2018
2074
|
_: 1
|
|
2019
|
-
}, 8, ["type"])) :
|
|
2020
|
-
|
|
2075
|
+
}, 8, ["type"])) : z("", !0),
|
|
2076
|
+
I("span", oa, s(m.value?.page.url ?? ""), 1)
|
|
2021
2077
|
])
|
|
2022
2078
|
]),
|
|
2023
2079
|
extra: a(() => [
|
|
2024
|
-
|
|
2080
|
+
m.value ? (t(), b("span", ra, [
|
|
2025
2081
|
e(h) ? (t(), u(e(Q), {
|
|
2026
2082
|
key: 0,
|
|
2027
2083
|
size: "sm",
|
|
2028
2084
|
icon: "refresh",
|
|
2029
2085
|
loading: f.value,
|
|
2030
|
-
onClick:
|
|
2086
|
+
onClick: W
|
|
2031
2087
|
}, {
|
|
2032
2088
|
default: a(() => [
|
|
2033
2089
|
n(s(e(i)("page.recheck")), 1)
|
|
2034
2090
|
]),
|
|
2035
2091
|
_: 1
|
|
2036
|
-
}, 8, ["loading"])) :
|
|
2092
|
+
}, 8, ["loading"])) : z("", !0),
|
|
2037
2093
|
g(e(Q), {
|
|
2038
2094
|
size: "sm",
|
|
2039
2095
|
variant: "text",
|
|
2040
2096
|
icon: "download",
|
|
2041
|
-
href: e(r).pageFile(
|
|
2097
|
+
href: e(r).pageFile(p.run, m.value.page.id)
|
|
2042
2098
|
}, {
|
|
2043
2099
|
default: a(() => [
|
|
2044
2100
|
n(s(e(i)("page.export-page")), 1)
|
|
@@ -2046,7 +2102,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2046
2102
|
_: 1
|
|
2047
2103
|
}, 8, ["href"]),
|
|
2048
2104
|
g(e(xe), {
|
|
2049
|
-
href:
|
|
2105
|
+
href: m.value.page.url,
|
|
2050
2106
|
target: "_blank"
|
|
2051
2107
|
}, {
|
|
2052
2108
|
default: a(() => [
|
|
@@ -2054,10 +2110,10 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2054
2110
|
]),
|
|
2055
2111
|
_: 1
|
|
2056
2112
|
}, 8, ["href"])
|
|
2057
|
-
])) :
|
|
2113
|
+
])) : z("", !0)
|
|
2058
2114
|
]),
|
|
2059
2115
|
default: a(() => [
|
|
2060
|
-
j.value ? (t(), u(e(
|
|
2116
|
+
j.value ? (t(), u(e(P), {
|
|
2061
2117
|
key: 0,
|
|
2062
2118
|
tone: "danger"
|
|
2063
2119
|
}, {
|
|
@@ -2065,58 +2121,58 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2065
2121
|
n(s(j.value), 1)
|
|
2066
2122
|
]),
|
|
2067
2123
|
_: 1
|
|
2068
|
-
})) :
|
|
2069
|
-
f.value ? (t(), u(e(
|
|
2124
|
+
})) : m.value ? (t(), b("div", da, [
|
|
2125
|
+
f.value ? (t(), u(e(_e), {
|
|
2070
2126
|
key: 0,
|
|
2071
2127
|
type: "info",
|
|
2072
2128
|
description: e(i)("page.recheck-running")
|
|
2073
|
-
}, null, 8, ["description"])) :
|
|
2129
|
+
}, null, 8, ["description"])) : k.value && k.value.status === "done" && k.value.counts ? (t(), u(e(_e), {
|
|
2074
2130
|
key: 1,
|
|
2075
|
-
type:
|
|
2131
|
+
type: k.value.counts.new > 0 ? "warning" : "success"
|
|
2076
2132
|
}, {
|
|
2077
2133
|
default: a(() => [
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2134
|
+
I("div", ca, [
|
|
2135
|
+
I("span", null, s(e(i)("page.recheck-fixed", { count: k.value.counts.fixed })), 1),
|
|
2136
|
+
I("span", null, s(e(i)("page.recheck-new", { count: k.value.counts.new })), 1),
|
|
2137
|
+
p.base ? (t(), u(e(Q), {
|
|
2082
2138
|
key: 0,
|
|
2083
2139
|
size: "sm",
|
|
2084
2140
|
variant: "text",
|
|
2085
|
-
onClick:
|
|
2141
|
+
onClick: O
|
|
2086
2142
|
}, {
|
|
2087
2143
|
default: a(() => [
|
|
2088
2144
|
n(s(e(i)("page.recheck-compare")), 1)
|
|
2089
2145
|
]),
|
|
2090
2146
|
_: 1
|
|
2091
|
-
})) :
|
|
2147
|
+
})) : z("", !0)
|
|
2092
2148
|
])
|
|
2093
2149
|
]),
|
|
2094
2150
|
_: 1
|
|
2095
|
-
}, 8, ["type"])) :
|
|
2151
|
+
}, 8, ["type"])) : k.value ? (t(), u(e(_e), {
|
|
2096
2152
|
key: 2,
|
|
2097
2153
|
type: "danger",
|
|
2098
|
-
description:
|
|
2099
|
-
}, null, 8, ["description"])) :
|
|
2100
|
-
|
|
2154
|
+
description: k.value.error ?? e(i)(`page.status-${k.value.status}`)
|
|
2155
|
+
}, null, 8, ["description"])) : z("", !0),
|
|
2156
|
+
m.value.page.title ? (t(), u(e(P), {
|
|
2101
2157
|
key: 3,
|
|
2102
2158
|
weight: "semibold"
|
|
2103
2159
|
}, {
|
|
2104
2160
|
default: a(() => [
|
|
2105
|
-
n(s(
|
|
2161
|
+
n(s(m.value.page.title), 1)
|
|
2106
2162
|
]),
|
|
2107
2163
|
_: 1
|
|
2108
|
-
})) :
|
|
2109
|
-
g(e(
|
|
2110
|
-
modelValue:
|
|
2111
|
-
"onUpdate:modelValue": G[0] || (G[0] = (y) =>
|
|
2112
|
-
items:
|
|
2164
|
+
})) : z("", !0),
|
|
2165
|
+
g(e(it), {
|
|
2166
|
+
modelValue: x.value,
|
|
2167
|
+
"onUpdate:modelValue": G[0] || (G[0] = (y) => x.value = y),
|
|
2168
|
+
items: F.value
|
|
2113
2169
|
}, {
|
|
2114
2170
|
default: a(() => [
|
|
2115
|
-
|
|
2116
|
-
(t(!0), b(
|
|
2117
|
-
|
|
2118
|
-
typeof H == "string" ? (t(), b("dd",
|
|
2119
|
-
(t(!0), b(
|
|
2171
|
+
x.value === "overview" ? (t(), b("dl", pa, [
|
|
2172
|
+
(t(!0), b(L, null, M(Pe.value, ([y, H]) => (t(), b(L, { key: y }, [
|
|
2173
|
+
I("dt", null, s(y), 1),
|
|
2174
|
+
typeof H == "string" ? (t(), b("dd", ga, s(H), 1)) : "pairs" in H ? (t(), b("dd", va, [
|
|
2175
|
+
(t(!0), b(L, null, M(H.pairs, ([Z, $], E) => (t(), b(L, { key: E }, [
|
|
2120
2176
|
g(e(B), {
|
|
2121
2177
|
size: "sm",
|
|
2122
2178
|
class: "wx-audit-card__key"
|
|
@@ -2126,10 +2182,10 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2126
2182
|
]),
|
|
2127
2183
|
_: 2
|
|
2128
2184
|
}, 1024),
|
|
2129
|
-
|
|
2185
|
+
I("span", null, s($), 1)
|
|
2130
2186
|
], 64))), 128))
|
|
2131
|
-
])) : (t(), b("dd",
|
|
2132
|
-
(t(!0), b(
|
|
2187
|
+
])) : (t(), b("dd", ha, [
|
|
2188
|
+
(t(!0), b(L, null, M(H.tags, (Z, $) => (t(), u(e(B), {
|
|
2133
2189
|
key: $,
|
|
2134
2190
|
type: "info",
|
|
2135
2191
|
size: "sm"
|
|
@@ -2139,7 +2195,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2139
2195
|
]),
|
|
2140
2196
|
_: 2
|
|
2141
2197
|
}, 1024))), 128)),
|
|
2142
|
-
H.error ? (t(), u(e(
|
|
2198
|
+
H.error ? (t(), u(e(P), {
|
|
2143
2199
|
key: 0,
|
|
2144
2200
|
size: "sm",
|
|
2145
2201
|
tone: "danger"
|
|
@@ -2148,19 +2204,19 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2148
2204
|
n(s(H.error), 1)
|
|
2149
2205
|
]),
|
|
2150
2206
|
_: 2
|
|
2151
|
-
}, 1024)) :
|
|
2207
|
+
}, 1024)) : z("", !0)
|
|
2152
2208
|
]))
|
|
2153
2209
|
], 64))), 128)),
|
|
2154
|
-
Object.keys(
|
|
2155
|
-
|
|
2156
|
-
G[2] || (G[2] =
|
|
2157
|
-
(t(!0), b(
|
|
2158
|
-
|
|
2159
|
-
|
|
2210
|
+
Object.keys(m.value.page.headers).length ? (t(), b(L, { key: 0 }, [
|
|
2211
|
+
I("dt", fa, s(e(i)("page.headers")), 1),
|
|
2212
|
+
G[2] || (G[2] = I("dd", null, null, -1)),
|
|
2213
|
+
(t(!0), b(L, null, M(m.value.page.headers, (y, H) => (t(), b(L, { key: H }, [
|
|
2214
|
+
I("dt", _a, s(H), 1),
|
|
2215
|
+
I("dd", ma, s(y), 1)
|
|
2160
2216
|
], 64))), 128))
|
|
2161
|
-
], 64)) :
|
|
2162
|
-
])) :
|
|
2163
|
-
|
|
2217
|
+
], 64)) : z("", !0)
|
|
2218
|
+
])) : x.value === "issues" ? (t(), b("div", ya, [
|
|
2219
|
+
m.value.issues.length ? z("", !0) : (t(), u(e(P), {
|
|
2164
2220
|
key: 0,
|
|
2165
2221
|
tone: "muted"
|
|
2166
2222
|
}, {
|
|
@@ -2169,13 +2225,13 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2169
2225
|
]),
|
|
2170
2226
|
_: 1
|
|
2171
2227
|
})),
|
|
2172
|
-
(t(!0), b(
|
|
2228
|
+
(t(!0), b(L, null, M(m.value.issues, (y) => (t(), b("div", {
|
|
2173
2229
|
key: y.id,
|
|
2174
2230
|
class: "wx-audit-card__issue"
|
|
2175
2231
|
}, [
|
|
2176
|
-
|
|
2232
|
+
I("div", ba, [
|
|
2177
2233
|
g(e(B), {
|
|
2178
|
-
type:
|
|
2234
|
+
type: ue[y.severity],
|
|
2179
2235
|
dot: ""
|
|
2180
2236
|
}, {
|
|
2181
2237
|
default: a(() => [
|
|
@@ -2183,12 +2239,12 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2183
2239
|
]),
|
|
2184
2240
|
_: 2
|
|
2185
2241
|
}, 1032, ["type"]),
|
|
2186
|
-
g(e(
|
|
2242
|
+
g(e(P), {
|
|
2187
2243
|
size: "sm",
|
|
2188
2244
|
weight: "semibold"
|
|
2189
2245
|
}, {
|
|
2190
2246
|
default: a(() => [
|
|
2191
|
-
n(s(
|
|
2247
|
+
n(s(p.titles[y.check] ?? y.check), 1)
|
|
2192
2248
|
]),
|
|
2193
2249
|
_: 2
|
|
2194
2250
|
}, 1024),
|
|
@@ -2201,27 +2257,27 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2201
2257
|
n(s(e(i)("page.state-new")), 1)
|
|
2202
2258
|
]),
|
|
2203
2259
|
_: 1
|
|
2204
|
-
})) :
|
|
2260
|
+
})) : z("", !0)
|
|
2205
2261
|
]),
|
|
2206
|
-
g(
|
|
2262
|
+
g(je, {
|
|
2207
2263
|
details: y.details
|
|
2208
2264
|
}, null, 8, ["details"])
|
|
2209
2265
|
]))), 128))
|
|
2210
|
-
])) :
|
|
2211
|
-
key: `resources-${String(
|
|
2266
|
+
])) : V.value ? (t(), u(e(he), {
|
|
2267
|
+
key: `resources-${String(x.value)}`,
|
|
2212
2268
|
data: R.value,
|
|
2213
|
-
columns:
|
|
2269
|
+
columns: ge.value,
|
|
2214
2270
|
"row-key": "id",
|
|
2215
2271
|
flush: "",
|
|
2216
|
-
loading:
|
|
2272
|
+
loading: q.value,
|
|
2217
2273
|
"per-page-options": [],
|
|
2218
2274
|
"empty-text": e(i)("page.no-resources"),
|
|
2219
2275
|
onStateChange: Ie
|
|
2220
2276
|
}, {
|
|
2221
2277
|
"cell-url": a(({ row: y }) => [
|
|
2222
|
-
|
|
2223
|
-
g(e(
|
|
2224
|
-
src: y.url,
|
|
2278
|
+
V.value === "images" ? (t(), b("span", ka, [
|
|
2279
|
+
g(e(ut), {
|
|
2280
|
+
src: e(Ue)(y) ? y.url : void 0,
|
|
2225
2281
|
alt: y.alt ?? "",
|
|
2226
2282
|
width: 48,
|
|
2227
2283
|
height: 48,
|
|
@@ -2229,11 +2285,19 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2229
2285
|
radius: "var(--wx-radius-sm)",
|
|
2230
2286
|
preview: "",
|
|
2231
2287
|
"preview-label": e(i)("page.view-full"),
|
|
2232
|
-
class: "wx-audit-card__thumb"
|
|
2233
|
-
},
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2288
|
+
class: Ne(["wx-audit-card__thumb", { "is-unviewable": !e(Ue)(y) }])
|
|
2289
|
+
}, Je({ _: 2 }, [
|
|
2290
|
+
e(Ue)(y) ? void 0 : {
|
|
2291
|
+
name: "placeholder",
|
|
2292
|
+
fn: a(() => [
|
|
2293
|
+
g(e(ot), { name: "image" })
|
|
2294
|
+
]),
|
|
2295
|
+
key: "0"
|
|
2296
|
+
}
|
|
2297
|
+
]), 1032, ["src", "alt", "preview-label", "class"]),
|
|
2298
|
+
I("span", xa, s(y.url), 1)
|
|
2299
|
+
])) : (t(), b("span", wa, s(y.url), 1)),
|
|
2300
|
+
y.location ? (t(), u(e(P), {
|
|
2237
2301
|
key: 2,
|
|
2238
2302
|
size: "sm",
|
|
2239
2303
|
tone: "muted",
|
|
@@ -2243,8 +2307,8 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2243
2307
|
n(" → " + s(y.location), 1)
|
|
2244
2308
|
]),
|
|
2245
2309
|
_: 2
|
|
2246
|
-
}, 1024)) :
|
|
2247
|
-
y.error ? (t(), u(e(
|
|
2310
|
+
}, 1024)) : z("", !0),
|
|
2311
|
+
y.error ? (t(), u(e(P), {
|
|
2248
2312
|
key: 3,
|
|
2249
2313
|
size: "sm",
|
|
2250
2314
|
tone: "danger"
|
|
@@ -2253,7 +2317,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2253
2317
|
n(s(y.error), 1)
|
|
2254
2318
|
]),
|
|
2255
2319
|
_: 2
|
|
2256
|
-
}, 1024)) :
|
|
2320
|
+
}, 1024)) : z("", !0)
|
|
2257
2321
|
]),
|
|
2258
2322
|
"cell-status": a(({ row: y }) => [
|
|
2259
2323
|
y.status !== null ? (t(), u(e(B), {
|
|
@@ -2274,7 +2338,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2274
2338
|
n("—", -1)
|
|
2275
2339
|
])]),
|
|
2276
2340
|
_: 1
|
|
2277
|
-
})) : (t(), u(e(
|
|
2341
|
+
})) : (t(), u(e(P), {
|
|
2278
2342
|
key: 2,
|
|
2279
2343
|
size: "sm",
|
|
2280
2344
|
tone: "muted"
|
|
@@ -2289,7 +2353,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2289
2353
|
n(s(Ae(y)), 1)
|
|
2290
2354
|
]),
|
|
2291
2355
|
"cell-alt": a(({ row: y }) => [
|
|
2292
|
-
y.alt === null && y.kind === "img" ? (t(), u(e(
|
|
2356
|
+
y.alt === null && y.kind === "img" ? (t(), u(e(P), {
|
|
2293
2357
|
key: 0,
|
|
2294
2358
|
size: "sm",
|
|
2295
2359
|
tone: "danger"
|
|
@@ -2298,13 +2362,13 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2298
2362
|
n(s(e(i)("page.missing")), 1)
|
|
2299
2363
|
]),
|
|
2300
2364
|
_: 1
|
|
2301
|
-
})) : (t(), b(
|
|
2365
|
+
})) : (t(), b(L, { key: 1 }, [
|
|
2302
2366
|
n(s(y.alt ?? ""), 1)
|
|
2303
2367
|
], 64))
|
|
2304
2368
|
]),
|
|
2305
2369
|
_: 1
|
|
2306
|
-
}, 8, ["data", "columns", "loading", "empty-text"])) :
|
|
2307
|
-
|
|
2370
|
+
}, 8, ["data", "columns", "loading", "empty-text"])) : x.value === "microdata" ? (t(), b("div", $a, [
|
|
2371
|
+
m.value.page.json_ld.length ? z("", !0) : (t(), u(e(P), {
|
|
2308
2372
|
key: 0,
|
|
2309
2373
|
tone: "muted"
|
|
2310
2374
|
}, {
|
|
@@ -2313,12 +2377,12 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2313
2377
|
]),
|
|
2314
2378
|
_: 1
|
|
2315
2379
|
})),
|
|
2316
|
-
(t(!0), b(
|
|
2380
|
+
(t(!0), b(L, null, M(m.value.page.json_ld, (y, H) => (t(), b("div", {
|
|
2317
2381
|
key: H,
|
|
2318
2382
|
class: "wx-audit-card__issue"
|
|
2319
2383
|
}, [
|
|
2320
|
-
|
|
2321
|
-
g(e(
|
|
2384
|
+
I("div", za, [
|
|
2385
|
+
g(e(P), {
|
|
2322
2386
|
size: "sm",
|
|
2323
2387
|
weight: "semibold"
|
|
2324
2388
|
}, {
|
|
@@ -2327,7 +2391,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2327
2391
|
]),
|
|
2328
2392
|
_: 2
|
|
2329
2393
|
}, 1024),
|
|
2330
|
-
(t(!0), b(
|
|
2394
|
+
(t(!0), b(L, null, M(y.types, (Z) => (t(), u(e(B), {
|
|
2331
2395
|
key: Z,
|
|
2332
2396
|
size: "sm"
|
|
2333
2397
|
}, {
|
|
@@ -2337,7 +2401,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2337
2401
|
_: 2
|
|
2338
2402
|
}, 1024))), 128))
|
|
2339
2403
|
]),
|
|
2340
|
-
y.error ? (t(), u(e(
|
|
2404
|
+
y.error ? (t(), u(e(P), {
|
|
2341
2405
|
key: 0,
|
|
2342
2406
|
size: "sm",
|
|
2343
2407
|
tone: "danger"
|
|
@@ -2346,9 +2410,9 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2346
2410
|
n(s(e(i)("page.jsonld-error")) + " " + s(y.error), 1)
|
|
2347
2411
|
]),
|
|
2348
2412
|
_: 2
|
|
2349
|
-
}, 1024)) :
|
|
2350
|
-
(t(!0), b(
|
|
2351
|
-
Z.missing.length ? (t(), u(e(
|
|
2413
|
+
}, 1024)) : z("", !0),
|
|
2414
|
+
(t(!0), b(L, null, M(y.items ?? [], (Z, $) => (t(), b(L, { key: $ }, [
|
|
2415
|
+
Z.missing.length ? (t(), u(e(P), {
|
|
2352
2416
|
key: 0,
|
|
2353
2417
|
size: "sm",
|
|
2354
2418
|
tone: "danger"
|
|
@@ -2357,8 +2421,8 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2357
2421
|
n(s(Z.type) + " — " + s(e(i)("page.jsonld-required")) + " " + s(Z.missing.join(", ")), 1)
|
|
2358
2422
|
]),
|
|
2359
2423
|
_: 2
|
|
2360
|
-
}, 1024)) :
|
|
2361
|
-
Z.recommended.length ? (t(), u(e(
|
|
2424
|
+
}, 1024)) : z("", !0),
|
|
2425
|
+
Z.recommended.length ? (t(), u(e(P), {
|
|
2362
2426
|
key: 1,
|
|
2363
2427
|
size: "sm",
|
|
2364
2428
|
tone: "muted"
|
|
@@ -2367,8 +2431,8 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2367
2431
|
n(s(Z.type) + " — " + s(e(i)("page.jsonld-recommended")) + " " + s(Z.recommended.join(", ")), 1)
|
|
2368
2432
|
]),
|
|
2369
2433
|
_: 2
|
|
2370
|
-
}, 1024)) :
|
|
2371
|
-
!Z.missing.length && !Z.recommended.length ? (t(), u(e(
|
|
2434
|
+
}, 1024)) : z("", !0),
|
|
2435
|
+
!Z.missing.length && !Z.recommended.length ? (t(), u(e(P), {
|
|
2372
2436
|
key: 2,
|
|
2373
2437
|
size: "sm",
|
|
2374
2438
|
tone: "success"
|
|
@@ -2377,23 +2441,23 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2377
2441
|
n(s(Z.type) + " — " + s(e(i)("page.jsonld-complete")), 1)
|
|
2378
2442
|
]),
|
|
2379
2443
|
_: 2
|
|
2380
|
-
}, 1024)) :
|
|
2444
|
+
}, 1024)) : z("", !0)
|
|
2381
2445
|
], 64))), 128)),
|
|
2382
|
-
y.source ? (t(), b("pre",
|
|
2446
|
+
y.source ? (t(), b("pre", Sa, s(Ce(y.source)), 1)) : z("", !0)
|
|
2383
2447
|
]))), 128))
|
|
2384
|
-
])) : (t(), u(e(
|
|
2385
|
-
key: String(
|
|
2448
|
+
])) : (t(), u(e(he), {
|
|
2449
|
+
key: String(x.value),
|
|
2386
2450
|
data: J.value,
|
|
2387
2451
|
columns: $e.value,
|
|
2388
2452
|
"row-key": "id",
|
|
2389
2453
|
flush: "",
|
|
2390
|
-
loading:
|
|
2454
|
+
loading: Y.value,
|
|
2391
2455
|
"per-page-options": [],
|
|
2392
2456
|
"empty-text": e(i)("page.no-links"),
|
|
2393
2457
|
onStateChange: We
|
|
2394
2458
|
}, {
|
|
2395
2459
|
"cell-url": a(({ row: y }) => [
|
|
2396
|
-
|
|
2460
|
+
I("span", Ca, s(y.url ?? "—"), 1)
|
|
2397
2461
|
]),
|
|
2398
2462
|
"cell-status": a(({ row: y }) => [
|
|
2399
2463
|
y.status !== null ? (t(), u(e(B), {
|
|
@@ -2405,7 +2469,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2405
2469
|
n(s(y.status), 1)
|
|
2406
2470
|
]),
|
|
2407
2471
|
_: 2
|
|
2408
|
-
}, 1032, ["type"])) :
|
|
2472
|
+
}, 1032, ["type"])) : z("", !0)
|
|
2409
2473
|
]),
|
|
2410
2474
|
"cell-host_class": a(({ row: y }) => [
|
|
2411
2475
|
y.host_class ? (t(), u(e(B), {
|
|
@@ -2417,7 +2481,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2417
2481
|
n(s(e(i)(`page.host-${y.host_class}`)), 1)
|
|
2418
2482
|
]),
|
|
2419
2483
|
_: 2
|
|
2420
|
-
}, 1032, ["type"])) :
|
|
2484
|
+
}, 1032, ["type"])) : z("", !0)
|
|
2421
2485
|
]),
|
|
2422
2486
|
_: 1
|
|
2423
2487
|
}, 8, ["data", "columns", "loading", "empty-text"]))
|
|
@@ -2432,7 +2496,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2432
2496
|
_: 1
|
|
2433
2497
|
}, 8, ["open"]));
|
|
2434
2498
|
}
|
|
2435
|
-
}),
|
|
2499
|
+
}), Wa = /* @__PURE__ */ ie(Pa, [["__scopeId", "data-v-4cc2906c"]]), ae = {
|
|
2436
2500
|
url: "url",
|
|
2437
2501
|
status: "status",
|
|
2438
2502
|
final_status: "status",
|
|
@@ -2462,7 +2526,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2462
2526
|
in_sitemap: "bool",
|
|
2463
2527
|
in_registry: "bool",
|
|
2464
2528
|
blocked_by_robots: "bool"
|
|
2465
|
-
},
|
|
2529
|
+
}, Ia = [
|
|
2466
2530
|
"url",
|
|
2467
2531
|
"status",
|
|
2468
2532
|
"indexable",
|
|
@@ -2470,121 +2534,121 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2470
2534
|
"word_count",
|
|
2471
2535
|
"links_in",
|
|
2472
2536
|
"issues"
|
|
2473
|
-
],
|
|
2537
|
+
], qe = ["h1"], Ee = {
|
|
2474
2538
|
url: ["contains", "eq", "empty", "filled"],
|
|
2475
2539
|
text: ["contains", "eq", "empty", "filled"],
|
|
2476
2540
|
number: ["gt", "lt", "eq", "empty"],
|
|
2477
2541
|
status: ["eq", "gt", "lt", "empty"],
|
|
2478
2542
|
bool: ["yes", "no"],
|
|
2479
2543
|
source: ["eq"]
|
|
2480
|
-
},
|
|
2544
|
+
}, Ve = ["contains", "eq", "gt", "lt"], Oa = ["home", "sitemap", "registry", "link"], Ua = { class: "wx-audit-pages__filters" }, Be = "webx-audit.pages.columns", Va = /* @__PURE__ */ se({
|
|
2481
2545
|
__name: "AuditPagesPage",
|
|
2482
2546
|
props: {
|
|
2483
2547
|
base: {}
|
|
2484
2548
|
},
|
|
2485
|
-
setup(
|
|
2486
|
-
const v =
|
|
2549
|
+
setup(_) {
|
|
2550
|
+
const v = _, p = re(le());
|
|
2487
2551
|
ne();
|
|
2488
|
-
const o = ee("webx-audit"), l = ee("webx-admin"), r =
|
|
2552
|
+
const o = ee("webx-audit"), l = ee("webx-admin"), r = oe(), d = at(), h = S(null), k = S(!1), f = S(null), c = S(!1), W = S(null), C = S({}), O = S(null), i = S(null), N = S(null), m = S([]);
|
|
2489
2553
|
let j = { page: 1, perPage: 50, sort: null, search: "" };
|
|
2490
|
-
const
|
|
2554
|
+
const x = S(J());
|
|
2491
2555
|
function J() {
|
|
2492
2556
|
try {
|
|
2493
|
-
const $ = JSON.parse(window.localStorage.getItem(
|
|
2557
|
+
const $ = JSON.parse(window.localStorage.getItem(Be) ?? "null");
|
|
2494
2558
|
if (Array.isArray($)) {
|
|
2495
2559
|
const E = $.filter((T) => T in ae);
|
|
2496
2560
|
if (E.length) return E;
|
|
2497
2561
|
}
|
|
2498
2562
|
} catch {
|
|
2499
2563
|
}
|
|
2500
|
-
return [...
|
|
2564
|
+
return [...Ia];
|
|
2501
2565
|
}
|
|
2502
|
-
|
|
2566
|
+
de(x, ($) => {
|
|
2503
2567
|
try {
|
|
2504
|
-
window.localStorage.setItem(
|
|
2568
|
+
window.localStorage.setItem(Be, JSON.stringify($));
|
|
2505
2569
|
} catch {
|
|
2506
2570
|
}
|
|
2507
2571
|
});
|
|
2508
|
-
const
|
|
2509
|
-
() =>
|
|
2510
|
-
),
|
|
2511
|
-
() =>
|
|
2512
|
-
),
|
|
2572
|
+
const Y = Object.keys(ae), R = D(
|
|
2573
|
+
() => Y.map(($) => ({ value: $, label: o(`page.field-${$}`) }))
|
|
2574
|
+
), q = D(
|
|
2575
|
+
() => Y.filter(($) => !qe.includes($)).map(($) => ({ value: $, label: o(`page.field-${$}`) }))
|
|
2576
|
+
), U = D(
|
|
2513
2577
|
() => (
|
|
2514
2578
|
/* The picker keeps the order things were ticked in; the table keeps the card's order. */
|
|
2515
|
-
|
|
2579
|
+
Y.filter(($) => x.value.includes($)).map(($) => ({
|
|
2516
2580
|
key: $,
|
|
2517
2581
|
label: o(`page.field-${$}`),
|
|
2518
|
-
sortable: !
|
|
2582
|
+
sortable: !qe.includes($),
|
|
2519
2583
|
minWidth: ae[$] === "url" || ae[$] === "text" ? 220 : void 0,
|
|
2520
2584
|
align: ae[$] === "number" ? "right" : void 0
|
|
2521
2585
|
}))
|
|
2522
2586
|
)
|
|
2523
|
-
),
|
|
2587
|
+
), A = D(() => [
|
|
2524
2588
|
...["2xx", "3xx", "4xx", "5xx"].map(($) => ({ value: $, label: $ })),
|
|
2525
2589
|
{ value: "none", label: o("page.status-none") }
|
|
2526
|
-
]),
|
|
2590
|
+
]), F = D(() => [
|
|
2527
2591
|
{ value: "1", label: o("page.indexable-yes") },
|
|
2528
2592
|
{ value: "0", label: o("page.indexable-no") }
|
|
2529
|
-
]),
|
|
2530
|
-
() => Object.entries(
|
|
2531
|
-
),
|
|
2532
|
-
() => [
|
|
2533
|
-
), ye =
|
|
2534
|
-
status:
|
|
2593
|
+
]), V = D(
|
|
2594
|
+
() => Object.entries(C.value).map(([$, E]) => ({ value: $, label: E }))
|
|
2595
|
+
), ue = D(
|
|
2596
|
+
() => [O.value, i.value, N.value].filter(Boolean).length + m.value.filter($e).length
|
|
2597
|
+
), ye = D(() => ({
|
|
2598
|
+
status: O.value,
|
|
2535
2599
|
indexable: i.value === null ? null : i.value === "1",
|
|
2536
2600
|
check: N.value,
|
|
2537
|
-
filters:
|
|
2601
|
+
filters: m.value.filter($e)
|
|
2538
2602
|
}));
|
|
2539
2603
|
function $e($) {
|
|
2540
|
-
return !
|
|
2604
|
+
return !Ve.includes($.op) || ($.value ?? "").trim() !== "";
|
|
2541
2605
|
}
|
|
2542
|
-
function
|
|
2606
|
+
function ge($) {
|
|
2543
2607
|
return typeof $ == "string" && $ !== "" ? $ : null;
|
|
2544
2608
|
}
|
|
2545
2609
|
function Ce($) {
|
|
2546
|
-
return
|
|
2610
|
+
return Ee[ae[$]].map((E) => ({ value: E, label: o(`page.op-${E}`) }));
|
|
2547
2611
|
}
|
|
2548
2612
|
function Ae() {
|
|
2549
|
-
|
|
2613
|
+
m.value = [...m.value, { field: "title", op: "empty" }];
|
|
2550
2614
|
}
|
|
2551
2615
|
function Pe($, E) {
|
|
2552
|
-
const T =
|
|
2553
|
-
T && (
|
|
2554
|
-
(K, te) => te === $ ? { field: T, op:
|
|
2616
|
+
const T = ge(E);
|
|
2617
|
+
T && (m.value = m.value.map(
|
|
2618
|
+
(K, te) => te === $ ? { field: T, op: Ee[ae[T]][0], value: "" } : K
|
|
2555
2619
|
));
|
|
2556
2620
|
}
|
|
2557
2621
|
function be($, E) {
|
|
2558
|
-
const T =
|
|
2559
|
-
T && (
|
|
2622
|
+
const T = ge(E);
|
|
2623
|
+
T && (m.value = m.value.map((K, te) => te === $ ? { ...K, op: T } : K));
|
|
2560
2624
|
}
|
|
2561
2625
|
function ze($, E) {
|
|
2562
|
-
|
|
2626
|
+
m.value = m.value.map((T, K) => K === $ ? { ...T, value: E } : T);
|
|
2563
2627
|
}
|
|
2564
2628
|
function We($) {
|
|
2565
|
-
|
|
2629
|
+
m.value = m.value.filter((E, T) => T !== $);
|
|
2566
2630
|
}
|
|
2567
2631
|
function Ie($) {
|
|
2568
2632
|
const E = $.filter((T) => String(T) in ae);
|
|
2569
|
-
|
|
2633
|
+
x.value = E.length ? E : ["url"];
|
|
2570
2634
|
}
|
|
2571
|
-
const
|
|
2635
|
+
const w = {
|
|
2572
2636
|
2: "success",
|
|
2573
2637
|
3: "info",
|
|
2574
2638
|
4: "warning",
|
|
2575
2639
|
5: "danger"
|
|
2576
2640
|
};
|
|
2577
2641
|
function G($) {
|
|
2578
|
-
return
|
|
2642
|
+
return w[String($ ?? "").charAt(0)] ?? "danger";
|
|
2579
2643
|
}
|
|
2580
2644
|
function y($) {
|
|
2581
2645
|
return $ == null || $ === "" ? "—" : String($);
|
|
2582
2646
|
}
|
|
2583
2647
|
async function H($ = j) {
|
|
2584
2648
|
if (j = $, h.value !== null) {
|
|
2585
|
-
|
|
2649
|
+
c.value = !0;
|
|
2586
2650
|
try {
|
|
2587
|
-
f.value = await
|
|
2651
|
+
f.value = await p.pages(h.value.id, {
|
|
2588
2652
|
...ye.value,
|
|
2589
2653
|
search: $.search,
|
|
2590
2654
|
sort: $.sort ? `${$.sort.order === "desc" ? "-" : ""}${$.sort.key}` : null,
|
|
@@ -2592,41 +2656,41 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2592
2656
|
per_page: $.perPage
|
|
2593
2657
|
});
|
|
2594
2658
|
} catch (E) {
|
|
2595
|
-
|
|
2659
|
+
X.danger(r(E));
|
|
2596
2660
|
} finally {
|
|
2597
|
-
|
|
2661
|
+
c.value = !1;
|
|
2598
2662
|
}
|
|
2599
2663
|
}
|
|
2600
2664
|
}
|
|
2601
2665
|
function Z() {
|
|
2602
2666
|
h.value !== null && window.location.assign(
|
|
2603
|
-
|
|
2667
|
+
p.pagesFile(
|
|
2604
2668
|
h.value.id,
|
|
2605
2669
|
{ ...ye.value, search: j.search },
|
|
2606
|
-
|
|
2670
|
+
U.value.map(($) => $.key)
|
|
2607
2671
|
)
|
|
2608
2672
|
);
|
|
2609
2673
|
}
|
|
2610
|
-
return
|
|
2674
|
+
return de(ye, () => {
|
|
2611
2675
|
H({ ...j, page: 1 });
|
|
2612
|
-
}, { deep: !0 }),
|
|
2676
|
+
}, { deep: !0 }), ve(async () => {
|
|
2613
2677
|
try {
|
|
2614
|
-
if (h.value = (await
|
|
2615
|
-
const $ = await
|
|
2616
|
-
|
|
2678
|
+
if (h.value = (await p.latest()).crawled, h.value !== null) {
|
|
2679
|
+
const $ = await p.checks(h.value.id);
|
|
2680
|
+
C.value = Object.fromEntries($.map((E) => [E.id, E.title]));
|
|
2617
2681
|
}
|
|
2618
2682
|
} catch ($) {
|
|
2619
|
-
|
|
2683
|
+
X.danger(r($));
|
|
2620
2684
|
} finally {
|
|
2621
|
-
|
|
2685
|
+
k.value = !0;
|
|
2622
2686
|
}
|
|
2623
2687
|
H();
|
|
2624
|
-
}), ($, E) => (t(), u(
|
|
2688
|
+
}), ($, E) => (t(), u(me, {
|
|
2625
2689
|
base: v.base,
|
|
2626
2690
|
current: "pages"
|
|
2627
2691
|
}, {
|
|
2628
2692
|
default: a(() => [
|
|
2629
|
-
|
|
2693
|
+
k.value && h.value === null ? (t(), u(e(P), {
|
|
2630
2694
|
key: 0,
|
|
2631
2695
|
tone: "muted",
|
|
2632
2696
|
class: "wx-audit-pages__none"
|
|
@@ -2635,27 +2699,27 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2635
2699
|
n(s(e(o)("page.pages-none")), 1)
|
|
2636
2700
|
]),
|
|
2637
2701
|
_: 1
|
|
2638
|
-
})) : (t(), u(e(
|
|
2702
|
+
})) : (t(), u(e(he), {
|
|
2639
2703
|
key: 1,
|
|
2640
2704
|
data: f.value,
|
|
2641
|
-
columns:
|
|
2705
|
+
columns: U.value,
|
|
2642
2706
|
"row-key": "id",
|
|
2643
2707
|
searchable: "",
|
|
2644
2708
|
clickable: "",
|
|
2645
2709
|
hover: "",
|
|
2646
2710
|
flush: "",
|
|
2647
|
-
loading:
|
|
2711
|
+
loading: c.value || !k.value,
|
|
2648
2712
|
"per-page-options": [50, 100, 200],
|
|
2649
2713
|
"search-placeholder": e(o)("page.search-url"),
|
|
2650
|
-
"filters-count":
|
|
2714
|
+
"filters-count": ue.value,
|
|
2651
2715
|
"filters-label": e(l)("filters.title"),
|
|
2652
2716
|
"filters-width": 420,
|
|
2653
2717
|
"empty-text": e(o)("page.empty"),
|
|
2654
2718
|
onStateChange: H,
|
|
2655
|
-
onRowClick: E[3] || (E[3] = (T) =>
|
|
2656
|
-
},
|
|
2719
|
+
onRowClick: E[3] || (E[3] = (T) => W.value = T.id)
|
|
2720
|
+
}, Je({
|
|
2657
2721
|
title: a(() => [
|
|
2658
|
-
h.value ? (t(), u(e(
|
|
2722
|
+
h.value ? (t(), u(e(P), {
|
|
2659
2723
|
key: 0,
|
|
2660
2724
|
size: "sm",
|
|
2661
2725
|
tone: "muted"
|
|
@@ -2664,10 +2728,10 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2664
2728
|
n(s(e(o)("page.pages-run", { date: e(d).short(h.value.finished_at) })), 1)
|
|
2665
2729
|
]),
|
|
2666
2730
|
_: 1
|
|
2667
|
-
})) :
|
|
2731
|
+
})) : z("", !0)
|
|
2668
2732
|
]),
|
|
2669
2733
|
actions: a(() => [
|
|
2670
|
-
g(e(
|
|
2734
|
+
g(e(Qe), {
|
|
2671
2735
|
title: e(o)("page.columns"),
|
|
2672
2736
|
width: "300"
|
|
2673
2737
|
}, {
|
|
@@ -2684,8 +2748,8 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2684
2748
|
})
|
|
2685
2749
|
]),
|
|
2686
2750
|
default: a(() => [
|
|
2687
|
-
g(e(
|
|
2688
|
-
"model-value":
|
|
2751
|
+
g(e(rt), {
|
|
2752
|
+
"model-value": x.value,
|
|
2689
2753
|
options: R.value,
|
|
2690
2754
|
size: "sm",
|
|
2691
2755
|
class: "wx-audit-pages__picker",
|
|
@@ -2708,59 +2772,59 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2708
2772
|
}, 8, ["disabled"])
|
|
2709
2773
|
]),
|
|
2710
2774
|
filters: a(() => [
|
|
2711
|
-
|
|
2712
|
-
g(e(
|
|
2713
|
-
"model-value":
|
|
2714
|
-
options:
|
|
2775
|
+
I("div", Ua, [
|
|
2776
|
+
g(e(pe), {
|
|
2777
|
+
"model-value": O.value,
|
|
2778
|
+
options: A.value,
|
|
2715
2779
|
placeholder: e(o)("page.any-status"),
|
|
2716
2780
|
clearable: "",
|
|
2717
|
-
"onUpdate:modelValue": E[0] || (E[0] = (T) =>
|
|
2781
|
+
"onUpdate:modelValue": E[0] || (E[0] = (T) => O.value = ge(T))
|
|
2718
2782
|
}, null, 8, ["model-value", "options", "placeholder"]),
|
|
2719
|
-
g(e(
|
|
2783
|
+
g(e(pe), {
|
|
2720
2784
|
"model-value": i.value,
|
|
2721
|
-
options:
|
|
2785
|
+
options: F.value,
|
|
2722
2786
|
placeholder: e(o)("page.any-indexable"),
|
|
2723
2787
|
clearable: "",
|
|
2724
|
-
"onUpdate:modelValue": E[1] || (E[1] = (T) => i.value =
|
|
2788
|
+
"onUpdate:modelValue": E[1] || (E[1] = (T) => i.value = ge(T))
|
|
2725
2789
|
}, null, 8, ["model-value", "options", "placeholder"]),
|
|
2726
|
-
g(e(
|
|
2790
|
+
g(e(pe), {
|
|
2727
2791
|
"model-value": N.value,
|
|
2728
|
-
options:
|
|
2792
|
+
options: V.value,
|
|
2729
2793
|
placeholder: e(o)("page.any-check"),
|
|
2730
2794
|
clearable: "",
|
|
2731
2795
|
filterable: "",
|
|
2732
|
-
"onUpdate:modelValue": E[2] || (E[2] = (T) => N.value =
|
|
2796
|
+
"onUpdate:modelValue": E[2] || (E[2] = (T) => N.value = ge(T))
|
|
2733
2797
|
}, null, 8, ["model-value", "options", "placeholder"]),
|
|
2734
|
-
(t(!0), b(
|
|
2798
|
+
(t(!0), b(L, null, M(m.value, (T, K) => (t(), b("div", {
|
|
2735
2799
|
key: K,
|
|
2736
2800
|
class: "wx-audit-pages__filter"
|
|
2737
2801
|
}, [
|
|
2738
|
-
g(e(
|
|
2802
|
+
g(e(pe), {
|
|
2739
2803
|
"model-value": T.field,
|
|
2740
|
-
options:
|
|
2804
|
+
options: q.value,
|
|
2741
2805
|
filterable: "",
|
|
2742
2806
|
size: "sm",
|
|
2743
2807
|
"onUpdate:modelValue": (te) => Pe(K, te)
|
|
2744
2808
|
}, null, 8, ["model-value", "options", "onUpdate:modelValue"]),
|
|
2745
|
-
g(e(
|
|
2809
|
+
g(e(pe), {
|
|
2746
2810
|
"model-value": T.op,
|
|
2747
2811
|
options: Ce(T.field),
|
|
2748
2812
|
size: "sm",
|
|
2749
2813
|
"onUpdate:modelValue": (te) => be(K, te)
|
|
2750
2814
|
}, null, 8, ["model-value", "options", "onUpdate:modelValue"]),
|
|
2751
|
-
e(
|
|
2815
|
+
e(Ve).includes(T.op) && e(ae)[T.field] === "source" ? (t(), u(e(pe), {
|
|
2752
2816
|
key: 0,
|
|
2753
2817
|
"model-value": T.value ?? null,
|
|
2754
|
-
options: e(
|
|
2818
|
+
options: e(Oa).map((te) => ({ value: te, label: e(o)(`page.source-${te}`) })),
|
|
2755
2819
|
size: "sm",
|
|
2756
|
-
"onUpdate:modelValue": (te) => ze(K,
|
|
2757
|
-
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : e(
|
|
2820
|
+
"onUpdate:modelValue": (te) => ze(K, ge(te) ?? "")
|
|
2821
|
+
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : e(Ve).includes(T.op) ? (t(), u(e(Ke), {
|
|
2758
2822
|
key: 1,
|
|
2759
2823
|
"model-value": T.value ?? "",
|
|
2760
2824
|
placeholder: e(o)("page.value"),
|
|
2761
2825
|
size: "sm",
|
|
2762
2826
|
"onUpdate:modelValue": (te) => ze(K, String(te ?? ""))
|
|
2763
|
-
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) :
|
|
2827
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : z("", !0),
|
|
2764
2828
|
g(e(Q), {
|
|
2765
2829
|
size: "sm",
|
|
2766
2830
|
variant: "text",
|
|
@@ -2784,7 +2848,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2784
2848
|
]),
|
|
2785
2849
|
_: 2
|
|
2786
2850
|
}, [
|
|
2787
|
-
M(
|
|
2851
|
+
M(x.value, (T) => ({
|
|
2788
2852
|
name: `cell-${T}`,
|
|
2789
2853
|
fn: a(({ row: K }) => [
|
|
2790
2854
|
e(ae)[T] === "status" && K[T] !== null ? (t(), u(e(B), {
|
|
@@ -2796,7 +2860,7 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2796
2860
|
n(s(K[T]), 1)
|
|
2797
2861
|
]),
|
|
2798
2862
|
_: 2
|
|
2799
|
-
}, 1032, ["type"])) : e(ae)[T] === "status" ? (t(), u(e(
|
|
2863
|
+
}, 1032, ["type"])) : e(ae)[T] === "status" ? (t(), u(e(P), {
|
|
2800
2864
|
key: 1,
|
|
2801
2865
|
size: "sm",
|
|
2802
2866
|
tone: "danger"
|
|
@@ -2805,9 +2869,9 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2805
2869
|
n(s(e(o)("page.status-none")), 1)
|
|
2806
2870
|
]),
|
|
2807
2871
|
_: 1
|
|
2808
|
-
})) : e(ae)[T] === "bool" ? (t(), b(
|
|
2872
|
+
})) : e(ae)[T] === "bool" ? (t(), b(L, { key: 2 }, [
|
|
2809
2873
|
n(s(K[T] ? e(o)("page.yes") : e(o)("page.no")), 1)
|
|
2810
|
-
], 64)) : e(ae)[T] === "source" ? (t(), b(
|
|
2874
|
+
], 64)) : e(ae)[T] === "source" ? (t(), b(L, { key: 3 }, [
|
|
2811
2875
|
n(s(e(o)(`page.source-${K[T]}`)), 1)
|
|
2812
2876
|
], 64)) : T === "issues" && K.issues > 0 ? (t(), u(e(B), {
|
|
2813
2877
|
key: 4,
|
|
@@ -2820,81 +2884,81 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2820
2884
|
_: 2
|
|
2821
2885
|
}, 1024)) : (t(), b("span", {
|
|
2822
2886
|
key: 5,
|
|
2823
|
-
class:
|
|
2887
|
+
class: Ne({ "wx-audit-pages__long": e(ae)[T] === "url" })
|
|
2824
2888
|
}, s(y(K[T])), 3))
|
|
2825
2889
|
])
|
|
2826
2890
|
}))
|
|
2827
2891
|
]), 1032, ["data", "columns", "loading", "search-placeholder", "filters-count", "filters-label", "empty-text"])),
|
|
2828
|
-
h.value ? (t(), u(
|
|
2892
|
+
h.value ? (t(), u(Wa, {
|
|
2829
2893
|
key: 2,
|
|
2830
2894
|
run: h.value.id,
|
|
2831
2895
|
base: v.base,
|
|
2832
|
-
"page-id":
|
|
2833
|
-
titles:
|
|
2834
|
-
onClose: E[4] || (E[4] = (T) =>
|
|
2835
|
-
}, null, 8, ["run", "base", "page-id", "titles"])) :
|
|
2896
|
+
"page-id": W.value,
|
|
2897
|
+
titles: C.value,
|
|
2898
|
+
onClose: E[4] || (E[4] = (T) => W.value = null)
|
|
2899
|
+
}, null, 8, ["run", "base", "page-id", "titles"])) : z("", !0)
|
|
2836
2900
|
]),
|
|
2837
2901
|
_: 1
|
|
2838
2902
|
}, 8, ["base"]));
|
|
2839
2903
|
}
|
|
2840
|
-
}),
|
|
2904
|
+
}), Na = /* @__PURE__ */ ie(Va, [["__scopeId", "data-v-7850735f"]]), ja = { class: "wx-audit-compare" }, Ta = /* @__PURE__ */ se({
|
|
2841
2905
|
__name: "AuditCompareIssues",
|
|
2842
2906
|
props: {
|
|
2843
2907
|
from: {},
|
|
2844
2908
|
to: {},
|
|
2845
2909
|
row: {}
|
|
2846
2910
|
},
|
|
2847
|
-
setup(
|
|
2848
|
-
const v =
|
|
2911
|
+
setup(_) {
|
|
2912
|
+
const v = _, p = re(le());
|
|
2849
2913
|
ne();
|
|
2850
|
-
const o = ee("webx-audit"), l =
|
|
2851
|
-
() => r.map((
|
|
2852
|
-
value:
|
|
2853
|
-
label: `${o(`page.kind-${
|
|
2854
|
-
disabled: v.row[
|
|
2914
|
+
const o = ee("webx-audit"), l = oe(), r = ["new", "fixed", "persisting"], d = S(r.find((O) => v.row[O] > 0) ?? "new"), h = S(null), k = S(1), f = S(!1), c = S(null), W = D(
|
|
2915
|
+
() => r.map((O) => ({
|
|
2916
|
+
value: O,
|
|
2917
|
+
label: `${o(`page.kind-${O}`)} · ${v.row[O]}`,
|
|
2918
|
+
disabled: v.row[O] === 0
|
|
2855
2919
|
}))
|
|
2856
2920
|
);
|
|
2857
|
-
async function
|
|
2858
|
-
|
|
2921
|
+
async function C(O = 1) {
|
|
2922
|
+
c.value = null;
|
|
2859
2923
|
try {
|
|
2860
|
-
const i = await
|
|
2924
|
+
const i = await p.compareIssues({
|
|
2861
2925
|
from: v.from,
|
|
2862
2926
|
to: v.to,
|
|
2863
2927
|
kind: d.value,
|
|
2864
2928
|
check: v.row.check,
|
|
2865
|
-
page:
|
|
2929
|
+
page: O,
|
|
2866
2930
|
per_page: 50
|
|
2867
2931
|
});
|
|
2868
|
-
h.value =
|
|
2932
|
+
h.value = O === 1 ? i.data : [...h.value ?? [], ...i.data], k.value = i.current_page, f.value = i.current_page < i.last_page;
|
|
2869
2933
|
} catch (i) {
|
|
2870
|
-
|
|
2934
|
+
c.value = l(i);
|
|
2871
2935
|
}
|
|
2872
2936
|
}
|
|
2873
|
-
return
|
|
2937
|
+
return de(
|
|
2874
2938
|
d,
|
|
2875
2939
|
() => {
|
|
2876
|
-
h.value = null,
|
|
2940
|
+
h.value = null, C();
|
|
2877
2941
|
},
|
|
2878
2942
|
{ immediate: !0 }
|
|
2879
|
-
), (
|
|
2880
|
-
g(e(
|
|
2943
|
+
), (O, i) => (t(), b("div", ja, [
|
|
2944
|
+
g(e(Xe), {
|
|
2881
2945
|
modelValue: d.value,
|
|
2882
2946
|
"onUpdate:modelValue": i[0] || (i[0] = (N) => d.value = N),
|
|
2883
|
-
options:
|
|
2947
|
+
options: W.value,
|
|
2884
2948
|
size: "sm",
|
|
2885
2949
|
"aria-label": e(o)("page.compare")
|
|
2886
2950
|
}, null, 8, ["modelValue", "options", "aria-label"]),
|
|
2887
|
-
|
|
2951
|
+
c.value ? (t(), u(e(P), {
|
|
2888
2952
|
key: 0,
|
|
2889
2953
|
size: "sm",
|
|
2890
2954
|
tone: "danger"
|
|
2891
2955
|
}, {
|
|
2892
2956
|
default: a(() => [
|
|
2893
|
-
n(s(
|
|
2957
|
+
n(s(c.value), 1)
|
|
2894
2958
|
]),
|
|
2895
2959
|
_: 1
|
|
2896
|
-
})) : h.value ? (t(), b(
|
|
2897
|
-
(t(!0), b(
|
|
2960
|
+
})) : h.value ? (t(), b(L, { key: 2 }, [
|
|
2961
|
+
(t(!0), b(L, null, M(h.value, (N) => (t(), b("div", {
|
|
2898
2962
|
key: N.id,
|
|
2899
2963
|
class: "wx-audit-compare__item"
|
|
2900
2964
|
}, [
|
|
@@ -2908,8 +2972,8 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2908
2972
|
n(s(N.url), 1)
|
|
2909
2973
|
]),
|
|
2910
2974
|
_: 2
|
|
2911
|
-
}, 1032, ["href"])) :
|
|
2912
|
-
g(
|
|
2975
|
+
}, 1032, ["href"])) : z("", !0),
|
|
2976
|
+
g(je, {
|
|
2913
2977
|
details: N.details
|
|
2914
2978
|
}, null, 8, ["details"])
|
|
2915
2979
|
]))), 128)),
|
|
@@ -2917,41 +2981,41 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2917
2981
|
key: 0,
|
|
2918
2982
|
size: "sm",
|
|
2919
2983
|
variant: "text",
|
|
2920
|
-
onClick: i[1] || (i[1] = (N) =>
|
|
2984
|
+
onClick: i[1] || (i[1] = (N) => C(k.value + 1))
|
|
2921
2985
|
}, {
|
|
2922
2986
|
default: a(() => [...i[2] || (i[2] = [
|
|
2923
2987
|
n("…", -1)
|
|
2924
2988
|
])]),
|
|
2925
2989
|
_: 1
|
|
2926
|
-
})) :
|
|
2990
|
+
})) : z("", !0)
|
|
2927
2991
|
], 64)) : (t(), u(e(fe), {
|
|
2928
2992
|
key: 1,
|
|
2929
2993
|
rows: 2
|
|
2930
2994
|
}))
|
|
2931
2995
|
]));
|
|
2932
2996
|
}
|
|
2933
|
-
}),
|
|
2997
|
+
}), Ra = /* @__PURE__ */ ie(Ta, [["__scopeId", "data-v-02d42bdb"]]), Fa = { class: "wx-audit-runs" }, La = {
|
|
2934
2998
|
key: 0,
|
|
2935
2999
|
class: "wx-audit-runs__counts"
|
|
2936
|
-
},
|
|
3000
|
+
}, Da = /* @__PURE__ */ se({
|
|
2937
3001
|
__name: "AuditRunsPage",
|
|
2938
3002
|
props: {
|
|
2939
3003
|
base: {}
|
|
2940
3004
|
},
|
|
2941
|
-
setup(
|
|
2942
|
-
const v =
|
|
3005
|
+
setup(_) {
|
|
3006
|
+
const v = _, p = re(le()), o = Ye();
|
|
2943
3007
|
ne();
|
|
2944
|
-
const l = ee("webx-audit"), r =
|
|
3008
|
+
const l = ee("webx-audit"), r = oe(), d = S(null), h = S(!1), k = S([]), f = S(null), c = S(!1), W = S([]), C = {
|
|
2945
3009
|
queued: "info",
|
|
2946
3010
|
running: "primary",
|
|
2947
3011
|
done: "success",
|
|
2948
3012
|
failed: "danger",
|
|
2949
3013
|
cancelled: "warning"
|
|
2950
|
-
},
|
|
3014
|
+
}, O = {
|
|
2951
3015
|
error: "danger",
|
|
2952
3016
|
warning: "warning",
|
|
2953
3017
|
notice: "info"
|
|
2954
|
-
}, i =
|
|
3018
|
+
}, i = D(() => [
|
|
2955
3019
|
{ key: "id", label: l("page.run-id"), width: 90 },
|
|
2956
3020
|
{ key: "created_at", label: l("page.started-at"), minWidth: 160 },
|
|
2957
3021
|
{ key: "scope", label: l("page.scope"), width: 120 },
|
|
@@ -2959,123 +3023,123 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
2959
3023
|
{ key: "health", label: l("page.health"), width: 100, align: "right" },
|
|
2960
3024
|
{ key: "severity", label: l("page.severity"), minWidth: 170, hideBelow: 640 },
|
|
2961
3025
|
{ key: "started_by", label: l("page.started-by"), minWidth: 130, hideBelow: 760 }
|
|
2962
|
-
]), N =
|
|
3026
|
+
]), N = D(() => [
|
|
2963
3027
|
{ key: "severity", label: l("page.severity"), width: 130 },
|
|
2964
3028
|
{ key: "title", label: l("page.check") },
|
|
2965
3029
|
{ key: "new", label: l("page.kind-new"), width: 90, align: "right" },
|
|
2966
3030
|
{ key: "fixed", label: l("page.kind-fixed"), width: 100, align: "right" },
|
|
2967
3031
|
{ key: "persisting", label: l("page.kind-persisting"), width: 120, align: "right" }
|
|
2968
|
-
]),
|
|
2969
|
-
const R =
|
|
3032
|
+
]), m = D(() => {
|
|
3033
|
+
const R = k.value.map(Number).sort((q, U) => q - U);
|
|
2970
3034
|
return R.length === 0 ? null : R.length === 1 ? { to: R[0], from: null } : { to: R[R.length - 1], from: R[0] };
|
|
2971
|
-
}), j =
|
|
3035
|
+
}), j = D(
|
|
2972
3036
|
() => f.value !== null && f.value.from.scope !== f.value.to.scope
|
|
2973
3037
|
);
|
|
2974
|
-
function
|
|
3038
|
+
function x(R) {
|
|
2975
3039
|
return R.started_by === "schedule" ? l("page.by-schedule") : R.started_by === "mcp" ? l("page.by-mcp") : R.started_by === "console" ? l("page.by-console") : R.started_by ? l("page.by-person") : "";
|
|
2976
3040
|
}
|
|
2977
3041
|
async function J(R) {
|
|
2978
3042
|
h.value = !0;
|
|
2979
3043
|
try {
|
|
2980
|
-
d.value = await
|
|
2981
|
-
} catch (
|
|
2982
|
-
|
|
3044
|
+
d.value = await p.runs({ page: R?.page ?? 1, per_page: R?.perPage ?? 20 });
|
|
3045
|
+
} catch (q) {
|
|
3046
|
+
X.danger(r(q));
|
|
2983
3047
|
} finally {
|
|
2984
3048
|
h.value = !1;
|
|
2985
3049
|
}
|
|
2986
3050
|
}
|
|
2987
|
-
async function
|
|
2988
|
-
const R =
|
|
2989
|
-
if (f.value = null,
|
|
2990
|
-
|
|
3051
|
+
async function Y() {
|
|
3052
|
+
const R = m.value;
|
|
3053
|
+
if (f.value = null, W.value = [], !!R) {
|
|
3054
|
+
c.value = !0;
|
|
2991
3055
|
try {
|
|
2992
|
-
f.value = await
|
|
2993
|
-
} catch (
|
|
2994
|
-
|
|
3056
|
+
f.value = await p.compare(R.to, R.from);
|
|
3057
|
+
} catch (q) {
|
|
3058
|
+
X.danger(r(q));
|
|
2995
3059
|
} finally {
|
|
2996
|
-
|
|
3060
|
+
c.value = !1;
|
|
2997
3061
|
}
|
|
2998
3062
|
}
|
|
2999
3063
|
}
|
|
3000
|
-
return
|
|
3064
|
+
return ve(() => {
|
|
3001
3065
|
const R = Number(o.query.to);
|
|
3002
|
-
Number.isInteger(R) && R > 0 && (
|
|
3003
|
-
}),
|
|
3004
|
-
R.length > 2 ?
|
|
3005
|
-
}), (R,
|
|
3066
|
+
Number.isInteger(R) && R > 0 && (k.value = [R]);
|
|
3067
|
+
}), de(k, (R) => {
|
|
3068
|
+
R.length > 2 ? k.value = R.slice(-2) : Y();
|
|
3069
|
+
}), (R, q) => (t(), u(me, {
|
|
3006
3070
|
base: v.base,
|
|
3007
3071
|
current: "runs",
|
|
3008
3072
|
card: !1
|
|
3009
3073
|
}, {
|
|
3010
3074
|
default: a(() => [
|
|
3011
|
-
|
|
3012
|
-
g(e(
|
|
3075
|
+
I("div", Fa, [
|
|
3076
|
+
g(e(ce), null, {
|
|
3013
3077
|
default: a(() => [
|
|
3014
|
-
g(e(
|
|
3015
|
-
selected:
|
|
3016
|
-
"onUpdate:selected":
|
|
3078
|
+
g(e(he), {
|
|
3079
|
+
selected: k.value,
|
|
3080
|
+
"onUpdate:selected": q[0] || (q[0] = (U) => k.value = U),
|
|
3017
3081
|
data: d.value,
|
|
3018
3082
|
columns: i.value,
|
|
3019
3083
|
"row-key": "id",
|
|
3020
3084
|
selectable: "",
|
|
3021
|
-
"selectable-if": (
|
|
3085
|
+
"selectable-if": (U) => U.status === "done",
|
|
3022
3086
|
flush: "",
|
|
3023
3087
|
loading: h.value,
|
|
3024
3088
|
"empty-text": e(l)("page.runs-empty"),
|
|
3025
3089
|
onStateChange: J
|
|
3026
3090
|
}, {
|
|
3027
|
-
"cell-created_at": a(({ row:
|
|
3091
|
+
"cell-created_at": a(({ row: U }) => [
|
|
3028
3092
|
g(e(ke), {
|
|
3029
|
-
value:
|
|
3093
|
+
value: U.created_at
|
|
3030
3094
|
}, null, 8, ["value"])
|
|
3031
3095
|
]),
|
|
3032
|
-
"cell-scope": a(({ row:
|
|
3033
|
-
n(s(e(l)(`page.scope-${
|
|
3096
|
+
"cell-scope": a(({ row: U }) => [
|
|
3097
|
+
n(s(e(l)(`page.scope-${U.scope}`)), 1)
|
|
3034
3098
|
]),
|
|
3035
|
-
"cell-status": a(({ row:
|
|
3099
|
+
"cell-status": a(({ row: U }) => [
|
|
3036
3100
|
g(e(B), {
|
|
3037
|
-
type:
|
|
3101
|
+
type: C[U.status],
|
|
3038
3102
|
dot: ""
|
|
3039
3103
|
}, {
|
|
3040
3104
|
default: a(() => [
|
|
3041
|
-
n(s(e(l)(`page.status-${
|
|
3105
|
+
n(s(e(l)(`page.status-${U.status}`)), 1)
|
|
3042
3106
|
]),
|
|
3043
3107
|
_: 2
|
|
3044
3108
|
}, 1032, ["type"])
|
|
3045
3109
|
]),
|
|
3046
|
-
"cell-health": a(({ row:
|
|
3047
|
-
n(s(
|
|
3110
|
+
"cell-health": a(({ row: U }) => [
|
|
3111
|
+
n(s(U.counts ? `${U.counts.health}%` : ""), 1)
|
|
3048
3112
|
]),
|
|
3049
|
-
"cell-severity": a(({ row:
|
|
3050
|
-
|
|
3051
|
-
(t(), b(
|
|
3052
|
-
|
|
3113
|
+
"cell-severity": a(({ row: U }) => [
|
|
3114
|
+
U.counts ? (t(), b("span", La, [
|
|
3115
|
+
(t(), b(L, null, M(O, (A, F) => (t(), b(L, { key: F }, [
|
|
3116
|
+
U.counts.severity[F] ? (t(), u(e(B), {
|
|
3053
3117
|
key: 0,
|
|
3054
|
-
type:
|
|
3118
|
+
type: A,
|
|
3055
3119
|
size: "sm"
|
|
3056
3120
|
}, {
|
|
3057
3121
|
default: a(() => [
|
|
3058
|
-
n(s(
|
|
3122
|
+
n(s(U.counts.severity[F]), 1)
|
|
3059
3123
|
]),
|
|
3060
3124
|
_: 2
|
|
3061
|
-
}, 1032, ["type"])) :
|
|
3125
|
+
}, 1032, ["type"])) : z("", !0)
|
|
3062
3126
|
], 64))), 64))
|
|
3063
|
-
])) :
|
|
3127
|
+
])) : z("", !0)
|
|
3064
3128
|
]),
|
|
3065
|
-
"cell-started_by": a(({ row:
|
|
3066
|
-
n(s(
|
|
3129
|
+
"cell-started_by": a(({ row: U }) => [
|
|
3130
|
+
n(s(x(U)), 1)
|
|
3067
3131
|
]),
|
|
3068
3132
|
_: 1
|
|
3069
3133
|
}, 8, ["selected", "data", "columns", "selectable-if", "loading", "empty-text"])
|
|
3070
3134
|
]),
|
|
3071
3135
|
_: 1
|
|
3072
3136
|
}),
|
|
3073
|
-
|
|
3137
|
+
m.value ? (t(), u(e(ce), {
|
|
3074
3138
|
key: 1,
|
|
3075
3139
|
title: e(l)("page.compare")
|
|
3076
3140
|
}, {
|
|
3077
3141
|
default: a(() => [
|
|
3078
|
-
f.value ? (t(), u(e(
|
|
3142
|
+
f.value ? (t(), u(e(P), {
|
|
3079
3143
|
key: 0,
|
|
3080
3144
|
size: "sm",
|
|
3081
3145
|
tone: "muted",
|
|
@@ -3092,71 +3156,71 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
3092
3156
|
}, null, 8, ["value"])
|
|
3093
3157
|
]),
|
|
3094
3158
|
_: 1
|
|
3095
|
-
})) :
|
|
3096
|
-
j.value ? (t(), u(e(
|
|
3159
|
+
})) : z("", !0),
|
|
3160
|
+
j.value ? (t(), u(e(_e), {
|
|
3097
3161
|
key: 1,
|
|
3098
3162
|
type: "info",
|
|
3099
3163
|
description: e(l)("page.compare-scopes"),
|
|
3100
3164
|
class: "wx-audit-runs__note"
|
|
3101
|
-
}, null, 8, ["description"])) :
|
|
3102
|
-
g(e(
|
|
3103
|
-
expanded:
|
|
3104
|
-
"onUpdate:expanded":
|
|
3165
|
+
}, null, 8, ["description"])) : z("", !0),
|
|
3166
|
+
g(e(he), {
|
|
3167
|
+
expanded: W.value,
|
|
3168
|
+
"onUpdate:expanded": q[1] || (q[1] = (U) => W.value = U),
|
|
3105
3169
|
data: f.value?.checks ?? [],
|
|
3106
3170
|
columns: N.value,
|
|
3107
3171
|
"row-key": "check",
|
|
3108
3172
|
expandable: "",
|
|
3109
3173
|
flush: "",
|
|
3110
3174
|
pagination: !1,
|
|
3111
|
-
loading:
|
|
3175
|
+
loading: c.value,
|
|
3112
3176
|
"empty-text": e(l)("page.compare-none")
|
|
3113
3177
|
}, {
|
|
3114
|
-
"cell-severity": a(({ row:
|
|
3178
|
+
"cell-severity": a(({ row: U }) => [
|
|
3115
3179
|
g(e(B), {
|
|
3116
|
-
type: U
|
|
3180
|
+
type: O[U.severity],
|
|
3117
3181
|
dot: ""
|
|
3118
3182
|
}, {
|
|
3119
3183
|
default: a(() => [
|
|
3120
|
-
n(s(e(l)(`page.severity-${
|
|
3184
|
+
n(s(e(l)(`page.severity-${U.severity}`)), 1)
|
|
3121
3185
|
]),
|
|
3122
3186
|
_: 2
|
|
3123
3187
|
}, 1032, ["type"])
|
|
3124
3188
|
]),
|
|
3125
|
-
"cell-new": a(({ row:
|
|
3126
|
-
g(e(
|
|
3127
|
-
tone:
|
|
3189
|
+
"cell-new": a(({ row: U }) => [
|
|
3190
|
+
g(e(P), {
|
|
3191
|
+
tone: U.new ? "danger" : "muted",
|
|
3128
3192
|
size: "sm"
|
|
3129
3193
|
}, {
|
|
3130
3194
|
default: a(() => [
|
|
3131
|
-
n(s(
|
|
3195
|
+
n(s(U.new), 1)
|
|
3132
3196
|
]),
|
|
3133
3197
|
_: 2
|
|
3134
3198
|
}, 1032, ["tone"])
|
|
3135
3199
|
]),
|
|
3136
|
-
"cell-fixed": a(({ row:
|
|
3137
|
-
g(e(
|
|
3138
|
-
tone:
|
|
3200
|
+
"cell-fixed": a(({ row: U }) => [
|
|
3201
|
+
g(e(P), {
|
|
3202
|
+
tone: U.fixed ? "success" : "muted",
|
|
3139
3203
|
size: "sm"
|
|
3140
3204
|
}, {
|
|
3141
3205
|
default: a(() => [
|
|
3142
|
-
n(s(
|
|
3206
|
+
n(s(U.fixed), 1)
|
|
3143
3207
|
]),
|
|
3144
3208
|
_: 2
|
|
3145
3209
|
}, 1032, ["tone"])
|
|
3146
3210
|
]),
|
|
3147
|
-
expanded: a(({ row:
|
|
3148
|
-
f.value ? (t(), u(
|
|
3211
|
+
expanded: a(({ row: U }) => [
|
|
3212
|
+
f.value ? (t(), u(Ra, {
|
|
3149
3213
|
key: 0,
|
|
3150
3214
|
from: f.value.from.id,
|
|
3151
3215
|
to: f.value.to.id,
|
|
3152
|
-
row:
|
|
3153
|
-
}, null, 8, ["from", "to", "row"])) :
|
|
3216
|
+
row: U
|
|
3217
|
+
}, null, 8, ["from", "to", "row"])) : z("", !0)
|
|
3154
3218
|
]),
|
|
3155
3219
|
_: 1
|
|
3156
3220
|
}, 8, ["expanded", "data", "columns", "loading", "empty-text"])
|
|
3157
3221
|
]),
|
|
3158
3222
|
_: 1
|
|
3159
|
-
}, 8, ["title"])) : (t(), u(e(
|
|
3223
|
+
}, 8, ["title"])) : (t(), u(e(P), {
|
|
3160
3224
|
key: 0,
|
|
3161
3225
|
size: "sm",
|
|
3162
3226
|
tone: "muted"
|
|
@@ -3171,59 +3235,59 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
3171
3235
|
_: 1
|
|
3172
3236
|
}, 8, ["base"]));
|
|
3173
3237
|
}
|
|
3174
|
-
}),
|
|
3238
|
+
}), qa = /* @__PURE__ */ ie(Da, [["__scopeId", "data-v-abbed1f9"]]), Ea = { class: "wx-audit-settings" }, Ba = /* @__PURE__ */ se({
|
|
3175
3239
|
__name: "AuditSettingsPage",
|
|
3176
3240
|
props: {
|
|
3177
3241
|
base: {}
|
|
3178
3242
|
},
|
|
3179
|
-
setup(
|
|
3180
|
-
const v =
|
|
3243
|
+
setup(_) {
|
|
3244
|
+
const v = _, p = le(), o = re(p);
|
|
3181
3245
|
ne();
|
|
3182
|
-
const l = ee("webx-audit"), r =
|
|
3183
|
-
|
|
3246
|
+
const l = ee("webx-audit"), r = oe(), d = S({}), h = S({}), k = S(!0), f = S(!1), c = p.can("audit.manage");
|
|
3247
|
+
ve(async () => {
|
|
3184
3248
|
try {
|
|
3185
3249
|
d.value = await o.settings();
|
|
3186
|
-
} catch (
|
|
3187
|
-
|
|
3250
|
+
} catch (C) {
|
|
3251
|
+
X.danger(r(C));
|
|
3188
3252
|
} finally {
|
|
3189
|
-
|
|
3253
|
+
k.value = !1;
|
|
3190
3254
|
}
|
|
3191
3255
|
});
|
|
3192
|
-
async function
|
|
3256
|
+
async function W() {
|
|
3193
3257
|
f.value = !0, h.value = {};
|
|
3194
3258
|
try {
|
|
3195
|
-
d.value = await o.saveSettings(d.value),
|
|
3196
|
-
} catch (
|
|
3197
|
-
const
|
|
3198
|
-
|
|
3259
|
+
d.value = await o.saveSettings(d.value), X.success(l("page.saved"));
|
|
3260
|
+
} catch (C) {
|
|
3261
|
+
const O = C.body;
|
|
3262
|
+
O?.errors && (h.value = O.errors), X.danger(r(C));
|
|
3199
3263
|
} finally {
|
|
3200
3264
|
f.value = !1;
|
|
3201
3265
|
}
|
|
3202
3266
|
}
|
|
3203
|
-
return (
|
|
3267
|
+
return (C, O) => (t(), u(me, {
|
|
3204
3268
|
base: v.base,
|
|
3205
3269
|
current: "settings",
|
|
3206
3270
|
card: !1
|
|
3207
3271
|
}, {
|
|
3208
3272
|
default: a(() => [
|
|
3209
|
-
|
|
3210
|
-
|
|
3273
|
+
I("div", Ea, [
|
|
3274
|
+
k.value ? (t(), u(e(fe), {
|
|
3211
3275
|
key: 0,
|
|
3212
3276
|
rows: 6
|
|
3213
|
-
})) : (t(), u(e(
|
|
3277
|
+
})) : (t(), u(e(st), {
|
|
3214
3278
|
key: 1,
|
|
3215
3279
|
modelValue: d.value,
|
|
3216
|
-
"onUpdate:modelValue":
|
|
3280
|
+
"onUpdate:modelValue": O[0] || (O[0] = (i) => d.value = i),
|
|
3217
3281
|
name: "audit.settings",
|
|
3218
3282
|
errors: h.value,
|
|
3219
|
-
disabled: !e(
|
|
3283
|
+
disabled: !e(c)
|
|
3220
3284
|
}, null, 8, ["modelValue", "errors", "disabled"])),
|
|
3221
|
-
e(
|
|
3285
|
+
e(c) && !k.value ? (t(), u(e(dt), { key: 2 }, {
|
|
3222
3286
|
default: a(() => [
|
|
3223
3287
|
g(e(Q), {
|
|
3224
3288
|
type: "primary",
|
|
3225
3289
|
loading: f.value,
|
|
3226
|
-
onClick:
|
|
3290
|
+
onClick: W
|
|
3227
3291
|
}, {
|
|
3228
3292
|
default: a(() => [
|
|
3229
3293
|
n(s(e(l)("page.save")), 1)
|
|
@@ -3232,48 +3296,48 @@ const dt = { class: "wx-audit-places" }, ct = {
|
|
|
3232
3296
|
}, 8, ["loading"])
|
|
3233
3297
|
]),
|
|
3234
3298
|
_: 1
|
|
3235
|
-
})) :
|
|
3299
|
+
})) : z("", !0)
|
|
3236
3300
|
])
|
|
3237
3301
|
]),
|
|
3238
3302
|
_: 1
|
|
3239
3303
|
}, 8, ["base"]));
|
|
3240
3304
|
}
|
|
3241
|
-
}),
|
|
3242
|
-
function
|
|
3243
|
-
const v =
|
|
3305
|
+
}), Ha = /* @__PURE__ */ ie(Ba, [["__scopeId", "data-v-4b3f5a3f"]]);
|
|
3306
|
+
function Qa(_ = {}) {
|
|
3307
|
+
const v = _.path ?? "/audit", p = { base: v };
|
|
3244
3308
|
return {
|
|
3245
3309
|
id: "audit",
|
|
3246
3310
|
path: v,
|
|
3247
3311
|
routes: [
|
|
3248
|
-
{ path: v, name: "webx.audit", component:
|
|
3249
|
-
{ path: `${v}/issues`, name: "webx.audit.issues", component:
|
|
3250
|
-
{ path: `${v}/pages`, name: "webx.audit.pages", component:
|
|
3251
|
-
{ path: `${v}/hosts`, name: "webx.audit.hosts", component:
|
|
3252
|
-
{ path: `${v}/runs`, name: "webx.audit.runs", component:
|
|
3312
|
+
{ path: v, name: "webx.audit", component: ia, props: p },
|
|
3313
|
+
{ path: `${v}/issues`, name: "webx.audit.issues", component: Ht, props: p },
|
|
3314
|
+
{ path: `${v}/pages`, name: "webx.audit.pages", component: Na, props: p },
|
|
3315
|
+
{ path: `${v}/hosts`, name: "webx.audit.hosts", component: yt, props: p },
|
|
3316
|
+
{ path: `${v}/runs`, name: "webx.audit.runs", component: qa, props: p },
|
|
3253
3317
|
{
|
|
3254
3318
|
path: `${v}/settings`,
|
|
3255
3319
|
name: "webx.audit.settings",
|
|
3256
|
-
component:
|
|
3257
|
-
props:
|
|
3320
|
+
component: Ha,
|
|
3321
|
+
props: p
|
|
3258
3322
|
}
|
|
3259
3323
|
]
|
|
3260
3324
|
};
|
|
3261
3325
|
}
|
|
3262
3326
|
export {
|
|
3263
|
-
|
|
3327
|
+
Ia as DEFAULT_COLUMNS,
|
|
3264
3328
|
ae as PAGE_FIELDS,
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3329
|
+
je as WxAuditDetails,
|
|
3330
|
+
jt as WxAuditHideDialog,
|
|
3331
|
+
yt as WxAuditHostsPage,
|
|
3332
|
+
Ht as WxAuditIssuesPage,
|
|
3333
|
+
ia as WxAuditOverviewPage,
|
|
3334
|
+
Wa as WxAuditPageCard,
|
|
3335
|
+
Na as WxAuditPagesPage,
|
|
3336
|
+
qa as WxAuditRunsPage,
|
|
3337
|
+
Ha as WxAuditSettingsPage,
|
|
3338
|
+
Qa as audit,
|
|
3339
|
+
ct as auditMessages,
|
|
3340
|
+
re as createAuditApi,
|
|
3341
|
+
Le as pageParams
|
|
3278
3342
|
};
|
|
3279
3343
|
//# sourceMappingURL=index.js.map
|