You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ji...@apache.org on 2016/10/28 12:13:11 UTC

incubator-eagle git commit: EAGLE-699 UI imporvement

Repository: incubator-eagle
Updated Branches:
  refs/heads/master e3f358c84 -> 4250e2d32


EAGLE-699 UI imporvement

* Init UI hide {{}}
* Description update
* Fix JPM widget bug
* UI tab to window / router update

Author: zombieJ <sm...@gmail.com>

Closes #582 from zombieJ/699.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/4250e2d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/4250e2d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/4250e2d3

Branch: refs/heads/master
Commit: 4250e2d32f2cb33760af5d3b1d7f06a9bb91748f
Parents: e3f358c
Author: zombieJ <sm...@gmail.com>
Authored: Fri Oct 28 20:12:28 2016 +0800
Committer: zombieJ <sm...@gmail.com>
Committed: Fri Oct 28 20:12:28 2016 +0800

----------------------------------------------------------------------
 .../webapp/app/apps/jpm/ctrl/jobTaskCtrl.js     |  2 +-
 .../app/apps/jpm/partials/job/detail.html       | 16 ++--
 eagle-server/src/main/webapp/app/dev/index.html |  7 +-
 .../webapp/app/dev/partials/alert/list.html     | 86 +++++++++++---------
 .../webapp/app/dev/partials/alert/main.html     | 29 -------
 .../app/dev/partials/alert/policyList.html      |  8 +-
 .../app/dev/partials/alert/streamList.html      | 62 ++++++++------
 .../src/main/webapp/app/dev/public/css/main.css |  6 ++
 .../src/main/webapp/app/dev/public/js/app.js    | 35 ++++----
 .../src/main/webapp/app/dev/public/js/common.js |  1 +
 .../webapp/app/dev/public/js/ctrls/alertCtrl.js | 21 ++---
 .../dev/public/js/ctrls/alertEditCtrl.bac.js    |  2 +-
 .../app/dev/public/js/ctrls/alertEditCtrl.js    | 12 +--
 .../app/dev/public/js/services/pageSrv.js       |  8 +-
 .../app/dev/public/js/services/timeSrv.js       | 53 ++++++------
 15 files changed, 175 insertions(+), 173 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/jobTaskCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/jobTaskCtrl.js b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/jobTaskCtrl.js
index 9f0e7f4..fc70bd3 100644
--- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/jobTaskCtrl.js
+++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/ctrl/jobTaskCtrl.js
@@ -101,7 +101,7 @@
 			var startTime = Number($wrapState.param.startTime);
 			var endTime = Number($wrapState.param.endTime);
 
-			PageConfig.title = "Task";
+			PageConfig.title = "(beta) Task Statistic";
 			PageConfig.subTitle = $scope.jobId;
 
 			var timeDiff = endTime - startTime;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html
index 57561ba..fb8f7b8 100644
--- a/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html
+++ b/eagle-jpm/eagle-jpm-web/src/main/webapp/app/apps/jpm/partials/job/detail.html
@@ -125,19 +125,23 @@
 						</tr>
 						<tr>
 							<th>Map vCores</th>
