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