querysub 0.581.0 → 0.582.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.581.0",
3
+ "version": "0.582.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",
@@ -71,7 +71,7 @@
71
71
  "node-forge": "https://github.com/sliftist/forge#e618181b469b07bdc70b968b0391beb8ef5fecd6",
72
72
  "pako": "^2.1.0",
73
73
  "peggy": "^5.0.6",
74
- "sliftutils": "^1.7.50",
74
+ "sliftutils": "^1.7.51",
75
75
  "socket-function": "^1.2.26",
76
76
  "terser": "^5.31.0",
77
77
  "typenode": "^6.6.1",
@@ -28,7 +28,8 @@ const PAST_COLOR = { h: 0, s: 0, l: 90 };
28
28
  const FUTURE_COLOR = { h: 45, s: 80, l: 85 };
29
29
  // Windows are days or hours wide, so the countdown only has to be roughly right
30
30
  const TIME_REFRESH_INTERVAL = 60 * 1000;
31
- const WATCH_POLL_INTERVAL = 60 * 1000;
31
+ // Watching exists to see a config change as it happens - a deploy or a server disagreeing with the others - so it polls far faster than the window countdowns need to update
32
+ const WATCH_POLL_INTERVAL = 5 * 1000;
32
33
  const WATCH_ACTIVE_COLOR = { h: 195, s: 60, l: 85 };
33
34
  const WINDOW_HEADER_SIZE = 13;
34
35
  const WINDOW_TIME_SIZE = 14;
@@ -513,7 +514,8 @@ class RouteConfigGroupView extends qreact.Component<{ group: RouteConfigGroup }>
513
514
  class LiveWatchView extends qreact.Component<{ watchKey: string; watch: LiveWatch }> {
514
515
  render() {
515
516
  let { watchKey, watch } = this.props;
516
- let now = Querysub.timeDelayed(TIME_REFRESH_INTERVAL);
517
+ // Ticks with the polling, not with the window countdowns - "updated 1 minute ago" on something refreshed seconds ago reads as broken
518
+ let now = Querysub.timeDelayed(WATCH_POLL_INTERVAL);
517
519
  let sources = (watch.routing?.sources || []).map(normalizeSource);
518
520
  return <div className={css.vbox(10).fillWidth.pad2(10, 8).bord2(WATCH_ACTIVE_COLOR.h, WATCH_ACTIVE_COLOR.s, WATCH_ACTIVE_COLOR.l - 25)}>
519
521
  <div className={css.hbox(8).wrap.fontSize(WINDOW_HEADER_SIZE)}>