You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/12/09 15:11:25 UTC
svn commit: r1418965 [2/2] - in
/incubator/ambari/branches/AMBARI-666/ambari-web: ./ app/
app/assets/data/hosts/ app/controllers/ app/controllers/global/
app/controllers/main/ app/controllers/main/charts/
app/controllers/main/host/ app/controllers/main...
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js Sun Dec 9 14:11:19 2012
@@ -58,6 +58,16 @@ App.MainAdminUserEditView = Em.View.exte
userForm: App.EditUserForm.create({}),
didInsertElement: function(){
- this.get('userForm').propertyDidChange('object');
+ var form = this.get('userForm');
+ if( form.getField("isLdap").get("value") )
+ {
+ form.getField("old_password").set("disabled",true);
+ form.getField("new_password").set("disabled",true);
+ }else{
+ //debugger;
+ form.getField("old_password").set("disabled",false);
+ form.getField("new_password").set("disabled",false);
+ }
+ form.propertyDidChange('object');
}
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps_view.js Sun Dec 9 14:11:19 2012
@@ -823,13 +823,7 @@ App.MainAppsView = Em.View.extend({
}
}
}),
- /**
- * Object contain views of expanded row
- */
- expandedRow:Ember.Object.create({
- rowView:null,
- rowChildView:null
- }),
+
/**
* This Container View is used to render static table row(appTableRow) and additional dynamic content
*/
@@ -841,44 +835,23 @@ App.MainAppsView = Em.View.extend({
id: function() {
return this.get('run.id');
}.property("run.id"),
- /**
- * Delete expanded row from table
- *
- * @param row
- */
- deleteRow:function(row){
- row.get('rowChildView').destroy();
- row.get('rowView').set('expanded', false);
- row.set('rowView', null);
- row.set('rowChildView', null);
- },
- viewCreate:function(){
- App.router.get('mainAppsItemController').set('content', this.get('run'));
- var newView = App.MainAppsItemView.create({
- controllerBinding: 'App.router.mainAppsItemController'
- });
- return newView;
- },
- expanded : false,
+
/**
* Show/hide additional content appropriated for this row
*/
expandToggle : function(){
- var newView;
- var expandedView = this.get('parentView.expandedRow');
- if(expandedView.get('rowView')) {
- if(this.get('expanded')){
- this.deleteRow(expandedView);
- return;
- }
- this.deleteRow(expandedView);
- }
-
- newView = this.viewCreate();
- this.set('expanded', true);
- expandedView.set('rowView', this);
- expandedView.set('rowChildView', newView);
- this.get('childViews').pushObject(newView);
+ App.router.get('mainAppsItemController').set('content', this.get('run'));
+ App.ModalPopup.show({
+ classNames: ['big-modal'],
+ header: Em.I18n.t('apps.dagCharts.popup'),
+ bodyClass: App.MainAppsItemView.extend({
+ controllerBinding: 'App.router.mainAppsItemController'
+ }),
+ onPrimary: function() {
+ this.hide();
+ },
+ secondary : null
+ });
}
}),
/**
@@ -900,4 +873,4 @@ App.MainAppsView = Em.View.extend({
})
-});
+});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js Sun Dec 9 14:11:19 2012
@@ -87,7 +87,7 @@ App.MainDashboardServiceView = Em.View.e
}.property('controller.data'),
criticalAlertsCount: function () {
- var alerts = this.get('controller.alerts');
+ var alerts = App.router.get('clusterController.alerts');
return alerts.filterProperty('serviceType', this.get('service.id')).filterProperty('status', '1').length;
}.property('service.alerts')
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js Sun Dec 9 14:11:19 2012
@@ -52,7 +52,7 @@ App.MainHostView = Em.View.extend({
{ "sType":"num-html" },
{ "sType":"ambari-bandwidth" },
{ "sType":"string" },
- { "sType":"string" },
+ { "sType":"num-html" },
{ "sType":"string", "bSortable": false }
]
});
@@ -160,6 +160,24 @@ App.MainHostView = Em.View.extend({
}.observes('value')
}),
/**
+ * Filter-field for load avg
+ */
+ loadAvgFilterView: Em.TextField.extend({
+ classNames:['input-mini'],
+ type:'text',
+ placeholder: 'Any ',
+ elementId:'load_avg_filter',
+ filtering:function(){
+ if (this.get('value') == '') {
+ this.$().closest('th').addClass('notActive');
+ }
+ else {
+ this.$().closest('th').removeClass('notActive');
+ }
+ this.get('parentView').get('applyFilter')(this.get('parentView'), 2);
+ }.observes('value')
+ }),
+ /**
* Filter-field for RAM
*/
ramFilterView: Em.TextField.extend({
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/menu.js Sun Dec 9 14:11:19 2012
@@ -21,11 +21,14 @@ var App = require('app');
App.MainServiceInfoMenuView = Em.CollectionView.extend({
tagName: 'ul',
classNames: ["nav", "nav-tabs"],
- content:[
- { label:'Summary', routing:'summary', active:"active"},
- { label:'Configs', routing:'configs'}/*,
- { label:'Audit', routing:'audit'}*/
- ],
+ content:function(){
+ var menuItems = [
+ { label:'Summary', routing:'summary', active:"active"}
+ //{ label:'Audit', routing:'audit'}
+ ];
+ if(this.get('configTab')) menuItems.push({ label:'Configs', routing:'configs'});
+ return menuItems;
+ }.property(),
init: function(){ this._super(); this.activateView(); },
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js Sun Dec 9 14:11:19 2012
@@ -5,9 +5,9 @@
* 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
@@ -18,28 +18,31 @@
var App = require('app');
App.MainServiceInfoSummaryView = Em.View.extend({
- templateName: require('templates/main/service/info/summary'),
- attributes: null,
- serviceStatus: {
- hdfs: false,
- mapreduce: false,
- hbase: false,
- zookeeper: false,
- oozie: false,
- hive: false
+ templateName:function () {
+ var service = this.get('controller.content');
+ return require(service.get('isClients') ? 'templates/main/service/info/client_summary' : 'templates/main/service/info/summary');
+ }.property('controller.content'),
+ attributes:null,
+ serviceStatus:{
+ hdfs:false,
+ mapreduce:false,
+ hbase:false,
+ zookeeper:false,
+ oozie:false,
+ hive:false
},
data:{
hive:{
- "database" : "PostgreSQL",
- "databaseName" : "hive",
- "user" : "hive"
+ "database":"PostgreSQL",
+ "databaseName":"hive",
+ "user":"hive"
}
},
- service: function () {
+ service:function () {
var svc = this.get('controller.content');
var svcName = svc.get('serviceName');
- if(svcName){
+ if (svcName) {
switch (svcName.toLowerCase()) {
case 'hdfs':
svc = App.HDFSService.find().objectAt(0);
@@ -57,60 +60,60 @@ App.MainServiceInfoSummaryView = Em.View
return svc;
}.property('controller.content'),
- isHide: true,
- moreStatsView: Em.View.extend({
- tagName: "a",
- template: Ember.Handlebars.compile('{{t services.service.summary.moreStats}}'),
- attributeBindings: [ 'href' ],
- classNames: [ 'more-stats' ],
- click: function (event) {
+ isHide:true,
+ moreStatsView:Em.View.extend({
+ tagName:"a",
+ template:Ember.Handlebars.compile('{{t services.service.summary.moreStats}}'),
+ attributeBindings:[ 'href' ],
+ classNames:[ 'more-stats' ],
+ click:function (event) {
this._parentView._parentView.set('isHide', false);
this.remove();
},
- href: 'javascript:void(null)'
+ href:'javascript:void(null)'
}),
- serviceName: function () {
+ serviceName:function () {
return this.get('service.serviceName');
}.property('service'),
- oldServiceName : '',
-
+ oldServiceName:'',
+
/**
* Contains graphs for this particular service
*/
- serviceMetricGraphs: function(){
+ serviceMetricGraphs:function () {
var svcName = this.get('service.serviceName');
var graphs = [];
- if(svcName){
+ if (svcName) {
switch (svcName.toLowerCase()) {
case 'hdfs':
graphs = [ App.ChartServiceMetricsHDFS_SpaceUtilization.extend(),
- App.ChartServiceMetricsHDFS_FileOperations.extend(),
- App.ChartServiceMetricsHDFS_BlockStatus.extend(),
- App.ChartServiceMetricsHDFS_IO.extend(),
- App.ChartServiceMetricsHDFS_RPC.extend(),
- App.ChartServiceMetricsHDFS_GC.extend(),
- App.ChartServiceMetricsHDFS_JVMHeap.extend(),
- App.ChartServiceMetricsHDFS_JVMThreads.extend()];
+ App.ChartServiceMetricsHDFS_FileOperations.extend(),
+ App.ChartServiceMetricsHDFS_BlockStatus.extend(),
+ App.ChartServiceMetricsHDFS_IO.extend(),
+ App.ChartServiceMetricsHDFS_RPC.extend(),
+ App.ChartServiceMetricsHDFS_GC.extend(),
+ App.ChartServiceMetricsHDFS_JVMHeap.extend(),
+ App.ChartServiceMetricsHDFS_JVMThreads.extend()];
break;
case 'mapreduce':
- graphs = [ App.ChartServiceMetricsMapReduce_JobsStatus.extend(),
- App.ChartServiceMetricsMapReduce_JobsRunningWaiting.extend(),
- App.ChartServiceMetricsMapReduce_MapSlots.extend(),
- App.ChartServiceMetricsMapReduce_ReduceSlots.extend(),
- App.ChartServiceMetricsMapReduce_GC.extend(),
- App.ChartServiceMetricsMapReduce_RPC.extend(),
- App.ChartServiceMetricsMapReduce_JVMHeap.extend(),
- App.ChartServiceMetricsMapReduce_JVMThreads.extend()];
+ graphs = [ App.ChartServiceMetricsMapReduce_JobsStatus.extend(),
+ App.ChartServiceMetricsMapReduce_JobsRunningWaiting.extend(),
+ App.ChartServiceMetricsMapReduce_MapSlots.extend(),
+ App.ChartServiceMetricsMapReduce_ReduceSlots.extend(),
+ App.ChartServiceMetricsMapReduce_GC.extend(),
+ App.ChartServiceMetricsMapReduce_RPC.extend(),
+ App.ChartServiceMetricsMapReduce_JVMHeap.extend(),
+ App.ChartServiceMetricsMapReduce_JVMThreads.extend()];
break;
case 'hbase':
graphs = [ App.ChartServiceMetricsHBASE_ClusterRequests.extend(),
- App.ChartServiceMetricsHBASE_RegionServerReadWriteRequests.extend(),
- App.ChartServiceMetricsHBASE_RegionServerRegions.extend(),
- App.ChartServiceMetricsHBASE_RegionServerQueueSize.extend(),
- App.ChartServiceMetricsHBASE_HlogSplitTime.extend(),
- App.ChartServiceMetricsHBASE_HlogSplitSize.extend()];
+ App.ChartServiceMetricsHBASE_RegionServerReadWriteRequests.extend(),
+ App.ChartServiceMetricsHBASE_RegionServerRegions.extend(),
+ App.ChartServiceMetricsHBASE_RegionServerQueueSize.extend(),
+ App.ChartServiceMetricsHBASE_HlogSplitTime.extend(),
+ App.ChartServiceMetricsHBASE_HlogSplitSize.extend()];
break;
default:
break;
@@ -119,14 +122,14 @@ App.MainServiceInfoSummaryView = Em.View
return graphs;
}.property('service'),
- loadServiceSummary: function (serviceName) {
+ loadServiceSummary:function (serviceName) {
var serviceName = this.get('serviceName');
- if(!serviceName){
+ if (!serviceName) {
return;
}
- if(this.get('oldServiceName')){
+ if (this.get('oldServiceName')) {
// do not delete it!
return;
}
@@ -145,8 +148,8 @@ App.MainServiceInfoSummaryView = Em.View
this.set('oldServiceName', serviceName);
serviceName = serviceName.toLowerCase();
}.observes('serviceName'),
-
- didInsertElement: function () {
+
+ didInsertElement:function () {
// We have to make the height of the Alerts section
// match the height of the Summary section.
var summaryTable = document.getElementById('summary-info');
@@ -160,5 +163,28 @@ App.MainServiceInfoSummaryView = Em.View
$(summaryTable).attr('style', "height:" + alertsList.clientHeight + "px;");
}
}
- }
+ },
+
+
+ clientHosts:App.Host.find(),
+
+ clientHostsLength:function () {
+ var text = this.t('services.service.summary.clientCount');
+ var self = this;
+ return text.format(self.get('clientHosts.length'));
+ }.property('clientHosts'),
+
+ clientComponents:function () {
+ return App.HostComponent.find().filterProperty('isClient', true);
+ }.property(),
+
+ clientComponentsString:function () {
+ var components = this.get('clientComponents');
+ var names = [];
+ components.forEach(function (component) {
+ names.push(component.get('displayName'));
+ });
+
+ return names.length ? names.join(', ') : false;
+ }.property('clientComponents')
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/item.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/item.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/item.js Sun Dec 9 14:11:19 2012
@@ -24,16 +24,23 @@ App.MainServiceItemView = Em.View.extend
var options = [];
var service = this.get('controller.content');
switch(service.get('serviceName')) {
- case 'hdfs':
+ case 'HDFS':
options.push({action: 'runRebalancer', 'label': Em.I18n.t('services.service.actions.run.rebalancer')});
break;
- case 'hbase':
+ case 'HBASE':
options.push({action: 'runCompaction', 'label': Em.I18n.t('services.service.actions.run.compaction')});
break;
+ default:
+ options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke')});
}
- options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke')});
return options;
- }.property('controller.content')
+ }.property('controller.content'),
+ hasMaintenanceControl: function(){
+ return this.get("controller.content.isMaintained");
+ }.property('controller.content.isMaintained'),
+ hasConfigTab: function(){
+ return this.get("controller.content.isConfigurable");
+ }.property('controller.content.isConfigurable')
});
App.MainServiceItemOperations = Em.View.extend({
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js Sun Dec 9 14:11:19 2012
@@ -20,7 +20,18 @@ var App = require('app');
App.MainServiceMenuView = Em.CollectionView.extend({
content:function () {
- return App.router.get('mainServiceController.content');
+ var items = App.router.get('mainServiceController.content').toArray();
+
+ var itemsToRemove = ['PIG', 'SQOOP'];
+
+ items.forEach(function (item) {
+ if (itemsToRemove.indexOf(item.get('serviceName')) != -1) {
+ items.removeObject(item);
+ }
+ });
+
+ items.push(App.router.get('mainServiceController.additionalMenuItem'));
+ return items;
}.property('App.router.mainServiceController.content'),
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js Sun Dec 9 14:11:19 2012
@@ -148,7 +148,6 @@ App.ServiceConfigCheckbox = Ember.Checkb
});
-<!-- {{bindAttr name="view.name" value="option"}} '<input type="radio" {{bindAttr name = "view.name" value="view.obj"}}>',-->
App.ServiceConfigRadioButtons = Ember.View.extend({
template: Ember.Handlebars.compile([
'{{#each option in view.options}}',
@@ -303,7 +302,8 @@ App.ServiceConfigMasterHostsView = Ember
}),
onPrimary:function(){
this.hide();
- }
+ },
+ secondary: null
});
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step9_view.js Sun Dec 9 14:11:19 2012
@@ -125,6 +125,7 @@ App.HostStatusView = Em.View.extend({
onPrimary: function () {
this.hide();
},
+ secondary: null,
controllerBinding: context,
bodyClass: Ember.View.extend({
templateName: require('templates/wizard/step9HostTasksLogPopup'),
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml?rev=1418965&r1=1418964&r2=1418965&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml Sun Dec 9 14:11:19 2012
@@ -58,6 +58,11 @@
<exec dir="${basedir}" executable="brunch" failonerror="false">
<arg value="build"/>
</exec>
+ <exec dir="${basedir}" executable="gzip" failonerror="false">
+ <arg value="public/javascripts/app.js"/>
+ <arg value="public/javascripts/vendor.js"/>
+ <arg value="public/stylesheets/app.css"/>
+ </exec>
</target>
</configuration>
</execution>