Repository: incubator-griffin
Updated Branches:
  refs/heads/master a691f5ecb -> 711acce55


Fix UI bugs

Fix UI bugs

Author: dodobel <1254288...@qq.com>

Closes #222 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/711acce5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/711acce5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/711acce5

Branch: refs/heads/master
Commit: 711acce55d26ba4f4c16390d5713da0cceb4d16a
Parents: a691f5e
Author: dodobel <1254288...@qq.com>
Authored: Mon Feb 12 10:51:59 2018 +0800
Committer: Lionel Liu <bhlx3l...@163.com>
Committed: Mon Feb 12 10:51:59 2018 +0800

----------------------------------------------------------------------
 .../measure/create-measure/ac/ac.component.ts   |  8 +++---
 .../measure/create-measure/pr/pr.component.html |  2 +-
 .../measure/create-measure/pr/pr.component.ts   |  8 ++++--
 .../detail-metric/detail-metric.component.html  | 30 ++++++++++----------
 4 files changed, 25 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/711acce5/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 7d4fc2c..469b3ca 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
@@ -159,7 +159,7 @@ export class AcComponent implements OnInit, 
AfterViewChecked {
               {
                 type: "file.exist",
                 config: {
-                  "root.path": "hdfs:///griffin/demo_src",
+                  "root.path": '',
                   path: ""
                 }
               }
@@ -185,7 +185,7 @@ export class AcComponent implements OnInit, 
AfterViewChecked {
               {
                 type: "file.exist",
                 config: {
-                  "root.path": "hdfs:///griffin/demo_src",
+                  "root.path": '',
                   path: ""
                 }
               }
@@ -395,7 +395,7 @@ export class AcComponent implements OnInit, 
AfterViewChecked {
                 {
                   type: "file.exist",
                   config: {
-                    "root.path": "hdfs:///griffin/demo_src",
+                    "root.path": this.src_location,
                     path: this.src_path
                   }
                 }
@@ -421,7 +421,7 @@ export class AcComponent implements OnInit, 
AfterViewChecked {
                 {
                   type: "file.exist",
                   config: {
-                    "root.path": "hdfs:///griffin/demo_src",
+                    "root.path": this.tgt_location,
                     path: this.tgt_path
                   }
                 }

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/711acce5/ui/angular/src/app/measure/create-measure/pr/pr.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/measure/create-measure/pr/pr.component.html 
b/ui/angular/src/app/measure/create-measure/pr/pr.component.html
index ad955f7..5bd9e13 100644
--- a/ui/angular/src/app/measure/create-measure/pr/pr.component.html
+++ b/ui/angular/src/app/measure/create-measure/pr/pr.component.html
@@ -375,7 +375,7 @@ under the License.
                           {{this.where}}
                         </div>
                       </div>
-                      <div class="row" *ngIf="this.path">
+                      <div class="row" *ngIf="this.needpath && this.path">
                         <label class="col-md-4 col-lg-4 col-sm-4">
                           Source Path:
                         </label>

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/711acce5/ui/angular/src/app/measure/create-measure/pr/pr.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/measure/create-measure/pr/pr.component.ts 
b/ui/angular/src/app/measure/create-measure/pr/pr.component.ts
index 7342da3..c324013 100644
--- a/ui/angular/src/app/measure/create-measure/pr/pr.component.ts
+++ b/ui/angular/src/app/measure/create-measure/pr/pr.component.ts
@@ -139,7 +139,7 @@ export class PrComponent implements AfterViewChecked, 
OnInit {
               {
                 type: "file.exist",
                 config: {
-                  "root.path": "hdfs:///griffin/demo_src",
+                  "root.path": '',
                   path: ""
                 }
               }
@@ -176,6 +176,7 @@ export class PrComponent implements AfterViewChecked, 
OnInit {
   size: string;
   path: string;
   location: string;
+  needpath: boolean;
 
   private toasterService: ToasterService;
   public visible = false;
@@ -412,7 +413,7 @@ export class PrComponent implements AfterViewChecked, 
OnInit {
                 {
                   type: "file.exist",
                   config: {
-                    "root.path": "hdfs:///griffin/demo_src",
+                    "root.path": this.location,
                     path: this.path
                   }
                 }
@@ -436,7 +437,7 @@ export class PrComponent implements AfterViewChecked, 
OnInit {
     if (this.size.indexOf("0") == 0) {
       delete this.newMeasure["data.sources"][0]["connectors"][0]["data.unit"];
     }
-    if (this.path == "") {
+    if (!this.needpath || this.path == "") {
       delete this.newMeasure["data.sources"][0]["connectors"][0]["predicates"];
     }
     this.visible = true;
@@ -615,6 +616,7 @@ export class PrComponent implements AfterViewChecked, 
OnInit {
     this.timezone = evt.timezone;
     this.where = evt.where;
     this.size = evt.num + evt.timetype;
+    this.needpath = evt.needpath;
     this.path = evt.path;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/711acce5/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 91d4ccd..3d112b6 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" 
style="text-align: center;">{{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" 
style="text-align: center;">{{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;position: fixed;margin-left: 30%;" 
id="pagination">
-          <mfBootstrapPaginator></mfBootstrapPaginator>
-        </td>
-      </tr>
+        <tr>
+          <td class="text-center" colspan="8" 
style="background-color:#1f1f1f;position: fixed;margin-left: 30%;" 
id="pagination">
+            <mfBootstrapPaginator></mfBootstrapPaginator>
+          </td>
+        </tr>
       </tfoot>
     </table>
   </div>

Reply via email to