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/04/18 10:51:52 UTC
[incubator-dlab] branch inactivity_integration updated: [DLAB-454]:
added terminate date validity check
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch inactivity_integration
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/inactivity_integration by this push:
new e7f029b [DLAB-454]: added terminate date validity check
e7f029b is described below
commit e7f029ba4d7a68ec28a3be6b5d8fa9e12fdd209d
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Apr 18 13:51:18 2019 +0300
[DLAB-454]: added terminate date validity check
---
.../resources/scheduler/scheduler.component.html | 1 -
.../resources/scheduler/scheduler.component.scss | 361 +++++++++++----------
.../app/resources/scheduler/scheduler.component.ts | 2 +
3 files changed, 184 insertions(+), 180 deletions(-)
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 f1cf415..90203da 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
@@ -80,7 +80,6 @@
<input matInput [matDatepicker]="terminateDate" placeholder="Choose terminate date"
formControlName="terminateDate">
<mat-datepicker-toggle
- [ngClass]="{'not-allowed' : destination.type === 'СOMPUTATIONAL' && inherit || !enableSchedule }"
matSuffix [for]="terminateDate"></mat-datepicker-toggle>
<mat-datepicker #terminateDate></mat-datepicker>
</mat-form-field>
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 cecedde..83d9bac 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
@@ -18,189 +18,192 @@
*/
.scheduler-dialog {
- .mat-form-field-appearance-legacy {
- .mat-form-field-label {
- font-family: 'Open Sans', sans-serif !important;
- font-size: 13px;
- }
- }
+ .mat-form-field-appearance-legacy {
+ .mat-form-field-label {
+ font-family: 'Open Sans', sans-serif !important;
+ font-size: 13px;
+ }
+ }
+ .mat-select-value {
+ color: #758da9;
+ }
+ .mat-select-disabled {
.mat-select-value {
- color: #758da9;
- }
- .mat-select-disabled {
- .mat-select-value {
- color: #9e9e9e;
- }
- }
- .mat-form-field-flex {
- width: 160px;
- }
- .mat-select-trigger {
- width: 180px;
- }
- .content-box {
- overflow: hidden;
- }
- .enable-schedule {
- display: flex;
- margin-bottom: 10px;
- .idle {
- display: flex;
- width: 50%;
- i {
- font-size: 20px;
- padding-left: 10px;
- align-self: center;
- user-select: none;
- cursor: pointer;
- }
- }
- }
- .info-message,
- .idle-control {
- height: 0;
- opacity: 0;
- visibility: hidden;
- text-align: left;
- transition: height 0.35s linear 0.2s;
- padding-bottom: 0;
- &.show {
- height: 30px;
- visibility: visible;
- opacity: 1;
- margin-bottom: 50px;
- }
- }
- .idle-control {
- .control {
- position: relative;
- .error {
- position: absolute;
- left: 5px;
- top: 40px;
- font-size: 12px;
- }
- }
- }
- .info-message {
- &.show {
- margin-bottom: 15px;
- }
- }
- .schedule-by-time {
- transition: opacity 0.5s linear 0.2s;
- visibility: visible;
- height: 240px;
+ color: #9e9e9e;
+ }
+ }
+ .mat-form-field-flex {
+ width: 160px;
+ }
+ .mat-select-trigger {
+ width: 180px;
+ }
+ .content-box {
+ overflow: hidden;
+ }
+ .enable-schedule {
+ display: flex;
+ margin-bottom: 10px;
+ .idle {
+ display: flex;
+ width: 50%;
+ i {
+ font-size: 20px;
+ padding-left: 10px;
+ align-self: center;
+ user-select: none;
+ cursor: pointer;
+ }
+ }
+ }
+ .info-message,
+ .idle-control {
+ height: 0;
+ opacity: 0;
+ visibility: hidden;
+ text-align: left;
+ transition: height 0.35s linear 0.2s;
+ padding-bottom: 0;
+ &.show {
+ height: 30px;
+ visibility: visible;
+ opacity: 1;
+ margin-bottom: 50px;
+ }
+ }
+ .idle-control {
+ .control {
+ position: relative;
+ .error {
+ position: absolute;
+ left: 5px;
+ top: 40px;
+ font-size: 12px;
+ }
+ }
+ }
+ .info-message {
+ &.show {
+ margin-bottom: 15px;
+ }
+ }
+ .schedule-by-time {
+ transition: opacity 0.5s linear 0.2s;
+ visibility: visible;
+ height: 240px;
+ opacity: 1;
+ &.hide {
+ height: 0;
+ opacity: 0;
+ visibility: hidden;
+ text-align: left;
+ }
+ &.resource {
+ height: 280px;
+ }
+ .row-wrap {
+ position: relative;
+ .error {
+ position: absolute;
+ bottom: -10px;
+ font-size: 12px;
+ }
+ mat-datepicker-toggle.not-allowed {
opacity: 1;
- &.hide {
- height: 0;
- opacity: 0;
- visibility: hidden;
- text-align: left;
- }
- &.resource {
- height: 280px;
- }
- .row-wrap {
- position: relative;
- .error {
- position: absolute;
- bottom: -10px;
- font-size: 12px;
- }
- }
- }
- .col-3 {
- width: 33%;
- box-sizing: border-box;
- padding: 0 5px;
- &:last-child {
- padding-right: 0;
+ }
+ }
+ }
+ .col-3 {
+ width: 33%;
+ box-sizing: border-box;
+ padding: 0 5px;
+ &:last-child {
+ padding-right: 0;
+ }
+ }
+ .control-group {
+ .label.repeat {
+ width: 100%;
+ }
+ .week-day {
+ display: flex;
+ width: 50%;
+ padding: 5px 10px;
+ transition: all 0.4s ease-out;
+ &.Sunday {
+ order: 0;
+ }
+ &.Monday {
+ order: 1;
+ }
+ &.Tuesday {
+ order: 5;
+ }
+ &.Wednesday {
+ order: 6;
+ }
+ &.Thursday {
+ order: 0;
+ }
+ &.Friday {
+ order: 1;
+ }
+ &.Saturday {
+ order: 5;
+ }
+ &:hover {
+ color: #35afd5;
+ }
+ }
+ &.time-range {
+ padding-bottom: 0 !important;
+ }
+ .days-block {
+ padding-bottom: 0;
+ margin: 15px 15px 0 0;
+ .mat-button-toggle-standalone {
+ box-shadow: none;
+ margin: 2px;
+ &.mat-button-toggle-checked {
+ background-color: rgba(77, 184, 218, 0.62);
+ color: #ffffff;
}
- }
- .control-group {
- .label.repeat {
- width: 100%;
- }
- .week-day {
- display: flex;
- width: 50%;
- padding: 5px 10px;
- transition: all 0.4s ease-out;
- &.Sunday {
- order: 0;
- }
- &.Monday {
- order: 1;
- }
- &.Tuesday {
- order: 5;
- }
- &.Wednesday {
- order: 6;
- }
- &.Thursday {
- order: 0;
- }
- &.Friday {
- order: 1;
- }
- &.Saturday {
- order: 5;
- }
- &:hover {
- color: #35afd5;
- }
+ &.mat-button-toggle-disabled.mat-button-toggle-checked {
+ background-color: #bdbdbd !important;
}
- &.time-range {
- padding-bottom: 0 !important;
+ .mat-button-toggle-label-content {
+ line-height: 26px;
+ padding: 0px 8px;
+ width: 26px;
+ font-size: 13px;
+ text-align: center;
+ background: rgba(196, 231, 243, 0.3);
}
- .days-block {
- padding-bottom: 0;
- margin: 15px 15px 0 0;
- .mat-button-toggle-standalone {
- box-shadow: none;
- margin: 2px;
- &.mat-button-toggle-checked {
- background-color: rgba(77, 184, 218, 0.62);
- color: #ffffff;
- }
- &.mat-button-toggle-disabled.mat-button-toggle-checked {
- background-color: #bdbdbd !important;
- }
- .mat-button-toggle-label-content {
- line-height: 26px;
- padding: 0px 8px;
- width: 26px;
- font-size: 13px;
- text-align: center;
- background: rgba(196, 231, 243, 0.3);
- }
- }
- }
- }
- .timezone-offset {
- width: 100%;
- padding-right: 10px;
- }
- .note {
- display: flex;
- font-size: 12px;
- color: #36afd5;
- }
- .options {
- color: #718ba6;
- font-size: 15px;
- font-weight: 600;
- margin-bottom: 10px;
- .mat-slide-toggle-content {
- padding: 5px;
- .hold-label {
- span {
- font-size: 13px;
- vertical-align: text-bottom;
- }
- }
+ }
+ }
+ }
+ .timezone-offset {
+ width: 100%;
+ padding-right: 10px;
+ }
+ .note {
+ display: flex;
+ font-size: 12px;
+ color: #36afd5;
+ }
+ .options {
+ color: #718ba6;
+ font-size: 15px;
+ font-weight: 600;
+ margin-bottom: 10px;
+ .mat-slide-toggle-content {
+ padding: 5px;
+ .hold-label {
+ span {
+ font-size: 13px;
+ vertical-align: text-bottom;
}
+ }
}
-}
\ No newline at end of file
+ }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts
index 427d8a6..fb0a4fc 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.ts
@@ -153,6 +153,7 @@ export class SchedulerComponent implements OnInit {
: this.schedulerForm.get('startDate').disable();
this.enableSchedule ? this.schedulerForm.get('finishDate').enable() : this.schedulerForm.get('finishDate').disable();
+ this.enableSchedule ? this.schedulerForm.get('terminateDate').enable() : this.schedulerForm.get('terminateDate').disable();
if (this.enableSchedule && $event.source) this.enableIdleTimeView = false;
}
@@ -330,5 +331,6 @@ export class SchedulerComponent implements OnInit {
this.schedulerForm.get('startDate').disable();
this.schedulerForm.get('finishDate').disable();
+ this.schedulerForm.get('terminateDate').disable();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org