querysub 0.365.0 → 0.366.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.365.0",
3
+ "version": "0.366.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
package/src/config.ts CHANGED
@@ -25,7 +25,6 @@ let yargObj = parseArgsFactory()
25
25
  .option("diskaudit", {
26
26
  type: "boolean",
27
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
28
  desc: "Track all audit logs to disk. This might end up writing A LOT of data."
30
29
  })
31
30
  .argv
@@ -81,7 +80,7 @@ export function isRecovery() {
81
80
  }
82
81
 
83
82
  export function isDiskAudit() {
84
- return !!yargObj.diskaudit;
83
+ return !!(yargObj.diskaudit ?? true);
85
84
  }
86
85
 
87
86
  export function devDebugbreak() {
@@ -192,8 +192,8 @@ export const MachineController = getSyncedController(SocketFunction.register(
192
192
  }),
193
193
  ), {
194
194
  writes: {
195
- deployMachineFromBrowser: ["MachineInfo"],
196
- deployMachine: ["MachineInfo"],
195
+ deployMachineFromBrowser: ["MachineInfo", "RollingInfo"],
196
+ deployMachine: ["MachineInfo", "RollingInfo"],
197
197
  killRollingServicesFromBrowser: ["RollingInfo"],
198
198
  },
199
199
  reads: {
@@ -398,7 +398,7 @@ export class FilePathSelectorModal extends qreact.Component<{
398
398
 
399
399
  return (
400
400
  <div
401
- className={css.vbox(10).pad2(10).hsl(0, 0, 100).overflowAuto.width("75vw").height("75vh").marginAuto}
401
+ className={css.vbox(10).pad2(10).hsl(0, 0, 100).overflowHidden.width("75vw").height("75vh").marginAuto}
402
402
  onClick={(e) => e.stopPropagation()}
403
403
  >
404
404
  <div className={css.hbox(10).alignItems("start")}>
@@ -418,7 +418,8 @@ export class FilePathSelectorModal extends qreact.Component<{
418
418
  <div className={css.vbox(5)}>
419
419
  <div className={css.hbox(10)}>
420
420
  <div className={css.minWidth(120)}>Machines: {formatNumber(summary.machineCount)}</div>
421
- <div className={css.minWidth(110)}>Threads: {formatNumber(summary.threadCount)}</div>
421
+ {/* NOTE: If the files have been merged, the thread count doesn't matter anymore, so it's deceiving to put the thread count here. */}
422
+ {/* <div className={css.minWidth(110)}>Threads: {formatNumber(summary.threadCount)}</div> */}
422
423
  <div className={css.minWidth(140)}>Files: {formatNumber(summary.fileCount)} ({formatNumber(summary.pendingCount)} pending)</div>
423
424
  <div className={css.minWidth(120)}>Size: {this.props.formatBytes(summary.totalSize)}</div>
424
425
  <div className={css.minWidth(100)}>Logs: {formatNumber(summary.totalLogCount)}</div>
@@ -446,114 +447,116 @@ export class FilePathSelectorModal extends qreact.Component<{
446
447
  </div>
447
448
 
448
449
 
449
- {this.props.grouped.map((machine) => {
450
- let isMachineExpanded = machine.machineId in this.state.expandedMachines;
451
- let allFiles = machine.threads.flatMap(t => t.files);
452
- let allSelected = allFiles.every(f => this.state.selectedPaths.has(f.fullPath));
453
- let someSelected = allFiles.some(f => this.state.selectedPaths.has(f.fullPath));
454
- let totalFileCount = allFiles.length;
455
-
456
- return (
457
- <div key={machine.machineId} className={css.vbox(0).bord(1, { h: 0, s: 0, l: 80 })}>
458
- <div
459
- className={css.hbox(5).button}
460
- onMouseDown={() => {
461
- if (isMachineExpanded) {
462
- delete this.state.expandedMachines[machine.machineId];
463
- } else {
464
- this.state.expandedMachines[machine.machineId] = { expanded: true };
465
- }
466
- }}
467
- >
468
- <div>
469
- {isMachineExpanded ? "▼" : "▶"}
470
- </div>
471
- <Button
472
- onClick={(e) => {
473
- e.stopPropagation();
474
- this.toggleMachine(machine.machineId);
450
+ <div className={css.vbox(5).overflowAuto}>
451
+ {this.props.grouped.map((machine) => {
452
+ let isMachineExpanded = machine.machineId in this.state.expandedMachines;
453
+ let allFiles = machine.threads.flatMap(t => t.files);
454
+ let allSelected = allFiles.every(f => this.state.selectedPaths.has(f.fullPath));
455
+ let someSelected = allFiles.some(f => this.state.selectedPaths.has(f.fullPath));
456
+ let totalFileCount = allFiles.length;
457
+
458
+ return (
459
+ <div key={machine.machineId} className={css.vbox(0).bord(1, { h: 0, s: 0, l: 80 })}>
460
+ <div
461
+ className={css.hbox(5).button}
462
+ onMouseDown={() => {
463
+ if (isMachineExpanded) {
464
+ delete this.state.expandedMachines[machine.machineId];
465
+ } else {
466
+ this.state.expandedMachines[machine.machineId] = { expanded: true };
467
+ }
475
468
  }}
476
- onMouseDown={(e) => e.stopPropagation()}
477
- className={css.minWidth(100)}
478
- hue={allSelected ? 120 : undefined}
479
469
  >
480
- {allSelected ? "Selected" : someSelected ? "Partial" : "Not Selected"}
481
- </Button>
482
- <MachineThreadInfo machineId={machine.machineId} />
483
- <div>Threads: {formatNumber(machine.threads.length)}</div>
484
- <div className={css.minWidth(120)}>Files: {formatNumber(totalFileCount)} ({formatNumber(machine.pendingCount)} pending)</div>
485
- <div className={css.minWidth(100)}>Size: {this.props.formatBytes(machine.totalSize)}</div>
486
- <div className={css.minWidth(100)}>Logs: {formatNumber(machine.totalLogCount)}</div>
487
- {machine.errorCount > 0 && (
488
- <div className={css.minWidth(100) + css.colorhsl(0, 80, 40)}>Errors: {formatNumber(machine.errorCount)}</div>
489
- )}
490
- </div>
470
+ <div>
471
+ {isMachineExpanded ? "▼" : "▶"}
472
+ </div>
473
+ <Button
474
+ onClick={(e) => {
475
+ e.stopPropagation();
476
+ this.toggleMachine(machine.machineId);
477
+ }}
478
+ onMouseDown={(e) => e.stopPropagation()}
479
+ className={css.minWidth(100)}
480
+ hue={allSelected ? 120 : undefined}
481
+ >
482
+ {allSelected ? "Selected" : someSelected ? "Partial" : "Not Selected"}
483
+ </Button>
484
+ <MachineThreadInfo machineId={machine.machineId} />
485
+ <div>Threads: {formatNumber(machine.threads.length)}</div>
486
+ <div className={css.minWidth(120)}>Files: {formatNumber(totalFileCount)} ({formatNumber(machine.pendingCount)} pending)</div>
487
+ <div className={css.minWidth(100)}>Size: {this.props.formatBytes(machine.totalSize)}</div>
488
+ <div className={css.minWidth(100)}>Logs: {formatNumber(machine.totalLogCount)}</div>
489
+ {machine.errorCount > 0 && (
490
+ <div className={css.minWidth(100) + css.colorhsl(0, 80, 40)}>Errors: {formatNumber(machine.errorCount)}</div>
491
+ )}
492
+ </div>
491
493
 
492
- {isMachineExpanded && machine.threads.map((thread) => {
493
- let threadKey = `${machine.machineId}:${thread.threadId}`;
494
- let isThreadExpanded = threadKey in this.state.expandedThreads;
495
- let allThreadSelected = thread.files.every(f => this.state.selectedPaths.has(f.fullPath));
496
- let someThreadSelected = thread.files.some(f => this.state.selectedPaths.has(f.fullPath));
497
-
498
- return (
499
- <div key={threadKey} className={css.vbox(0).bord(1, { h: 0, s: 0, l: 85 }).marginLeft(10)}>
500
- <div
501
- className={css.hbox(5).button}
502
- onMouseDown={() => {
503
- if (isThreadExpanded) {
504
- delete this.state.expandedThreads[threadKey];
505
- } else {
506
- this.state.expandedThreads[threadKey] = { expanded: true };
507
- }
508
- }}
509
- >
510
- <div>
511
- {isThreadExpanded ? "▼" : "▶"}
512
- </div>
513
- <Button
514
- onClick={(e) => {
515
- e.stopPropagation();
516
- this.toggleThread(machine.machineId, thread.threadId);
494
+ {isMachineExpanded && machine.threads.map((thread) => {
495
+ let threadKey = `${machine.machineId}:${thread.threadId}`;
496
+ let isThreadExpanded = threadKey in this.state.expandedThreads;
497
+ let allThreadSelected = thread.files.every(f => this.state.selectedPaths.has(f.fullPath));
498
+ let someThreadSelected = thread.files.some(f => this.state.selectedPaths.has(f.fullPath));
499
+
500
+ return (
501
+ <div key={threadKey} className={css.vbox(0).bord(1, { h: 0, s: 0, l: 85 }).marginLeft(10)}>
502
+ <div
503
+ className={css.hbox(5).button}
504
+ onMouseDown={() => {
505
+ if (isThreadExpanded) {
506
+ delete this.state.expandedThreads[threadKey];
507
+ } else {
508
+ this.state.expandedThreads[threadKey] = { expanded: true };
509
+ }
517
510
  }}
518
- onMouseDown={(e) => e.stopPropagation()}
519
- className={css.minWidth(100)}
520
- hue={allThreadSelected ? 120 : undefined}
521
511
  >
522
- {allThreadSelected ? "Selected" : someThreadSelected ? "Partial" : "Not Selected"}
523
- </Button>
524
- <div className={css.minWidth(120)}>Files: {formatNumber(thread.files.length)} ({formatNumber(thread.pendingCount)} pending)</div>
525
- <div className={css.minWidth(100)}>Size: {this.props.formatBytes(thread.totalSize)}</div>
526
- <div className={css.minWidth(100)}>Logs: {formatNumber(thread.totalLogCount)}</div>
527
- {thread.errorCount > 0 && (
528
- <div className={css.minWidth(100) + css.colorhsl(0, 80, 40)}>Errors: {formatNumber(thread.errorCount)}</div>
512
+ <div>
513
+ {isThreadExpanded ? "▼" : "▶"}
514
+ </div>
515
+ <Button
516
+ onClick={(e) => {
517
+ e.stopPropagation();
518
+ this.toggleThread(machine.machineId, thread.threadId);
519
+ }}
520
+ onMouseDown={(e) => e.stopPropagation()}
521
+ className={css.minWidth(100)}
522
+ hue={allThreadSelected ? 120 : undefined}
523
+ >
524
+ {allThreadSelected ? "Selected" : someThreadSelected ? "Partial" : "Not Selected"}
525
+ </Button>
526
+ <div className={css.minWidth(120)}>Files: {formatNumber(thread.files.length)} ({formatNumber(thread.pendingCount)} pending)</div>
527
+ <div className={css.minWidth(100)}>Size: {this.props.formatBytes(thread.totalSize)}</div>
528
+ <div className={css.minWidth(100)}>Logs: {formatNumber(thread.totalLogCount)}</div>
529
+ {thread.errorCount > 0 && (
530
+ <div className={css.minWidth(100) + css.colorhsl(0, 80, 40)}>Errors: {formatNumber(thread.errorCount)}</div>
531
+ )}
532
+ <MachineThreadInfo machineId={machine.machineId} threadId={thread.threadId} onlyShowThread />
533
+ </div>
534
+
535
+ {isThreadExpanded && (
536
+ <table className={css.width("100%")}>
537
+ <thead>
538
+ <tr>
539
+ <th className={css.pad2(2).textAlign("left")}>Selection</th>
540
+ <th className={css.pad2(2).textAlign("left")}>Size</th>
541
+ <th className={css.pad2(2).textAlign("left")}>Logs</th>
542
+ <th className={css.pad2(2).textAlign("left")}>Source</th>
543
+ <th className={css.pad2(2).textAlign("left")}>Dedupe</th>
544
+ <th className={css.pad2(2).textAlign("left")}>Start Time</th>
545
+ <th className={css.pad2(2).textAlign("left")}>Status</th>
546
+ </tr>
547
+ </thead>
548
+ <tbody>
549
+ {thread.files.map((file) => this.renderFile(file, machine.machineId, errorsByPath))}
550
+ </tbody>
551
+ </table>
529
552
  )}
530
- <MachineThreadInfo machineId={machine.machineId} threadId={thread.threadId} onlyShowThread />
531
553
  </div>
532
-
533
- {isThreadExpanded && (
534
- <table className={css.width("100%")}>
535
- <thead>
536
- <tr>
537
- <th className={css.pad2(2).textAlign("left")}>Selection</th>
538
- <th className={css.pad2(2).textAlign("left")}>Size</th>
539
- <th className={css.pad2(2).textAlign("left")}>Logs</th>
540
- <th className={css.pad2(2).textAlign("left")}>Source</th>
541
- <th className={css.pad2(2).textAlign("left")}>Dedupe</th>
542
- <th className={css.pad2(2).textAlign("left")}>Start Time</th>
543
- <th className={css.pad2(2).textAlign("left")}>Status</th>
544
- </tr>
545
- </thead>
546
- <tbody>
547
- {thread.files.map((file) => this.renderFile(file, machine.machineId, errorsByPath))}
548
- </tbody>
549
- </table>
550
- )}
551
- </div>
552
- );
553
- })}
554
- </div>
555
- );
556
- })}
554
+ );
555
+ })}
556
+ </div>
557
+ );
558
+ })}
559
+ </div>
557
560
 
558
561
  <div className={css.hbox(10)}>
559
562
  <Button onClick={() => this.save()} hue={120}>
@@ -158,8 +158,9 @@ export class LogViewer3 extends qreact.Component {
158
158
  savedPathsURL.value = compressed.toString("base64");
159
159
  }
160
160
 
161
- clearFrozenPaths() {
161
+ async clearFrozenPaths() {
162
162
  savedPathsURL.value = "";
163
+ await this.loadPaths();
163
164
  }
164
165
 
165
166
  renderSearchStats() {
@@ -328,8 +329,7 @@ export class LogViewer3 extends qreact.Component {
328
329
  ))}
329
330
  <Button
330
331
  onClick={() => {
331
- this.clearFrozenPaths();
332
- void this.loadPaths();
332
+ void this.clearFrozenPaths();
333
333
  }}
334
334
  hue={180}
335
335
  >
@@ -795,10 +795,6 @@ export class LogViewer3 extends qreact.Component {
795
795
  <TimeRangeSelector />
796
796
  </div>
797
797
 
798
- <h1>
799
- Test 2
800
- </h1>
801
-
802
798
  <div className={css.hbox(10).fillWidth}>
803
799
  <InputLabelURL
804
800
  flavor="large"
@@ -821,7 +817,7 @@ export class LogViewer3 extends qreact.Component {
821
817
  {this.state.paths.length && "Reset Files" || "Preview Files"}
822
818
  </Button>
823
819
  )}
824
- {this.state.paths && !savedPathsURL.value &&
820
+ {this.getPaths().length > 0 &&
825
821
  <Button flavor="large" hue={120} onClick={() => void this.updatePaths()}>
826
822
  Update Files
827
823
  </Button>
@@ -867,8 +863,7 @@ export class LogViewer3 extends qreact.Component {
867
863
  <Button
868
864
  onClick={() => {
869
865
  if (savedPathsURL.value) {
870
- this.clearFrozenPaths();
871
- void this.loadPaths();
866
+ void this.clearFrozenPaths();
872
867
  } else {
873
868
  this.freezePaths();
874
869
  }
@@ -19,20 +19,9 @@ IMPORTANT! Now I am properly calling shutdown, so none of the streamed logs shou
19
19
 
20
20
 
21
21
 
22
- BUG: We aren't able to connect directly to the apply service? Hmm...
23
-
24
- 0) Make a minor UI change, so we can see rolling nodes appear
25
- 1) Disable, to ensure rolling nodes go away
26
- 2) Re-enable
27
- 3) Another minor UI change
28
- 4) Use the new "kill rolling" so we can see a forced update
29
-
30
-
31
- BUG: Why are CYOA deploys not working!
32
- I even disabled it, and nothing. It's still running. WTF...
22
+ Make sure audits are appearing.
23
+ new non-local WATCH
33
24
 
34
- Hmm... why are not enough logs appearing?
35
- - We only have logs for server.ts? Wtf?
36
25
 
37
26
  2.0) SUPPORT reading pending from multiple servers
38
27
  - The main controller has to find a node on each other machine, and call it. Only one node per machine though, so it shouldn't be too difficult.
@@ -48,10 +37,15 @@ BUG: UGH... live logs for the remote server isn't working...
48
37
  - UGH... it being pending logs is annoying, as that's hard to debug locally...
49
38
  AH! Why do we have so few logs?
50
39
 
40
+
41
+ 1) Support & / | syntax in find
42
+ - Add note above search for *, &, | syntax
43
+
44
+ NOTE: The reason we're not going to add the ability to pin to specific threads is because The files are going to be combined cross-thread anyway, and that should be mostly the files we're searching eventually.
45
+
51
46
  2) Create lot of remote server logs
52
47
  - Via our refresh loop
53
48
 
54
- 3) Verify true remote reads are reasonable fast
55
49
 
56
50
  3) Deploy service for movelogs
57
51
  0) Run move logs in function runner, in development, just so we don't get too far behind