querysub 0.227.0 → 0.229.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
|
@@ -172,6 +172,36 @@ type ServiceConfig = ${serviceConfigType}
|
|
|
172
172
|
sort(machines, x => -x.heartbeat);
|
|
173
173
|
|
|
174
174
|
return <div className={css.vbox(16).fillWidth}>
|
|
175
|
+
<style>{`
|
|
176
|
+
@keyframes rainbow-slide {
|
|
177
|
+
0% { background-position: 100% 100%; }
|
|
178
|
+
100% { background-position: 0% 0%; }
|
|
179
|
+
}
|
|
180
|
+
.rainbow-flash {
|
|
181
|
+
background: linear-gradient(-45deg,
|
|
182
|
+
hsl(0, 70%, 50%),
|
|
183
|
+
hsl(60, 70%, 50%),
|
|
184
|
+
hsl(120, 70%, 50%),
|
|
185
|
+
hsl(180, 70%, 50%),
|
|
186
|
+
hsl(240, 70%, 50%),
|
|
187
|
+
hsl(300, 70%, 50%),
|
|
188
|
+
hsl(0, 70%, 50%),
|
|
189
|
+
hsl(60, 70%, 50%),
|
|
190
|
+
hsl(120, 70%, 50%),
|
|
191
|
+
hsl(180, 70%, 50%)
|
|
192
|
+
);
|
|
193
|
+
background-size: 300% 300%;
|
|
194
|
+
color: white;
|
|
195
|
+
font-weight: bold;
|
|
196
|
+
text-shadow:
|
|
197
|
+
3px 3px 6px rgba(0, 0, 0, 0.9),
|
|
198
|
+
-3px -3px 6px rgba(0, 0, 0, 0.9),
|
|
199
|
+
3px -3px 6px rgba(0, 0, 0, 0.9),
|
|
200
|
+
-3px 3px 6px rgba(0, 0, 0, 0.9),
|
|
201
|
+
0 0 12px rgba(0, 0, 0, 0.8);
|
|
202
|
+
animation: rainbow-slide 3s linear infinite;
|
|
203
|
+
}
|
|
204
|
+
`}</style>
|
|
175
205
|
<div className={css.vbox(4).fillWidth}>
|
|
176
206
|
<InputLabel
|
|
177
207
|
label="Title"
|
|
@@ -269,19 +299,22 @@ type ServiceConfig = ${serviceConfigType}
|
|
|
269
299
|
)}
|
|
270
300
|
</div>
|
|
271
301
|
{hasError && (
|
|
272
|
-
<div
|
|
302
|
+
<div
|
|
303
|
+
className={css.pad2(8, 4).button}
|
|
304
|
+
onClick={(e) => {
|
|
305
|
+
e.stopPropagation();
|
|
306
|
+
const key = `${machineId}-${selectedServiceId || ""}`;
|
|
307
|
+
const current = this.state.expandedErrors[key];
|
|
308
|
+
if (current) {
|
|
309
|
+
current.expanded = !current.expanded;
|
|
310
|
+
} else {
|
|
311
|
+
this.state.expandedErrors[key] = { expanded: true };
|
|
312
|
+
}
|
|
313
|
+
}}
|
|
314
|
+
>
|
|
273
315
|
<div
|
|
274
|
-
className={css.
|
|
275
|
-
|
|
276
|
-
e.stopPropagation();
|
|
277
|
-
const key = `${machineId}-${selectedServiceId || ""}`;
|
|
278
|
-
const current = this.state.expandedErrors[key];
|
|
279
|
-
if (current) {
|
|
280
|
-
current.expanded = !current.expanded;
|
|
281
|
-
} else {
|
|
282
|
-
this.state.expandedErrors[key] = { expanded: true };
|
|
283
|
-
}
|
|
284
|
-
}}>
|
|
316
|
+
className={css.pad2(4, 8).bord2(0, 0, 10).hsl(0, 0, 80)}
|
|
317
|
+
>
|
|
285
318
|
{this.state.expandedErrors[`${machineId}-${selectedServiceId || ""}`]?.expanded ? "Hide Error ▲" : "Show Error ▼"}
|
|
286
319
|
</div>
|
|
287
320
|
{serviceInfo?.errorFromLastRun && this.state.expandedErrors[`${machineId}-${selectedServiceId || ""}`]?.expanded && (
|
|
@@ -313,7 +346,7 @@ type ServiceConfig = ${serviceConfigType}
|
|
|
313
346
|
<button className={css.pad2(12, 8).button.bord2(0, 0, 20).hsl(0, 0, 80)}
|
|
314
347
|
onClick={() => {
|
|
315
348
|
configT.parameters.poke = (configT.parameters.poke || 0) + 1;
|
|
316
|
-
void this.
|
|
349
|
+
void this.updateConfigSynced(configT);
|
|
317
350
|
}}>
|
|
318
351
|
Poke
|
|
319
352
|
</button>
|
|
@@ -352,8 +385,8 @@ type ServiceConfig = ${serviceConfigType}
|
|
|
352
385
|
</button>
|
|
353
386
|
</>}
|
|
354
387
|
|
|
355
|
-
{this.state.isSaving && <div className={css.pad2(12, 8).
|
|
356
|
-
Deploying
|
|
388
|
+
{this.state.isSaving && <div className={css.pad2(12, 8).bord2(0, 0, 20) + " rainbow-flash"}>
|
|
389
|
+
Deploying changes
|
|
357
390
|
</div>}
|
|
358
391
|
|
|
359
392
|
<div className={css.marginAuto}></div>
|
|
@@ -436,6 +469,7 @@ type ServiceConfig = ${serviceConfigType}
|
|
|
436
469
|
theme: "vs-dark",
|
|
437
470
|
automaticLayout: true,
|
|
438
471
|
minimap: { enabled: false },
|
|
472
|
+
wordWrap: "on",
|
|
439
473
|
});
|
|
440
474
|
|
|
441
475
|
// Listen for changes
|
|
@@ -169,9 +169,29 @@ const runScreenCommand = measureWrap(async function runScreenCommand(config: {
|
|
|
169
169
|
// Throw if it already exists
|
|
170
170
|
await runPromise(`${prefix}tmux new -s ${screenName} -d`);
|
|
171
171
|
} catch { }
|
|
172
|
-
await runPromise(`${prefix}tmux send-keys -t ${screenName} 'echo "Updating running command at $(
|
|
173
|
-
// Send ctrl+c to kill any running command
|
|
172
|
+
await runPromise(`${prefix}tmux send-keys -t ${screenName} 'echo "Updating running command at ${new Date().toISOString()}"' Enter`);
|
|
174
173
|
await runPromise(`${prefix}tmux send-keys -t ${screenName} 'C-c' Enter`);
|
|
174
|
+
await delay(1000);
|
|
175
|
+
if (await isScreenRunningProcess(screenName)) {
|
|
176
|
+
// It doesn't want to die. Wait longer, but it it just won't die, kill the screen
|
|
177
|
+
console.warn(`Screen ${screenName} is not dying, giving it another 30 seconds`);
|
|
178
|
+
await delay(timeInSecond * 30);
|
|
179
|
+
if (await isScreenRunningProcess(screenName)) {
|
|
180
|
+
console.warn(`Screen ${screenName} is still running, killing it forcefully`);
|
|
181
|
+
await killScreen({ screenName });
|
|
182
|
+
if (await isScreenRunningProcess(screenName)) {
|
|
183
|
+
console.error(`I don't know what happened. The screen won't die. We can't do much else, I guess we'll just ignore it...`);
|
|
184
|
+
} else {
|
|
185
|
+
// Nested, to create the screen again.
|
|
186
|
+
await runScreenCommand({
|
|
187
|
+
screenName,
|
|
188
|
+
command: config.command,
|
|
189
|
+
folder: config.folder,
|
|
190
|
+
});
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
175
195
|
await runPromise(`${prefix}tmux send-keys -t ${screenName} 'cd ${config.folder}' Enter`);
|
|
176
196
|
await runPromise(`${prefix}tmux send-keys -t ${screenName} '${config.command}' Enter`);
|
|
177
197
|
});
|