trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dang...@apache.org
Subject [1/4] incubator-trafficcontrol git commit: adds widget collapse / close buttons
Date Tue, 09 May 2017 17:41:58 GMT
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master ee2ba9720 -> 0ecda947d


adds widget collapse / close buttons


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/8fad0ca8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/8fad0ca8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/8fad0ca8

Branch: refs/heads/master
Commit: 8fad0ca8f35ef55b7f1fd27b660ddbcdfd5848db
Parents: b21b6f6
Author: Jeremy Mitchell <mitchell852@gmail.com>
Authored: Tue May 9 11:35:21 2017 -0600
Committer: Dan Kirkwood <dangogh@gmail.com>
Committed: Tue May 9 11:41:31 2017 -0600

----------------------------------------------------------------------
 .../cacheGroups/WidgetCacheGroupsController.js  |  6 +++--
 .../cacheGroups/widget.cacheGroups.tpl.html     |  8 ++++++-
 .../widget/capacity/widget.capacity.tpl.html    |  7 +++++-
 .../widget/cdnChart/WidgetCDNChartController.js | 24 ++------------------
 .../widget/cdnChart/widget.cdnChart.tpl.html    | 11 +++++----
 .../changeLogs/WidgetChangeLogsController.js    |  6 +++--
 .../changeLogs/widget.changeLogs.tpl.html       |  7 +++++-
 .../widget/routing/widget.routing.tpl.html      |  7 +++++-
 8 files changed, 42 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/WidgetCacheGroupsController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/WidgetCacheGroupsController.js
b/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/WidgetCacheGroupsController.js
index e26f71a..43cda07 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/WidgetCacheGroupsController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/WidgetCacheGroupsController.js
@@ -17,12 +17,14 @@
  * under the License.
  */
 
