Skip to content

Commit

Permalink
chores: migrate ng8 (#4369)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux committed Jun 18, 2019
1 parent ab78a16 commit d796fab
Show file tree
Hide file tree
Showing 74 changed files with 151 additions and 187 deletions.
16 changes: 8 additions & 8 deletions ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
"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",
"node_modules/prismjs/themes/prism-okaidia.css",
"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",
Expand Down Expand Up @@ -91,7 +91,7 @@
}
},
"serve": {
"builder": "@angular-builders/dev-server:generic",
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "ui-ng2:build"
},
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -214,4 +214,4 @@
"prefix": "app"
}
}
}
}
42 changes: 20 additions & 22 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -69,39 +69,38 @@
"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",
"lodash-es": "4.17.11",
"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",
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions ui/semantic.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"base": "semantic\\",
"base": "semantic",
"paths": {
"source": {
"config": "src/theme.config",
Expand All @@ -18,5 +18,5 @@
"permission": false,
"autoInstall": true,
"rtl": false,
"version": "2.2.13"
}
"version": "2.7.5"
}
21 changes: 14 additions & 7 deletions ui/src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/shared/diff/item/diff.item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/labels/edit/labels.edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean, boolean, void>;
modal: ActiveModal<boolean, boolean, void>;
modalConfig: TemplateModalConfig<boolean, boolean, void>;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/modal/confirm/confirm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class ConfirmModalComponent {
@Output() event = new EventEmitter<boolean>();

// Ng semantic modal
@ViewChild('myConfirmModal')
@ViewChild('myConfirmModal', {static: false})
public myConfirmModal: ModalTemplate<boolean, boolean, void>;
modal: ActiveModal<boolean, boolean, void>;
modalConfig: TemplateModalConfig<boolean, boolean, void>;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/modal/delete/delete.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class DeleteModalComponent {
@Output() event = new EventEmitter<boolean>();

// Ng semantic modal
@ViewChild('myDeleteModal')
@ViewChild('myDeleteModal', {static: false})
public myDeleteModal: ModalTemplate<boolean, boolean, void>;
modal: ActiveModal<boolean, boolean, void>;
modalConfig: TemplateModalConfig<boolean, boolean, void>;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/modal/warning/warning.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class WarningModalComponent {
@Input() msg: string;
@Output() event = new EventEmitter<any>();

@ViewChild('myModal')
@ViewChild('myModal', {static: false})
private modal: SemanticModalComponent;

constructor() { }
Expand Down
3 changes: 1 addition & 2 deletions ui/src/app/shared/parameter/form/parameter.form.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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<string>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class ParameterValueComponent implements OnInit, AfterViewChecked {
@Output() valueChange = new EventEmitter<string | number | boolean>();
@Output() valueUpdating = new EventEmitter<boolean>();

@ViewChild('codeMirror') codemirror: any;
@ViewChild('codeMirror', {static: false}) codemirror: any;

codeMirrorConfig: any;
repositoriesManager: Array<RepositoriesManager>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class RepoManagerFormComponent {
@Input() project: Project;

// Warning modal
@ViewChild('linkRepoWarning')
@ViewChild('linkRepoWarning', {static: false})
linkRepoWarningModal: WarningModalComponent;

public ready = false;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/variable/list/variable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class VariableComponent extends Table<Variable> {

@Output() event = new EventEmitter<VariableEvent>();

@ViewChild('auditModal')
@ViewChild('auditModal', {static: false})
auditModal: SemanticModalComponent;

public ready = false;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/vcs/vcs.strategy.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class VCSStrategyComponent implements OnInit {
displayVCSStrategy = false;
defaultKeyType = 'ssh';

@ViewChild('createKey')
@ViewChild('createKey', {static: false})
sshModalTemplate: ModalTemplate<boolean, boolean, void>;
sshModal: ActiveModal<boolean, boolean, void>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean, boolean, void>;
@ViewChild('workflowTemplateApplyModal', {static: false}) workflowTemplateApplyModal: ModalTemplate<boolean, boolean, void>;
modal: ActiveModal<boolean, boolean, void>;
open: boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Column, ColumnType, Select } from '../../../shared/table/data-table.com
})
@AutoUnsubscribe()
export class WorkflowTemplateBulkModalComponent {
@ViewChild('workflowTemplateBulkModal') workflowTemplateBulkModal: ModalTemplate<boolean, boolean, void>;
@ViewChild('workflowTemplateBulkModal', {static: false}) workflowTemplateBulkModal: ModalTemplate<boolean, boolean, void>;
modal: ActiveModal<boolean, boolean, void>;
open: boolean;

Expand Down
6 changes: 0 additions & 6 deletions ui/src/app/shared/workflow/menu/edit-hook/menu.edit.hook.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
<div class="sidebar-node-edit">
<div class="ui list">
<a class="item" (click)="sendEvent('details')">
<div class="content">
{{ 'btn_logs' | translate }}
</div>
</a>
<hr>
<a class="item" (click)="sendEvent('edit')">
<div class="content">
<span *ngIf="readonly">{{ 'workflow_node_menu_edit_ro' | translate }}</span>
<span *ngIf="!readonly">{{ 'workflow_node_menu_edit' | translate }}</span>
</div>
</a>
<hr>
<a class="item" (click)="sendEvent('delete')"
[class.disabled]="(workflow.from_repository && workflow.from_repository.length > 0) || readonly">
<div class="content">
{{ 'btn_delete' | translate }}
</div>
</a>
</div>
</div>
Expand Down
Loading

0 comments on commit d796fab

Please sign in to comment.