You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2020/11/04 12:47:42 UTC
[incubator-datalab] branch DATALAB-2123 updated: Update angular
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DATALAB-2123
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/DATALAB-2123 by this push:
new f970e9c Update angular
f970e9c is described below
commit f970e9c8afc2eb6873d4da09c7cbba34ea13659c
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Nov 4 14:46:31 2020 +0200
Update angular
---
.../src/app/core/services/localization.service.ts | 6 +-
.../bucket-browser/bucket-browser.component.scss | 9 +--
.../buckets-tree/bucket-tree.component.scss | 11 +---
.../app/resources/scheduler/scheduler.component.ts | 73 +++++++++++-----------
.../src/main/resources/webapp/tsconfig.json | 3 +-
5 files changed, 48 insertions(+), 54 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts
index 7aa9a0a..9e6533a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts
@@ -19,15 +19,15 @@
import { Injectable } from '@angular/core';
import { registerLocaleData } from '@angular/common';
-import * as _moment from 'moment';
-import 'moment-timezone';
+// import * as _moment from 'moment';
+// import 'moment-timezone';
@Injectable({
providedIn: 'root'
})
export class LocalizationService {
- public timezone = _moment().format('Z');
+ // public timezone = _moment().format('Z');
private _locale;
constructor() { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.scss
index 88a8dd9..5fd829e 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.scss
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+
.dialog-header {
padding-left: 33px !important;
}
@@ -24,7 +25,6 @@
font-size: 14px;
font-weight: 400;
-
.loading-block{
width: 80%;
margin: 0 auto;
@@ -187,11 +187,8 @@
position: relative;
opacity: 0;
}
-
-
}
-
.bucket-wrapper{
height: 57vh;
border: 2px solid rgba(0,0,0,.12);
@@ -229,14 +226,13 @@
top: 9px;
text-align: center;
-
i{
cursor: pointer;
font-size: 18px;
&:hover{
color: #00bcd4;
- }
+ }
}
}
@@ -266,6 +262,7 @@
}
}
}
+
.navigation{
transition: .2s;
width: 31.3%;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/buckets-tree/bucket-tree.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/buckets-tree/bucket-tree.component.scss
index 5bd774a..4befb8b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/buckets-tree/bucket-tree.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/buckets-tree/bucket-tree.component.scss
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
+
.folder{
padding-left: 5px;
max-width: 350px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
-
}
.mat-tree{
@@ -45,8 +45,6 @@
i{
color: #00bcd4;
}
-
-
}
.add-folder-form{
@@ -64,8 +62,10 @@
height: 25px;
line-height: 28px;
}
+
&:hover{
color: #00bcd4;
+
i{
color: #00bcd4;
}
@@ -109,11 +109,6 @@
.mat-error {
background-color: #ffffff;
}
-
- .d-none{
- display: none;
- }
-
}
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 7d826c2..ca9b455 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
@@ -22,8 +22,8 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { ToastrService } from 'ngx-toastr';
-import * as _moment from 'moment';
-import 'moment-timezone';
+// import * as _moment from 'moment';
+// import 'moment-timezone';
import { SchedulerService } from '../../core/services';
@@ -62,7 +62,8 @@ export class SchedulerComponent implements OnInit {
public schedulerForm: FormGroup;
public destination: any;
public zones: {};
- public tzOffset: string = _moment().format('Z');
+ //public tzOffset: string = _moment().format('Z');
+ public tzOffset: string = '+0300';
public startTime = SchedulerCalculations.convertTimeFormat('09:00');
public startTimeMilliseconds: number = SchedulerCalculations.setTimeInMiliseconds(this.startTime);
public endTime = SchedulerCalculations.convertTimeFormat('20:00');
@@ -90,13 +91,13 @@ export class SchedulerComponent implements OnInit {
public open(notebook, type, resource?): void {
this.notebook = notebook;
- this.zones = _moment.tz.names()
- .map(item => [_moment.tz(item).format('Z'), item])
- .sort()
- .reduce((memo, item) => {
- memo[item[0]] ? memo[item[0]] += `, ${item[1]}` : memo[item[0]] = item[1];
- return memo;
- }, {});
+ // this.zones = _moment.tz.names()
+ // .map(item => [_moment.tz(item).format('Z'), item])
+ // .sort()
+ // .reduce((memo, item) => {
+ // memo[item[0]] ? memo[item[0]] += `, ${item[1]}` : memo[item[0]] = item[1];
+ // return memo;
+ // }, {});
this.model = new SchedulerModel(
response => {
@@ -225,9 +226,9 @@ export class SchedulerComponent implements OnInit {
finishDate: this.schedulerForm.controls.finishDate.value,
terminateDate: this.schedulerForm.controls.terminateDate.value
};
- const terminateDateTime = (data.terminateDate && this.terminateTime)
- ? `${_moment(data.terminateDate).format(this.date_format)} ${SchedulerCalculations.convertTimeFormat(this.terminateTime)}`
- : null;
+ // const terminateDateTime = (data.terminateDate && this.terminateTime)
+ // ? `${_moment(data.terminateDate).format(this.date_format)} ${SchedulerCalculations.convertTimeFormat(this.terminateTime)}`
+ // : null;
if (!this.startTime && !this.endTime && !this.terminateTime && this.enableSchedule) {
this.timeReqiered = true;
@@ -240,25 +241,25 @@ export class SchedulerComponent implements OnInit {
}
const selectedDays = Object.keys(this.selectedStartWeekDays);
- const parameters: ScheduleSchema = {
- begin_date: data.startDate ? _moment(data.startDate).format(this.date_format) : null,
- finish_date: data.finishDate ? _moment(data.finishDate).format(this.date_format) : null,
- start_time: this.startTime ? SchedulerCalculations.convertTimeFormat(this.startTime) : null,
- end_time: this.endTime ? SchedulerCalculations.convertTimeFormat(this.endTime) : null,
- start_days_repeat: selectedDays.filter(el => Boolean(this.selectedStartWeekDays[el])).map(day => day.toUpperCase()),
- stop_days_repeat: selectedDays.filter(el => Boolean(this.selectedStopWeekDays[el])).map(day => day.toUpperCase()),
- timezone_offset: this.tzOffset,
- sync_start_required: this.inherit,
- check_inactivity_required: this.enableIdleTime,
- terminate_datetime: terminateDateTime
- };
-
- if (this.destination.type === 'СOMPUTATIONAL') {
- this.model.confirmAction(this.notebook.project, this.notebook.name, parameters, this.destination.computational_name);
- } else {
- parameters['consider_inactivity'] = this.considerInactivity;
- this.model.confirmAction(this.notebook.project, this.notebook.name, parameters);
- }
+ // const parameters: ScheduleSchema = {
+ // begin_date: data.startDate ? _moment(data.startDate).format(this.date_format) : null,
+ // finish_date: data.finishDate ? _moment(data.finishDate).format(this.date_format) : null,
+ // start_time: this.startTime ? SchedulerCalculations.convertTimeFormat(this.startTime) : null,
+ // end_time: this.endTime ? SchedulerCalculations.convertTimeFormat(this.endTime) : null,
+ // start_days_repeat: selectedDays.filter(el => Boolean(this.selectedStartWeekDays[el])).map(day => day.toUpperCase()),
+ // stop_days_repeat: selectedDays.filter(el => Boolean(this.selectedStopWeekDays[el])).map(day => day.toUpperCase()),
+ // timezone_offset: this.tzOffset,
+ // sync_start_required: this.inherit,
+ // check_inactivity_required: this.enableIdleTime,
+ // terminate_datetime: terminateDateTime
+ // };
+
+ // if (this.destination.type === 'СOMPUTATIONAL') {
+ // this.model.confirmAction(this.notebook.project, this.notebook.name, parameters, this.destination.computational_name);
+ // } else {
+ // parameters['consider_inactivity'] = this.considerInactivity;
+ // this.model.confirmAction(this.notebook.project, this.notebook.name, parameters);
+ // }
}
private setScheduleByInactivity() {
@@ -274,9 +275,9 @@ export class SchedulerComponent implements OnInit {
private formInit(start?: string, end?: string, terminate?: string) {
this.schedulerForm = this.formBuilder.group({
- startDate: { disabled: this.inherit, value: start ? _moment(start).format() : null },
- finishDate: { disabled: this.inherit, value: end ? _moment(end).format() : null },
- terminateDate: { disabled: false, value: terminate ? _moment(terminate).format() : null },
+ // startDate: { disabled: this.inherit, value: start ? _moment(start).format() : null },
+ // finishDate: { disabled: this.inherit, value: end ? _moment(end).format() : null },
+ // terminateDate: { disabled: false, value: terminate ? _moment(terminate).format() : null },
inactivityTime: [this.inactivityLimits.min,
[Validators.compose([Validators.pattern(this.integerRegex), this.validInactivityRange.bind(this)])]]
});
@@ -342,7 +343,7 @@ export class SchedulerComponent implements OnInit {
this.enableSchedule = false;
this.considerInactivity = false;
this.enableIdleTime = false;
- this.tzOffset = _moment().format('Z');
+ // this.tzOffset = _moment().format('Z');
this.startTime = SchedulerCalculations.convertTimeFormat('09:00');
this.endTime = SchedulerCalculations.convertTimeFormat('20:00');
this.terminateTime = null;
diff --git a/services/self-service/src/main/resources/webapp/tsconfig.json b/services/self-service/src/main/resources/webapp/tsconfig.json
index bc53e8c..20365e6 100644
--- a/services/self-service/src/main/resources/webapp/tsconfig.json
+++ b/services/self-service/src/main/resources/webapp/tsconfig.json
@@ -17,7 +17,8 @@
"angularCompilerOptions": {
//"fullTemplateTypeCheck": true,
// "preserveWhitespaces": true
- "annotationsAs": "decorators"
+ "annotationsAs": "decorators",
+ "enableIvy": false
},
"skipLibCheck": true
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org