Repository: incubator-griffin
Updated Branches:
  refs/heads/master 6fd22ae71 -> 5464ba5f9


Apache master

Author: Yang <[email protected]>

Closes #119 from RachelYang2/apache_master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/5464ba5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/5464ba5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/5464ba5f

Branch: refs/heads/master
Commit: 5464ba5f9832ac1d293270ac97b5e44e88b0b3b6
Parents: 6fd22ae
Author: Yang <[email protected]>
Authored: Fri Aug 18 14:45:34 2017 +0800
Committer: William Guo <[email protected]>
Committed: Fri Aug 18 14:45:34 2017 +0800

----------------------------------------------------------------------
 ui/index.html                           |  2 +-
 ui/js/controllers/createrule-ac-ctrl.js |  9 ++++---
 ui/js/controllers/mydashboard-ctrl.js   | 38 ++++++++++++++--------------
 ui/js/controllers/sidebar-ctrl.js       |  2 +-
 ui/js/routes.js                         |  6 +++--
 ui/js/services/bark-chart.js            |  5 +++-
 6 files changed, 34 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5464ba5f/ui/index.html
----------------------------------------------------------------------
diff --git a/ui/index.html b/ui/index.html
index 5dcf58a..bf623c8 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -80,7 +80,7 @@ under the License.
                 <!-- <li><a href="#/undercons"><i class="icon-calendar 
icon-white"></i> Data Profiling</a></li> -->
                 <li ng-class="{active:isActive('/jobs') || 
isActive('/jobs')}"><a href="#!/jobs"><i class="icon-calendar icon-white"></i> 
Jobs</a></li>
 
