diff --git a/ui/angular.json b/ui/angular.json index ebbd2ac266..cbf3017655 100644 --- a/ui/angular.json +++ b/ui/angular.json @@ -28,7 +28,7 @@ "node_modules/codemirror/lib/codemirror.css", "node_modules/codemirror/addon/hint/show-hint.css", "node_modules/codemirror/theme/darcula.css", - "node_modules/semantic-ui/dist/semantic.css", + "node_modules/fomantic-ui/dist/semantic.css", "node_modules/angular2-toaster/toaster.css", "node_modules/font-awesome/css/font-awesome.css", "node_modules/animate.css/animate.min.css", @@ -36,8 +36,8 @@ "src/styles.scss" ], "scripts": [ - "node_modules/jquery/dist/jquery.min.js", - "node_modules/semantic-ui/dist/semantic.min.js", + "node_modules/jquery/dist/jquery.js", + "node_modules/fomantic-ui/dist/semantic.min.js", "node_modules/codemirror/lib/codemirror.js", "node_modules/codemirror/mode/shell/shell.js", "node_modules/codemirror/addon/mode/simple.js", @@ -91,7 +91,7 @@ } }, "serve": { - "builder": "@angular-builders/dev-server:generic", + "builder": "@angular-builders/custom-webpack:dev-server", "options": { "browserTarget": "ui-ng2:build" }, @@ -121,8 +121,8 @@ "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "scripts": [ - "node_modules/jquery/dist/jquery.min.js", - "node_modules/semantic-ui/dist/semantic.min.js", + "node_modules/jquery/dist/jquery.js", + "node_modules/fomantic-ui/dist/semantic.min.js", "node_modules/codemirror/lib/codemirror.js", "node_modules/codemirror/mode/shell/shell.js", "node_modules/codemirror/addon/mode/simple.js", @@ -148,7 +148,7 @@ "node_modules/dragula/dist/dragula.css", "node_modules/codemirror/lib/codemirror.css", "node_modules/codemirror/addon/hint/show-hint.css", - "node_modules/semantic-ui/dist/semantic.css", + "node_modules/fomantic-ui/dist/semantic.css", "node_modules/angular2-toaster/toaster.css", "node_modules/font-awesome/css/font-awesome.css", "node_modules/animate.css/animate.min.css", @@ -214,4 +214,4 @@ "prefix": "app" } } -} \ No newline at end of file +} diff --git a/ui/package.json b/ui/package.json index 43e3fdc85e..5c93229685 100644 --- a/ui/package.json +++ b/ui/package.json @@ -38,22 +38,22 @@ }, "private": true, "dependencies": { - "@angular/animations": "7.2.2", - "@angular/common": "7.2.2", - "@angular/compiler": "7.2.2", - "@angular/core": "7.2.2", - "@angular/forms": "7.2.2", - "@angular/http": "7.2.2", - "@angular/platform-browser": "7.2.2", - "@angular/platform-browser-dynamic": "7.2.2", - "@angular/router": "7.2.2", + "@angular/animations": "8.0.0", + "@angular/common": "8.0.0", + "@angular/compiler": "8.0.0", + "@angular/core": "8.0.0", + "@angular/forms": "8.0.0", + "@angular/http": "7.2.15", + "@angular/platform-browser": "8.0.0", + "@angular/platform-browser-dynamic": "8.0.0", + "@angular/router": "8.0.0", "@ngui/auto-complete": "2.0.0", "@ngx-translate/core": "11.0.1", "@ngx-translate/http-loader": "4.0.0", "@ngxs/devtools-plugin": "3.3.4", "@ngxs/logger-plugin": "3.3.4", "@ngxs/store": "3.3.4", - "@swimlane/ngx-charts": "10.0.0", + "@swimlane/ngx-charts": "11.1.0", "@types/dagre-d3": "0.4.38", "angular2-prettyjson": "3.0.1", "angular2-toaster": "7.0.0", @@ -69,6 +69,7 @@ "duration-js": "4.0.0", "enhanced-resolve": "4.1.0", "fast-json-patch": "2.0.7", + "fomantic-ui": "2.7.5", "font-awesome": "4.7.0", "immutable": "4.0.0-rc.12", "js-beautify": "1.8.9", @@ -76,32 +77,30 @@ "moment": "2.24.0", "ng-event-source": "1.0.14", "ng-semantic": "https://github.com/sguiheux/ngSemantic/tarball/sgu-master", - "ng2-codemirror-typescript": "1.1.2", + "ng2-codemirror-typescript": "2.0.0", "ng2-completer": "2.0.8", "ng2-dragula": "2.1.1", "ng2-semantic-ui": "git+https://git@github.com/bnjjj/ng2-semantic-ui.git#dist", "ngx-auto-scroll": "1.1.0", - "ngx-clipboard": "11.1.9", + "ngx-clipboard": "12.1.0", "ngx-infinite-scroll": "7.0.1", "ngx-markdown": "7.1.2", "ngx-moment": "3.4.0", "prismjs": "1.15.0", "raven-js": "3.27.0", - "rxjs": "6.3.3", + "rxjs": "6.5.2", "rxjs-compat": "6.3.3", "sanitize-html": "1.20.0", - "semantic-ui": "2.2.13", "spinkit": "1.2.5", "string-format-obj": "1.1.1", "ts-helpers": "1.1.2", - "zone.js": "0.8.29" + "zone.js": "0.9.1" }, "devDependencies": { - "@angular-builders/custom-webpack": "7.4.3", - "@angular-builders/dev-server": "7.3.1", - "@angular-devkit/build-angular": "0.12.3", - "@angular/cli": "7.2.3", - "@angular/compiler-cli": "7.2.2", + "@angular-builders/custom-webpack": "8.0.2", + "@angular-devkit/build-angular": "0.800.2", + "@angular/cli": "8.0.2", + "@angular/compiler-cli": "8.0.0", "@compodoc/compodoc": "1.1.7", "@sentry/cli": "1.37.4", "@types/d3": "5.7.0", @@ -123,10 +122,9 @@ "karma-jasmine-html-reporter": "1.4.0", "karma-junit-reporter": "1.2.0", "lint-staged": "git+https://github.com/bnjjj/lint-staged.git#master", - "node-sass": "4.11.0", "ts-node": "8.0.2", "tslint": "5.12.1", - "typescript": "3.2.4", + "typescript": "3.4.5", "webdriver-manager": "12.1.1", "webpack-bundle-analyzer": "3.3.2", "wrench-sui": "0.0.3" diff --git a/ui/semantic.json b/ui/semantic.json index 3e17784c69..757d4b40e4 100644 --- a/ui/semantic.json +++ b/ui/semantic.json @@ -1,5 +1,5 @@ { - "base": "semantic\\", + "base": "semantic", "paths": { "source": { "config": "src/theme.config", @@ -18,5 +18,5 @@ "permission": false, "autoInstall": true, "rtl": false, - "version": "2.2.13" -} \ No newline at end of file + "version": "2.7.5" +} diff --git a/ui/src/app/app.routing.ts b/ui/src/app/app.routing.ts index 070a07d27c..cc92695417 100644 --- a/ui/src/app/app.routing.ts +++ b/ui/src/app/app.routing.ts @@ -3,13 +3,20 @@ import {PreloadAllModules, RouterModule, Routes} from '@angular/router'; const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, - { path: 'home', loadChildren: 'app/views/home/home.module#HomeModule', data: { title: 'Home' }}, - { path: 'favorite', loadChildren: 'app/views/favorite/favorite.module#FavoriteModule', data: { title: 'Bookmarks' } }, - { path: 'broadcast', loadChildren: 'app/views/broadcast/broadcast.module#BroadcastModule', data: { title: 'Broadcasts' } }, - { path: 'account', loadChildren: 'app/views/account/account.module#AccountModule', data: { title: 'Account' } }, - { path: 'project', loadChildren: 'app/views/project/project.module#ProjectModule', data: { title: 'Project' } }, - { path: 'settings', loadChildren: 'app/views/settings/settings.module#SettingsModule', data: { title: 'Settings' } }, - { path: 'admin', loadChildren: 'app/views/admin/admin.module#AdminModule', data: { title: 'Admin' }} + { path: 'home', loadChildren: () => import('app/views/home/home.module') + .then(m => m.HomeModule), data: { title: 'Home' }}, + { path: 'favorite', loadChildren: () => import('app/views/favorite/favorite.module') + .then(m => m.FavoriteModule), data: { title: 'Bookmarks' } }, + { path: 'broadcast', loadChildren: () => import('app/views/broadcast/broadcast.module') + .then(m => m.BroadcastModule), data: { title: 'Broadcasts' } }, + { path: 'account', loadChildren: () => import('app/views/account/account.module') + .then(m => m.AccountModule), data: { title: 'Account' } }, + { path: 'project', loadChildren: () => import('app/views/project/project.module') + .then(m => m.ProjectModule), data: { title: 'Project' } }, + { path: 'settings', loadChildren: () => import('app/views/settings/settings.module') + .then(m => m.SettingsModule), data: { title: 'Settings' } }, + { path: 'admin', loadChildren: () => import('app/views/admin/admin.module') + .then(m => m.AdminModule), data: { title: 'Admin' }} ]; export const routing: ModuleWithProviders = RouterModule.forRoot(routes, { diff --git a/ui/src/app/shared/diff/item/diff.item.component.ts b/ui/src/app/shared/diff/item/diff.item.component.ts index 339420c938..ddda11018a 100644 --- a/ui/src/app/shared/diff/item/diff.item.component.ts +++ b/ui/src/app/shared/diff/item/diff.item.component.ts @@ -16,8 +16,8 @@ export class Mode { }) @AutoUnsubscribe() export class DiffItemComponent implements OnInit, OnChanges { - @ViewChild('codeLeft') codeLeft: any; - @ViewChild('codeRight') codeRight: any; + @ViewChild('codeLeft', {static: false}) codeLeft: any; + @ViewChild('codeRight', {static: false}) codeRight: any; @Input() original: string; @Input() updated: string; diff --git a/ui/src/app/shared/labels/edit/labels.edit.component.ts b/ui/src/app/shared/labels/edit/labels.edit.component.ts index 4eb74c5e5a..89c46b2053 100644 --- a/ui/src/app/shared/labels/edit/labels.edit.component.ts +++ b/ui/src/app/shared/labels/edit/labels.edit.component.ts @@ -16,7 +16,7 @@ import { Label, Project } from '../../../model/project.model'; export class LabelsEditComponent { @Input() project: Project; - @ViewChild('labelsEditModal') + @ViewChild('labelsEditModal', {static: false}) public labelsEditModal: ModalTemplate; modal: ActiveModal; modalConfig: TemplateModalConfig; diff --git a/ui/src/app/shared/modal/confirm/confirm.component.ts b/ui/src/app/shared/modal/confirm/confirm.component.ts index 5ee096f972..34fe167f35 100644 --- a/ui/src/app/shared/modal/confirm/confirm.component.ts +++ b/ui/src/app/shared/modal/confirm/confirm.component.ts @@ -13,7 +13,7 @@ export class ConfirmModalComponent { @Output() event = new EventEmitter(); // Ng semantic modal - @ViewChild('myConfirmModal') + @ViewChild('myConfirmModal', {static: false}) public myConfirmModal: ModalTemplate; modal: ActiveModal; modalConfig: TemplateModalConfig; diff --git a/ui/src/app/shared/modal/delete/delete.component.ts b/ui/src/app/shared/modal/delete/delete.component.ts index 79d9e962b7..2b64c5ba96 100644 --- a/ui/src/app/shared/modal/delete/delete.component.ts +++ b/ui/src/app/shared/modal/delete/delete.component.ts @@ -14,7 +14,7 @@ export class DeleteModalComponent { @Output() event = new EventEmitter(); // Ng semantic modal - @ViewChild('myDeleteModal') + @ViewChild('myDeleteModal', {static: false}) public myDeleteModal: ModalTemplate; modal: ActiveModal; modalConfig: TemplateModalConfig; diff --git a/ui/src/app/shared/modal/warning/warning.component.ts b/ui/src/app/shared/modal/warning/warning.component.ts index 66f929bce0..d941b1404b 100644 --- a/ui/src/app/shared/modal/warning/warning.component.ts +++ b/ui/src/app/shared/modal/warning/warning.component.ts @@ -14,7 +14,7 @@ export class WarningModalComponent { @Input() msg: string; @Output() event = new EventEmitter(); - @ViewChild('myModal') + @ViewChild('myModal', {static: false}) private modal: SemanticModalComponent; constructor() { } diff --git a/ui/src/app/shared/parameter/form/parameter.form.ts b/ui/src/app/shared/parameter/form/parameter.form.ts index 795c2016b2..734577580f 100644 --- a/ui/src/app/shared/parameter/form/parameter.form.ts +++ b/ui/src/app/shared/parameter/form/parameter.form.ts @@ -1,4 +1,4 @@ -import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; import { AllKeys } from '../../../model/keys.model'; import { Parameter } from '../../../model/parameter.model'; import { Project } from '../../../model/project.model'; @@ -12,7 +12,6 @@ import { ParameterEvent } from '../parameter.event.model'; styleUrls: ['./parameter.form.scss'] }) export class ParameterFormComponent { - @ViewChild('selectType') selectType: ElementRef; @Input() project: Project; @Input() suggest: Array; diff --git a/ui/src/app/shared/parameter/value/parameter.value.component.ts b/ui/src/app/shared/parameter/value/parameter.value.component.ts index f0f8b271e8..8df0eb00d3 100644 --- a/ui/src/app/shared/parameter/value/parameter.value.component.ts +++ b/ui/src/app/shared/parameter/value/parameter.value.component.ts @@ -62,7 +62,7 @@ export class ParameterValueComponent implements OnInit, AfterViewChecked { @Output() valueChange = new EventEmitter(); @Output() valueUpdating = new EventEmitter(); - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; codeMirrorConfig: any; repositoriesManager: Array; diff --git a/ui/src/app/shared/repomanager/from/repomanager.form.component.ts b/ui/src/app/shared/repomanager/from/repomanager.form.component.ts index ffeb9b09ed..bda309f5b2 100644 --- a/ui/src/app/shared/repomanager/from/repomanager.form.component.ts +++ b/ui/src/app/shared/repomanager/from/repomanager.form.component.ts @@ -24,7 +24,7 @@ export class RepoManagerFormComponent { @Input() project: Project; // Warning modal - @ViewChild('linkRepoWarning') + @ViewChild('linkRepoWarning', {static: false}) linkRepoWarningModal: WarningModalComponent; public ready = false; diff --git a/ui/src/app/shared/variable/list/variable.component.ts b/ui/src/app/shared/variable/list/variable.component.ts index bf6be247f4..9471a4ea94 100644 --- a/ui/src/app/shared/variable/list/variable.component.ts +++ b/ui/src/app/shared/variable/list/variable.component.ts @@ -43,7 +43,7 @@ export class VariableComponent extends Table { @Output() event = new EventEmitter(); - @ViewChild('auditModal') + @ViewChild('auditModal', {static: false}) auditModal: SemanticModalComponent; public ready = false; diff --git a/ui/src/app/shared/vcs/vcs.strategy.component.ts b/ui/src/app/shared/vcs/vcs.strategy.component.ts index 4c99f2412d..9c56d9ac5f 100644 --- a/ui/src/app/shared/vcs/vcs.strategy.component.ts +++ b/ui/src/app/shared/vcs/vcs.strategy.component.ts @@ -47,7 +47,7 @@ export class VCSStrategyComponent implements OnInit { displayVCSStrategy = false; defaultKeyType = 'ssh'; - @ViewChild('createKey') + @ViewChild('createKey', {static: false}) sshModalTemplate: ModalTemplate; sshModal: ActiveModal; diff --git a/ui/src/app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component.ts b/ui/src/app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component.ts index 498e180141..815b22c76d 100644 --- a/ui/src/app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component.ts +++ b/ui/src/app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component.ts @@ -16,7 +16,7 @@ import { Item } from '../../diff/list/diff.list.component'; styleUrls: ['./workflow-template.apply-modal.scss'] }) export class WorkflowTemplateApplyModalComponent implements OnChanges { - @ViewChild('workflowTemplateApplyModal') workflowTemplateApplyModal: ModalTemplate; + @ViewChild('workflowTemplateApplyModal', {static: false}) workflowTemplateApplyModal: ModalTemplate; modal: ActiveModal; open: boolean; diff --git a/ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.component.ts b/ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.component.ts index 53b8b9e925..cc0222db20 100644 --- a/ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.component.ts +++ b/ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.component.ts @@ -25,7 +25,7 @@ import { Column, ColumnType, Select } from '../../../shared/table/data-table.com }) @AutoUnsubscribe() export class WorkflowTemplateBulkModalComponent { - @ViewChild('workflowTemplateBulkModal') workflowTemplateBulkModal: ModalTemplate; + @ViewChild('workflowTemplateBulkModal', {static: false}) workflowTemplateBulkModal: ModalTemplate; modal: ActiveModal; open: boolean; diff --git a/ui/src/app/shared/workflow/menu/edit-hook/menu.edit.hook.html b/ui/src/app/shared/workflow/menu/edit-hook/menu.edit.hook.html index 210a44fa3a..66b12040af 100644 --- a/ui/src/app/shared/workflow/menu/edit-hook/menu.edit.hook.html +++ b/ui/src/app/shared/workflow/menu/edit-hook/menu.edit.hook.html @@ -1,23 +1,17 @@ diff --git a/ui/src/app/shared/workflow/menu/edit-node/menu.edit.node.html b/ui/src/app/shared/workflow/menu/edit-node/menu.edit.node.html index f9eccb44b5..25cb772c76 100644 --- a/ui/src/app/shared/workflow/menu/edit-node/menu.edit.node.html +++ b/ui/src/app/shared/workflow/menu/edit-node/menu.edit.node.html @@ -9,27 +9,19 @@ -
{{ 'workflow_node_trigger_add' | translate }} -
-
{{ 'workflow_node_parent' | translate }} -
-
{{ 'workflow_node_fork_add' | translate }} -
-
{{ 'workflow_node_join_add' | translate }} -
@@ -42,32 +34,24 @@ -
{{ 'workflow_node_outgoing_hook' | translate }} -

-
{{ 'workflow_node_menu_edit_ro' | translate }} {{ 'workflow_node_menu_edit' | translate }} -
-
{{ 'workflow_node_menu_edit_pipeline' | translate }} -

-
{{ 'btn_delete' | translate }} -
@@ -78,9 +62,7 @@
-
{{ 'workflow_node_menu_edit_ro' | translate }} -
diff --git a/ui/src/app/shared/workflow/modal/delete/workflow.node.delete.component.ts b/ui/src/app/shared/workflow/modal/delete/workflow.node.delete.component.ts index 6232afb93b..b0a9c02db3 100644 --- a/ui/src/app/shared/workflow/modal/delete/workflow.node.delete.component.ts +++ b/ui/src/app/shared/workflow/modal/delete/workflow.node.delete.component.ts @@ -11,7 +11,7 @@ import { WNode, Workflow } from '../../../../model/workflow.model'; }) export class WorkflowDeleteNodeComponent { - @ViewChild('deleteModal') + @ViewChild('deleteModal', {static: false}) deleteModalTemplate: ModalTemplate; modal: ActiveModal; diff --git a/ui/src/app/shared/workflow/modal/hook-add/hook.modal.component.ts b/ui/src/app/shared/workflow/modal/hook-add/hook.modal.component.ts index 05fe0d1f43..8622ccd565 100644 --- a/ui/src/app/shared/workflow/modal/hook-add/hook.modal.component.ts +++ b/ui/src/app/shared/workflow/modal/hook-add/hook.modal.component.ts @@ -25,12 +25,12 @@ export class WorkflowHookModalComponent { @Output() hookEvent = new EventEmitter(); @Output() deleteHookEvent = new EventEmitter(); - @ViewChild('hookModalComponent') + @ViewChild('hookModalComponent', {static: false}) public hookModalComponent: ModalTemplate; modalConfig: TemplateModalConfig; modal: ActiveModal; - @ViewChild('hookFormComponent') + @ViewChild('hookFormComponent', {static: false}) hookFormComponent: WorkflowNodeHookFormComponent; permissionEnum = PermissionValue; diff --git a/ui/src/app/shared/workflow/modal/node-add/workflow.trigger.component.ts b/ui/src/app/shared/workflow/modal/node-add/workflow.trigger.component.ts index 268c29c1c0..11e94a0d60 100644 --- a/ui/src/app/shared/workflow/modal/node-add/workflow.trigger.component.ts +++ b/ui/src/app/shared/workflow/modal/node-add/workflow.trigger.component.ts @@ -15,12 +15,12 @@ import { ActiveModal } from 'ng2-semantic-ui/dist'; }) export class WorkflowTriggerComponent { - @ViewChild('triggerModal') + @ViewChild('triggerModal', {static: false}) triggerModal: ModalTemplate; modal: ActiveModal; - @ViewChild('nodeWizard') + @ViewChild('nodeWizard', {static: false}) nodeWizard: WorkflowNodeAddWizardComponent; - @ViewChild('worklflowAddOutgoingHook') + @ViewChild('worklflowAddOutgoingHook', {static: false}) worklflowAddOutgoingHook: WorkflowWizardOutgoingHookComponent; @Output() triggerEvent = new EventEmitter(); diff --git a/ui/src/app/shared/workflow/modal/node-edit/node.edit.modal.component.ts b/ui/src/app/shared/workflow/modal/node-edit/node.edit.modal.component.ts index 8a8ecd02b7..3f3a3df25a 100644 --- a/ui/src/app/shared/workflow/modal/node-edit/node.edit.modal.component.ts +++ b/ui/src/app/shared/workflow/modal/node-edit/node.edit.modal.component.ts @@ -34,7 +34,7 @@ export class WorkflowNodeEditModalComponent implements AfterViewInit { groups: Array; - @ViewChild('nodeEditModal') + @ViewChild('nodeEditModal', {static: false}) public nodeEditModal: ModalTemplate; modal: ActiveModal; modalConfig: TemplateModalConfig; diff --git a/ui/src/app/shared/workflow/modal/save-as-code/save.as.code.component.ts b/ui/src/app/shared/workflow/modal/save-as-code/save.as.code.component.ts index 402fe054d6..182bf39faa 100644 --- a/ui/src/app/shared/workflow/modal/save-as-code/save.as.code.component.ts +++ b/ui/src/app/shared/workflow/modal/save-as-code/save.as.code.component.ts @@ -23,7 +23,7 @@ export class WorkflowSaveAsCodeComponent { ope: Operation; webworkerSub: Subscription; - @ViewChild('saveAsCodeModal') + @ViewChild('saveAsCodeModal', {static: false}) public saveAsCodeModal: ModalTemplate; modalConfig: TemplateModalConfig; modal: ActiveModal; diff --git a/ui/src/app/shared/workflow/node/hook/details/hook.details.component.ts b/ui/src/app/shared/workflow/node/hook/details/hook.details.component.ts index fbc9e4d298..cc1737c2b0 100644 --- a/ui/src/app/shared/workflow/node/hook/details/hook.details.component.ts +++ b/ui/src/app/shared/workflow/node/hook/details/hook.details.component.ts @@ -14,8 +14,8 @@ import { Subscription } from 'rxjs'; }) @AutoUnsubscribe() export class WorkflowNodeHookDetailsComponent implements OnInit { - @ViewChild('code') codemirror: any; - @ViewChild('nodeHookDetailsModal') nodeHookDetailsModal: ModalTemplate; + @ViewChild('code', {static: false}) codemirror: any; + @ViewChild('nodeHookDetailsModal', {static: false}) nodeHookDetailsModal: ModalTemplate; modal: ActiveModal; modalConfig: TemplateModalConfig; diff --git a/ui/src/app/shared/workflow/node/run/node.run.param.component.ts b/ui/src/app/shared/workflow/node/run/node.run.param.component.ts index 0dc42a70f9..3a5470214f 100644 --- a/ui/src/app/shared/workflow/node/run/node.run.param.component.ts +++ b/ui/src/app/shared/workflow/node/run/node.run.param.component.ts @@ -26,11 +26,11 @@ declare var CodeMirror: any; }) @AutoUnsubscribe() export class WorkflowNodeRunParamComponent implements OnInit { - @ViewChild('runWithParamModal') + @ViewChild('runWithParamModal', {static: false}) runWithParamModal: ModalTemplate; modal: ActiveModal; - @ViewChild('textareaCodeMirror') codemirror: any; + @ViewChild('textareaCodeMirror', {static: false}) codemirror: any; @Input() workflowRun: WorkflowRun; _nodeRun: WorkflowNodeRun; diff --git a/ui/src/app/shared/workflow/sidebar/edit-hook/workflow.sidebar.hook.component.ts b/ui/src/app/shared/workflow/sidebar/edit-hook/workflow.sidebar.hook.component.ts index 1befb0064f..7e78f82f48 100644 --- a/ui/src/app/shared/workflow/sidebar/edit-hook/workflow.sidebar.hook.component.ts +++ b/ui/src/app/shared/workflow/sidebar/edit-hook/workflow.sidebar.hook.component.ts @@ -29,7 +29,7 @@ export class WorkflowSidebarHookComponent implements OnInit { loading = false; hookDetails: WorkflowHookTask; - @ViewChild('workflowDetailsHook') + @ViewChild('workflowDetailsHook', {static: false}) workflowDetailsHook: WorkflowNodeHookDetailsComponent; permissionEnum = PermissionValue; diff --git a/ui/src/app/shared/workflow/sidebar/run-hook/workflow.sidebar.run.hook.component.ts b/ui/src/app/shared/workflow/sidebar/run-hook/workflow.sidebar.run.hook.component.ts index 3eaac4b473..5dbd5aabc1 100644 --- a/ui/src/app/shared/workflow/sidebar/run-hook/workflow.sidebar.run.hook.component.ts +++ b/ui/src/app/shared/workflow/sidebar/run-hook/workflow.sidebar.run.hook.component.ts @@ -11,7 +11,6 @@ import { WNodeHook } from '../../../../model/workflow.model'; import { HookService } from '../../../../service/hook/hook.service'; import { AutoUnsubscribe } from '../../../decorator/autoUnsubscribe'; import { WorkflowNodeHookDetailsComponent } from '../../node/hook/details/hook.details.component'; -import { WorkflowNodeHookFormComponent } from '../../wizard/hook/hook.form.component'; @Component({ selector: 'app-workflow-sidebar-run-hook', @@ -20,10 +19,8 @@ import { WorkflowNodeHookFormComponent } from '../../wizard/hook/hook.form.compo }) @AutoUnsubscribe() export class WorkflowSidebarRunHookComponent implements OnInit { - @ViewChild('workflowConfigHook') - workflowConfigHook: WorkflowNodeHookFormComponent; - @ViewChild('workflowDetailsHook') + @ViewChild('workflowDetailsHook', {static: false}) workflowDetailsHook: WorkflowNodeHookDetailsComponent; @Input() project: Project; diff --git a/ui/src/app/shared/workflow/sidebar/run-list/workflow.sidebar.run.component.ts b/ui/src/app/shared/workflow/sidebar/run-list/workflow.sidebar.run.component.ts index 717ab664b2..803cce7e1b 100644 --- a/ui/src/app/shared/workflow/sidebar/run-list/workflow.sidebar.run.component.ts +++ b/ui/src/app/shared/workflow/sidebar/run-list/workflow.sidebar.run.component.ts @@ -19,7 +19,7 @@ import { DurationService } from '../../../duration/duration.service'; }) @AutoUnsubscribe() export class WorkflowSidebarRunListComponent implements OnDestroy { - @ViewChild('tagsList') tagsList: ElementRef; + @ViewChild('tagsList', {static: false}) tagsList: ElementRef; @Input() project: Project; diff --git a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts index 204d685a07..1495957388 100644 --- a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts +++ b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts @@ -33,11 +33,10 @@ export class WorkflowSidebarRunNodeComponent implements OnDestroy, OnInit { storeSub: Subscription; node: WNode; - subNode: Subscription; wNodeType = WNodeType; // Modal - @ViewChild('workflowRunNode') + @ViewChild('workflowRunNode', {static: false}) workflowRunNode: WorkflowNodeRunParamComponent; loading = true; diff --git a/ui/src/app/shared/workflow/wizard/conditions/wizard.conditions.component.ts b/ui/src/app/shared/workflow/wizard/conditions/wizard.conditions.component.ts index a577f175d5..4033fb96c0 100644 --- a/ui/src/app/shared/workflow/wizard/conditions/wizard.conditions.component.ts +++ b/ui/src/app/shared/workflow/wizard/conditions/wizard.conditions.component.ts @@ -31,7 +31,7 @@ import { Subscription } from 'rxjs/Subscription'; }) @AutoUnsubscribe() export class WorkflowWizardNodeConditionComponent extends Table implements OnInit { - @ViewChild('textareaCodeMirror') codemirror: any; + @ViewChild('textareaCodeMirror', {static: false}) codemirror: any; @Input() project: Project; @Input() workflow: Workflow; diff --git a/ui/src/app/shared/workflow/wizard/hook/hook.form.component.ts b/ui/src/app/shared/workflow/wizard/hook/hook.form.component.ts index 0c0dcc94c8..3ca3de1e28 100644 --- a/ui/src/app/shared/workflow/wizard/hook/hook.form.component.ts +++ b/ui/src/app/shared/workflow/wizard/hook/hook.form.component.ts @@ -21,7 +21,7 @@ import { Subscription } from 'rxjs/Subscription'; }) @AutoUnsubscribe() export class WorkflowNodeHookFormComponent implements OnInit { - @ViewChild('textareaCodeMirror') codemirror: any; + @ViewChild('textareaCodeMirror', {static: false}) codemirror: any; _hook: WNodeHook = new WNodeHook(); canDelete = false; diff --git a/ui/src/app/shared/workflow/wizard/input/wizard.input.component.ts b/ui/src/app/shared/workflow/wizard/input/wizard.input.component.ts index 98db88362f..a625dd4354 100644 --- a/ui/src/app/shared/workflow/wizard/input/wizard.input.component.ts +++ b/ui/src/app/shared/workflow/wizard/input/wizard.input.component.ts @@ -27,7 +27,7 @@ declare var CodeMirror: any; }) @AutoUnsubscribe() export class WorkflowWizardNodeInputComponent implements OnInit { - @ViewChild('textareaCodeMirror') codemirror: any; + @ViewChild('textareaCodeMirror', {static: false}) codemirror: any; @Input() project: Project; @Input() workflow: Workflow; diff --git a/ui/src/app/shared/workflow/wizard/outgoinghook/wizard.outgoinghook.component.ts b/ui/src/app/shared/workflow/wizard/outgoinghook/wizard.outgoinghook.component.ts index 34f785088e..6b707c810b 100644 --- a/ui/src/app/shared/workflow/wizard/outgoinghook/wizard.outgoinghook.component.ts +++ b/ui/src/app/shared/workflow/wizard/outgoinghook/wizard.outgoinghook.component.ts @@ -22,7 +22,7 @@ import { finalize, first } from 'rxjs/operators'; }) @AutoUnsubscribe() export class WorkflowWizardOutgoingHookComponent implements OnInit { - @ViewChild('textareaCodeMirror') codemirror: any; + @ViewChild('textareaCodeMirror', {static: false}) codemirror: any; @Input() project: Project; @Input() workflow: Workflow; diff --git a/ui/src/app/shared/workflow/wnode/hook/hook.component.ts b/ui/src/app/shared/workflow/wnode/hook/hook.component.ts index 289204c1a3..6be391e5f1 100644 --- a/ui/src/app/shared/workflow/wnode/hook/hook.component.ts +++ b/ui/src/app/shared/workflow/wnode/hook/hook.component.ts @@ -34,7 +34,7 @@ export class WorkflowNodeHookComponent implements OnInit { @Input() project: Project; @Input() node: WNode; - @ViewChild('deleteHookModal') + @ViewChild('deleteHookModal', {static: false}) deleteHookModal: DeleteModalComponent; icon: string; diff --git a/ui/src/app/shared/workflow/wnode/wnode.component.ts b/ui/src/app/shared/workflow/wnode/wnode.component.ts index a8ded66e45..e8057c6573 100644 --- a/ui/src/app/shared/workflow/wnode/wnode.component.ts +++ b/ui/src/app/shared/workflow/wnode/wnode.component.ts @@ -41,9 +41,9 @@ export class WorkflowWNodeComponent implements OnInit { @Input() workflow: Workflow; @Input() project: Project; - @ViewChild('menu') + @ViewChild('menu', {static: false}) menu: WorkflowWNodeMenuEditComponent; - @ViewChild('workflowRunNode') + @ViewChild('workflowRunNode', {static: false}) workflowRunNode: WorkflowNodeRunParamComponent; // Selected workflow run @@ -60,13 +60,13 @@ export class WorkflowWNodeComponent implements OnInit { zone = new NgZone({}); // Modal - @ViewChild('workflowDeleteNode') + @ViewChild('workflowDeleteNode', {static: false}) workflowDeleteNode: WorkflowDeleteNodeComponent; - @ViewChild('workflowTrigger') + @ViewChild('workflowTrigger', {static: false}) workflowTrigger: WorkflowTriggerComponent; - @ViewChild('workflowAddHook') + @ViewChild('workflowAddHook', {static: false}) workflowAddHook: WorkflowHookModalComponent; - @ViewChild('nodeEditModal') + @ViewChild('nodeEditModal', {static: false}) nodeEditModal: WorkflowNodeEditModalComponent; constructor( diff --git a/ui/src/app/views/admin/service/show/service.show.component.ts b/ui/src/app/views/admin/service/show/service.show.component.ts index f440044979..7d888c1579 100644 --- a/ui/src/app/views/admin/service/show/service.show.component.ts +++ b/ui/src/app/views/admin/service/show/service.show.component.ts @@ -13,7 +13,7 @@ import { Subscription } from 'rxjs/Subscription'; }) @AutoUnsubscribe() export class ServiceShowComponent implements OnInit { - @ViewChild('textareaCodeMirror') codemirror: any; + @ViewChild('textareaCodeMirror', {static: false}) codemirror: any; loading: boolean; service: Service; diff --git a/ui/src/app/views/application/show/admin/application.admin.component.ts b/ui/src/app/views/application/show/admin/application.admin.component.ts index c36640bf10..c4da824b4e 100644 --- a/ui/src/app/views/application/show/admin/application.admin.component.ts +++ b/ui/src/app/views/application/show/admin/application.admin.component.ts @@ -21,7 +21,7 @@ export class ApplicationAdminComponent implements OnInit { @Input() application: Application; @Input() project: Project; - @ViewChild('updateWarning') + @ViewChild('updateWarning', {static: false}) private updateWarningModal: WarningModalComponent; user: User; diff --git a/ui/src/app/views/application/show/admin/deployment/application.deployment.component.ts b/ui/src/app/views/application/show/admin/deployment/application.deployment.component.ts index d37eee2ae5..cb67beb458 100644 --- a/ui/src/app/views/application/show/admin/deployment/application.deployment.component.ts +++ b/ui/src/app/views/application/show/admin/deployment/application.deployment.component.ts @@ -23,8 +23,8 @@ export class ApplicationDeploymentComponent { _project: Project; - @ViewChild('removeWarning') removeWarningModal: WarningModalComponent; - @ViewChild('linkWarning') linkWarningModal: WarningModalComponent; + @ViewChild('removeWarning', {static: false}) removeWarningModal: WarningModalComponent; + @ViewChild('linkWarning', {static: false}) linkWarningModal: WarningModalComponent; @Input() application: Application; @Input('project') diff --git a/ui/src/app/views/application/show/admin/repository/application.repo.component.ts b/ui/src/app/views/application/show/admin/repository/application.repo.component.ts index 77a4837680..9465590d52 100644 --- a/ui/src/app/views/application/show/admin/repository/application.repo.component.ts +++ b/ui/src/app/views/application/show/admin/repository/application.repo.component.ts @@ -30,8 +30,8 @@ export class ApplicationRepositoryComponent implements OnInit { model: string; displayVCSStrategy = false; - @ViewChild('removeWarning') removeWarningModal: WarningModalComponent; - @ViewChild('linkWarning') linkWarningModal: WarningModalComponent; + @ViewChild('removeWarning', {static: false}) removeWarningModal: WarningModalComponent; + @ViewChild('linkWarning', {static: false}) linkWarningModal: WarningModalComponent; constructor( private _repoManagerService: RepoManagerService, diff --git a/ui/src/app/views/application/show/application.component.ts b/ui/src/app/views/application/show/application.component.ts index 715bc56ab5..eabc5c67bc 100644 --- a/ui/src/app/views/application/show/application.component.ts +++ b/ui/src/app/views/application/show/application.component.ts @@ -53,7 +53,7 @@ export class ApplicationShowComponent implements OnInit { // Selected tab selectedTab = 'home'; - @ViewChild('varWarning') + @ViewChild('varWarning', {static: false}) private varWarningModal: WarningModalComponent; // queryparam for breadcrum diff --git a/ui/src/app/views/home/heatmap/home.heatmap.component.ts b/ui/src/app/views/home/heatmap/home.heatmap.component.ts index 216d94920a..9d5bbca5c8 100644 --- a/ui/src/app/views/home/heatmap/home.heatmap.component.ts +++ b/ui/src/app/views/home/heatmap/home.heatmap.component.ts @@ -42,7 +42,7 @@ export class HomeHeatmapComponent implements OnInit { heatmapSearch: HeatmapSearchCriterion; - @ViewChild('toolbar', { read: ToolbarComponent }) toolbar: ToolbarComponent; + @ViewChild('toolbar', { read: ToolbarComponent, static: false }) toolbar: ToolbarComponent; static clone(objectToCopy) { return (JSON.parse(JSON.stringify(objectToCopy))); diff --git a/ui/src/app/views/pipeline/show/ascode-editor/pipeline.ascode.editor.component.ts b/ui/src/app/views/pipeline/show/ascode-editor/pipeline.ascode.editor.component.ts index 371b963252..1980046d90 100644 --- a/ui/src/app/views/pipeline/show/ascode-editor/pipeline.ascode.editor.component.ts +++ b/ui/src/app/views/pipeline/show/ascode-editor/pipeline.ascode.editor.component.ts @@ -18,7 +18,7 @@ import { finalize } from 'rxjs/operators'; }) @AutoUnsubscribe() export class PipelineAsCodeEditorComponent implements OnInit { - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; // Project that contains the pipeline @Input() project: Project; diff --git a/ui/src/app/views/pipeline/show/pipeline.show.component.ts b/ui/src/app/views/pipeline/show/pipeline.show.component.ts index 0a69fff96d..6d6426b83b 100644 --- a/ui/src/app/views/pipeline/show/pipeline.show.component.ts +++ b/ui/src/app/views/pipeline/show/pipeline.show.component.ts @@ -58,7 +58,7 @@ export class PipelineShowComponent implements OnInit { pipName: string; queryParams: Params; - @ViewChild('paramWarning') + @ViewChild('paramWarning', {static: false}) parameterModalWarning: WarningModalComponent; keys: AllKeys; diff --git a/ui/src/app/views/pipeline/show/workflow/pipeline.workflow.component.ts b/ui/src/app/views/pipeline/show/workflow/pipeline.workflow.component.ts index 05b4c89f07..9517f2ed43 100644 --- a/ui/src/app/views/pipeline/show/workflow/pipeline.workflow.component.ts +++ b/ui/src/app/views/pipeline/show/workflow/pipeline.workflow.component.ts @@ -71,7 +71,7 @@ export class PipelineWorkflowComponent implements OnInit, OnDestroy { } @Input() queryParams: {}; - @ViewChild('editStageModal') + @ViewChild('editStageModal', {static: false}) editStageModal: SemanticModalComponent; pipeline: Pipeline; diff --git a/ui/src/app/views/project/add/project.add.component.ts b/ui/src/app/views/project/add/project.add.component.ts index 280234ee50..b9d185161e 100644 --- a/ui/src/app/views/project/add/project.add.component.ts +++ b/ui/src/app/views/project/add/project.add.component.ts @@ -29,7 +29,7 @@ export class ProjectAddComponent { groupList: Group[]; - @ViewChild('createGroupModal') + @ViewChild('createGroupModal', {static: false}) modalCreateGroup: SemanticModalComponent; constructor( diff --git a/ui/src/app/views/project/project.routing.ts b/ui/src/app/views/project/project.routing.ts index 864fefda46..f35db2d3f9 100644 --- a/ui/src/app/views/project/project.routing.ts +++ b/ui/src/app/views/project/project.routing.ts @@ -14,9 +14,12 @@ const projectRoutes: Routes = [ { path: '', component: ProjectAddComponent, data: { title: 'Add • Project' } }, { path: 'list/all', component: ProjectListComponent, data: { title: 'List • Project' } }, { path: ':key', component: ProjectShowComponent, data: { title: '{key} • Project' } }, - { path: ':key/workflow', loadChildren: 'app/views/workflow/workflow.module#WorkflowModule'}, - { path: ':key/application', loadChildren: 'app/views/application/application.module#ApplicationModule'}, - { path: ':key/pipeline', loadChildren: 'app/views/pipeline/pipeline.module#PipelineModule'} + { path: ':key/workflow', loadChildren: + () => import('app/views/workflow/workflow.module').then(m => m.WorkflowModule)}, + { path: ':key/application', loadChildren: + () => import('app/views/application/application.module').then(m => m.ApplicationModule)}, + { path: ':key/pipeline', loadChildren: + () => import('app/views/pipeline/pipeline.module').then(m => m.PipelineModule)} ] } ]; diff --git a/ui/src/app/views/project/show/admin/project.admin.component.ts b/ui/src/app/views/project/show/admin/project.admin.component.ts index ea6ad6c40d..565f1edb55 100644 --- a/ui/src/app/views/project/show/admin/project.admin.component.ts +++ b/ui/src/app/views/project/show/admin/project.admin.component.ts @@ -36,7 +36,7 @@ export class ProjectAdminComponent implements OnInit { unusedWarning: Map; @Input() project: Project; - @ViewChild('updateWarning') + @ViewChild('updateWarning', {static: false}) private warningUpdateModal: WarningModalComponent; loading = false; diff --git a/ui/src/app/views/project/show/admin/repomanager/list/project.repomanager.list.component.ts b/ui/src/app/views/project/show/admin/repomanager/list/project.repomanager.list.component.ts index 1fab1eee6e..155b72362f 100644 --- a/ui/src/app/views/project/show/admin/repomanager/list/project.repomanager.list.component.ts +++ b/ui/src/app/views/project/show/admin/repomanager/list/project.repomanager.list.component.ts @@ -21,7 +21,7 @@ export class ProjectRepoManagerComponent extends Table { @Input() project: Project; @Input() reposmanagers: RepositoriesManager[]; - @ViewChild('deleteRepoWarning') + @ViewChild('deleteRepoWarning', {static: false}) private deleteRepoWarning: WarningModalComponent; public deleteLoading = false; diff --git a/ui/src/app/views/project/show/integrations/form/integration.form.component.ts b/ui/src/app/views/project/show/integrations/form/integration.form.component.ts index e6f212c155..253cb08bed 100644 --- a/ui/src/app/views/project/show/integrations/form/integration.form.component.ts +++ b/ui/src/app/views/project/show/integrations/form/integration.form.component.ts @@ -18,7 +18,7 @@ import { Subscription } from 'rxjs/Subscription'; }) @AutoUnsubscribe() export class ProjectIntegrationFormComponent implements OnInit { - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; @Input() project: Project; diff --git a/ui/src/app/views/project/show/integrations/list/integration.list.component.ts b/ui/src/app/views/project/show/integrations/list/integration.list.component.ts index 744e6043d8..53cf981934 100644 --- a/ui/src/app/views/project/show/integrations/list/integration.list.component.ts +++ b/ui/src/app/views/project/show/integrations/list/integration.list.component.ts @@ -19,7 +19,7 @@ import { finalize, first } from 'rxjs/operators'; }) @AutoUnsubscribe() export class ProjectIntegrationListComponent extends Table implements OnInit { - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; @Input() project: Project; diff --git a/ui/src/app/views/project/show/permission/permission.component.ts b/ui/src/app/views/project/show/permission/permission.component.ts index 22a67de8ff..36ecce965d 100644 --- a/ui/src/app/views/project/show/permission/permission.component.ts +++ b/ui/src/app/views/project/show/permission/permission.component.ts @@ -20,9 +20,9 @@ export class ProjectPermissionsComponent { @Input() project: Project; @Input() warnings: Array; - @ViewChild('permWarning') + @ViewChild('permWarning', {static: false}) permWarningModal: WarningModalComponent; - @ViewChild('confirmPropagationModal') + @ViewChild('confirmPropagationModal', {static: false}) confirmPropagationModal: ConfirmModalComponent; permissionEnum = PermissionValue; diff --git a/ui/src/app/views/project/show/variable/variable.list.component.ts b/ui/src/app/views/project/show/variable/variable.list.component.ts index a2f1c641b0..8a07139e57 100644 --- a/ui/src/app/views/project/show/variable/variable.list.component.ts +++ b/ui/src/app/views/project/show/variable/variable.list.component.ts @@ -38,7 +38,7 @@ export class ProjectVariablesComponent implements OnInit { variableWarning: Map; unusedVariableWarning: Array; - @ViewChild('varWarning') + @ViewChild('varWarning', {static: false}) varWarningModal: WarningModalComponent; permissionEnum = PermissionValue; diff --git a/ui/src/app/views/project/show/workflow/blocs/workflow.list.blocs.component.ts b/ui/src/app/views/project/show/workflow/blocs/workflow.list.blocs.component.ts index e619f1fa3d..d95af99e6c 100644 --- a/ui/src/app/views/project/show/workflow/blocs/workflow.list.blocs.component.ts +++ b/ui/src/app/views/project/show/workflow/blocs/workflow.list.blocs.component.ts @@ -1,11 +1,10 @@ -import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Store } from '@ngxs/store'; import { LinkLabelOnWorkflow, UnlinkLabelOnWorkflow } from 'app/store/workflow.action'; import { finalize } from 'rxjs/operators'; import { IdName, Label, Project } from '../../../../../model/project.model'; import { Warning } from '../../../../../model/warning.model'; import { HelpersService } from '../../../../../service/helpers/helpers.service'; -import { LabelsEditComponent } from '../../../../../shared/labels/edit/labels.edit.component'; @Component({ selector: 'app-project-workflows-blocs', @@ -59,10 +58,6 @@ export class ProjectWorkflowListBlocsComponent { return this._filterLabel; } - // Modal - @ViewChild('projectLabels') - projectLabels: LabelsEditComponent; - _labels: Label[]; _workflows: IdName[]; _filterLabel = ''; diff --git a/ui/src/app/views/project/show/workflow/labels/workflow.list.labels.component.ts b/ui/src/app/views/project/show/workflow/labels/workflow.list.labels.component.ts index 76efbb4feb..bac7ca0c5d 100644 --- a/ui/src/app/views/project/show/workflow/labels/workflow.list.labels.component.ts +++ b/ui/src/app/views/project/show/workflow/labels/workflow.list.labels.component.ts @@ -1,9 +1,8 @@ -import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Store } from '@ngxs/store'; import { IdName, Label, Project } from 'app/model/project.model'; import { Warning } from 'app/model/warning.model'; import { HelpersService } from 'app/service/helpers/helpers.service'; -import { LabelsEditComponent } from 'app/shared/labels/edit/labels.edit.component'; import { LinkLabelOnWorkflow, UnlinkLabelOnWorkflow } from 'app/store/workflow.action'; import cloneDeep from 'lodash-es/cloneDeep'; import { finalize } from 'rxjs/operators'; @@ -87,10 +86,6 @@ export class ProjectWorkflowListLabelsComponent { return this._filterLabel; } - // Modal - @ViewChild('projectLabels') - projectLabels: LabelsEditComponent; - _project: Project; _labels: Label[]; _workflows: IdName[]; diff --git a/ui/src/app/views/project/show/workflow/lines/workflow.list.lines.component.ts b/ui/src/app/views/project/show/workflow/lines/workflow.list.lines.component.ts index 3ca6b66acf..19642752ec 100644 --- a/ui/src/app/views/project/show/workflow/lines/workflow.list.lines.component.ts +++ b/ui/src/app/views/project/show/workflow/lines/workflow.list.lines.component.ts @@ -1,11 +1,10 @@ -import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Store } from '@ngxs/store'; import { LinkLabelOnWorkflow, UnlinkLabelOnWorkflow } from 'app/store/workflow.action'; import { finalize } from 'rxjs/operators'; import { IdName, Label, Project } from '../../../../../model/project.model'; import { Warning } from '../../../../../model/warning.model'; import { HelpersService } from '../../../../../service/helpers/helpers.service'; -import { LabelsEditComponent } from '../../../../../shared/labels/edit/labels.edit.component'; @Component({ selector: 'app-project-workflows-lines', @@ -61,10 +60,6 @@ export class ProjectWorkflowListLinesComponent { return this._filterLabel; } - // Modal - @ViewChild('projectLabels') - projectLabels: LabelsEditComponent; - _labels: Label[]; _workflows: IdName[]; _filterLabel = ''; diff --git a/ui/src/app/views/project/show/workflow/workflow.list.component.ts b/ui/src/app/views/project/show/workflow/workflow.list.component.ts index dc56a7dece..98ceef4e03 100644 --- a/ui/src/app/views/project/show/workflow/workflow.list.component.ts +++ b/ui/src/app/views/project/show/workflow/workflow.list.component.ts @@ -66,7 +66,7 @@ export class ProjectWorkflowListComponent implements OnInit { } // Modal - @ViewChild('projectLabels') + @ViewChild('projectLabels', {static: false}) projectLabels: LabelsEditComponent; _project: Project; diff --git a/ui/src/app/views/settings/cdsctl/cdsctl.component.ts b/ui/src/app/views/settings/cdsctl/cdsctl.component.ts index 935eede688..302f2170e9 100644 --- a/ui/src/app/views/settings/cdsctl/cdsctl.component.ts +++ b/ui/src/app/views/settings/cdsctl/cdsctl.component.ts @@ -16,14 +16,14 @@ import { finalize } from 'rxjs/operators'; }) @AutoUnsubscribe() export class CdsctlComponent implements OnInit { - @ViewChild('codemirror1') codemirror1: any; - @ViewChild('codemirror2') codemirror2: any; - @ViewChild('codemirror3') codemirror3: any; - @ViewChild('codemirror4') codemirror4: any; - @ViewChild('codemirror5') codemirror5: any; - @ViewChild('codemirror6') codemirror6: any; - @ViewChild('codemirror7') codemirror7: any; - @ViewChild('codemirror8') codemirror8: any; + @ViewChild('codemirror1', {static: false}) codemirror1: any; + @ViewChild('codemirror2', {static: false}) codemirror2: any; + @ViewChild('codemirror3', {static: false}) codemirror3: any; + @ViewChild('codemirror4', {static: false}) codemirror4: any; + @ViewChild('codemirror5', {static: false}) codemirror5: any; + @ViewChild('codemirror6', {static: false}) codemirror6: any; + @ViewChild('codemirror7', {static: false}) codemirror7: any; + @ViewChild('codemirror8', {static: false}) codemirror8: any; currentUser: User; apiURL: string; diff --git a/ui/src/app/views/settings/worker-model/form/worker-model.form.component.ts b/ui/src/app/views/settings/worker-model/form/worker-model.form.component.ts index f53463d3f3..965562abf2 100644 --- a/ui/src/app/views/settings/worker-model/form/worker-model.form.component.ts +++ b/ui/src/app/views/settings/worker-model/form/worker-model.form.component.ts @@ -17,7 +17,7 @@ import { Subscription } from 'rxjs/Subscription'; }) @AutoUnsubscribe() export class WorkerModelFormComponent implements OnInit, OnChanges { - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; _workerModel: WorkerModel; @Input() set workerModel(wm: WorkerModel) { diff --git a/ui/src/app/views/settings/workflow-template/edit/workflow-template.edit.component.ts b/ui/src/app/views/settings/workflow-template/edit/workflow-template.edit.component.ts index e3ef6a7a4d..51f3e91be8 100644 --- a/ui/src/app/views/settings/workflow-template/edit/workflow-template.edit.component.ts +++ b/ui/src/app/views/settings/workflow-template/edit/workflow-template.edit.component.ts @@ -35,9 +35,9 @@ import { WorkflowTemplateBulkModalComponent } from '../../../../shared/workflow- }) @AutoUnsubscribe() export class WorkflowTemplateEditComponent implements OnInit { - @ViewChild('templateApplyModal') + @ViewChild('templateApplyModal', {static: false}) templateApplyModal: WorkflowTemplateApplyModalComponent; - @ViewChild('templateBulkModal') + @ViewChild('templateBulkModal', {static: false}) templateBulkModal: WorkflowTemplateBulkModalComponent; oldWorkflowTemplate: WorkflowTemplate; diff --git a/ui/src/app/views/settings/workflow-template/editor/workflow-template.editor.component.ts b/ui/src/app/views/settings/workflow-template/editor/workflow-template.editor.component.ts index 7a96e75293..8bf9fd761b 100644 --- a/ui/src/app/views/settings/workflow-template/editor/workflow-template.editor.component.ts +++ b/ui/src/app/views/settings/workflow-template/editor/workflow-template.editor.component.ts @@ -11,7 +11,7 @@ import { AutoUnsubscribe } from '../../../../shared/decorator/autoUnsubscribe'; }) @AutoUnsubscribe() export class WorkflowTemplateEditorComponent implements OnInit, OnChanges { - @ViewChild('code') codemirror: any; + @ViewChild('code', {static: false}) codemirror: any; @Input() editable: boolean; @Input() removable: boolean; diff --git a/ui/src/app/views/workflow/add/workflow.add.component.ts b/ui/src/app/views/workflow/add/workflow.add.component.ts index 93e7b79f0e..4b16e1591f 100644 --- a/ui/src/app/views/workflow/add/workflow.add.component.ts +++ b/ui/src/app/views/workflow/add/workflow.add.component.ts @@ -30,7 +30,7 @@ import { environment } from '../../../../environments/environment'; }) @AutoUnsubscribe() export class WorkflowAddComponent implements OnInit { - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; workflow: Workflow; project: Project; diff --git a/ui/src/app/views/workflow/graph/workflow.graph.component.ts b/ui/src/app/views/workflow/graph/workflow.graph.component.ts index 39b47afed4..382454f5e0 100644 --- a/ui/src/app/views/workflow/graph/workflow.graph.component.ts +++ b/ui/src/app/views/workflow/graph/workflow.graph.component.ts @@ -13,7 +13,6 @@ import { } from '@angular/core'; import * as d3 from 'd3'; import * as dagreD3 from 'dagre-d3'; -import { SemanticDimmerComponent } from 'ng-semantic/ng-semantic'; import { Project } from '../../../model/project.model'; import { WNode, Workflow } from '../../../model/workflow.model'; import { WorkflowRun } from '../../../model/workflow.run.model'; @@ -75,15 +74,12 @@ export class WorkflowGraphComponent implements AfterViewInit { _direction: string; // workflow graph - @ViewChild('svgGraph', { read: ViewContainerRef }) svgContainer: any; + @ViewChild('svgGraph', { read: ViewContainerRef, static: false }) svgContainer: any; g: dagreD3.graphlib.Graph; render = new dagreD3.render(); svgWidth: number = window.innerWidth; svgHeight: number = window.innerHeight; - @ViewChild('dimmer') - dimmer: SemanticDimmerComponent; - linkWithJoin = false; nodeToLink: WNode; previousWorkflowRunId = 0; diff --git a/ui/src/app/views/workflow/run/node/pipeline/service/service.log.component.ts b/ui/src/app/views/workflow/run/node/pipeline/service/service.log.component.ts index 7ff98cf35c..ad32cb9c04 100644 --- a/ui/src/app/views/workflow/run/node/pipeline/service/service.log.component.ts +++ b/ui/src/app/views/workflow/run/node/pipeline/service/service.log.component.ts @@ -36,7 +36,7 @@ export class WorkflowServiceLogComponent implements OnDestroy { return this._nodeJobRun; } - @ViewChild('logsContent') logsElt: ElementRef; + @ViewChild('logsContent', {static: false}) logsElt: ElementRef; logsSplitted: Array = []; diff --git a/ui/src/app/views/workflow/run/node/pipeline/spawninfo/spawninfo.component.ts b/ui/src/app/views/workflow/run/node/pipeline/spawninfo/spawninfo.component.ts index ef27f77f5e..c999525b62 100644 --- a/ui/src/app/views/workflow/run/node/pipeline/spawninfo/spawninfo.component.ts +++ b/ui/src/app/views/workflow/run/node/pipeline/spawninfo/spawninfo.component.ts @@ -51,7 +51,7 @@ export class WorkflowRunJobSpawnInfoComponent implements OnDestroy { @Output() displayServicesLogsChange = new EventEmitter(); - @ViewChild('jobVariable') + @ViewChild('jobVariable', {static: false}) jobVariable: WorkflowRunJobVariableComponent; _nodeJobRun: WorkflowNodeJobRun; diff --git a/ui/src/app/views/workflow/run/node/pipeline/step/step.log.component.ts b/ui/src/app/views/workflow/run/node/pipeline/step/step.log.component.ts index 1d5f21a054..b0bbaab237 100644 --- a/ui/src/app/views/workflow/run/node/pipeline/step/step.log.component.ts +++ b/ui/src/app/views/workflow/run/node/pipeline/step/step.log.component.ts @@ -92,7 +92,7 @@ export class WorkflowStepLogComponent implements OnInit, OnDestroy { _stepStatus: StepStatus; pipelineBuildStatusEnum = PipelineStatus; MAX_PRETTY_LOGS_LINES = 3500; - @ViewChild('logsContent') logsElt: ElementRef; + @ViewChild('logsContent', {static: false}) logsElt: ElementRef; constructor( private _authStore: AuthentificationStore, diff --git a/ui/src/app/views/workflow/run/node/pipeline/variables/job.variables.component.ts b/ui/src/app/views/workflow/run/node/pipeline/variables/job.variables.component.ts index 43430bfe99..f7073958eb 100644 --- a/ui/src/app/views/workflow/run/node/pipeline/variables/job.variables.component.ts +++ b/ui/src/app/views/workflow/run/node/pipeline/variables/job.variables.component.ts @@ -9,7 +9,7 @@ import {Parameter} from '../../../../../../model/parameter.model'; }) export class WorkflowRunJobVariableComponent { - @ViewChild('jobVariablesModal') + @ViewChild('jobVariablesModal', {static: false}) jobVariablesModal: SemanticModalComponent; @Input('variables') diff --git a/ui/src/app/views/workflow/run/node/summary/run.summary.component.ts b/ui/src/app/views/workflow/run/node/summary/run.summary.component.ts index 632bc869ea..e6a19f1112 100644 --- a/ui/src/app/views/workflow/run/node/summary/run.summary.component.ts +++ b/ui/src/app/views/workflow/run/node/summary/run.summary.component.ts @@ -22,7 +22,7 @@ export class WorkflowNodeRunSummaryComponent implements OnInit { @Input() project: Project; @Input() duration: string; - @ViewChild('workflowNodeRunParam') + @ViewChild('workflowNodeRunParam', {static: false}) runWithParamComponent: WorkflowNodeRunParamComponent; node: WNode; diff --git a/ui/src/app/views/workflow/run/workflow.run.component.ts b/ui/src/app/views/workflow/run/workflow.run.component.ts index 9dc0ad81d4..12d0b592a1 100644 --- a/ui/src/app/views/workflow/run/workflow.run.component.ts +++ b/ui/src/app/views/workflow/run/workflow.run.component.ts @@ -25,7 +25,7 @@ import { filter } from 'rxjs/operators'; }) @AutoUnsubscribe() export class WorkflowRunComponent implements OnInit { - @ViewChild('workflowRunParam') + @ViewChild('workflowRunParam', {static: false}) runWithParamComponent: WorkflowNodeRunParamComponent; workflow: Workflow; diff --git a/ui/src/app/views/workflow/show/admin/workflow.admin.component.ts b/ui/src/app/views/workflow/show/admin/workflow.admin.component.ts index c212c56d87..7e7f782e38 100644 --- a/ui/src/app/views/workflow/show/admin/workflow.admin.component.ts +++ b/ui/src/app/views/workflow/show/admin/workflow.admin.component.ts @@ -45,7 +45,7 @@ export class WorkflowAdminComponent implements OnInit { purgeTag: string; iconUpdated = false; - @ViewChild('updateWarning') + @ViewChild('updateWarning', {static: false}) private warningUpdateModal: WarningModalComponent; loading = false; diff --git a/ui/src/app/views/workflow/show/workflow.component.ts b/ui/src/app/views/workflow/show/workflow.component.ts index b092507dff..c389d420b2 100644 --- a/ui/src/app/views/workflow/show/workflow.component.ts +++ b/ui/src/app/views/workflow/show/workflow.component.ts @@ -37,11 +37,11 @@ export class WorkflowShowComponent implements OnInit { qpsSubs: Subscription; direction: string; - @ViewChild('workflowGraph') + @ViewChild('workflowGraph', {static: false}) workflowGraph: WorkflowGraphComponent; - @ViewChild('workflowStartParam') + @ViewChild('workflowStartParam', {static: false}) runWithParamComponent: WorkflowNodeRunParamComponent; - @ViewChild('permWarning') + @ViewChild('permWarning', {static: false}) permWarningModal: WarningModalComponent; selectedHookRef: string; diff --git a/ui/src/app/views/workflow/sidebar/code/sidebar.code.component.ts b/ui/src/app/views/workflow/sidebar/code/sidebar.code.component.ts index 0b8477845e..13d8561b93 100644 --- a/ui/src/app/views/workflow/sidebar/code/sidebar.code.component.ts +++ b/ui/src/app/views/workflow/sidebar/code/sidebar.code.component.ts @@ -20,7 +20,7 @@ import { finalize } from 'rxjs/operators'; }) @AutoUnsubscribe() export class WorkflowSidebarCodeComponent implements OnInit { - @ViewChild('codeMirror') codemirror: any; + @ViewChild('codeMirror', {static: false}) codemirror: any; // Project that contains the workflow @Input() project: Project; diff --git a/ui/src/app/views/workflow/workflow.component.ts b/ui/src/app/views/workflow/workflow.component.ts index a3af36b8d1..68ad5c1ec9 100644 --- a/ui/src/app/views/workflow/workflow.component.ts +++ b/ui/src/app/views/workflow/workflow.component.ts @@ -11,7 +11,6 @@ import { UpdateFavoriteWorkflow } from 'app/store/workflow.action'; import { WorkflowState, WorkflowStateModel} from 'app/store/workflow.state'; -import { SemanticSidebarComponent } from 'ng-semantic/ng-semantic'; import { SuiPopup, SuiPopupController, SuiPopupTemplateController } from 'ng2-semantic-ui/dist'; import { Subscription } from 'rxjs'; import { filter, finalize } from 'rxjs/operators'; @@ -33,7 +32,7 @@ import { WorkflowSaveAsCodeComponent } from '../../shared/workflow/modal/save-as }) @AutoUnsubscribe() export class WorkflowComponent { - @ViewChild('templateApplyModal') + @ViewChild('templateApplyModal', { static: false }) templateApplyModal: WorkflowTemplateApplyModalComponent; project: Project; @@ -55,11 +54,9 @@ export class WorkflowComponent { asCodeEditorSubscription: Subscription; asCodeEditorOpen = false; - @ViewChild('invertedSidebar') - sidebar: SemanticSidebarComponent; - @ViewChild('saveAsCode') + @ViewChild('saveAsCode', {static: false}) saveAsCode: WorkflowSaveAsCodeComponent; - @ViewChild('popup') + @ViewChild('popup', {static: false}) popupFromlRepository: SuiPopup; @ViewChildren(SuiPopupController) popups: QueryList; @ViewChildren(SuiPopupTemplateController) popups2: QueryList>; diff --git a/ui/src/styles.scss b/ui/src/styles.scss index 75eaf57162..f333f8ff40 100644 --- a/ui/src/styles.scss +++ b/ui/src/styles.scss @@ -87,6 +87,10 @@ body ::-webkit-scrollbar-thumb { border-radius: $scrollbarradius; } +.toast { + padding: 0; +} + // dropdown .ui.buttons { sm-dropdown>.ui.dropdown:last-child .menu { diff --git a/ui/src/tsconfig.app.json b/ui/src/tsconfig.app.json index 1b961dd929..e3667cabae 100644 --- a/ui/src/tsconfig.app.json +++ b/ui/src/tsconfig.app.json @@ -11,7 +11,7 @@ "dom" ], "outDir": "../out-tsc/app", - "module": "es2015", + "module": "esnext", "baseUrl": "", "paths": {}, "types": [] @@ -27,5 +27,8 @@ "../node_modules/ng-semantic/demo/**/*.ts", "../node_modules/angular2-prettyjson/node_modules/**/*.ts", "../node_modules/angular2-prettyjson/**/*.ts" - ] + ], + "angularCompilerOptions": { + "enableIvy": false + } }