You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/01/25 21:49:35 UTC
[44/50] [abbrv] helix git commit: [helix-front] Upgrade Angular to 5;
Material to 5; ngx-datatable to 11
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/app/shared/node-viewer/node-viewer.component.spec.ts
----------------------------------------------------------------------
diff --git a/helix-front/client/app/shared/node-viewer/node-viewer.component.spec.ts b/helix-front/client/app/shared/node-viewer/node-viewer.component.spec.ts
index 40f57b9..d66b1ee 100644
--- a/helix-front/client/app/shared/node-viewer/node-viewer.component.spec.ts
+++ b/helix-front/client/app/shared/node-viewer/node-viewer.component.spec.ts
@@ -1,8 +1,6 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
-import { MaterialModule } from '@angular/material';
-import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-import { RouterTestingModule } from '@angular/router/testing';
+import { TestingModule } from '../../../testing/testing.module';
import { NodeViewerComponent } from './node-viewer.component';
@@ -13,9 +11,7 @@ describe('NodeViewerComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
- MaterialModule,
- NoopAnimationsModule,
- RouterTestingModule
+ TestingModule
],
declarations: [ NodeViewerComponent ],
schemas: [
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/app/shared/node-viewer/node-viewer.component.ts
----------------------------------------------------------------------
diff --git a/helix-front/client/app/shared/node-viewer/node-viewer.component.ts b/helix-front/client/app/shared/node-viewer/node-viewer.component.ts
index 9842568..316cbbf 100644
--- a/helix-front/client/app/shared/node-viewer/node-viewer.component.ts
+++ b/helix-front/client/app/shared/node-viewer/node-viewer.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit, Input, Output, ViewChild, ViewEncapsulation, EventEmitter } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
-import { MdDialog } from '@angular/material';
+import { MatDialog } from '@angular/material';
import * as _ from 'lodash';
@@ -63,6 +63,7 @@ export class NodeViewerComponent implements OnInit {
protected _obj: any;
protected node: Node;
+ headerHeight = Settings.tableHeaderHeight;
rowHeight = Settings.tableRowHeight;
sorts = [
{ prop: 'name', dir: 'asc'}
@@ -117,7 +118,7 @@ export class NodeViewerComponent implements OnInit {
}
constructor(
- protected dialog: MdDialog,
+ protected dialog: MatDialog,
protected route: ActivatedRoute
) { }
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/app/shared/shared.module.ts
----------------------------------------------------------------------
diff --git a/helix-front/client/app/shared/shared.module.ts b/helix-front/client/app/shared/shared.module.ts
index 017a637..0aa75d1 100644
--- a/helix-front/client/app/shared/shared.module.ts
+++ b/helix-front/client/app/shared/shared.module.ts
@@ -1,13 +1,13 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
-import { MaterialModule } from '@angular/material';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule } from '@angular/forms';
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
import { NgxJsonViewerModule } from 'ngx-json-viewer';
+import { MaterialModule } from './material.module';
import { HelperService } from './helper.service';
import { InputDialogComponent } from './dialog/input-dialog/input-dialog.component';
import { DetailHeaderComponent } from './detail-header/detail-header.component';
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/app/shared/state-label/state-label.component.html
----------------------------------------------------------------------
diff --git a/helix-front/client/app/shared/state-label/state-label.component.html b/helix-front/client/app/shared/state-label/state-label.component.html
index 6641a15..8b98d7e 100644
--- a/helix-front/client/app/shared/state-label/state-label.component.html
+++ b/helix-front/client/app/shared/state-label/state-label.component.html
@@ -3,5 +3,5 @@
'state-label-ready': isReady,
'state-label-not-ready': isReady == false
}">
- {{ state }}
+ {{ state || 'NO STATE' }}
</span>
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/app/workflow/workflow-detail/workflow-detail.component.html
----------------------------------------------------------------------
diff --git a/helix-front/client/app/workflow/workflow-detail/workflow-detail.component.html b/helix-front/client/app/workflow/workflow-detail/workflow-detail.component.html
index 38b3128..848c6c2 100644
--- a/helix-front/client/app/workflow/workflow-detail/workflow-detail.component.html
+++ b/helix-front/client/app/workflow/workflow-detail/workflow-detail.component.html
@@ -1,7 +1,9 @@
-<md-toolbar class="mat-elevation-z1">
- <hi-detail-header [cluster]="clusterName" [workflow]="workflow?.name"></hi-detail-header>
- <md-toolbar-row class="information">
- <a md-mini-fab routerLink="../"><md-icon>arrow_back</md-icon></a>
+<mat-toolbar class="mat-elevation-z1">
+ <mat-toolbar-row>
+ <hi-detail-header [cluster]="clusterName" [workflow]="workflow?.name"></hi-detail-header>
+ </mat-toolbar-row>
+ <mat-toolbar-row class="information">
+ <a mat-mini-fab routerLink="../"><mat-icon>arrow_back</mat-icon></a>
<hi-key-value-pairs [obj]="workflow">
<hi-key-value-pair name="Capacity" prop="config.capacity"></hi-key-value-pair>
<hi-key-value-pair name="Target State" prop="config.TargetState"></hi-key-value-pair>
@@ -10,10 +12,10 @@
<hi-key-value-pair name="Failure Threshold" prop="config.FailureThreshold"></hi-key-value-pair>
<hi-key-value-pair name="Expiry" prop="config.Expiry"></hi-key-value-pair>
</hi-key-value-pairs>
- </md-toolbar-row>
-</md-toolbar>
+ </mat-toolbar-row>
+</mat-toolbar>
<section fxLayout="column" fxLayoutAlign="center center">
- <md-spinner *ngIf="isLoading"></md-spinner>
+ <mat-spinner *ngIf="isLoading"></mat-spinner>
<section class="content" fxFlexFill>
<ngx-json-viewer [json]="workflow"></ngx-json-viewer>
</section>
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/app/workflow/workflow-list/workflow-list.component.html
----------------------------------------------------------------------
diff --git a/helix-front/client/app/workflow/workflow-list/workflow-list.component.html b/helix-front/client/app/workflow/workflow-list/workflow-list.component.html
index f3b642f..9c4222c 100644
--- a/helix-front/client/app/workflow/workflow-list/workflow-list.component.html
+++ b/helix-front/client/app/workflow/workflow-list/workflow-list.component.html
@@ -1,15 +1,15 @@
<section fxLayout="column" fxLayoutAlign="center center">
- <md-spinner *ngIf="isLoading"></md-spinner>
+ <mat-spinner *ngIf="isLoading"></mat-spinner>
<section fxFlexFill>
<section *ngIf="!isLoading && workflows.length == 0" class="empty">
There's no workflow here.
</section>
- <md-nav-list>
+ <mat-nav-list>
<a *ngFor="let name of workflows"
- md-list-item
+ mat-list-item
[routerLink]="[name]">
- <div md-line>{{ name }}</div>
+ <div mat-line>{{ name }}</div>
</a>
- </md-nav-list>
+ </mat-nav-list>
</section>
</section>
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/styles.scss
----------------------------------------------------------------------
diff --git a/helix-front/client/styles.scss b/helix-front/client/styles.scss
index 2161b18..9a64f47 100644
--- a/helix-front/client/styles.scss
+++ b/helix-front/client/styles.scss
@@ -18,6 +18,10 @@
&.active,
&.active .datatable-row-group {
background-color: #0077B5 !important;
+
+ .datatable-body-cell {
+ color: #FFF !important;
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/testing/testing.module.ts
----------------------------------------------------------------------
diff --git a/helix-front/client/testing/testing.module.ts b/helix-front/client/testing/testing.module.ts
index 36ba18d..632a3c7 100644
--- a/helix-front/client/testing/testing.module.ts
+++ b/helix-front/client/testing/testing.module.ts
@@ -1,7 +1,8 @@
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
-import { MaterialModule } from '@angular/material';
+import { MaterialModule } from '../app/shared/material.module';
import { RouterTestingModule } from '@angular/router/testing';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { HelperService } from '../app/shared/helper.service';
import { HelperServiceStub } from './stubs';
@@ -10,7 +11,8 @@ import { HelperServiceStub } from './stubs';
imports: [
HttpModule,
MaterialModule,
- RouterTestingModule
+ RouterTestingModule,
+ NoopAnimationsModule
],
providers: [
{
@@ -21,7 +23,8 @@ import { HelperServiceStub } from './stubs';
exports: [
HttpModule,
MaterialModule,
- RouterTestingModule
+ RouterTestingModule,
+ NoopAnimationsModule
]
})
export class TestingModule { }
http://git-wip-us.apache.org/repos/asf/helix/blob/b3ecd2a7/helix-front/client/tsconfig.app.json
----------------------------------------------------------------------
diff --git a/helix-front/client/tsconfig.app.json b/helix-front/client/tsconfig.app.json
index 5e2507d..126454c 100644
--- a/helix-front/client/tsconfig.app.json
+++ b/helix-front/client/tsconfig.app.json
@@ -9,5 +9,9 @@
"exclude": [
"test.ts",
"**/*.spec.ts"
+ ],
+ "include": [
+ "**/*",
+ "../node_modules/ngx-json-viewer/index.ts"
]
}