querysub 0.359.0 → 0.360.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/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -22,7 +22,12 @@ let yargObj = parseArgsFactory()
|
|
|
22
22
|
// TODO: The bootstrapper is a single file. Maybe we shouldn't run the entire service just for that. Although... maybe it's fine, as services are light?
|
|
23
23
|
.option("bootstraponly", { type: "boolean", desc: "Don't register as an edge node, so we serve the bootstrap files, but we don't need up to date code because we are not used for endpoints or the UI." })
|
|
24
24
|
.option("notifyemails", { type: "array", desc: "The emails to notify when errors occur." })
|
|
25
|
-
.option("diskaudit", {
|
|
25
|
+
.option("diskaudit", {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
// NOTE: I wanna see how long I can keep this on for. Eventually it's gonna become a problem and we're gonna have to turn it off. But for testing it's certainly useful as we don't know exactly what is gonna cause a problem. But it probably will be synchronization related, and every server does synchronization.
|
|
28
|
+
default: true,
|
|
29
|
+
desc: "Track all audit logs to disk. This might end up writing A LOT of data."
|
|
30
|
+
})
|
|
26
31
|
.argv
|
|
27
32
|
;
|
|
28
33
|
type QuerysubConfig = {
|
|
@@ -23,6 +23,7 @@ import { PUBLIC_MOVE_THRESHOLD } from "./BufferIndexLogsOptimizationConstants";
|
|
|
23
23
|
import { atomic } from "../../../2-proxy/PathValueProxyWatcher";
|
|
24
24
|
import { errorToUndefined } from "querysub/src/errors";
|
|
25
25
|
import { IndexedLogResults, createEmptyIndexedLogResults } from "./BufferIndexHelpers";
|
|
26
|
+
import { TimeFilePath } from "./TimeFileTree";
|
|
26
27
|
|
|
27
28
|
let searchText = new URLParam("searchText", "");
|
|
28
29
|
let readLiveData = new URLParam("readLiveData", false);
|
|
@@ -435,6 +436,19 @@ export class LogViewer3 extends qreact.Component {
|
|
|
435
436
|
this.state.paths = allPaths;
|
|
436
437
|
this.state.loadingPaths = false;
|
|
437
438
|
});
|
|
439
|
+
return allPaths;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
async updatePaths() {
|
|
443
|
+
let prevPaths = this.getPaths();
|
|
444
|
+
let newPaths = await this.loadPaths();
|
|
445
|
+
Querysub.commitLocal(() => {
|
|
446
|
+
function getHash(path: TimeFilePath): string {
|
|
447
|
+
return path.threadId + "_" + path.machineId;
|
|
448
|
+
}
|
|
449
|
+
let keep = new Set(prevPaths.map(getHash));
|
|
450
|
+
this.state.paths = newPaths?.filter(x => keep.has(getHash(x))) || [];
|
|
451
|
+
});
|
|
438
452
|
}
|
|
439
453
|
|
|
440
454
|
cancel = async () => {
|
|
@@ -798,11 +812,16 @@ export class LogViewer3 extends qreact.Component {
|
|
|
798
812
|
<Button
|
|
799
813
|
flavor="large"
|
|
800
814
|
onClick={() => void this.loadPaths()}
|
|
801
|
-
hue={120}
|
|
815
|
+
hue={this.state.paths.length ? 200 : 120}
|
|
802
816
|
>
|
|
803
|
-
Preview Files
|
|
817
|
+
{this.state.paths.length && "Reset Files" || "Preview Files"}
|
|
804
818
|
</Button>
|
|
805
819
|
)}
|
|
820
|
+
{this.state.paths && !savedPathsURL.value &&
|
|
821
|
+
<Button flavor="large" hue={120} onClick={() => void this.updatePaths()}>
|
|
822
|
+
Update Files
|
|
823
|
+
</Button>
|
|
824
|
+
}
|
|
806
825
|
{savedPathsURL.value && (
|
|
807
826
|
<Button
|
|
808
827
|
flavor="large"
|
|
@@ -19,8 +19,7 @@ IMPORTANT! Now I am properly calling shutdown, so none of the streamed logs shou
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
Logs still aren't appearing. Hmm...
|
|
24
23
|
|
|
25
24
|
Hmm... why are not enough logs appearing?
|
|
26
25
|
- We only have logs for server.ts? Wtf?
|