-							<td>{{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.JobCounter"].VCORES_MILLIS_MAPS)}}</td>
+							<td class="text-no-break">{{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.JobCounter"].VCORES_MILLIS_MAPS)}} ms</td>
 							<th>Map CPU</th>
-							<td>{{common.number.toFixed(job.jobCounters.counters.MapTaskAttemptCounter.CPU_MILLISECONDS)}}</td>
+							<td class="text-no-break">{{common.number.toFixed(job.jobCounters.counters.MapTaskAttemptCounter.CPU_MILLISECONDS)}} ms</td>
 							<th>HDFS Read Bytes</th>
-							<td>{{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.FileSystemCounter"].HDFS_BYTES_READ)}}</td>
+							<td title="{{job.jobCounters.counters['org.apache.hadoop.mapreduce.FileSystemCounter'].HDFS_BYTES_READ}}">
+								{{common.number.abbr(job.jobCounters.counters["org.apache.hadoop.mapreduce.FileSystemCounter"].HDFS_BYTES_READ, true)}}
+							</td>
 						</tr>
 						<tr>
 							<th>Reduce vCores</th>
-							<td>{{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.JobCounter"].VCORES_MILLIS_REDUCES)}}</td>
+							<td class="text-no-break">{{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.JobCounter"].VCORES_MILLIS_REDUCES)}} ms</td>
 							<th>Map CPU</th>
-							<td>{{common.number.toFixed(job.jobCounters.counters.ReduceTaskAttemptCounter.CPU_MILLISECONDS)}}</td>
+							<td class="text-no-break">{{common.number.toFixed(job.jobCounters.counters.ReduceTaskAttemptCounter.CPU_MILLISECONDS)}} ms</td>
 							<th>HDFS Write Bytes</th>
-							<td>{{common.number.toFixed(job.jobCounters.counters["org.apache.hadoop.mapreduce.FileSystemCounter"].HDFS_BYTES_WRITTEN)}}</td>
+							<td title="{{job.jobCounters.counters['org.apache.hadoop.mapreduce.FileSystemCounter'].HDFS_BYTES_WRITTEN}}">
+								{{common.number.abbr(job.jobCounters.counters["org.apache.hadoop.mapreduce.FileSystemCounter"].HDFS_BYTES_WRITTEN, true)}}
+							</td>
 						</tr>
 						<tr ng-if="!isRunning">
 							<th>Last Map Duration</th>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/index.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/index.html b/eagle-server/src/main/webapp/app/dev/index.html
index 05ad602..d889237 100644
--- a/eagle-server/src/main/webapp/app/dev/index.html
+++ b/eagle-server/src/main/webapp/app/dev/index.html
@@ -44,7 +44,7 @@
 		<link href="public/css/main.css" rel="stylesheet" type="text/css" media="screen">
 		<!-- endref -->
 	</head>
-	<body class="skin-blue sidebar-mini" ng-class="{'no-sidebar' : PageConfig.hideSidebar}">
+	<body class="skin-blue sidebar-mini ng-init-lock" ng-class="{'no-sidebar' : PageConfig.hideSidebar}">
 		<!-- Site wrapper -->
 		<div class="wrapper">
 			<header class="main-header">
@@ -169,6 +169,11 @@
 
 				<!-- Main content -->
 				<section class="content">
+					<h1 id="appLoadTip">
+						<span class="fa fa-refresh fa-spin"></span>
+						Loading...
+					</h1>
+
 					<div id="content">
 						<div ui-view></div>
 					</div>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/partials/alert/list.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/alert/list.html b/eagle-server/src/main/webapp/app/dev/partials/alert/list.html
index 182f749..395e24b 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/alert/list.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/alert/list.html
@@ -16,44 +16,52 @@
   limitations under the License.
   -->
 
-<div class="box-body">
-	<div sort-table="alertList" is-sorting="isSorting">
-		<table class="table table-bordered">
-			<thead>
-				<tr>
-					<th sortpath="alertTimestamp" width="135">
-						Alert Time
-						<span class="fa fa-refresh fa-spin no-animate" ng-show="!alertList._done || isSorting"></span>
-					</th>
-					<th sortpath="siteId" width="75">Site</th>
-					<th sortpath="policyId" width="75">Policy</th>
-					<!--th sortpath="streamId" width="75">Stream</th-->
-					<th width="100">Application</th>
-					<th>Alert Data</th>
-					<th width="10"></th>
-				</tr>
-			</thead>
-			<tbody>
-				<tr>
-					<td>{{Time.format(item.alertTimestamp)}}</td>
-					<td>{{item.siteId}}</td>
-					<td>
-						<a ui-sref="policyDetail({name: item.policyId})">{{item.policyId}}</a>
-					</td>
-					<!--td>{{item.streamId}}</td-->
-					<td>
-						<ul class="list-unstyled">
-							<li ng-repeat="app in item.appIds track by $index" class="label label-sm label-primary">
-								{{Application.findProvider(app).type || app}}
-							</li>
-						</ul>
-					</td>
-					<td class="text-break">{{item.alertData}}</td>
-					<td>
-						<a ui-sref="alertDetail({alertId: item.alertId})">Detail</a>
-					</td>
-				</tr>
-			</tbody>
-		</table>
+<div class="box box-primary">
+	<div class="box-header with-border">
+		<span class="fa fa-bell"></span>
+		<h3 class="box-title">
+			Alert List
+		</h3>
+	</div>
+	<div class="box-body">
+		<div sort-table="alertList" is-sorting="isSorting">
+			<table class="table table-bordered">
+				<thead>
+					<tr>
+						<th sortpath="alertTimestamp" width="135">
+							Alert Time
+							<span class="fa fa-refresh fa-spin no-animate" ng-show="!alertList._done || isSorting"></span>
+						</th>
+						<th sortpath="siteId" width="75">Site</th>
+						<th sortpath="policyId" width="75">Policy</th>
+						<!--th sortpath="streamId" width="75">Stream</th-->
+						<th width="100">Application</th>
+						<th>Alert Data</th>
+						<th width="10"></th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>{{Time.format(item.alertTimestamp)}}</td>
+						<td>{{item.siteId}}</td>
+						<td>
+							<a ui-sref="policyDetail({name: item.policyId})">{{item.policyId}}</a>
+						</td>
+						<!--td>{{item.streamId}}</td-->
+						<td>
+							<ul class="list-unstyled">
+								<li ng-repeat="app in item.appIds track by $index" class="label label-sm label-primary">
+									{{Application.findProvider(app).type || app}}
+								</li>
+							</ul>
+						</td>
+						<td class="text-break">{{item.alertData}}</td>
+						<td>
+							<a ui-sref="alertDetail({alertId: item.alertId})">Detail</a>
+						</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
 	</div>
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/partials/alert/main.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/alert/main.html b/eagle-server/src/main/webapp/app/dev/partials/alert/main.html
deleted file mode 100644
index 5d35893..0000000
--- a/eagle-server/src/main/webapp/app/dev/partials/alert/main.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<div class="nav-tabs-custom">
-	<ul class="nav nav-tabs">
-		<li ng-class="{active: getState() === 'alert.list'}"><a href="#/alert/">Alerts</a></li>
-		<li ng-class="{active: getState() === 'alert.policyList'}"><a href="#/alert/policyList">Policies</a></li>
-		<li ng-class="{active: getState() === 'alert.streamList'}"><a href="#/alert/streamList">Streams</a></li>
-	</ul>
-	<div class="tab-content no-padding">
-		<div ui-view></div>
-	</div>
-</div>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/partials/alert/policyList.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/alert/policyList.html b/eagle-server/src/main/webapp/app/dev/partials/alert/policyList.html
index 862f944..46bf082 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/alert/policyList.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/alert/policyList.html
@@ -16,7 +16,13 @@
   limitations under the License.
   -->
 
-<div class="box box-solid">
+<div class="box box-primary">
+	<div class="box-header with-border">
+		<span class="fa fa-rocket"></span>
+		<h3 class="box-title">
+			Policy List
+		</h3>
+	</div>
 	<div class="box-body">
 		<div sort-table="policyList" ng-show="policyList.length">
 			<table class="table table-bordered">

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/partials/alert/streamList.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/alert/streamList.html b/eagle-server/src/main/webapp/app/dev/partials/alert/streamList.html
index 79f15a6..2c2332f 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/alert/streamList.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/alert/streamList.html
@@ -16,32 +16,40 @@
   limitations under the License.
   -->
 
-<div class="box-body">
-	<div sort-table="streamList">
-		<table class="table table-bordered table-hover">
-			<thead>
-				<tr>
-					<th>Stream</th>
-					<th>Provider (App)</th>
-					<th>Site</th>
-					<th>Schema</th>
-				</tr>
-			</thead>
-			<tbody>
-				<tr>
-					<td><span class="label label-primary">{{item.streamId}}</span></td>
-					<td>{{item.appType}}</td>
-					<td>{{item.siteId}}</td>
-					<td>
-						<ul class="no-margin">
-							<li ng-repeat="column in item.schema.columns track by $index">
-								<strong>{{column.name}}</strong>:
-								{{column.type}}
-							</li>
-						</ul>
-					</td>
-				</tr>
-			</tbody>
-		</table>
+<div class="box box-primary">
+	<div class="box-header with-border">
+		<span class="fa fa-code-fork"></span>
+		<h3 class="box-title">
+			Stream List
+		</h3>
+	</div>
+	<div class="box-body">
+		<div sort-table="streamList">
+			<table class="table table-bordered table-hover">
+				<thead>
+					<tr>
+						<th>Stream</th>
+						<th>Provider (App)</th>
+						<th>Site</th>
+						<th>Schema</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td><span class="label label-primary">{{item.streamId}}</span></td>
+						<td>{{item.appType}}</td>
+						<td>{{item.siteId}}</td>
+						<td>
+							<ul class="no-margin">
+								<li ng-repeat="column in item.schema.columns track by $index">
+									<strong>{{column.name}}</strong>:
+									{{column.type}}
+								</li>
+							</ul>
+						</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
 	</div>
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/css/main.css
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/css/main.css b/eagle-server/src/main/webapp/app/dev/public/css/main.css
index a447bdf..8f65c69 100644
--- a/eagle-server/src/main/webapp/app/dev/public/css/main.css
+++ b/eagle-server/src/main/webapp/app/dev/public/css/main.css
@@ -17,6 +17,12 @@
  * limitations under the License.
  */
 
+body.ng-init-lock .main-sidebar .sidebar-menu,
+body.ng-init-lock .content-wrapper .content-header,
+body.ng-init-lock .main-header .navbar-custom-menu {
+	display: none;
+}
+
 a {
 	cursor: pointer;
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/app.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/app.js b/eagle-server/src/main/webapp/app/dev/public/js/app.js
index 67b8487..ca5c6ef 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/app.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/app.js
@@ -117,52 +117,45 @@ var app = {};
 					resolve: routeResolve({ site: false, application: false })
 				})
 				// ================================= Alerts =================================
-				.state('alert', {
-					abstract: true,
-					url: "/alert/",
-					templateUrl: "partials/alert/main.html?_=" + window._TRS(),
-					controller: "alertCtrl",
-					resolve: routeResolve(false)
-				})
-				.state('alert.list', {
-					url: "",
+				.state('alertList', {
+					url: "/alerts",
 					templateUrl: "partials/alert/list.html?_=" + window._TRS(),
 					controller: "alertListCtrl",
 					resolve: routeResolve()
 				})
-				.state('alert.policyList', {
-					url: "policyList",
+				.state('policyList', {
+					url: "/policies",
 					templateUrl: "partials/alert/policyList.html?_=" + window._TRS(),
 					controller: "policyListCtrl",
 					resolve: routeResolve()
 				})
-				.state('alert.streamList', {
-					url: "streamList",
+				.state('streamList', {
+					url: "/streams",
 					templateUrl: "partials/alert/streamList.html?_=" + window._TRS(),
 					controller: "alertStreamListCtrl",
 					resolve: routeResolve()
 				})
 				.state('policyCreate', {
-					url: "/alert/policyCreate",
+					url: "/policy/create",
 					templateUrl: "partials/alert/policyEdit/main.html?_=" + window._TRS(),
 					controller: "policyCreateCtrl",
 					resolve: routeResolve()
 				})
 				.state('policyEdit', {
-					url: "/alert/policyEdit/{name}",
+					url: "/policy/edit/{name}",
 					templateUrl: "partials/alert/policyEdit/main.html?_=" + window._TRS(),
 					controller: "policyEditCtrl",
 					resolve: routeResolve()
 				})
 
 				.state('alertDetail', {
-					url: "/alertDetail/{alertId}",
+					url: "/alert/detail/{alertId}",
 					templateUrl: "partials/alert/detail.html?_=" + window._TRS(),
 					controller: "alertDetailCtrl",
 					resolve: routeResolve()
 				})
 				.state('policyDetail', {
-					url: "/policyDetail/{name}",
+					url: "/policy/detail/{name}",
 					templateUrl: "partials/alert/policyDetail.html?_=" + window._TRS(),
 					controller: "policyDetailCtrl",
 					resolve: routeResolve()
@@ -303,6 +296,10 @@ var app = {};
 				}
 			});
 
+			$scope.$on('$stateChangeSuccess ', function (event) {
+				console.log("[Switch] done ->", event);
+			});
+
 			// ================================ Function ================================
 			// Get side bar navigation item class
 			$scope.getNavClass = function (portal) {
@@ -355,8 +352,12 @@ var app = {};
 		//noinspection JSCheckFunctionSignatures
 		angular.element(document).ready(function() {
 			console.info("[Eagle] UI start...");
+
 			//noinspection JSCheckFunctionSignatures
 			angular.bootstrap(document, ['eagleApp']);
+
+			$("body").removeClass("ng-init-lock");
+			$("#appLoadTip").remove();
 		});
 	});
 })();

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/common.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/common.js b/eagle-server/src/main/webapp/app/dev/public/js/common.js
index 7d41371..e4f806d 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/common.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/common.js
@@ -360,6 +360,7 @@
 		var sign = number < 0 ? -1 : 1;
 		var unit = '';
 		number = Math.abs(number);
+		if(isNaN(number)) return "-";
 
 		for(var i = abbrev.length - 1; i >= 0; i--) {
 			var size = Math.pow(base, i + 1);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertCtrl.js
index ed3ca74..6c3b930 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertCtrl.js
@@ -22,20 +22,10 @@
 	var eagleControllers = angular.module('eagleControllers');
 
 	// ======================================================================================
-	// =                                        Main                                        =
-	// ======================================================================================
-	eagleControllers.controller('alertCtrl', function ($scope, $wrapState, PageConfig) {
-		PageConfig.title = "Alert";
-		$scope.getState = function() {
-			return $wrapState.current.name;
-		};
-	});
-
-	// ======================================================================================
 	// =                                        Alert                                       =
 	// ======================================================================================
 	eagleControllers.controller('alertListCtrl', function ($scope, $wrapState, $interval, PageConfig, Entity) {
-		PageConfig.subTitle = "Explore Alerts";
+		PageConfig.title = "Alerts";
 
 		$scope.alertList = Entity.queryMetadata("alerts", {size: 10000});
 
@@ -67,8 +57,7 @@
 	// =                                       Stream                                       =
 	// ======================================================================================
 	eagleControllers.controller('alertStreamListCtrl', function ($scope, $wrapState, PageConfig, Application) {
-		PageConfig.title = "Alert";
-		PageConfig.subTitle = "Streams";
+		PageConfig.title = "Streams";
 
 		$scope.streamList = $.map(Application.list, function (app) {
 			return (app.streams || []).map(function (stream) {
@@ -86,7 +75,7 @@
 	// =                                       Policy                                       =
 	// ======================================================================================
 	eagleControllers.controller('policyListCtrl', function ($scope, $wrapState, PageConfig, Entity, UI) {
-		PageConfig.subTitle = "Manage Policies";
+		PageConfig.title = "Policies";
 
 		$scope.policyList = [];
 
@@ -124,7 +113,7 @@
 		PageConfig.title = $wrapState.param.name;
 		PageConfig.subTitle = "Detail";
 		PageConfig.navPath = [
-			{title: "Policy List", path: "/alert/policyList"},
+			{title: "Policy List", path: "/policies"},
 			{title: "Detail"}
 		];
 
@@ -138,7 +127,7 @@
 					title: "OPS",
 					content: "Policy '" + $wrapState.param.name + "' not found!"
 				}, function () {
-					$wrapState.go("alert.policyList");
+					$wrapState.go("policyList");
 				});
 			} else {
 				$scope.publisherList = Entity.queryMetadata("policies/" + encodeURIComponent($scope.policy.name) + "/publishments");

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.bac.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.bac.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.bac.js
index 3bcd8d8..ce32013 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.bac.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.bac.js
@@ -58,7 +58,7 @@
 					title: "OPS",
 					content: "Policy '" + $wrapState.param.name + "' not found!"
 				}, function () {
-					$wrapState.go("alert.policyList");
+					$wrapState.go("policyList");
 				});
 			}
 		});

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
index 8b7d041..989ce0f 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/alertEditCtrl.js
@@ -73,7 +73,7 @@
 					title: "OPS",
 					content: "Policy '" + $wrapState.param.name + "' not found!"
 				}, function () {
-					$wrapState.go("alert.policyList");
+					$wrapState.go("policyList");
 				});
 			}
 		});
@@ -82,11 +82,6 @@
 	function policyEditController(policy, $scope, $q, $wrapState, $timeout, PageConfig, Entity) {
 		$scope.publisherTypes = publisherTypes;
 
-		PageConfig.navPath = [
-			{title: "Policy List", path: "/alert/policyList"},
-			{title: "Policy"}
-		];
-
 		$scope.policy = policy;
 		$scope.policy = common.merge({
 			name: "",
@@ -108,6 +103,11 @@
 		$scope.applications = {};
 		$scope.newPolicy = !$scope.policy.name;
 
+		PageConfig.navPath = [
+			{title: "Policy List", path: "/policies"},
+			{title: ($scope.newPolicy ? "Define" : "Update") + " Policy"}
+		];
+
 		// ==============================================================
 		// =                             UI                             =
 		// ==============================================================

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js b/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
index be3281b..2c61087 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
@@ -53,10 +53,10 @@
 		var defaultPortalList = [
 			{name: "Home", icon: "home", path: "#/"},
 			{name: "Alert", icon: "bell", showFunc: checkApplication, list: [
-				{name: "Alerts", path: "#/alert/"},
-				{name: "Policies", path: "#/alert/policyList"},
-				{name: "Streams", path: "#/alert/streamList"},
-				{name: "Define Policy", path: "#/alert/policyCreate"}
+				{name: "Alerts", path: "#/alerts"},
+				{name: "Policies", path: "#/policies"},
+				{name: "Streams", path: "#/streams"},
+				{name: "Define Policy", path: "#/policy/create"}
 			]}
 		];
 		var adminPortalList = [

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/4250e2d3/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js b/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
index 9d1f85c..a80de86 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
@@ -235,41 +235,44 @@
 
 		var promiseLock = false;
 		$Time.getPromise = function (config, state, param) {
+			var deferred = $q.defer();
+
 			if(keepTime) {
 				keepTime = false;
-				return $q.when($Time);
-			}
-
-			if(config.time === true) {
-				$Time.pickerType = $Time.TIME_RANGE_PICKER;
-
-				if(!promiseLock) {
-					startTime = $Time.verifyTime(param.startTime);
-					endTime = $Time.verifyTime(param.endTime);
+				deferred.resolve($Time);
+			} else {
+				if (config.time === true) {
+					$Time.pickerType = $Time.TIME_RANGE_PICKER;
 
-					if (!startTime || !endTime) {
-						endTime = $Time();
-						startTime = endTime.clone().subtract(2, "hour");
+					if (!promiseLock) {
+						startTime = $Time.verifyTime(param.startTime);
+						endTime = $Time.verifyTime(param.endTime);
 
-						setTimeout(function () {
-							promiseLock = true;
-							keepTime = true;
-							$wrapState.go(state.name, $.extend({}, param, {
-								startTime: $Time.format(startTime),
-								endTime: $Time.format(endTime)
-							}), {location: "replace", notify: false});
+						if (!startTime || !endTime) {
+							endTime = $Time();
+							startTime = endTime.clone().subtract(2, "hour");
 
 							setTimeout(function () {
-								promiseLock = false;
-							}, 150);
-						}, 100);
+								promiseLock = true;
+								keepTime = true;
+								$wrapState.go(state.name, $.extend({}, param, {
+									startTime: $Time.format(startTime),
+									endTime: $Time.format(endTime)
+								}), {location: "replace", notify: false});
+
+								setTimeout(function () {
+									promiseLock = false;
+								}, 150);
+							}, 100);
+						}
 					}
+				} else {
+					$Time.pickerType = null;
 				}
-			} else {
-				$Time.pickerType = null;
+				deferred.resolve($Time);
 			}
 
-			return $q.when($Time);
+			return deferred.promise;
 		};
 
 		return $Time;