querysub 0.311.0 → 0.313.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +1 -1
- package/costsBenefits.txt +4 -1
- package/package.json +3 -2
- package/spec.txt +23 -18
- package/src/-0-hooks/hooks.ts +1 -1
- package/src/-a-archives/archives.ts +16 -3
- package/src/-a-archives/archivesBackBlaze.ts +51 -3
- package/src/-a-archives/archivesLimitedCache.ts +175 -0
- package/src/-a-archives/archivesPrivateFileSystem.ts +299 -0
- package/src/-a-auth/certs.ts +58 -31
- package/src/-b-authorities/cdnAuthority.ts +2 -2
- package/src/-b-authorities/dnsAuthority.ts +3 -2
- package/src/-c-identity/IdentityController.ts +9 -2
- package/src/-d-trust/NetworkTrust2.ts +38 -31
- package/src/-e-certs/EdgeCertController.ts +3 -4
- package/src/-e-certs/certAuthority.ts +1 -2
- package/src/-f-node-discovery/NodeDiscovery.ts +20 -13
- package/src/-g-core-values/NodeCapabilities.ts +6 -1
- package/src/0-path-value-core/NodePathAuthorities.ts +1 -1
- package/src/0-path-value-core/PathValueCommitter.ts +3 -3
- package/src/0-path-value-core/PathValueController.ts +3 -3
- package/src/0-path-value-core/archiveLocks/ArchiveLocks2.ts +15 -37
- package/src/0-path-value-core/pathValueCore.ts +4 -3
- package/src/3-path-functions/PathFunctionRunner.ts +2 -2
- package/src/4-dom/qreact.tsx +4 -3
- package/src/4-querysub/Querysub.ts +2 -2
- package/src/4-querysub/QuerysubController.ts +2 -2
- package/src/5-diagnostics/GenericFormat.tsx +1 -0
- package/src/5-diagnostics/Table.tsx +3 -0
- package/src/5-diagnostics/diskValueAudit.ts +2 -1
- package/src/5-diagnostics/nodeMetadata.ts +0 -1
- package/src/deployManager/components/MachineDetailPage.tsx +9 -1
- package/src/deployManager/components/ServiceDetailPage.tsx +10 -1
- package/src/diagnostics/NodeViewer.tsx +3 -4
- package/src/diagnostics/logs/FastArchiveAppendable.ts +748 -0
- package/src/diagnostics/logs/FastArchiveController.ts +524 -0
- package/src/diagnostics/logs/FastArchiveViewer.tsx +863 -0
- package/src/diagnostics/logs/LogViewer2.tsx +349 -0
- package/src/diagnostics/logs/TimeRangeSelector.tsx +94 -0
- package/src/diagnostics/logs/diskLogger.ts +135 -305
- package/src/diagnostics/logs/diskShimConsoleLogs.ts +6 -29
- package/src/diagnostics/logs/errorNotifications/ErrorNotificationController.ts +577 -0
- package/src/diagnostics/logs/errorNotifications/ErrorSuppressionUI.tsx +225 -0
- package/src/diagnostics/logs/errorNotifications/ErrorWarning.tsx +207 -0
- package/src/diagnostics/logs/importLogsEntry.ts +38 -0
- package/src/diagnostics/logs/injectFileLocationToConsole.ts +7 -17
- package/src/diagnostics/logs/lifeCycleAnalysis/lifeCycles.tsx +0 -0
- package/src/diagnostics/logs/lifeCycleAnalysis/spec.md +151 -0
- package/src/diagnostics/managementPages.tsx +7 -16
- package/src/diagnostics/misc-pages/ComponentSyncStats.tsx +0 -1
- package/src/diagnostics/periodic.ts +5 -0
- package/src/diagnostics/watchdog.ts +2 -2
- package/src/functional/SocketChannel.ts +67 -0
- package/src/library-components/Input.tsx +1 -1
- package/src/library-components/InputLabel.tsx +5 -2
- package/src/misc.ts +111 -0
- package/src/src.d.ts +34 -1
- package/src/user-implementation/userData.ts +4 -3
- package/test.ts +13 -0
- package/testEntry2.ts +29 -0
- package/src/diagnostics/errorLogs/ErrorLogController.ts +0 -535
- package/src/diagnostics/errorLogs/ErrorLogCore.ts +0 -274
- package/src/diagnostics/errorLogs/LogClassifiers.tsx +0 -308
- package/src/diagnostics/errorLogs/LogFilterUI.tsx +0 -84
- package/src/diagnostics/errorLogs/LogNotify.tsx +0 -101
- package/src/diagnostics/errorLogs/LogTimeSelector.tsx +0 -723
- package/src/diagnostics/errorLogs/LogViewer.tsx +0 -757
- package/src/diagnostics/errorLogs/logFiltering.tsx +0 -149
- package/src/diagnostics/logs/DiskLoggerPage.tsx +0 -613
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { URLParam, createURLSync } from "../../../src/library-components/URLParam";
|
|
2
|
-
import preact from "preact"; import { qreact } from "../../../src/4-dom/qreact";
|
|
3
|
-
import { Button } from "../../../src/library-components/Button";
|
|
4
|
-
import { css } from "typesafecss";
|
|
5
|
-
import { LogBlockInfo } from "../../../src/diagnostics/errorLogs/ErrorLogCore";
|
|
6
|
-
import { cache } from "socket-function/src/caching";
|
|
7
|
-
import { formatNumber } from "socket-function/src/formatting/format";
|
|
8
|
-
import { TimelineInfo } from "./LogTimeSelector";
|
|
9
|
-
import { getPathFromStr, getPathStr } from "../../../src/path";
|
|
10
|
-
|
|
11
|
-
// NOTE: You visit the page to see errors, so that's what we mostly show.
|
|
12
|
-
// - We show all values inside the top UI AND the "last" UI
|
|
13
|
-
// - The "top" UI helps the user discover what they can see
|
|
14
|
-
// - The "last" UI results in being able to see if the warning fraction is increasing
|
|
15
|
-
// - Also, because of the minimum size, it SHOULD allow seeing if there are any fatals
|
|
16
|
-
// or infos (the fraction will almost always be crushed by warnings though).
|
|
17
|
-
// - The rest of the UI is just based on showing when things happened, and then
|
|
18
|
-
// resolving recent issues.
|
|
19
|
-
|
|
20
|
-
export const showFatalURL = new URLParam("showLogs", true);
|
|
21
|
-
export const showErrorURL = new URLParam("showErrors", true);
|
|
22
|
-
export const showWarningURL = new URLParam("showWarnings", false);
|
|
23
|
-
export const showInfoURL = new URLParam("showInfos", false);
|
|
24
|
-
|
|
25
|
-
export const showOldestLogsFirstURL = new URLParam("logOldestFirst", false);
|
|
26
|
-
export const showLiveLogsURL = new URLParam("showLiveLogs", true);
|
|
27
|
-
|
|
28
|
-
// getPathStr(ids)
|
|
29
|
-
export const filterToClassesURL = new URLParam("filterToClasses", "");
|
|
30
|
-
export const filterMachineIdsURL = new URLParam("filterMachineIds", "");
|
|
31
|
-
export const filterThreadIdsURL = new URLParam("filterThreadIds", "");
|
|
32
|
-
|
|
33
|
-
export function getPathArrayLax(str: string) {
|
|
34
|
-
if (!str) return [];
|
|
35
|
-
let array = getPathFromStr(str);
|
|
36
|
-
if (!array.length) return [str];
|
|
37
|
-
return array;
|
|
38
|
-
}
|
|
39
|
-
export function getLogFilterClasses() {
|
|
40
|
-
return getPathArrayLax(filterToClassesURL.value);
|
|
41
|
-
}
|
|
42
|
-
export function getLogFilterMachineIds() {
|
|
43
|
-
return getPathArrayLax(filterMachineIdsURL.value);
|
|
44
|
-
}
|
|
45
|
-
export function getLogFilterThreadIds() {
|
|
46
|
-
return getPathArrayLax(filterThreadIdsURL.value);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const fatalColor = { h: -5, s: 75, l: 75 };
|
|
50
|
-
export const errorColor = { h: 0, s: 50, l: 50 };
|
|
51
|
-
export const warnColor = { h: 50, s: 50, l: 50 };
|
|
52
|
-
export const infoColor = { h: 200, s: 50, l: 50 };
|
|
53
|
-
|
|
54
|
-
export const countColors = {
|
|
55
|
-
fatal: fatalColor,
|
|
56
|
-
error: errorColor,
|
|
57
|
-
warn: warnColor,
|
|
58
|
-
info: infoColor,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export type Counts = {
|
|
62
|
-
total: number;
|
|
63
|
-
fatal: number;
|
|
64
|
-
error: number;
|
|
65
|
-
warn: number;
|
|
66
|
-
info: number;
|
|
67
|
-
};
|
|
68
|
-
export let countTypes = ["fatal", "error", "warn", "info"] as const;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export class PickLogType extends qreact.Component<{
|
|
72
|
-
infos: TimelineInfo[] | undefined;
|
|
73
|
-
}> {
|
|
74
|
-
render() {
|
|
75
|
-
let counts = countTypesCache(this.props.infos);
|
|
76
|
-
function renderShowButton(config: {
|
|
77
|
-
url: URLParam<boolean>;
|
|
78
|
-
title: string;
|
|
79
|
-
color: { h: number; s: number; l: number; };
|
|
80
|
-
count: number;
|
|
81
|
-
}) {
|
|
82
|
-
let { url, title, color, count } = config;
|
|
83
|
-
color = { ...color };
|
|
84
|
-
if (!url.value) {
|
|
85
|
-
color.s -= 30;
|
|
86
|
-
}
|
|
87
|
-
return (
|
|
88
|
-
<Button
|
|
89
|
-
class={css
|
|
90
|
-
.hsla(color.h, color.s, color.l, 1)
|
|
91
|
-
.button
|
|
92
|
-
.color("white")
|
|
93
|
-
.border("1px solid hsl(0, 0%, 10%)")
|
|
94
|
-
.boldStyle
|
|
95
|
-
.pad2(30, 16)
|
|
96
|
-
+ (!url.value ? css.opacity(0.5) : "")
|
|
97
|
-
}
|
|
98
|
-
onClick={() => url.value = !url.value}
|
|
99
|
-
>
|
|
100
|
-
{url.value ? "Hide " : "Show "} {formatNumber(count)} {title}s
|
|
101
|
-
</Button>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
return (
|
|
105
|
-
<div class={css.hbox(2).center}>
|
|
106
|
-
{renderShowButton({
|
|
107
|
-
url: showFatalURL,
|
|
108
|
-
title: "Fatal",
|
|
109
|
-
color: fatalColor,
|
|
110
|
-
count: counts.fatalCount,
|
|
111
|
-
})}
|
|
112
|
-
{renderShowButton({
|
|
113
|
-
url: showErrorURL,
|
|
114
|
-
title: "Error",
|
|
115
|
-
color: errorColor,
|
|
116
|
-
count: counts.errorCount,
|
|
117
|
-
})}
|
|
118
|
-
{renderShowButton({
|
|
119
|
-
url: showWarningURL,
|
|
120
|
-
title: "Warning",
|
|
121
|
-
color: warnColor,
|
|
122
|
-
count: counts.warnCount,
|
|
123
|
-
})}
|
|
124
|
-
{renderShowButton({
|
|
125
|
-
url: showInfoURL,
|
|
126
|
-
title: "Info",
|
|
127
|
-
color: infoColor,
|
|
128
|
-
count: counts.infoCount,
|
|
129
|
-
})}
|
|
130
|
-
</div>
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const countTypesCache = cache((infos: TimelineInfo[] | undefined) => {
|
|
136
|
-
let fatalCount = 0;
|
|
137
|
-
let errorCount = 0;
|
|
138
|
-
let warnCount = 0;
|
|
139
|
-
let infoCount = 0;
|
|
140
|
-
if (infos) {
|
|
141
|
-
for (let info of infos) {
|
|
142
|
-
fatalCount += info.fatalCount;
|
|
143
|
-
errorCount += info.errorCount;
|
|
144
|
-
warnCount += info.warnCount;
|
|
145
|
-
infoCount += info.infoCount;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return { fatalCount, errorCount, warnCount, infoCount };
|
|
149
|
-
});
|