You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/05/14 12:20:00 UTC
[incubator-dlab] 01/02: [DLAB-619]: added possibility to terminate
by schedule for Data Engine Services
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-619
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit af06b0bdd87308dc3828b7639e8d1c934f6c8550
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Tue May 14 15:04:46 2019 +0300
[DLAB-619]: added possibility to terminate by schedule for Data Engine Services
---
.../computational-resources-list.component.html | 3 +-
.../resources/scheduler/scheduler.component.html | 54 ++++++++++++++++------
.../resources/scheduler/scheduler.component.scss | 3 ++
3 files changed, 44 insertions(+), 16 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
index b69ae35..3881705 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
@@ -33,8 +33,7 @@
<div class="resource-actions">
<a class="schedule" [ngClass]="{'active': resource.scheduler_data,
- 'not-allowed': resource.image === 'docker.dlab-dataengine-service'
- || environment.status !== 'running' && environment.status !== 'stopped'
+ 'not-allowed': environment.status !== 'running' && environment.status !== 'stopped'
|| resource.status !== 'running' && resource.status !== 'stopped'
|| healthStatus === 'error' }">
<i class="material-icons" (click)="openScheduleDialog(resource)">schedule</i>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
index 90203da..258b013 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
@@ -33,14 +33,15 @@
<mat-slide-toggle labelPosition="after" [checked]="enableSchedule" (change)="toggleSchedule($event)">
<span *ngIf="toggleSchedule" class="hold-label">Scheduler by time</span>
</mat-slide-toggle>
- <div class="idle">
+ <div class="idle" *ngIf="destination.image !== 'docker.dlab-dataengine-service'">
<mat-slide-toggle labelPosition="before" [checked]="enableIdleTime" (change)="toggleIdleTimes($event)">
<span *ngIf="toggleSchedule" class="hold-label">Scheduler by inactivity</span>
</mat-slide-toggle>
</div>
</div>
- <div class="note m-bott-10">NOTE: In case of turning on inactivity time-check, your schedule
+ <div class="note m-bott-10" *ngIf="destination.image !== 'docker.dlab-dataengine-service'">
+ NOTE: In case of turning on inactivity time-check, your schedule
configuration will be decommissioned.</div>
<div class="control-group idle-control" [ngClass]="{ show: enableIdleTimeView }">
@@ -56,8 +57,9 @@
</div>
</div>
<div class="schedule-by-time" *ngIf="!enableIdleTimeView"
- [ngClass]="{ hide: enableIdleTimeView, resource: destination.type === 'СOMPUTATIONAL' }">
- <div class="row-wrap">
+ [ngClass]="{ hide: enableIdleTimeView, resource: destination.type === 'СOMPUTATIONAL',
+ des: destination.image === 'docker.dlab-dataengine-service' }">
+ <div class="row-wrap" *ngIf="destination.image !== 'docker.dlab-dataengine-service'">
<div class="col-3">
<mat-form-field>
<input matInput [matDatepicker]="startDate" placeholder="Choose start date" formControlName="startDate">
@@ -96,7 +98,7 @@
</ng-template>
</div>
- <div class="row-wrap">
+ <div class="row-wrap" *ngIf="destination.image !== 'docker.dlab-dataengine-service'">
<div class="control-group col-3 time-range">
<dlab-time-picker [(pickTime)]="startTime" [label]="'Choose start time'"
[disable]="destination.type === 'СOMPUTATIONAL' && inherit || !enableSchedule">
@@ -111,10 +113,11 @@
[disable]="!enableSchedule"></dlab-time-picker>
</div>
<div *ngIf="timeReqiered" class="error m-bott-10 mt-5"><span>At least one of time range fields
- should be selected</span></div>
+ should be selected</span>
+ </div>
</div>
- <div class="row-wrap" *ngIf="destination.type === 'СOMPUTATIONAL'">
+ <div class="row-wrap" *ngIf="destination.type === 'СOMPUTATIONAL' && destination.image !== 'docker.dlab-dataengine-service'">
<div class="col-3">
<mat-form-field class="timezone-offset">
<mat-select placeholder="Select offset" [(value)]="tzOffset"
@@ -124,7 +127,7 @@
</mat-form-field>
</div>
</div>
- <div class="control-group" *ngIf="destination">
+ <div class="control-group" *ngIf="destination && destination.image !== 'docker.dlab-dataengine-service'">
<label class="label repeat" for="options">Repeat on :</label>
<div class="days-block">
<label>Start date:</label>
@@ -144,7 +147,31 @@
</div>
</div>
- <div class="options" *ngIf="destination && allowInheritView">
+ <div class="row-wrap des-block" *ngIf="destination.image === 'docker.dlab-dataengine-service'">
+ <div class="col-3">
+ <mat-form-field>
+ <input matInput [matDatepicker]="terminateDate" placeholder="Choose terminate date"
+ formControlName="terminateDate">
+ <mat-datepicker-toggle
+ matSuffix [for]="terminateDate"></mat-datepicker-toggle>
+ <mat-datepicker #terminateDate></mat-datepicker>
+ </mat-form-field>
+ </div>
+ <div class="control-group col-3 time-range" *ngIf="destination.type === 'СOMPUTATIONAL'">
+ <dlab-time-picker [(pickTime)]="terminateTime" [label]="'Choose terminate time'"
+ [disable]="!enableSchedule"></dlab-time-picker>
+ </div>
+ <div class="col-3">
+ <mat-form-field class="timezone-offset">
+ <mat-select placeholder="Select offset" [(value)]="tzOffset"
+ [disabled]="destination.type === 'СOMPUTATIONAL' && inherit || !enableSchedule">
+ <mat-option *ngFor="let zone of zones" [value]="zone">{{ zone }}</mat-option>
+ </mat-select>
+ </mat-form-field>
+ </div>
+ </div>
+
+ <div class="options" *ngIf="destination && allowInheritView && destination.image !== 'docker.dlab-dataengine-service'">
<mat-slide-toggle labelPosition="after" [checked]="inherit" (change)="toggleInherit($event)"
[disabled]="!enableSchedule || (!parentInherit && destination.type === 'СOMPUTATIONAL')">
<span *ngIf="destination.type === 'EXPLORATORY'; else resourcePropagation" class="hold-label">
@@ -157,22 +184,21 @@
</mat-slide-toggle>
</div>
</div>
+
<div class="options" *ngIf="destination.type === 'EXPLORATORY'">
<mat-slide-toggle labelPosition="after" [checked]="considerInactivity"
[disabled]="!enableSchedule && !enableIdleTime" (change)="considerInactivity = !considerInactivity">
<span class="hold-label">
- <!-- <span>Use even some jobs are ran on computational resources</span> -->
- <span>In case of running jobs on Spark standalone, notebook stop scheduler will not be
- trigger</span>
+ <span>In case of running jobs on Spark standalone, notebook stop scheduler will not be triggered</span>
</span>
</mat-slide-toggle>
</div>
+
</form>
<div class="text-center m-top-30">
<button mat-raised-button type="button" class="butt action" (click)="close()">Cancel</button>
- <button mat-raised-button type="button" class="butt butt-success action"
+ <button mat-raised-button type="button" class="butt butt-success action" [disabled]="enableIdleTime && !schedulerForm.controls.inactivityTime.valid"
(click)="scheduleInstance_btnClick()">Save</button>
- <!-- [disabled]="!enableSchedule && !enableIdleTime" -->
</div>
</div>
</modal-content>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss
index 83d9bac..0b55df3 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.scss
@@ -101,6 +101,9 @@
&.resource {
height: 280px;
}
+ &.des {
+ height: 80px;
+ }
.row-wrap {
position: relative;
.error {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org