-                <li ng-class="{active:isActive('/mydashboard') || 
isActive('/subscribemodel')}"><a href="#!/mydashboard"><i class="icon-calendar 
icon-white"></i> My Dashboard</a></li>
+                <li ng-class="{active:isActive('/mydashboard')}"><a 
href="#!/mydashboard"><i class="icon-calendar icon-white"></i> My 
Dashboard</a></li>
             </ul>
 
             <ul class="nav navbar-nav navbar-right">

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5464ba5f/ui/js/controllers/createrule-ac-ctrl.js
----------------------------------------------------------------------
diff --git a/ui/js/controllers/createrule-ac-ctrl.js 
b/ui/js/controllers/createrule-ac-ctrl.js
index 7d6617a..1ddbcfe 100644
--- a/ui/js/controllers/createrule-ac-ctrl.js
+++ b/ui/js/controllers/createrule-ac-ctrl.js
@@ -294,11 +294,12 @@ define(['./module'], function(controllers) {
                     $(stepSelection).css({
                         height: window.innerHeight - 
$(stepSelection).offset().top - $('#footerwrap').outerHeight()
                     });
+                    //to fix this bug later
 //                    $('fieldset').height($(stepSelection).height() - 
$(stepSelection + '>.stepDesc').height() - $('.btn-container').height() - 80);
-                    document.getElementByTag('fieldset').style.minHeight = 
$(stepSelection).height() - $(stepSelection + '>.stepDesc').height() - 
$('.btn-container').height() - 80;
-                    $('.y-scrollable').css({
-                        'max-height': $('fieldset').height()- 
$('.add-dataset').outerHeight()
-                    });
+//                    document.getElementByTag('fieldset').style.minHeight = 
$(stepSelection).height() - $(stepSelection + '>.stepDesc').height() - 
$('.btn-container').height() - 80;
+//                    $('.y-scrollable').css({
+//                        'max-height': $('fieldset').height()- 
$('.add-dataset').outerHeight()
+//                    });
 
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5464ba5f/ui/js/controllers/mydashboard-ctrl.js
----------------------------------------------------------------------
diff --git a/ui/js/controllers/mydashboard-ctrl.js 
b/ui/js/controllers/mydashboard-ctrl.js
index 13672bd..1e18f5b 100644
--- a/ui/js/controllers/mydashboard-ctrl.js
+++ b/ui/js/controllers/mydashboard-ctrl.js
@@ -29,22 +29,22 @@ define(['./module'], function(controllers) {
           $scope.$emit('initReq');
 
           var url_dashboard = $config.uri.getmydashboard + $scope.ntAccount;
-          $http.get(url_dashboard).success(function(res) {
-              $scope.dashboard = res;
-              angular.forEach(res, function(sys) {
-                angular.forEach(sys.metrics, function(metric) {
-                  var chartData = metric.details;
-                  chartData.sort(function(a, b){
-                    return a.timestamp - b.timestamp;
-                  });
-
-                });
-              });
-              $scope.originalData = angular.copy(res);
-              $timeout(function() {
-                redraw($scope.dashboard);
-              }, 0);
-          });
+//          $http.get(url_dashboard).success(function(res) {
+//              $scope.dashboard = res;
+//              angular.forEach(res, function(sys) {
+//                angular.forEach(sys.metrics, function(metric) {
+//                  var chartData = metric.details;
+//                  chartData.sort(function(a, b){
+//                    return a.timestamp - b.timestamp;
+//                  });
+//
+//                });
+//              });
+//              $scope.originalData = angular.copy(res);
+//              $timeout(function() {
+//                redraw($scope.dashboard);
+//              }, 0);
+//          });
 
         }
 
@@ -75,9 +75,9 @@ define(['./module'], function(controllers) {
         $scope.showBig = function(t){
           var metricDetailUrl = $config.uri.metricdetail + '/' + t.name;
           // var metricDetailUrl = '/js/mock_data/anom.json';
-          $http.get(metricDetailUrl).success(function (data){
-            $rootScope.showBigChart($barkChart.getOptionBig(data));
-          });
+//          $http.get(metricDetailUrl).success(function (data){
+//            $rootScope.showBigChart($barkChart.getOptionBig(data));
+//          });
 
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5464ba5f/ui/js/controllers/sidebar-ctrl.js
----------------------------------------------------------------------
diff --git a/ui/js/controllers/sidebar-ctrl.js 
b/ui/js/controllers/sidebar-ctrl.js
index d280b91..07938c4 100644
--- a/ui/js/controllers/sidebar-ctrl.js
+++ b/ui/js/controllers/sidebar-ctrl.js
@@ -144,7 +144,7 @@ define(['./module'], function(controllers) {
             } else {
               $('#rightbar').css('display', 'block');
               resizePieChart();
-              $scope.dataAssetPieChart.resize();
+//              $scope.dataAssetPieChart.resize();
               resizeSideChart();
             }
         });

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5464ba5f/ui/js/routes.js
----------------------------------------------------------------------
diff --git a/ui/js/routes.js b/ui/js/routes.js
index eba5544..3a8bc1f 100644
--- a/ui/js/routes.js
+++ b/ui/js/routes.js
@@ -112,8 +112,10 @@ define(['./app'], function(app) {
         });
 
         $routeProvider.when('/mydashboard', {
-            templateUrl: '/pages/mydashboard/mydashboard.html',
-            controller: 'MyDashboardCtrl'
+            // templateUrl: '/pages/mydashboard/mydashboard.html',
+            // controller: 'MyDashboardCtrl'
+            templateUrl: '/pages/metrics/dashboard.html',
+            controller: 'MetricsCtrl'
         });
 
         $routeProvider.when('/subscribemodel', {

http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/5464ba5f/ui/js/services/bark-chart.js
----------------------------------------------------------------------
diff --git a/ui/js/services/bark-chart.js b/ui/js/services/bark-chart.js
index 186b23a..1f69029 100644
--- a/ui/js/services/bark-chart.js
+++ b/ui/js/services/bark-chart.js
@@ -257,7 +257,10 @@ define(['./module'], function (services) {
     var data = [];
     var chartData = metric.details;
     for(var i = 0; i < chartData.length; i++){
-        data.push([formatTimeStamp(chartData[i]._source.tmst), 
parseFloat((chartData[i]._source.matched/chartData[i]._source.total*100).toFixed(2))]);
+          if(chartData[i]._source.total!=0)
+            data.push([formatTimeStamp(chartData[i]._source.tmst), 
parseFloat((chartData[i]._source.matched/chartData[i]._source.total*100).toFixed(2))]);
+          else
+            data.push([formatTimeStamp(chartData[i]._source.tmst), 
parseFloat((0).toFixed(2))]);
     }
 
     data.sort(function(a, b){

Reply via email to