From 60069d0e6f188e974b37cce0b7b1333a81ec4c64 Mon Sep 17 00:00:00 2001
From: nhertz <nhertz@nrao.edu>
Date: Wed, 15 Sep 2021 15:26:47 -0600
Subject: [PATCH] Added button to sandbox to launch `null_dag` capability

---
 apps/web/src/app/workspaces/workspaces.component.html | 10 ++++++++++
 apps/web/src/app/workspaces/workspaces.component.ts   |  9 +++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/apps/web/src/app/workspaces/workspaces.component.html b/apps/web/src/app/workspaces/workspaces.component.html
index 29b5c9d9d..71cfca09f 100644
--- a/apps/web/src/app/workspaces/workspaces.component.html
+++ b/apps/web/src/app/workspaces/workspaces.component.html
@@ -31,6 +31,16 @@
         Launch null at NMT
       </button>
     </div>
+    <div class="d-flex px-2">
+      <button
+        type="button"
+        id="launchNullDagCapability"
+        class="btn btn-secondary btn-lg"
+        (click)="nullDagButtonOnClick()"
+      >
+        Launch multi-stage null capability
+      </button>
+    </div>
   </div>
 </div>
 <div class="container border rounded py-3 my-3">
diff --git a/apps/web/src/app/workspaces/workspaces.component.ts b/apps/web/src/app/workspaces/workspaces.component.ts
index 5e9d5d468..3b995cc08 100644
--- a/apps/web/src/app/workspaces/workspaces.component.ts
+++ b/apps/web/src/app/workspaces/workspaces.component.ts
@@ -1,9 +1,7 @@
 import { Component, OnInit } from "@angular/core";
 import { CapabilityLauncherService } from "./services/capability-launcher.service";
 import { CapabilityRequest } from "./model/capability-request";
-import { CapabilityExecution } from "./model/capability-execution";
 import { JsonObject } from "@angular/compiler-cli/ngcc/src/packages/entry_point";
-import { ActivatedRoute, Router } from "@angular/router";
 import { CapabilityRequestService } from "./services/capability-request.service";
 
 @Component({
@@ -51,6 +49,13 @@ export class WorkspacesComponent implements OnInit {
     this.launchCapability("null", { arguments: "-g", remote: true });
   }
 
+  /**
+   * OnClick method that creates a capability request for the null_dag capability
+   */
+  nullDagButtonOnClick(): void {
+    this.launchCapability("null_dag", {});
+  }
+
   /**
    * OnClick method that creates a capability request a given capability and submits it with the standard parameters:
    * - Product locator
-- 
GitLab