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