querysub 0.694.0 → 0.695.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.694.0",
3
+ "version": "0.695.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",
@@ -595,19 +595,6 @@ export class ServiceDetailPage extends qreact.Component {
595
595
  Old instances shut down in {formatTime(scheduledDeploy.switchTime + scheduledDeploy.overlapTime - now)} ({formatDateTimeDetailed(scheduledDeploy.switchTime + scheduledDeploy.overlapTime)})
596
596
  </div>
597
597
  <div className={css.hbox(8)}>
598
- <button
599
- className={css.pad2(12, 8).button.bord2(0, 0, 20).hsl(0, 70, 90)}
600
- onClick={() => {
601
- this.runControllerAction(async () => {
602
- let cancelled = await controller.cancelScheduledDeploy.promise(selectedServiceId);
603
- // Keep the cancelled changes in the editor, so they aren't lost (Discard Changes drops them)
604
- Querysub.commit(() => {
605
- this.state.editorState = cancelled;
606
- });
607
- });
608
- }}>
609
- Cancel Scheduled Deploy
610
- </button>
611
598
  <button
612
599
  className={css.pad2(12, 8).button.bord2(45, 80, 35).hsl(45, 85, 82)}
613
600
  disabled={this.state.isDeploying}
@@ -415,20 +415,6 @@ export class MachineServiceControllerBase {
415
415
  void this.notifyMachines([], getConfigMachineIds(normalizeServiceConfig(serviceConfig)));
416
416
  }
417
417
 
418
- /** Cancels parameters that are scheduled to deploy (releaseTime in the future), reverting to what is currently live. Returns the cancelled config, so the caller can keep the edits (ex, back in the editor). */
419
- public async cancelScheduledDeploy(serviceId: string): Promise<ServiceConfig> {
420
- let record = await serviceConfigs.get(serviceId);
421
- if (!record) {
422
- throw new Error(`Service ${serviceId} does not exist`);
423
- }
424
- normalizeServiceConfig(record);
425
- if (!record.parameters.releaseTime || Date.now() >= record.parameters.releaseTime || !record.oldParameters) {
426
- throw new Error(`Service ${serviceId} has no scheduled deploy to cancel (it may have already gone live)`);
427
- }
428
- await serviceConfigs.set(serviceId, { ...record, parameters: record.oldParameters, oldParameters: undefined });
429
- void this.notifyMachines(getConfigMachineIds(record), []);
430
- return stripReleaseState(record);
431
- }
432
418
  public async getServiceConfigType(): Promise<string> {
433
419
  return extractType(module, "ServiceConfig");
434
420
  }
@@ -657,7 +643,6 @@ export const MachineServiceController = getSyncedController(
657
643
  setMachineConfig: {},
658
644
  addServiceConfig: {},
659
645
  setServiceConfigs: {},
660
- cancelScheduledDeploy: {},
661
646
  getServiceConfigType: {},
662
647
  deleteServiceConfig: {},
663
648
  getGitInfo: {},
@@ -682,7 +667,6 @@ export const MachineServiceController = getSyncedController(
682
667
  setMachineConfig: ["MachineConfig", "MachineConfigList"],
683
668
  addServiceConfig: ["ServiceConfig", "ServiceConfigList"],
684
669
  setServiceConfigs: ["ServiceConfig"],
685
- cancelScheduledDeploy: ["ServiceConfig"],
686
670
  deleteServiceConfig: ["ServiceConfig", "ServiceConfigList"],
687
671
  commitPushService: ["gitInfo", "ServiceConfig"],
688
672
  commitPushAndPublishQuerysub: ["gitInfo", "ServiceConfig"],