-var WidgetCacheGroupsController = function(cacheGroupHealth, $scope) {
+var WidgetCacheGroupsController = function(cacheGroupHealth, $scope, locationUtils) {
 
 	// pagination
 	$scope.currentCacheGroupsPage = 1;
 	$scope.cacheGroupsPerPage = 10;
 
+	$scope.navigateToPath = locationUtils.navigateToPath;
+
 	$scope.onlinePercent = function(location) {
 		return (location.online / (location.online + location.offline)) * 100;
 	};
@@ -37,5 +39,5 @@ var WidgetCacheGroupsController = function(cacheGroupHealth, $scope) {
 
 };
 
-WidgetCacheGroupsController.$inject = ['cacheGroupHealth', '$scope'];
+WidgetCacheGroupsController.$inject = ['cacheGroupHealth', '$scope', 'locationUtils'];
 module.exports = WidgetCacheGroupsController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/widget.cacheGroups.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/widget.cacheGroups.tpl.html
b/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/widget.cacheGroups.tpl.html
index eeb0fe5..8f5cb88 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/widget.cacheGroups.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/cacheGroups/widget.cacheGroups.tpl.html
@@ -1,5 +1,11 @@
 <div class="x_title">
-    <h3>Cache Groups <small>{{cacheGroupHealth.totalOnline/(cacheGroupHealth.totalOnline
+ cacheGroupHealth.totalOffline) | percentFilter}} online</small></h3>
+    <h2>Cache Groups <small>{{cacheGroupHealth.totalOnline/(cacheGroupHealth.totalOnline
+ cacheGroupHealth.totalOffline) | percentFilter}} online</small></h2>
+    <ul class="nav navbar-right panel_toolbox">
+        <li><a class="collapse-link" ng-click="navigateToPath('/monitor/map')"><i
class="fa fa-map-marker"></i></a></li>
+        <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
+        <li><a class="close-link"><i class="fa fa-close"></i></a></li>
+    </ul>
+    <div class="clearfix"></div>
 </div>
 <div class="x_content">
     <div id="cache-groups-outer-container">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/capacity/widget.capacity.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/capacity/widget.capacity.tpl.html
b/traffic_ops/experimental/ui/app/src/common/modules/widget/capacity/widget.capacity.tpl.html
index 8e07478..c8b657f 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/capacity/widget.capacity.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/capacity/widget.capacity.tpl.html
@@ -1,5 +1,10 @@
 <div class="x_title">
-    <h3>Overall Capacity</h3>
+    <h2>Overall Capacity</h2>
+    <ul class="nav navbar-right panel_toolbox">
+        <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
+        <li><a class="close-link"><i class="fa fa-close"></i></a></li>
+    </ul>
+    <div class="clearfix"></div>
 </div>
 <div class="x_content">
     <table class="" style="width:100%">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/WidgetCDNChartController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/WidgetCDNChartController.js
b/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/WidgetCDNChartController.js
index 22e2a64..e456ef5 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/WidgetCDNChartController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/WidgetCDNChartController.js
@@ -136,34 +136,14 @@ var WidgetCDNChartController = function(cdn, $scope, $timeout, $filter,
$q, cdnS
 		};
 
 		var series = [
-			{ label: "Bandwidth", yaxis: 1, color: colors[Math.floor(Math.random() * 17) + 1], data:
bandwidthChartData },
-			{ label: "Connections", yaxis: 2, color: colors[Math.floor(Math.random() * 17) + 1], data:
connectionsChartData }
+			{ label: "Bandwidth", yaxis: 1, color: '#3498DB', data: bandwidthChartData },
+			{ label: "Connections", yaxis: 2, color: '#E74C3C', data: connectionsChartData }
 		];
 
 		$.plot($("#bps-chart-" + $scope.cdn.id), series, options);
 
 	};
 
-	var colors = [
-		'#1ABB9C',
-		'#3498DB',
-		'#73879C',
-		'#E74C3C',
-		'#946E83',
-		'#615055',
-		'#000000',
-		'#9FD356',
-		'#3A6B3D',
-		'#405672',
-		'#FF5000',
-		'#E39878',
-		'#6D6B6D',
-		'#54000B',
-		'#077187',
-		'#0D295E',
-		'#5B0554'
-	];
-
 	$scope.cdn;
 
 	$scope.unitSize = 'Gb';

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/widget.cdnChart.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/widget.cdnChart.tpl.html
b/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/widget.cdnChart.tpl.html
index c1bef77..a03b24c 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/widget.cdnChart.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/cdnChart/widget.cdnChart.tpl.html
@@ -1,8 +1,11 @@
 <div id="{{::randomId}}" class="dashboard_graph">
-    <div class="row x_title">
-        <div class="col-md-6">
-            <h3><a ng-click="navigateToPath('/admin/cdns/' + cdn.id)">{{::cdn.name}}</a></h3>
-        </div>
+    <div class="x_title">
+        <h2><a ng-click="navigateToPath('/admin/cdns/' + cdn.id)">{{::cdn.name}}</a></h2>
+        <ul class="nav navbar-right panel_toolbox">
+            <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
+            <li><a class="close-link"><i class="fa fa-close"></i></a></li>
+        </ul>
+        <div class="clearfix"></div>
     </div>
     <div class="col-md-9 col-sm-9 col-xs-12">
         <div class="bps-chart-container">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/WidgetChangeLogsController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/WidgetChangeLogsController.js
b/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/WidgetChangeLogsController.js
index 335fac5..45e46e9 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/WidgetChangeLogsController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/WidgetChangeLogsController.js
@@ -17,12 +17,14 @@
  * under the License.
  */
 
-var WidgetChangeLogsController = function(changeLogs, $scope) {
+var WidgetChangeLogsController = function(changeLogs, $scope, locationUtils) {
 
 	$scope.getRelativeTime = function(date) {
 		return moment(date).fromNow();
 	};
 
+	$scope.navigateToPath = locationUtils.navigateToPath;
+
 	var init = function() {
 		if (changeLogs) {
 			// only set this if it's passed in
@@ -33,5 +35,5 @@ var WidgetChangeLogsController = function(changeLogs, $scope) {
 
 };
 
-WidgetChangeLogsController.$inject = ['changeLogs', '$scope'];
+WidgetChangeLogsController.$inject = ['changeLogs', '$scope', 'locationUtils'];
 module.exports = WidgetChangeLogsController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/widget.changeLogs.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/widget.changeLogs.tpl.html
b/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/widget.changeLogs.tpl.html
index a3ceba2..2f96e21 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/widget.changeLogs.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/changeLogs/widget.changeLogs.tpl.html
@@ -1,5 +1,10 @@
 <div class="x_title">
-    <h3>Change Logs</h3>
+    <h2>Change Logs</h2>
+    <ul class="nav navbar-right panel_toolbox">
+        <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
+        <li><a class="close-link"><i class="fa fa-close"></i></a></li>
+    </ul>
+    <div class="clearfix"></div>
 </div>
 <div class="x_content">
     <div class="dashboard-widget-content">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fad0ca8/traffic_ops/experimental/ui/app/src/common/modules/widget/routing/widget.routing.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/widget/routing/widget.routing.tpl.html
b/traffic_ops/experimental/ui/app/src/common/modules/widget/routing/widget.routing.tpl.html
index d70493a..72d1de2 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/widget/routing/widget.routing.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/widget/routing/widget.routing.tpl.html
@@ -1,5 +1,10 @@
 <div class="x_title">
-    <h3>Routing Methods</h3>
+    <h2>Routing Methods</h2>
+    <ul class="nav navbar-right panel_toolbox">
+        <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
+        <li><a class="close-link"><i class="fa fa-close"></i></a></li>
+    </ul>
+    <div class="clearfix"></div>
 </div>
 <div class="x_content">
     <div class="widget_summary">


Mime
View raw message