You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@griffin.apache.org by gu...@apache.org on 2018/07/16 09:25:22 UTC
incubator-griffin git commit: [GRIFFIN-182] fix blank flash when
routing from job to metric detail
Repository: incubator-griffin
Updated Branches:
refs/heads/master c9f0898f1 -> 5cf2d822d
[GRIFFIN-182] fix blank flash when routing from job to metric detail
GRIFFIN-182 - fix blank flash when routing from job to metric detail
ISSUE:
currently, when navigating from ```health``` jobs to job-metric detail page, code will reload the health page to make navigation working causing blank flash
Author: Li, Juan <su...@gmail.com>
Closes #354 from icesmartjuan/fixblankflashwhenroutefromjobtometric.
Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/5cf2d822
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/5cf2d822
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/5cf2d822
Branch: refs/heads/master
Commit: 5cf2d822d2e9c59a5f3dbbd1b28c7eb45f26b3aa
Parents: c9f0898
Author: Li, Juan <su...@gmail.com>
Authored: Mon Jul 16 17:25:16 2018 +0800
Committer: Lionel Liu <bh...@163.com>
Committed: Mon Jul 16 17:25:16 2018 +0800
----------------------------------------------------------------------
ui/angular/package.json | 2 +-
ui/angular/src/app/app.module.ts | 4 ++--
ui/angular/src/app/health/health.component.ts | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5cf2d822/ui/angular/package.json
----------------------------------------------------------------------
diff --git a/ui/angular/package.json b/ui/angular/package.json
index 0eceb6f..a7f5f83 100644
--- a/ui/angular/package.json
+++ b/ui/angular/package.json
@@ -32,7 +32,7 @@
"font-awesome": "^4.7.0",
"ng2-bootstrap": "1.6.3",
"ng2-nouislider": "^1.7.6",
- "ngx-echarts": "1.2.4",
+ "ngx-echarts": "2.2.0",
"nouislider": "11.0.3",
"rxjs": "5.4.2",
"zone.js": "^0.8.14"
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5cf2d822/ui/angular/src/app/app.module.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.module.ts b/ui/angular/src/app/app.module.ts
index 44ea4a1..8adb212 100644
--- a/ui/angular/src/app/app.module.ts
+++ b/ui/angular/src/app/app.module.ts
@@ -23,7 +23,7 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { DataTableModule} from "angular2-datatable";
import { TreeModule } from 'angular-tree-component';
import { BrowserAnimationsModule} from '@angular/platform-browser/animations';
-import { AngularEchartsModule } from 'ngx-echarts';
+import { NgxEchartsModule } from 'ngx-echarts';
import { MatDatepickerModule, MatNativeDateModule} from '@angular/material';
import { Location, LocationStrategy, HashLocationStrategy} from '@angular/common';
import { ToasterModule, ToasterService} from 'angular2-toaster';
@@ -168,7 +168,7 @@ const appRoutes: Routes = [
ToasterModule,
FormsModule,
NouisliderModule,
- AngularEchartsModule,
+ NgxEchartsModule,
DataTableModule,
AngularMultiSelectModule,
RouterModule.forRoot(
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5cf2d822/ui/angular/src/app/health/health.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/health/health.component.ts b/ui/angular/src/app/health/health.component.ts
index c0fe83b..ead969c 100644
--- a/ui/angular/src/app/health/health.component.ts
+++ b/ui/angular/src/app/health/health.component.ts
@@ -38,9 +38,9 @@ export class HealthComponent implements OnInit {
mesWithJob: any;
onChartClick($event) {
+ let self = this;
if ($event.data.name) {
- this.router.navigate(["/detailed/" + $event.data.name]);
- window.location.reload();
+ self.router.navigate(["/detailed/" + $event.data.name]);
}
}
@@ -86,6 +86,7 @@ export class HealthComponent implements OnInit {
metricId++;
}
}
+ item.children = item.children.sort(function(a,b) {return (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0);} );
result.push(item);
sysId++;
}