You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/05/16 23:26:53 UTC
[1/2] git commit: AMBARI-5781. Views: when a particular view is
selected,
the URL should reflect it so that upon page refresh the right view loads
up.(xiwang)
Repository: ambari
Updated Branches:
refs/heads/trunk cc20626ce -> b88de637e
AMBARI-5781. Views: when a particular view is selected, the URL should reflect it so that upon page refresh the right view loads up.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b88de637
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b88de637
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b88de637
Branch: refs/heads/trunk
Commit: b88de637e36103941e73ba2b500ad1ae4bade7ee
Parents: 6180950
Author: Xi Wang <xi...@apache.org>
Authored: Thu May 15 11:15:07 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Fri May 16 14:25:49 2014 -0700
----------------------------------------------------------------------
.../app/controllers/main/views_controller.js | 2 +-
ambari-web/app/routes/main.js | 24 ++++++++++++--------
2 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b88de637/ambari-web/app/controllers/main/views_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/views_controller.js b/ambari-web/app/controllers/main/views_controller.js
index 242d989..5401911 100644
--- a/ambari-web/app/controllers/main/views_controller.js
+++ b/ambari-web/app/controllers/main/views_controller.js
@@ -26,7 +26,7 @@ App.MainViewsController = Em.Controller.extend({
setView: function(event) {
if(event.context){
this.set('selectedView', event.context);
- App.router.transitionTo('views');
+ App.router.transitionTo('main.views.viewDetails', event.context);
}
}
})
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/b88de637/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 8f64ecf..f26b28b 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -62,13 +62,10 @@ module.exports = Em.Route.extend({
redirectsTo: 'dashboard.index'
}),
+ connectOutlets: function (router, context) {
+ router.get('applicationController').connectOutlet('main');
+ },
- views: Ember.Route.extend({
- route: '/views',
- connectOutlets: function (router, context) {
- router.get('mainController').connectOutlet('mainViews');
- }
- }),
test: Em.Route.extend({
route: '/test',
connectOutlets: function (router, context) {
@@ -76,9 +73,18 @@ module.exports = Em.Route.extend({
}
}),
- connectOutlets: function (router, context) {
- router.get('applicationController').connectOutlet('main');
- },
+ views: Em.Route.extend({
+ route: '/views',
+ connectOutlets: function (router, context) {
+ router.get('mainController').connectOutlet('mainViews');
+ },
+ viewDetails: Em.Route.extend({
+ route : '/:viewName/:version/:instanceName',
+ connectOutlets : function (router, context) {
+ router.get('mainController').connectOutlet('mainViews');
+ }
+ })
+ }),
dashboard: Em.Route.extend({
route: '/dashboard',
[2/2] git commit: AMBARI-5769. Views: selection should use instance
name, not view name.(xiwang)
Posted by xi...@apache.org.
AMBARI-5769. Views: selection should use instance name, not view name.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/61809500
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/61809500
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/61809500
Branch: refs/heads/trunk
Commit: 618095000d85f3e5bb765065840e5b8f9179acda
Parents: cc20626
Author: Xi Wang <xi...@apache.org>
Authored: Wed May 14 17:48:59 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Fri May 16 14:25:49 2014 -0700
----------------------------------------------------------------------
ambari-web/app/controllers/global/cluster_controller.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/61809500/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index ecb4304..8e0c148 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -416,7 +416,7 @@ App.ClusterController = Em.Controller.extend({
data.versions.forEach(function (version) {
version.instances.forEach(function (instance) {
var view = Em.Object.create({
- label: data.ViewInfo.view_name,
+ label: instance.ViewInstanceInfo.label || instance.ViewInstanceInfo.instance_name,
viewName: instance.ViewInstanceInfo.view_name,
instanceName: instance.ViewInstanceInfo.instance_name,
version: version.ViewVersionInfo.version,