Repository: incubator-griffin Updated Branches: refs/heads/master d8193a0f8 -> d063c03ee
Fix bug Fix bug when render chart on dashboard page Author: dodobel <[email protected]> Closes #214 from dodobel/button. Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/d063c03e Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/d063c03e Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/d063c03e Branch: refs/heads/master Commit: d063c03eec084bce1d0ab7c63327670b732d16ec Parents: d8193a0 Author: dodobel <[email protected]> Authored: Wed Feb 7 15:13:14 2018 +0800 Committer: Lionel Liu <[email protected]> Committed: Wed Feb 7 15:13:14 2018 +0800 ---------------------------------------------------------------------- ui/angular/src/app/app.component.html | 6 +- ui/angular/src/app/health/health.component.ts | 4 +- .../app/job/create-job/create-job.component.ts | 2 +- ui/angular/src/app/job/job.component.ts | 1 - .../measure/create-measure/ac/ac.component.html | 4 +- .../measure/create-measure/ac/ac.component.ts | 8 +- .../detail-metric/detail-metric.component.css | 91 ++++++++++---------- .../detail-metric/detail-metric.component.html | 30 +++---- .../detail-metric/detail-metric.component.ts | 4 +- ui/angular/src/app/metric/metric.component.ts | 4 +- ui/angular/src/app/service/chart.service.ts | 2 +- ui/angular/src/app/service/user.service.ts | 1 - ui/angular/src/app/sidebar/sidebar.component.ts | 4 +- 13 files changed, 80 insertions(+), 81 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/app.component.html ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/app.component.html b/ui/angular/src/app/app.component.html index f6781d0..27eb941 100644 --- a/ui/angular/src/app/app.component.html +++ b/ui/angular/src/app/app.component.html @@ -43,9 +43,9 @@ under the License. <li><a href="#!/undercons"><i class="fa fa-user fa-fw"></i> User Profile</a></li> <li><a href="#!/undercons"><i class="fa fa-gear fa-fw"></i> Settings</a></li> <li class="divider"></li> - <li><a href="/apidocs/index.html" target="_blank"><i class="fa fa-book fa-fw"></i> API DOCs</a></li> - <li><a href="https://github.com/eBay/griffin/blob/master/griffin-doc/userguide.md" target="_blank"><i class="fa fa-question-circle fa-fw"></i> User Guide</a></li> - <li><a href="mailto://[email protected]"><i class="fa fa-envelope fa-fw"></i> Contact us</a></li> + <li><a href="https://github.com/apache/incubator-griffin/blob/master/griffin-doc/service/api-guide.md" target="_blank"><i class="fa fa-book fa-fw"></i> API DOCs</a></li> + <li><a href="https://github.com/apache/incubator-griffin/blob/master/griffin-doc/ui/user-guide.md" target="_blank"><i class="fa fa-question-circle fa-fw"></i> User Guide</a></li> + <li><a href="mailto:[email protected]"><i class="fa fa-envelope fa-fw"></i> Contact us</a></li> <li class="divider"></li> <li><a (click)="logout()" class="re"><i class="fa fa-sign-out fa-fw"></i> Logout</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/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 997b856..bbba430 100644 --- a/ui/angular/src/app/health/health.component.ts +++ b/ui/angular/src/app/health/health.component.ts @@ -206,7 +206,7 @@ export class HealthComponent implements OnInit { } } } else { - break; + continue; } this.finalData.push(node); } @@ -227,4 +227,4 @@ export class HealthComponent implements OnInit { // }) } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/job/create-job/create-job.component.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/job/create-job/create-job.component.ts b/ui/angular/src/app/job/create-job/create-job.component.ts index c82c7ce..1c55bc1 100644 --- a/ui/angular/src/app/job/create-job/create-job.component.ts +++ b/ui/angular/src/app/job/create-job/create-job.component.ts @@ -345,7 +345,7 @@ export class CreateJobComponent implements OnInit, AfterViewChecked { } ngOnInit() { - var allModels = this.serviceService.config.uri.allModels; + var allModels = this.serviceService.config.uri.allModels + '?type=griffin'; this.http.get(allModels).subscribe(data => { this.Measures = data; }); http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/job/job.component.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/job/job.component.ts b/ui/angular/src/app/job/job.component.ts index 66e741e..aa4f4cf 100644 --- a/ui/angular/src/app/job/job.component.ts +++ b/ui/angular/src/app/job/job.component.ts @@ -110,7 +110,6 @@ export class JobComponent implements OnInit { this.http.get(getInstanceUrl).subscribe(data => { row.showDetail = !row.showDetail; this.allInstances = data; - console.log(this.allInstances); setTimeout(function() { $(".pagination").css("marginBottom", "-10px"); }, 0); http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/measure/create-measure/ac/ac.component.html ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/measure/create-measure/ac/ac.component.html b/ui/angular/src/app/measure/create-measure/ac/ac.component.html index eb39a70..6565670 100644 --- a/ui/angular/src/app/measure/create-measure/ac/ac.component.html +++ b/ui/angular/src/app/measure/create-measure/ac/ac.component.html @@ -472,7 +472,7 @@ under the License. {{this.src_where}} </div> </div> - <div class="row" *ngIf="this.src_path"> + <div class="row" *ngIf="this.src_needpath && this.src_path"> <label class="col-md-4 col-lg-4 col-sm-4"> Source Path: </label> @@ -512,7 +512,7 @@ under the License. {{this.tgt_where}} </div> </div> - <div class="row" *ngIf="this.tgt_path"> + <div class="row" *ngIf="this.tgt_needpath &&this.tgt_path"> <label class="col-md-4 col-lg-4 col-sm-4"> Target Path: </label> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/measure/create-measure/ac/ac.component.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/measure/create-measure/ac/ac.component.ts b/ui/angular/src/app/measure/create-measure/ac/ac.component.ts index 7230b76..7d4fc2c 100644 --- a/ui/angular/src/app/measure/create-measure/ac/ac.component.ts +++ b/ui/angular/src/app/measure/create-measure/ac/ac.component.ts @@ -122,6 +122,8 @@ export class AcComponent implements OnInit, AfterViewChecked { tgt_location: string; src_timezone: string; tgt_timezone: string; + src_needpath: boolean; + tgt_needpath: boolean; measureTypes = [ "accuracy", @@ -460,10 +462,10 @@ export class AcComponent implements OnInit, AfterViewChecked { if (this.tgt_size.indexOf("0") == 0) { this.deleteUnit(1); } - if (this.src_path == "") { + if (!this.src_needpath || this.src_path == "") { this.deletePredicates(0); } - if (this.tgt_path == "") { + if (!this.tgt_needpath || this.tgt_path == "") { this.deletePredicates(1); } var mappingRule = function(src, tgt, matches) { @@ -613,6 +615,7 @@ export class AcComponent implements OnInit, AfterViewChecked { this.src_timezone = evt.timezone; this.src_where = evt.where; this.src_size = evt.num + evt.timetype; + this.src_needpath = evt.needpath; this.src_path = evt.path; } @@ -621,6 +624,7 @@ export class AcComponent implements OnInit, AfterViewChecked { this.tgt_timezone = evt.timezone; this.tgt_where = evt.where; this.tgt_size = evt.num + evt.timetype; + this.tgt_needpath = evt.needpath; this.tgt_path = evt.path; } http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/metric/detail-metric/detail-metric.component.css ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/metric/detail-metric/detail-metric.component.css b/ui/angular/src/app/metric/detail-metric/detail-metric.component.css index dfc51c4..924c34a 100644 --- a/ui/angular/src/app/metric/detail-metric/detail-metric.component.css +++ b/ui/angular/src/app/metric/detail-metric/detail-metric.component.css @@ -18,32 +18,31 @@ under the License. */ .table-scroll { - position:relative; - /*max-width:800px;*/ - margin:auto; - overflow:hidden; - text-align: center; - /*border:1px solid #f5f5f5;*/ + position: relative; + /*max-width:800px;*/ + margin: auto; + overflow: hidden; + text-align: center; + /*border:1px solid #f5f5f5;*/ } + .table-wrap { - /*width:100%;*/ - overflow:auto; + /*width:100%;*/ + overflow: auto; } + .table-scroll table { - /*width:100%;*/ - margin:auto; - border-collapse:separate; - border-spacing:0; -} -.table-scroll th, .table-scroll td { - padding:5px 10px; - border:1px solid #000; - /*background:#fff;*/ - white-space:nowrap; - vertical-align:top; + margin: auto; + border-collapse: separate; + border-spacing: 0; } -.table-scroll thead, .table-scroll tfoot { - /*background:#f9f9f9;*/ + +.table-scroll th, +.table-scroll td { + padding: 5px 10px; + border: 1px solid #000; + white-space: nowrap; + vertical-align: top; } .main-table>tbody>tr:nth-of-type(even) { @@ -55,48 +54,46 @@ under the License. } .clone { - /*position:absolute;*/ - top:0; - left:0; - /*pointer-events:none;*/ -} -.clone th, .clone td { - /*visibility:hidden*/ + top: 0; + left: 0; } -.clone td, .clone th { - border-color:transparent + +.clone td, +.clone th { + border-color: transparent } + .clone tbody th { - visibility:visible; - color:#fff; + visibility: visible; + color: #fff; } + .clone .fixed-side { - position:absolute; - /*border:1px solid #000;*/ - /*background:#1f1f1f;*/ - visibility:visible; - width: 150px; + position: absolute; + visibility: visible; + width: 150px; } .clone tbody tr:nth-of-type(even) .fixed-side { - background: #1f1f1f; + background: #1f1f1f; } + .clone tbody tr:nth-of-type(odd) .fixed-side { - background: #080808; + background: #080808; } .cover { - position: static; - width: 150px; + position: static; + width: 150px; } .title { - margin-top: 10px; - margin-bottom: 10px; - font-size: 18px; + margin-top: 10px; + margin-bottom: 10px; + font-size: 18px; } -mfBootstrapPaginator { - position: fixed; +.clone thead, +.clone tfoot { + background: transparent; } -.clone thead, .clone tfoot{background:transparent;} http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/metric/detail-metric/detail-metric.component.html ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/metric/detail-metric/detail-metric.component.html b/ui/angular/src/app/metric/detail-metric/detail-metric.component.html index a76fda9..9883913 100644 --- a/ui/angular/src/app/metric/detail-metric/detail-metric.component.html +++ b/ui/angular/src/app/metric/detail-metric/detail-metric.component.html @@ -33,25 +33,25 @@ under the License. <div class="table-wrap"> <table class="main-table y-scrollable" [mfData]="prodata" #mf="mfDataTable" [mfRowsOnPage]="18"> <thead> - <tr style="background-color:#7D95CC"> - <th class="fixed-side" scope="col" style="background-color:#7D95CC">Time</th> - <th class="cover" scope="col">Time</th> - <th scope="col" *ngFor="let name of this.columnname">{{name}}</th> - </tr> + <tr style="background-color:#7D95CC"> + <th class="fixed-side" scope="col" style="background-color:#7D95CC">Time</th> + <th class="cover" scope="col">Time</th> + <th scope="col" *ngFor="let name of this.columnname">{{name}}</th> + </tr> </thead> <tbody> - <tr *ngFor="let item of mf.data"> - <th class="fixed-side">{{(item.tmst | date: 'yyyy/MM/dd HH:mm:ss') || 'N/A' }}</th> - <th class="cover">{{(item.tmst | date: 'yyyy/MM/dd HH:mm:ss') || 'N/A' }}</th> - <td *ngFor="let key of objectKeys(item.value)">{{item.value[key]}}</td> - </tr> + <tr *ngFor="let item of mf.data"> + <th class="fixed-side">{{(item.tmst | date: 'yyyy/MM/dd HH:mm:ss') || 'N/A' }}</th> + <th class="cover">{{(item.tmst | date: 'yyyy/MM/dd HH:mm:ss') || 'N/A' }}</th> + <td *ngFor="let key of objectKeys(item.value)">{{item.value[key]}}</td> + </tr> </tbody> <tfoot> - <tr> - <td class="text-center" colspan="8" style="background-color:#1f1f1f;" id="pagination"> - <mfBootstrapPaginator></mfBootstrapPaginator> - </td> - </tr> + <tr> + <td class="text-center" colspan="8" style="background-color:#1f1f1f;" id="pagination"> + <mfBootstrapPaginator></mfBootstrapPaginator> + </td> + </tr> </tfoot> </table> </div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/metric/detail-metric/detail-metric.component.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/metric/detail-metric/detail-metric.component.ts b/ui/angular/src/app/metric/detail-metric/detail-metric.component.ts index d0f7d50..32c3b91 100644 --- a/ui/angular/src/app/metric/detail-metric/detail-metric.component.ts +++ b/ui/angular/src/app/metric/detail-metric/detail-metric.component.ts @@ -106,7 +106,7 @@ export class DetailMetricComponent implements AfterViewChecked, OnInit { } ); } - + onResize(event) { this.resizeTreeMap(); } @@ -121,4 +121,4 @@ export class DetailMetricComponent implements AfterViewChecked, OnInit { ngAfterViewChecked() { $(".main-table").addClass('clone'); } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/metric/metric.component.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/metric/metric.component.ts b/ui/angular/src/app/metric/metric.component.ts index 0883b24..eae6e2a 100644 --- a/ui/angular/src/app/metric/metric.component.ts +++ b/ui/angular/src/app/metric/metric.component.ts @@ -89,7 +89,7 @@ export class MetricComponent implements OnInit { } } } else { - break; + continue; } this.finalData.push(node); } @@ -155,4 +155,4 @@ export class MetricComponent implements OnInit { self.redraw(self.finalData); }, 0); } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/service/chart.service.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/service/chart.service.ts b/ui/angular/src/app/service/chart.service.ts index 8b69191..d98a0f8 100644 --- a/ui/angular/src/app/service/chart.service.ts +++ b/ui/angular/src/app/service/chart.service.ts @@ -355,4 +355,4 @@ export class ChartService { option.series = this.getSeries(metric); return option; } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/service/user.service.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/service/user.service.ts b/ui/angular/src/app/service/user.service.ts index 16e943e..47efa02 100644 --- a/ui/angular/src/app/service/user.service.ts +++ b/ui/angular/src/app/service/user.service.ts @@ -27,7 +27,6 @@ export class UserService { if (days) { var date = new Date(); date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); - console.log(date); expires = "; expires=" + date.toUTCString(); } else { expires = ""; http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/d063c03e/ui/angular/src/app/sidebar/sidebar.component.ts ---------------------------------------------------------------------- diff --git a/ui/angular/src/app/sidebar/sidebar.component.ts b/ui/angular/src/app/sidebar/sidebar.component.ts index 051310b..c15b826 100644 --- a/ui/angular/src/app/sidebar/sidebar.component.ts +++ b/ui/angular/src/app/sidebar/sidebar.component.ts @@ -136,7 +136,7 @@ export class SidebarComponent implements OnInit { } } } else { - break; + continue; } this.finalData.push(node); } @@ -146,4 +146,4 @@ export class SidebarComponent implements OnInit { ngOnInit() { this.sideBarList(null); } -} +} \ No newline at end of file
