querysub 0.236.0 → 0.238.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.236.0",
3
+ "version": "0.238.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",
@@ -325,12 +325,11 @@ type ServiceConfig = ${serviceConfigType}
325
325
  const outputData = this.state.watchingOutputs[outputKey].data;
326
326
 
327
327
  return <div key={machineId}
328
- className={css.pad2(12).button.bord2(0, 0, 20) + backgroundColor}
329
- onClick={() => {
330
- currentViewParam.value = "machine-detail";
331
- selectedMachineIdParam.value = machineId;
332
- }}>
333
- <div className={css.hbox(12)}>
328
+ className={css.pad2(12).vbox(10).bord2(0, 0, 20) + backgroundColor}
329
+ >
330
+ <div
331
+ className={css.hbox(12)}
332
+ >
334
333
  <div className={css.flexGrow(1)}>
335
334
  {machineId} ({machineInfo.info["getExternalIP"]})
336
335
  </div>
@@ -364,7 +363,19 @@ type ServiceConfig = ${serviceConfigType}
364
363
  )}
365
364
 
366
365
  <div
367
- className={css.pad2(8, 4).button}
366
+ className={css.button.pad2(16, 8).bord2(0, 0, 10) + css.hsl(200, 70, 90)}
367
+ onClick={() => {
368
+ currentViewParam.value = "machine-detail";
369
+ selectedMachineIdParam.value = machineId;
370
+ }}
371
+ >
372
+ View Machine
373
+ </div>
374
+
375
+
376
+ <div
377
+ className={css.button.pad2(16, 8).bord2(0, 0, 10) + (isWatching ? css.hsl(0, 70, 90) : css.hsl(120, 70, 90))
378
+ }
368
379
  onClick={(e) => {
369
380
  e.stopPropagation();
370
381
  let applyNodeId = machineInfo.applyNodeId;
@@ -377,9 +388,7 @@ type ServiceConfig = ${serviceConfigType}
377
388
  });
378
389
  }}
379
390
  >
380
- <div className={css.pad2(4, 8).bord2(0, 0, 10) + (isWatching ? css.hsl(0, 70, 90) : css.hsl(120, 70, 90))}>
381
- {isWatching ? "Stop Watching Output" : "Watch Screen Output"}
382
- </div>
391
+ {isWatching ? "Stop Watching Output" : "Watch Screen Output"}
383
392
  </div>
384
393
  </div>
385
394
  {hasError && (
@@ -409,19 +418,25 @@ type ServiceConfig = ${serviceConfigType}
409
418
  </div>
410
419
  )}
411
420
 
412
- {isWatching && (
421
+ {isWatching &&
413
422
  <div
414
423
  className={
415
424
  css.pad2(8).bord2(0, 0, 10).hsl(0, 0, 10).colorhsl(0, 0, 100)
416
425
  .whiteSpace("pre-wrap").fontFamily("monospace")
417
426
  .overflowAuto
418
427
  .maxHeight("60vh")
428
+ .fillWidth
419
429
  }
430
+ // Gives the user the cursor, which makes navigating nice
431
+ contentEditable
432
+ onClick={e => e.stopPropagation()}
433
+
420
434
  >
421
435
  {outputData && outputData || "Waiting for output..."}
436
+ {/* <div className={css.size(1, `65vh`)} /> */}
422
437
  <ScrollOnMount debugText={`Screen ${outputKey}`} />
423
438
  </div>
424
- )}
439
+ }
425
440
  </div>;
426
441
  })}
427
442
  </div>
@@ -82,6 +82,7 @@ export async function streamScreenOutput(config: {
82
82
 
83
83
  async function stop() {
84
84
  if (stopped) return;
85
+ console.log(`Stopping stream output for ${screenName}`);
85
86
  stopped = true;
86
87
 
87
88
  if (childProcess) {
@@ -107,6 +108,7 @@ export async function streamScreenOutput(config: {
107
108
 
108
109
  childProcess.stdout?.on("data", (data) => {
109
110
  if (stopped) return;
111
+ console.log(`Captured data for ${screenName}: ${data.length}`);
110
112
  started.resolve();
111
113
  void onDataWrapped(data.toString());
112
114
  });
@@ -133,6 +133,7 @@ class MachineControllerClientBase {
133
133
  }): Promise<void> {
134
134
  let forwardToNodeId = forwardedCallbacks.get(config.callbackId);
135
135
  if (forwardToNodeId) {
136
+ console.log(`onScreenOutput forward ${config.callbackId} ${config.data.length}`);
136
137
  await MachineControllerClient.nodes[forwardToNodeId].onScreenOutput({
137
138
  key: config.key,
138
139
  index: config.index,
@@ -141,6 +142,7 @@ class MachineControllerClientBase {
141
142
  });
142
143
  return;
143
144
  }
145
+ console.log(`onScreenOutput ${config.callbackId} ${config.data.length}`);
144
146
 
145
147
  let callback = callbacks.get(config.callbackId);
146
148
  if (!callback) {
@@ -1,7 +1,12 @@
1
+ todonext;
2
+ Syncing isn't updating?
3
+
1
4
  3) Hmm... being able to watch the output for a service would be useful, and... it should be... trivial to do?
2
5
  - Buttons per key + index, which we can figure out clientside. Stream results under the button, and we can stream multiple at once?
3
6
  - OH, just for superusers, so the browser can connect directly!
4
7
 
8
+ OH! I think if something is scrollable, and is scrolled down, it'll stick to the bottom. We just need it to start scrollable!
9
+
5
10
  4) Destroy our testing digital ocean server
6
11
 
7
12
  5) Setup on our regular digital ocean server