added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / shared / modules / schedule-test-modal / schedule-test-modal.component.pug
1 //-  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
2 //-                                                                             #\r
3 //-  Licensed under the Apache License, Version 2.0 (the "License");            #\r
4 //-  you may not use this file except in compliance with the License.           #\r
5 //-  You may obtain a copy of the License at                                    #\r
6 //-                                                                             #\r
7 //-      http://www.apache.org/licenses/LICENSE-2.0                             #\r
8 //-                                                                             #\r
9 //-  Unless required by applicable law or agreed to in writing, software        #\r
10 //-  distributed under the License is distributed on an "AS IS" BASIS,          #\r
11 //-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
12 //-  See the License for the specific language governing permissions and        #\r
13 //-  limitations under the License.                                             #\r
14 //- #############################################################################\r
15 \r
16 \r
17 h2.mb-1(mat-dialog-title) Schedule {{selectedTestInstance ? selectedTestInstance.testInstanceName : ''}}\r
18 \r
19 mat-dialog-content(*ngIf="selectedTestInstance")\r
20   .row\r
21     .col-sm-6\r
22       h5 Create Schedule\r
23       .row\r
24         .col-sm-6\r
25           mat-form-field\r
26             input(matInput, [matDatepicker]="schedulePicker", [(ngModel)]='startDate', placeholder="Select Start Date", required)\r
27             mat-datepicker-toggle(matSuffix, [for]="schedulePicker")\r
28             mat-datepicker(#schedulePicker)\r
29         .col-sm-6\r
30           mat-form-field\r
31             input(matInput, [(ngModel)]="timeToRun", [ngxTimepicker]="picker", placeholder="Select Time", required)\r
32             ngx-material-timepicker(#picker)\r
33 \r
34       .row.mb-2\r
35         .col-12\r
36           mat-slide-toggle(color="primary", [(ngModel)]="frequency") Add Frequency\r
37 \r
38       .row(*ngIf="frequency").mb-2\r
39         .col-sm-12\r
40           mat-form-field.mr-2\r
41             input(matInput, type="number",  [(ngModel)]='numUnit', placeholder='Execution Interval', required)\r
42           mat-form-field\r
43             mat-select(placeholder='Time Unit', [(ngModel)]='timeUnit', required)\r
44               mat-option([value]=60) min(s)\r
45               mat-option([value]=3600) hour(s)\r
46               mat-option([value]=86400) day(s)\r
47         .col-sm-6\r
48           mat-form-field\r
49             input(matInput, [matDatepicker]="schedulePicker2",  [(ngModel)]='endDate', placeholder="Select a End Date (Optional)")\r
50             mat-datepicker-toggle(matSuffix, [for]="schedulePicker2")\r
51             mat-datepicker(#schedulePicker2)\r
52       \r
53       .row\r
54         .col-12\r
55           button(mat-raised-button, color="primary", (click)='createSchedule()') Create Schedule\r
56 \r
57     .col-sm-6\r
58       h5 Scheduled Runs\r
59       .row(*ngIf="scheduledJobs")\r
60         .col-12\r
61           .group-list\r
62             .group-list-item(*ngFor="let job of scheduledJobs") \r
63               a((click)="deleteJob(job)") \r
64                 i.fa.fa-times \r
65               |  {{ job.data.testSchedule._testInstanceStartDate }} {{job.data.testSchedule._testInstanceEndDate ? 'to ' + job.data.testSchedule._testInstanceEndDate : '' }} {{ job.data.testSchedule._testInstanceExecFreqInSeconds ? 'every ' + job.data.testSchedule._testInstanceExecFreqInSeconds + ' sec' : '' }}\r
66             .group-list-item(*ngIf="!loadingJobs && scheduledJobs.length == 0", style="text-align:center") Nothing is scheduled\r
67             .group-list-item(*ngIf="loadingJobs")\r
68               mat-spinner(style="margin:auto")\r
69 mat-dialog-actions.pull-right\r
70   button.pull-right(mat-button, mat-dialog-close) Close\r
71     // The mat-dialog-close directive optionally accepts a value as a result for the dialog.\r
72     \r