added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / shared / modules / schedule-test-modal / schedule-test-modal.component.pug
diff --git a/otf-frontend/client/src/app/shared/modules/schedule-test-modal/schedule-test-modal.component.pug b/otf-frontend/client/src/app/shared/modules/schedule-test-modal/schedule-test-modal.component.pug
new file mode 100644 (file)
index 0000000..72b7884
--- /dev/null
@@ -0,0 +1,72 @@
+//-  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+//-                                                                             #\r
+//-  Licensed under the Apache License, Version 2.0 (the "License");            #\r
+//-  you may not use this file except in compliance with the License.           #\r
+//-  You may obtain a copy of the License at                                    #\r
+//-                                                                             #\r
+//-      http://www.apache.org/licenses/LICENSE-2.0                             #\r
+//-                                                                             #\r
+//-  Unless required by applicable law or agreed to in writing, software        #\r
+//-  distributed under the License is distributed on an "AS IS" BASIS,          #\r
+//-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+//-  See the License for the specific language governing permissions and        #\r
+//-  limitations under the License.                                             #\r
+//- #############################################################################\r
+\r
+\r
+h2.mb-1(mat-dialog-title) Schedule {{selectedTestInstance ? selectedTestInstance.testInstanceName : ''}}\r
+\r
+mat-dialog-content(*ngIf="selectedTestInstance")\r
+  .row\r
+    .col-sm-6\r
+      h5 Create Schedule\r
+      .row\r
+        .col-sm-6\r
+          mat-form-field\r
+            input(matInput, [matDatepicker]="schedulePicker", [(ngModel)]='startDate', placeholder="Select Start Date", required)\r
+            mat-datepicker-toggle(matSuffix, [for]="schedulePicker")\r
+            mat-datepicker(#schedulePicker)\r
+        .col-sm-6\r
+          mat-form-field\r
+            input(matInput, [(ngModel)]="timeToRun", [ngxTimepicker]="picker", placeholder="Select Time", required)\r
+            ngx-material-timepicker(#picker)\r
+\r
+      .row.mb-2\r
+        .col-12\r
+          mat-slide-toggle(color="primary", [(ngModel)]="frequency") Add Frequency\r
+\r
+      .row(*ngIf="frequency").mb-2\r
+        .col-sm-12\r
+          mat-form-field.mr-2\r
+            input(matInput, type="number",  [(ngModel)]='numUnit', placeholder='Execution Interval', required)\r
+          mat-form-field\r
+            mat-select(placeholder='Time Unit', [(ngModel)]='timeUnit', required)\r
+              mat-option([value]=60) min(s)\r
+              mat-option([value]=3600) hour(s)\r
+              mat-option([value]=86400) day(s)\r
+        .col-sm-6\r
+          mat-form-field\r
+            input(matInput, [matDatepicker]="schedulePicker2",  [(ngModel)]='endDate', placeholder="Select a End Date (Optional)")\r
+            mat-datepicker-toggle(matSuffix, [for]="schedulePicker2")\r
+            mat-datepicker(#schedulePicker2)\r
+      \r
+      .row\r
+        .col-12\r
+          button(mat-raised-button, color="primary", (click)='createSchedule()') Create Schedule\r
+\r
+    .col-sm-6\r
+      h5 Scheduled Runs\r
+      .row(*ngIf="scheduledJobs")\r
+        .col-12\r
+          .group-list\r
+            .group-list-item(*ngFor="let job of scheduledJobs") \r
+              a((click)="deleteJob(job)") \r
+                i.fa.fa-times \r
+              |  {{ job.data.testSchedule._testInstanceStartDate }} {{job.data.testSchedule._testInstanceEndDate ? 'to ' + job.data.testSchedule._testInstanceEndDate : '' }} {{ job.data.testSchedule._testInstanceExecFreqInSeconds ? 'every ' + job.data.testSchedule._testInstanceExecFreqInSeconds + ' sec' : '' }}\r
+            .group-list-item(*ngIf="!loadingJobs && scheduledJobs.length == 0", style="text-align:center") Nothing is scheduled\r
+            .group-list-item(*ngIf="loadingJobs")\r
+              mat-spinner(style="margin:auto")\r
+mat-dialog-actions.pull-right\r
+  button.pull-right(mat-button, mat-dialog-close) Close\r
+    // The mat-dialog-close directive optionally accepts a value as a result for the dialog.\r
+    \r