You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/04/04 17:27:41 UTC
git commit: AMBARI-5349 Views: Embedding View with iFrame.
(ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk c1441e05f -> 0ebb16dca
AMBARI-5349 Views: Embedding View with iFrame. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0ebb16dc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0ebb16dc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0ebb16dc
Branch: refs/heads/trunk
Commit: 0ebb16dca92c93bf5f6f068eec3b1cf836b3a192
Parents: c1441e0
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Apr 4 18:25:01 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Apr 4 18:26:16 2014 +0300
----------------------------------------------------------------------
ambari-web/app/config.js | 3 +-
ambari-web/app/controllers.js | 1 +
ambari-web/app/controllers/main/views.js | 23 ++++++++++++++
ambari-web/app/messages.js | 1 +
ambari-web/app/routes/main.js | 8 +++++
ambari-web/app/styles/application.less | 5 +++
ambari-web/app/views.js | 3 ++
ambari-web/app/views/main/menu.js | 4 +++
ambari-web/app/views/main/views.js | 44 +++++++++++++++++++++++++++
9 files changed, 91 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 09a1472..14313be 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -75,7 +75,8 @@ App.supports = {
autoRollbackHA: false,
appTimelineServer: true,
jobs: true,
- ubuntu: true
+ ubuntu: true,
+ views: false
};
if (App.enableExperimental) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 1ba10d4..598279b 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -117,6 +117,7 @@ require('controllers/main/mirroring/edit_dataset_controller');
require('controllers/main/mirroring/datasets_controller');
require('controllers/main/mirroring/jobs_controller');
require('controllers/main/mirroring/manage_clusters_controller');
+require('controllers/main/views');
require('controllers/wizard/slave_component_groups_controller');
require('controllers/wizard/step0_controller');
require('controllers/wizard/step1_controller');
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/controllers/main/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/views.js b/ambari-web/app/controllers/main/views.js
new file mode 100644
index 0000000..ce10081
--- /dev/null
+++ b/ambari-web/app/controllers/main/views.js
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.MainViewsController = Em.Controller.extend({
+ name:'mainViewsController'
+})
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 030596b..820eb60 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1973,6 +1973,7 @@ Em.I18n.translations = {
'menu.item.mirroring':'Mirroring',
'menu.item.jobs':'Jobs',
'menu.item.admin':'Admin',
+ 'menu.item.views':'Views',
'jobs.nothingToShow': 'No jobs to display',
'jobs.loadingTasks': 'Loading...',
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 9b76c8b..1058827 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -62,6 +62,14 @@ module.exports = Em.Route.extend({
redirectsTo: 'dashboard'
}),
+
+ 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) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index bfbe8bc..5b42341 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5987,3 +5987,8 @@ i.icon-asterisks {
}
}
}
+
+.views_sizes {
+ width:100%;
+ min-height:600px;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 3c60ea0..2988e33 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -235,6 +235,9 @@ require('views/main/mirroring/edit_dataset_view');
require('views/main/mirroring/datasets_view');
require('views/main/mirroring/jobs_view');
require('views/main/mirroring/manage_clusters_view');
+
+require('views/main/views');
+
require('views/installer');
require('views/wizard/controls_view');
require('views/wizard/step0_view');
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/views/main/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js
index e703324..b59c2da 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -47,6 +47,10 @@ App.MainMenuView = Em.CollectionView.extend({
if (App.get('isAdmin')) {
result.push({ label:Em.I18n.t('menu.item.admin'), routing:'admin'});
}
+
+ if (App.supports.views) {
+ result.push({ label:Em.I18n.t('menu.item.views'), routing:'views'});
+ }
return result;
}.property(),
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/0ebb16dc/ambari-web/app/views/main/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/views.js b/ambari-web/app/views/main/views.js
new file mode 100644
index 0000000..e009486
--- /dev/null
+++ b/ambari-web/app/views/main/views.js
@@ -0,0 +1,44 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.MainViewsView = Em.View.extend({
+
+ tagName: "iframe",
+
+ classNames: ["views_sizes"],
+
+ attributeBindings: ['src','seamless'],
+
+ seamless: "seamless",
+
+ src: function() {
+ return window.location.origin + this.get('views')[1].link;
+ }.property("views"),
+
+ views: [{
+ name: "filebrowser",
+ link: "/views/FILE_BROWSER/FILEBROWSER_1/#/?path=/"
+ },
+ {
+ name: "pig",
+ link: "/views/PIG/PIG_1/"
+ }]
+
+});
\ No newline at end of file