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/10/03 06:41:44 UTC
svn commit: r1393287 - in /incubator/ambari/branches/AMBARI-666: ./
ambari-web/app/ ambari-web/app/controllers/
ambari-web/app/controllers/installer/ ambari-web/app/controllers/main/
ambari-web/app/controllers/main/admin/ ambari-web/app/controllers/mai...
Author: yusaku
Date: Wed Oct 3 04:41:43 2012
New Revision: 1393287
URL: http://svn.apache.org/viewvc?rev=1393287&view=rev
Log:
Reverting commit r1393286
Modified:
incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step4_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_audit.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/audit.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js
incubator/ambari/branches/AMBARI-666/ambari-web/test/installer/step4_test.js
Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Wed Oct 3 04:41:43 2012
@@ -12,9 +12,6 @@ AMBARI-666 branch (unreleased changes)
NEW FEATURES
- AMBARI-793. Make MapReduce, Nagios, and Ganglia optional during cluster
- install. (yusaku)
-
AMBARI-794. Add log4j properties for logging at the server. (mahadev)
AMBARI-790. OK in registration response. (jitendra)
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers.js Wed Oct 3 04:41:43 2012
@@ -26,7 +26,6 @@ require('controllers/installer/step1_con
require('controllers/installer/step2_controller');
require('controllers/installer/step3_controller');
require('controllers/installer/step4_controller');
-require('controllers/installer/step6_controller');
require('controllers/installer/step5_controller');
require('controllers/installer/step6_controller');
require('controllers/installer/step7_controller');
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step4_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step4_controller.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step4_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/installer/step4_controller.js Wed Oct 3 04:41:43 2012
@@ -31,19 +31,19 @@ App.InstallerStep4Controller = Em.ArrayC
{
serviceName: 'MAPREDUCE',
displayName: 'MapReduce',
- isDisabled: false,
+ isDisabled: true,
description: Em.I18n.t('services.mapreduce.description')
},
{
serviceName: 'NAGIOS',
displayName: 'Nagios',
- isDisabled: false,
+ isDisabled: true,
description: Em.I18n.t('services.nagios.description')
},
{
serviceName: 'GANGLIA',
displayName: 'Ganglia',
- isDisabled: false,
+ isDisabled: true,
description: Em.I18n.t('services.ganglia.description')
},
{
@@ -136,61 +136,7 @@ App.InstallerStep4Controller = Em.ArrayC
db.setSelectedServiceNames(serviceNames);
},
- needToAddMapReduce: function () {
- if (this.findProperty('serviceName', 'MAPREDUCE').get('isSelected') === false) {
- var mapreduceDependentServices = this.filter(function (item) {
- return ['PIG', 'OOZIE', 'HIVE'].contains(item.get('serviceName')) && item.get('isSelected', true);
- });
- return (mapreduceDependentServices.get('length') > 0);
- } else {
- return false;
- }
- },
-
- gangliaOrNagiosNotSelected: function () {
- return (this.findProperty('serviceName', 'GANGLIA').get('isSelected') === false || this.findProperty('serviceName', 'NAGIOS').get('isSelected') === false);
- },
-
- submit: function () {
- var self = this;
- if (this.needToAddMapReduce()) {
- App.ModalPopup.show({
- header: Em.I18n.t('installer.step4.mapreduceCheck.popup.header'),
- body: Em.I18n.t('installer.step4.mapreduceCheck.popup.body'),
- onPrimary: function () {
- self.findProperty('serviceName', 'MAPREDUCE').set('isSelected', true);
- this.hide();
- self.validateMonitoring();
- },
- onSecondary: function () {
- this.hide();
- }
- });
- } else {
- self.validateMonitoring();
- }
- },
-
- validateMonitoring: function () {
- var self = this;
- if (this.gangliaOrNagiosNotSelected()) {
- App.ModalPopup.show({
- header: Em.I18n.t('installer.step4.monitoringCheck.popup.header'),
- body: Em.I18n.t('installer.step4.monitoringCheck.popup.body'),
- onPrimary: function () {
- this.hide();
- self.proceed();
- },
- onSecondary: function () {
- this.hide();
- }
- });
- } else {
- self.proceed();
- }
- },
-
- proceed: function () {
+ submit: function() {
this.saveSelectedServiceNamesToDB();
App.router.send('next');
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/login_controller.js Wed Oct 3 04:41:43 2012
@@ -20,40 +20,29 @@ var App = require('app');
App.LoginController = Em.Object.extend({
- name:'loginController',
- loginName:'',
- password:'',
- errorMessage:'',
+ name: 'loginController',
+ loginName: '',
+ password: '',
+ errorMessage: '',
- submit:function (e) {
+ submit: function (e) {
console.log('Login: ' + this.get('loginName') + ' Password: ' + this.get('password'));
this.set('errorMessage', '');
- var userId = this.validateCredentials();
- if (userId) {
- App.get('router').login(this.get('loginName'), App.User.find(userId));
+ if (this.validateCredentials()) {
+ console.log('Logging in as: ' + this.get('loginName'));
+ App.get('router').login(this.get('loginName'));
} else {
console.log('Failed to login as: ' + this.get('loginName'));
this.set('errorMessage', Em.I18n.t('login.error'));
}
+
},
- /**
- *
- * @return {number} user by credentials || {undefined}
- */
- validateCredentials:function () {
+ validateCredentials: function () {
//TODO: REST api that validates the login
- var thisController = this;
-
- var user = App.store.filter(App.User, function (data) {
- return data.get('user_name') == thisController.get('loginName') && data.get('password') == thisController.get('password')
- });
-
- console.log(user, user.content[0]);
-
- return user.content[0];
+ return (this.get('loginName').trim() !== '' && this.get('loginName') === this.get('password'));
}
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/admin/user.js Wed Oct 3 04:41:43 2012
@@ -19,12 +19,6 @@
App.MainAdminUserController = Em.Controller.extend({
name:'mainAdminUserController',
deleteRecord:function (event) {
-
- if(event.context.get('userName') == App.get('router').getLoginName()) {
- alert(Em.I18n.t('admin.users.deleteYourselfMessage'));
- return ;
- }
-
if (Em.I18n.t('question.sure')) {
event.context.deleteRecord();
App.store.commit();
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host.js Wed Oct 3 04:41:43 2012
@@ -31,10 +31,6 @@ App.MainHostController = Em.ArrayControl
allChecked: false,
selectedHostsIds: [],
sortingAsc: true,
- isSort: false,
- sortClass: function(){
- return this.get('sortingAsc')? 'icon-arrow-down' : 'icon-arrow-up';
- }.property('sortingAsc'),
isDisabled:true,
@@ -191,7 +187,6 @@ App.MainHostController = Em.ArrayControl
return 0;
});
this.set('fullContent', objects);
- this.set('isSort', true);
this.set('sortingAsc', !this.get('sortingAsc'));
this.changeContent();
}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/host/details.js Wed Oct 3 04:41:43 2012
@@ -19,61 +19,20 @@
App.MainHostDetailsController = Em.Controller.extend({
name: 'mainHostDetailsController',
content: null,
-
- isFromHosts: false,
-
- isStarting: function(){
+ startComponents: function(){
return this.get('content.workStatus');
}.property('content.workStatus'),
- isStopping: function(){
- return !this.get('isStarting');
- }.property('isStarting'),
-
- setBack: function(isFromHosts){
- this.set('isFromHosts', isFromHosts);
- },
-
- startComponent: function(event){
- var self = this;
- App.ModalPopup.show({
- header: Em.I18n.t('hosts.host.start.popup.header'),
- body: Em.I18n.t('hosts.host.start.popup.body'),
- primary: 'Yes',
- secondary: 'No',
- onPrimary: function() {
- var component = event.context;
- component.set('workStatus', true);
- var stopped = self.get('content.components').filterProperty('workStatus', false);
- if (stopped.length == 0)
- self.set('content.workStatus', true);
- this.hide();
- },
- onSecondary: function() {
- this.hide();
- }
- });
- },
- stopComponent: function(event){
- var self = this;
- App.ModalPopup.show({
- header: Em.I18n.t('hosts.host.start.popup.header'),
- body: Em.I18n.t('hosts.host.start.popup.body'),
- primary: 'Yes',
- secondary: 'No',
- onPrimary: function() {
- var component = event.context;
- component.set('workStatus', false);
- var started = self.get('content.components').filterProperty('workStatus', true);
- if (started.length == 0)
- self.set('content.workStatus', false);
- this.hide();
- },
- onSecondary: function() {
- this.hide();
- }
- });
-
- },
+ stopComponents: function(){
+ return !this.get('startComponents');
+ }.property('startComponents'),
+ changeWorkStatus: function(){
+ if (this.get('startComponents')) {
+ this.set('iconClass', 'play');
+ } else {
+ this.set('iconClass', 'stop');
+ }
+ }.observes('startComponents'),
+ iconClass: '',
startConfirmPopup: function (event) {
var self = this;
@@ -83,8 +42,11 @@ App.MainHostDetailsController = Em.Contr
primary: 'Yes',
secondary: 'No',
onPrimary: function() {
- self.get('content.components').setEach('workStatus', true);
+ console.log(self.get('content.components').getEach('workStatus'));
+ self.get('content.components').setEach('workStatus', self.get('content.workStatus'));
+
self.set('content.workStatus', !self.get('content.workStatus'));
+
this.hide();
},
onSecondary: function() {
@@ -100,7 +62,8 @@ App.MainHostDetailsController = Em.Contr
primary: 'Yes',
secondary: 'No',
onPrimary: function() {
- self.get('content.components').setEach('workStatus', false);
+ console.log(self.get('content.components').getEach('workStatus'));
+ self.get('content.components').setEach('workStatus', self.get('content.workStatus'));
self.set('content.workStatus', !self.get('content.workStatus'));
this.hide();
},
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/messages.js Wed Oct 3 04:41:43 2012
@@ -42,7 +42,8 @@ Em.I18n.translations = {
'installer.header': 'Cluster Install Wizard',
'installer.step1.header': 'Welcome',
'installer.step1.body.header': 'Welcome to Apache Ambari!',
- 'installer.step1.body': 'Ambari makes it easy to install, manage, and monitor Hadoop clusters.<br>' +
+ 'installer.step1.body':
+ 'Ambari makes it easy to install, manage, and monitor Hadoop clusters.<br>' +
'We will walk you through the cluster installation process with this step-by-step wizard.',
'installer.step1.clusterName': 'Name your cluster',
'installer.step1.clusterName.tooltip.title': 'Cluster Name',
@@ -88,10 +89,6 @@ Em.I18n.translations = {
'installer.step4.header': 'Choose Services',
'installer.step4.body': 'Choose which services you want to install on your cluster.<br>Note that some services have dependencies (e.g., HBase requires ZooKeeper.)',
- 'installer.step4.mapreduceCheck.popup.header': 'MapReduce Needed',
- 'installer.step4.mapreduceCheck.popup.body': 'You did not select MapReduce, but it is needed by other services you selected. We will automatically add MapReduce. Is this OK?',
- 'installer.step4.monitoringCheck.popup.header': 'Limited Functionality Warning',
- 'installer.step4.monitoringCheck.popup.body': 'You did not select Nagios and/or Ganglia. If both are not selected, monitoring and alerts will not function properly. Is this OK?',
'installer.step5.header': 'Assign Masters',
'installer.step5.attention': 'more hosts without master service',
@@ -114,57 +111,54 @@ Em.I18n.translations = {
'installer.step9.host.status.success': 'success',
'installer.step9.host.status.warning': 'tolerable failures encountered',
'installer.step9.host.status.failed': 'failures encountered',
-
'installer.step10.header': 'Summary',
'form.create': 'Create',
'form.save': 'Save',
'form.cancel': 'Cancel',
- 'form.password': 'Password',
- 'form.passwordRetype': 'Retype Password',
- 'form.saveSuccess': 'Successfully saved.',
- 'form.saveError': 'Sorry, errors occured.',
-
- 'form.validator.invalidIp': 'Please enter valid ip address',
-
- 'admin.advanced.title': 'Advanced',
- 'admin.advanced.caution': 'This section is for advanced user only.<br/>Proceed with caution.',
- 'admin.advanced.button.uninstallIncludingData': 'Uninstall cluster including all data.',
- 'admin.advanced.button.uninstallKeepData': 'Uninstall cluster but keep data.',
+ 'form.password':'Password',
+ 'form.passwordRetype':'Retype Password',
+ 'form.saveSuccess':'Successfully saved.',
+ 'form.saveError':'Sorry, errors occured.',
+
+ 'form.validator.invalidIp':'Please enter valid ip address',
+
+ 'admin.advanced.title':'Advanced',
+ 'admin.advanced.caution':'This section is for advanced user only.<br/>Proceed with caution.',
+ 'admin.advanced.button.uninstallIncludingData':'Uninstall cluster including all data.',
+ 'admin.advanced.button.uninstallKeepData':'Uninstall cluster but keep data.',
- 'admin.advanced.popup.header': 'Uninstall Cluster',
+ 'admin.advanced.popup.header':'Uninstall Cluster',
/*'admin.advanced.popup.text':'Uninstall Cluster',*/
- 'admin.audit.grid.date': "Date/Time",
- 'admin.audit.grid.category': "Category",
- 'admin.audit.grid.operationName': "Operation",
- 'admin.audit.grid.performedBy': "Performed By",
- 'admin.audit.grid.service': "Category",
-
- 'admin.authentication.form.method.database': 'Use Ambari Database to authenticate users',
- 'admin.authentication.form.method.ldap': 'Use LDAP/Active Directory to authenticate',
- 'admin.authentication.form.primaryServer': 'Primary Server',
- 'admin.authentication.form.secondaryServer': 'Secondary Server',
- 'admin.authentication.form.useSsl': 'Use SSL',
- 'admin.authentication.form.bind.anonymously': "Bind Anonymously",
- 'admin.authentication.form.bind.useCrenedtials': "Use Credentials To Bind",
- 'admin.authentication.form.bindUserDN': 'Bind User DN',
- 'admin.authentication.form.searchBaseDN': 'Search Base DN',
- 'admin.authentication.form.usernameAttribute': 'Username Attribute',
-
- 'admin.authentication.form.userDN': 'User DN',
- 'admin.authentication.form.password': 'Password',
- 'admin.authentication.form.configurationTest': 'Configuration Test',
- 'admin.authentication.form.testConfiguration': 'Test Configuration',
+ 'admin.audit.grid.date':"Date/Time",
+ 'admin.audit.grid.category':"Category",
+ 'admin.audit.grid.operationName':"Operation",
+ 'admin.audit.grid.performedBy':"Performed By",
+
+ 'admin.authentication.form.method.database':'Use Ambari Database to authenticate users',
+ 'admin.authentication.form.method.ldap':'Use LDAP/Active Directory to authenticate',
+ 'admin.authentication.form.primaryServer':'Primary Server',
+ 'admin.authentication.form.secondaryServer':'Secondary Server',
+ 'admin.authentication.form.useSsl':'Use SSL',
+ 'admin.authentication.form.bind.anonymously':"Bind Anonymously",
+ 'admin.authentication.form.bind.useCrenedtials':"Use Credentials To Bind",
+ 'admin.authentication.form.bindUserDN':'Bind User DN',
+ 'admin.authentication.form.searchBaseDN':'Search Base DN',
+ 'admin.authentication.form.usernameAttribute':'Username Attribute',
+
+ 'admin.authentication.form.userDN':'User DN',
+ 'admin.authentication.form.password':'Password',
+ 'admin.authentication.form.configurationTest':'Configuration Test',
+ 'admin.authentication.form.testConfiguration':'Test Configuration',
- 'admin.authentication.form.test.success': 'The configuration passes the test',
- 'admin.authentication.form.test.fail': 'The configuration fails the test',
+ 'admin.authentication.form.test.success':'The configuration passes the test',
+ 'admin.authentication.form.test.fail':'The configuration fails the test',
- 'admin.security.title': 'Kerberos Security has not been enabled on this cluster.',
- 'admin.security.button.enable': 'Kerberos Security has not been enabled on this cluster.',
+ 'admin.security.title':'Kerberos Security has not been enabled on this cluster.',
+ 'admin.security.button.enable':'Kerberos Security has not been enabled on this cluster.',
- 'admin.users.ldapAuthentionUsed': 'LDAP Authentication is being used to authenticate users',
- 'admin.users.deleteYourselfMessage': 'You can\'t delete yourself',
+ 'admin.users.ldapAuthentionUsed':'LDAP Authentication is being used to authenticate users',
'admin.users.addButton': 'Add User',
'admin.users.delete': 'delete',
'admin.users.edit': 'edit',
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/cluster.js Wed Oct 3 04:41:43 2012
@@ -70,7 +70,7 @@ App.Host.FIXTURES = [
id: 1,
host_name: 'z_host1',
cluster_id: 1,
- components:[1, 2, 4],
+ components:[1, 2, 3, 4],
cpu: '2x2.5GHz',
memory: '8GB',
disk_usage: '40',
@@ -104,7 +104,6 @@ App.Host.FIXTURES = [
id: 4,
host_name: 'b_host4',
cluster_id: 2,
- components:[1, 2, 4, 5],
health_status: 'DEAD',
work_status: false
},
@@ -139,7 +138,7 @@ App.Host.FIXTURES = [
id: 7,
host_name: 'host7',
cluster_id: 1,
- components:[4, 7],
+ components:[4, 5],
cpu: '2x2.5GHz',
memory: '8GB',
disk_usage: '20',
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js Wed Oct 3 04:41:43 2012
@@ -60,7 +60,7 @@ App.Component = DS.Model.extend({
type:DS.attr('boolean'),
service:DS.belongsTo('App.Service'),
host:DS.belongsTo('App.Host'),
- workStatus: DS.attr('boolean')
+ workStatus:DS.attr('string')
});
App.Component.FIXTURES = [
@@ -71,7 +71,7 @@ App.Component.FIXTURES = [
type: true,
service_id:1,
host_id:1,
- work_status:false
+ work_status:true
},
{
id:2,
@@ -80,7 +80,7 @@ App.Component.FIXTURES = [
type: true,
service_id:1,
host_id:2,
- work_status:true
+ work_status:false
},
{
id:3,
@@ -88,8 +88,7 @@ App.Component.FIXTURES = [
label: 'DN',
service_id:1,
type: false,
- host_id:2,
- work_status:true
+ host_id:2
},
{
id:4,
@@ -106,8 +105,7 @@ App.Component.FIXTURES = [
label: 'JT',
type: false,
service_id:2,
- host_id:4,
- work_status:true
+ host_id:4
},
{
id:6,
@@ -115,8 +113,7 @@ App.Component.FIXTURES = [
label: 'HBM',
type: true,
service_id:3,
- host_id:4,
- work_status:true
+ host_id:4
},
{
id:7,
@@ -124,8 +121,7 @@ App.Component.FIXTURES = [
label: 'RS',
type: false,
service_id:3,
- host_id:2,
- work_status:true
+ host_id:2
}
];
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_audit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_audit.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_audit.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service_audit.js Wed Oct 3 04:41:43 2012
@@ -30,42 +30,36 @@ App.ServiceAudit.FIXTURES = [
id: 1,
date: 'September 12, 2012 17:00',
operation_name: 'Reconfigure',
- user_id: 2,
- service_id: 1
+ user_id: 2
},
{
id: 2,
date: 'September 13, 2012 17:00',
operation_name: 'Start',
- user_id: 1,
- service_id: 1
+ user_id: 1
},
{
id: 3,
date: 'September 14, 2012 17:00',
operation_name: 'Install',
- user_id: 1,
- service_id: 1
+ user_id: 1
},
{
id: 4,
date: 'September 12, 2012 17:00',
operation_name: 'Reconfigure',
- user_id: 2,
- service_id: 2
+ user_id: 2
},
{
id: 5,
date: 'September 13, 2012 17:00',
operation_name: 'Start',
- user_id: 1,
- service_id: 2
+ user_id: 1
},
{
id: 6,
date: 'September 14, 2012 17:00',
operation_name: 'Install',
- user_id: 1,
- service_id: 2
+ user_id: 1
}
];
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/models/user.js Wed Oct 3 04:41:43 2012
@@ -42,15 +42,6 @@ App.UserForm = App.Form.extend({
disableUsername:function () {
var field = this.getField("userName");
if (field) field.set("disabled", this.get('isObjectNew') ? false : "disabled");
-
- }.observes('isObjectNew'),
- disableAdminCheckbox:function () {
- var object = this.get('object');
- var field = this.getField("admin");
- if (field) {
- field.set("disabled", object.get('userName') == App.get('router').getLoginName() ? "disabled" : false);
- }
-
}.observes('isObjectNew')
});
@@ -58,7 +49,7 @@ App.User.FIXTURES = [
{
id:1,
user_name:'admin',
- password:'admin',
+ password: 'admin',
admin:1
},
{
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js Wed Oct 3 04:41:43 2012
@@ -66,20 +66,11 @@ App.Router = Em.Router.extend({
//localStorage.setItem('Ambari' + 'loginName', loginName);
},
- // that works incorrectly
- setUser: function(user){ App.db.setUser(user); },
- // that works incorrectly
- getUser: function(){ return App.db.getUser(); },
-
- login: function (loginName, user) {
+ login: function (loginName) {
// TODO: this needs to be hooked up with server authentication
console.log("In login function");
this.setAuthenticated(true);
this.setLoginName(loginName);
-
-// refactor to get user attributes
-// this.setUser(user);
-
this.transitionTo(this.getSection());
},
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js Wed Oct 3 04:41:43 2012
@@ -56,10 +56,7 @@ module.exports = Em.Route.extend({
router.get('mainController').connectOutlet('mainHost');
},
- showDetails: function(router, event){
- router.get('mainHostDetailsController').setBack(true);
- router.transitionTo('hostDetails.index', event.context)
- }
+ showDetails:Em.Router.transitionTo('hostDetails.index')
}),
@@ -216,6 +213,12 @@ module.exports = Em.Route.extend({
route:'/dashboard',
connectOutlets:function (router, context) {
router.get('mainController').connectOutlet('mainDashboard');
+ },
+ selectService: Em.Route.transitionTo('services.service'),
+ selectHost: Em.Router.transitionTo('hostDetails.index'),
+ filterHosts: function(router, component) {
+ router.get('mainHostController').set('filters.components', [component.context.get('id')]);
+ router.transitionTo('hosts');
}
}),
@@ -276,6 +279,12 @@ module.exports = Em.Route.extend({
router.get('mainServiceItemController').connectOutlet('mainServiceInfoAudit', item);
}
}),
+ selectService: Em.Route.transitionTo('services.service'),
+ selectHost: Em.Router.transitionTo('hostDetails.index'),
+ filterHosts: function(router, component) {
+ router.get('mainHostController').set('filters.components', [component.context.get('id')]);
+ router.transitionTo('hosts');
+ },
showInfo:function (router, event) {
var parent = event.view._parentView;
parent.deactivateChildViews();
@@ -289,18 +298,19 @@ module.exports = Em.Route.extend({
showService:Em.Router.transitionTo('service')
}),
- selectService: Em.Route.transitionTo('services.service'),
- selectHost: function(router, event) {
- router.get('mainHostDetailsController').setBack(true);
- router.transitionTo('hostDetails.index');
- },
- filterHosts: function(router, component) {
- router.get('mainHostController').filterByComponentId(component.context.get('id'));
- router.transitionTo('hosts');
- },
navigate:function (router, event) {
var parent = event.view._parentView;
parent.deactivateChildViews(event.context);
router.transitionTo(event.context.routing);
}
+
+ // TODO: create new routes here
+ // dashboard
+ // charts
+ // hosts
+ // hosts/:hostname
+ // admin
+ // etc...
+
+
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/app.css Wed Oct 3 04:41:43 2012
@@ -16,6 +16,55 @@
* limitations under the License.
*/
+/*Box styles*/
+.box {
+ border: 1px solid #5fa3c3;
+ margin-bottom: 20px;
+}
+.box-header,
+.box-footer {
+ padding: 10px;
+ background: #dedede;
+}
+.box-footer hr {
+ margin: 0px;
+}
+.box-header:after,
+.box-footer:after {
+ content: "";
+ display: table;
+ clear: both;
+}
+.box-header .btn-group {
+ float: right;
+}
+.box-header h4 {
+ float: left;
+}
+
+.alerts {
+ margin: 0px;
+}
+.alerts li {
+ border-bottom: 1px solid #b7b9bb;
+ list-style: none;
+ padding: 5px 10px 5px 43px;
+}
+.alerts li.status-ok {
+ background: url("../img/status-ok.jpg") no-repeat 14px 9px;
+}
+.alerts li.status-corrupt {
+ background: url("../img/status-corrupt.jpg") no-repeat 14px 9px;
+}
+.alerts li .date-time {
+ float: right;
+}
+.go-to {
+ float: right;
+ background: url("../img/arrow-right.png") no-repeat right center;
+ padding-right: 40px;
+ margin-top: 20px;
+}
/*Services*/
.service-summary {
background: #F6FAFD;
@@ -94,11 +143,10 @@
#hosts .table td.first label{
padding-top: 3px;
}
-#hosts .table td.name span{
+#hosts .table td.first label span{
display: block;
- float: left;
height: 13px;
- margin: 4px 5px 0 0;
+ margin: 3px 0 0 3px;
width: 13px;
}
#hosts .table ul.filter-components li{
@@ -184,7 +232,7 @@
border: 1px solid #DEDEDE;
background: #fff;
}
-#host-details .host-components .btn-group{
+#host-details .host-components .btn{
margin:0 5px 10px 0;
}
/*End Hosts*/
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Wed Oct 3 04:41:43 2012
@@ -227,36 +227,8 @@ a:focus {
@status-live-marker: url("../img/health-status-live.png");
@status-dead-marker: url("../img/health-status-dead.png");
-/*****start styles for boxes*****/
-.box {
- border: 1px solid #5fa3c3;
- margin-bottom: 20px;
-}
-.box-header,
-.box-footer {
- padding: 10px;
- background: #dedede;
-}
-.box-footer hr {
- margin: 0px;
-}
-.box-header:after,
-.box-footer:after {
- content: "";
- display: table;
- clear: both;
-}
-.box-header .btn-group {
- float: right;
-}
-.box-header h4 {
- float: left;
-}
-/*****end styles for boxes*****/
-
-/*****start styles for dashboard page*****/
+/*Dashboard*/
-/*start services summary*/
.services {
margin-left: 5px;
.tab-marker-position {
@@ -273,43 +245,7 @@ a:focus {
.tab-marker-position;
background-image: @status-dead-marker;
}
- dt {
- text-align: left;
- width: 120px;
- }
- dd{
- margin-left: 145px;
- }
-}
-/*end services summary*/
-
-/*start alerts summary*/
-.alerts {
- margin: 0px;
-}
-.alerts li {
- border-bottom: 1px solid #b7b9bb;
- list-style: none;
- padding: 5px 10px 5px 43px;
-}
-.alerts li.status-ok {
- background: url("../img/status-ok.jpg") no-repeat 14px 9px;
}
-.alerts li.status-corrupt {
- background: url("../img/status-corrupt.jpg") no-repeat 14px 9px;
-}
-.alerts li .date-time {
- float: right;
-}
-.go-to {
- float: right;
- background: url("../img/arrow-right.png") no-repeat right center;
- padding-right: 40px;
- margin-top: 20px;
-}
-/*end alerts summary*/
-
-/*****end styles for dashboard page*****/
/*Services*/
.nav-tabs {
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/audit.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/audit.hbs?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/audit.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/admin/audit.hbs Wed Oct 3 04:41:43 2012
@@ -24,11 +24,6 @@
{{/each}}
</tr>
</thead>
- <tbody>
- {{#each row in view.rows}}
- {{view row}}
- {{/each}}
- </tbody>
</table>
<div class="pagination">
<ul>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs Wed Oct 3 04:41:43 2012
@@ -49,22 +49,20 @@
<div class="box-header">
<h4>Services</h4>
</div>
- <dl class="dl-horizontal services">
+ <ul class="services">
{{#each service in controller.services}}
- <dt class="health-status-{{unbound service.healthStatus}}">
- <a {{action selectService service href=true}}>{{service.label}}</a> -
- </dt>
- <dd>
+ <li class="health-status-{{unbound service.healthStatus}}">
+ <a {{action selectService service href=true}} href="javascript:void(null)">{{service.label}}</a> -
{{#each component in service.components}}
{{#if component.type}}
- <a {{action selectHost component.host href=true}}>{{component.componentName}}</a>,
+ <a {{action selectHost component.host href=true}} href="javascript:void(null)">{{component.componentName}}</a>,
{{else}}
- <a {{action filterHosts component}}>{{component.componentName}}</a>
+ <a {{action filterHosts component}} href="javascript:void(null)">{{component.componentName}}</a>
{{/if}}
{{/each}}
- </dd>
+ </li>
{{/each}}
- </dl>
+ </ul>
</div>
</div>
</div>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host.hbs Wed Oct 3 04:41:43 2012
@@ -55,9 +55,6 @@
</th>
<th>
<a href="#" {{action sortByName target="controller" }}>Name</a>
- {{#if controller.isSort}}
- <i class="icon-arrow-up"{{bindAttr class="controller.sortClass"}}></i>
- {{/if}}
</th>
<th>Rack</th>
<th>CPU</th>
@@ -89,12 +86,10 @@
<td class="first">
<label class="checkbox">
{{view view.HostCheckboxView checkedBinding="host.isChecked" contentBinding="host"}}
+ <span class="health-status-{{unbound host.healthStatus}}"></span>
</label>
</td>
- <td class="name">
- <span class="health-status-{{unbound host.healthStatus}}"></span>
- <a href="#" {{action "showDetails" host}}>{{unbound host.hostName}}</a>
- </td>
+ <td><a href="#" {{action showDetails host}}>{{unbound host.hostName}}</a></td>
<td>{{host.cluster.clusterName}}</td>
<td>{{host.cpu}}</td>
<td>{{host.memory}}</td>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/details.hbs Wed Oct 3 04:41:43 2012
@@ -16,18 +16,16 @@
* limitations under the License.
-->
<div id="host-details" class="row">
- {{#if controller.isFromHosts}}
- <a class="btn back" {{action backToHostsList}}>â Back to Hosts</a>
- {{/if}}
+ <a class="btn back" {{action backToHostsList}}>â Back to Hosts</a>
<div class="box ">
<div class="box-header">
<div class="span1 host-title health-status-{{unbound view.content.healthStatus}}">{{unbound view.content.hostName}}</div>
<div class="button-section pull-right clearfix">
- <button {{bindAttr disabled="controller.isStarting"}} class="btn btn-success" data-toggle="modal" {{action "startConfirmPopup" target="controller"}}>
+ <button {{bindAttr disabled="controller.startComponents"}} class="btn btn-success" data-toggle="modal" {{action "startConfirmPopup" target="controller"}}>
<i class="icon-play"></i>
Start
</button>
- <button {{bindAttr disabled="controller.isStopping"}} class="btn btn-danger" data-toggle="modal" {{action "stopConfirmPopup" target="controller"}}>
+ <button {{bindAttr disabled="controller.stopComponents"}} class="btn btn-danger" data-toggle="modal" {{action "stopConfirmPopup" target="controller"}}>
<i class="icon-stop"></i>
Stop
</button>
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/host/summary.hbs Wed Oct 3 04:41:43 2012
@@ -30,26 +30,10 @@
{{#if view.content.components.length}}
<div class="span3 host-components pull-right">
{{#each component in view.content.components}}
- {{#view view.ComponentButtonView contentBinding="component"}}
- <div class="btn-group">
- <button {{bindAttr class="view.buttonClass"}} data-toggle="dropdown">
- {{unbound view.content.componentName}}
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <li>
- <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
- Start
- </a>
- </li>
- <li>
- <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
- Stop
- </a>
- </li>
- </ul>
- </div>
- {{/view}}
+ <button class="btn btn-{{bind view.buttonClass}}">
+ {{component.componentName}}
+ <i class="icon-{{unbound view.content.iconClass}}"></i>
+ </button>
{{/each}}
</div>
{{/if}}
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/summary.hbs Wed Oct 3 04:41:43 2012
@@ -31,11 +31,17 @@
<div class="service-content">
{{#each component in controller.content.components}}
{{#if component.type}}
- <div class="service-links">{{component.componentName}}: <a {{action selectHost component.host href=true}} href="javascript:void(null)">{{component.host.hostName}}</a></div>
+ <div class="service-links">{{component.componentName}}:<a {{action selectHost component.host href=true}} href="javascript:void(null)">{{component.host.hostName}}</a></div>
{{else}}
- <div class="service-links">{{component.componentName}}: <a {{action filterHosts component}} href="javascript:void(null)">{{component.componentName}}</a></div>
+ <div class="service-links">{{component.componentName}}:<a {{action filterHosts component}} href="javascript:void(null)">{{component.componentName}}</a></div>
{{/if}}
{{/each}}
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
+ industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
+ scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
+ electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of
+ Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like
+ Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
<div class="span6">
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/db.js Wed Oct 3 04:41:43 2012
@@ -74,14 +74,6 @@ App.db.setLoginName = function(name) {
localStorage.setObject('ambari',App.db.data);
}
-// that works incorrectly
-App.db.setUser = function(user) {
- console.log('TRACE: Entering db:setUser function');
- App.db.data = localStorage.getObject('ambari');
- App.db.data.app.user = user;
- localStorage.setObject('ambari',App.db.data);
-}
-
App.db.setAuthenticated = function(authenticated) {
console.log('TRACE: Entering db:setAuthenticated function');
@@ -209,13 +201,6 @@ App.db.setSlaveComponentHosts = function
* getter methods
*/
-// that works incorrectly
-App.db.getUser = function() {
- console.log('TRACE: Entering db:getUser function');
- App.db.data = localStorage.getObject('ambari');
- return App.db.data.app.user;
-}
-
App.db.getLoginName = function() {
console.log('Trace: Entering db:getLoginName function');
App.db.data = localStorage.getObject('ambari');
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js Wed Oct 3 04:41:43 2012
@@ -24,15 +24,4 @@ Em.CoreObject.reopen({
t: function(key, attrs){
return Em.I18n.t(key, attrs)
}
-});
-
-Em.Object.getMixinProperties = function(){
- var properties = {};
- this.PrototypeMixin.mixins.forEach(function(i,mix){
- if(mix.properties) {
- properties = mix.properties;
- }
- });
-
- return properties;
-}
\ No newline at end of file
+});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/audit.js Wed Oct 3 04:41:43 2012
@@ -35,31 +35,9 @@ App.GridHeader = Em.View.extend({
}
});
-App.GridRow = Em.View.extend({
- tagName:'tr',
- init:function (options) {
- console.warn("gridrow init");
- var object = this.get('object');
- var grid = this.get('grid');
- var fieldNames = grid.get('fieldNames');
- var template = '';
-// console.warn("FIELD NAMES:", +fieldNames);
-
- if (fieldNames) {
- $.each(grid.get('fieldNames'), function (i, field) {
- template += "<td>"+ object.get(field) +"</td>";
- });
-
- this.set('template', Em.Handlebars.compile(template));
- }
- return this._super();
- }
-});
-
App.MainAdminAuditView = Em.View.extend({
_columns:{},
columns:[],
- rows:[],
initComleted:false,
collection:[],
templateName:require('templates/main/admin/audit'),
@@ -69,7 +47,6 @@ App.MainAdminAuditView = Em.View.extend(
if (!this.columns.length) { // init completed on this
this.prepareColumns();
this.prepareFilters();
- this.prepareRows();
this.prepareCollection();
}
},
@@ -90,6 +67,7 @@ App.MainAdminAuditView = Em.View.extend(
var field = App.GridHeader.extend(options);
this.columns.push(field);
+// console.log("FI:", field.filterable);
if (field.filterable || 1) { // .filterable - field not working :(
this.fieldNames.push(options.name);
}
@@ -100,17 +78,9 @@ App.MainAdminAuditView = Em.View.extend(
label:Em.I18n.t("admin.audit.grid.date")
});
this.addColumn({
- name:"service.label",
- label:Em.I18n.t("admin.audit.grid.service")
- });
- this.addColumn({
name:"operationName",
label:Em.I18n.t("admin.audit.grid.operationName")
});
- this.addColumn({
- name:"user.userName",
- label:Em.I18n.t("admin.audit.grid.performedBy")
- });
},
prepareFilters:function () {
var collection = this.get('collection');
@@ -119,8 +89,8 @@ App.MainAdminAuditView = Em.View.extend(
if (collection && collection.content && collection.content.length) {
collection.forEach(function (i, object) {
-// console.warn("INTO");
-// console.warn(object, object.content);
+ console.warn("INTO");
+ console.warn(object, object.content);
$.each(fieldNames, function (j, field) {
if (!options[field]) {
options[field] = [];
@@ -130,8 +100,8 @@ App.MainAdminAuditView = Em.View.extend(
});
})
-// console.warn("SORT OPTIONS:", options);
-// this.set('fieldNames', false);
+ console.warn("SORT OPTIONS:", options);
+ this.set('fieldNames', false);
// indexOf
// console.warn("LENGTH:" + collection.content.length);
@@ -141,18 +111,5 @@ App.MainAdminAuditView = Em.View.extend(
// $.each(this.get('collection'), function(){})
- }.observes('collection'),
- prepareRows:function () {
- var collection = this.get('collection');
- var thisGrid = this;
- console.warn("PREPARE ROWS");
- if (collection && collection.content && collection.content.length) {
- collection.forEach(function (object) {
- console.warn("FOREACH COLLECTION");
- var row = App.GridRow.extend({grid:thisGrid, object:object});
- thisGrid.rows.push(row);
- });
- }
-
}.observes('collection')
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js Wed Oct 3 04:41:43 2012
@@ -23,11 +23,7 @@ App.MainHostSummaryView = Em.View.extend
content:function(){
return App.router.get('mainHostDetailsController.content');
}.property('App.router.mainHostDetailsController.content'),
- ComponentButtonView: Em.View.extend({
- content: null,
- buttonClass: function(){
- return this.get('content.workStatus') ? 'btn btn-success dropdown-toggle' : 'btn btn-danger dropdown-toggle';
- }.property('content.workStatus')
- })
-
+ buttonClass: function(){
+ return this.get('startComponents') ? 'success' : 'danger';
+ }.property('startComponents')
});
\ No newline at end of file
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/test/installer/step4_test.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/test/installer/step4_test.js?rev=1393287&r1=1393286&r2=1393287&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/test/installer/step4_test.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/test/installer/step4_test.js Wed Oct 3 04:41:43 2012
@@ -21,8 +21,8 @@ require('controllers/installer/step4_con
describe('App.InstallerStep4Controller', function () {
- var DEFAULT_SERVICES = ['HDFS'];
- var OPTIONAL_SERVICES = ['MAPREDUCE', 'NAGIOS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SQOOP', 'ZOOKEEPER', 'HCATALOG'];
+ var DEFAULT_SERVICES = ['HDFS', 'MAPREDUCE', 'NAGIOS', 'GANGLIA'];
+ var OPTIONAL_SERVICES = ['OOZIE', 'HIVE', 'HBASE', 'PIG', 'SQOOP', 'ZOOKEEPER', 'HCATALOG'];
var controller = App.InstallerStep4Controller.create();
@@ -93,48 +93,6 @@ describe('App.InstallerStep4Controller',
})
- describe('#needToAddMapReduce', function() {
-
- describe('mapreduce not selected', function() {
- beforeEach(function() {
- controller.findProperty('serviceName', 'MAPREDUCE').set('isSelected', false);
- })
-
- it('should return true if Hive is selected and MapReduce is not selected', function() {
- controller.findProperty('serviceName', 'HIVE').set('isSelected', true);
- expect(controller.needToAddMapReduce()).to.equal(true);
- })
- it('should return true if Pig is selected and MapReduce is not selected', function() {
- controller.findProperty('serviceName', 'PIG').set('isSelected', true);
- expect(controller.needToAddMapReduce()).to.equal(true);
- })
- it('should return true if Oozie is selected and MapReduce is not selected', function() {
- controller.findProperty('serviceName', 'OOZIE').set('isSelected', true);
- expect(controller.needToAddMapReduce()).to.equal(true);
- })
- })
-
- describe('mapreduce not selected', function() {
- beforeEach(function() {
- controller.findProperty('serviceName', 'MAPREDUCE').set('isSelected', true);
- })
-
- it('should return false if Hive is selected and MapReduce is selected', function() {
- controller.findProperty('serviceName', 'HIVE').set('isSelected', true);
- expect(controller.needToAddMapReduce()).to.equal(false);
- })
- it('should return false if Pig is selected and MapReduce is not selected', function() {
- controller.findProperty('serviceName', 'PIG').set('isSelected', true);
- expect(controller.needToAddMapReduce()).to.equal(false);
- })
- it('should return false if Oozie is selected and MapReduce is not selected', function() {
- controller.findProperty('serviceName', 'OOZIE').set('isSelected', true);
- expect(controller.needToAddMapReduce()).to.equal(false);
- })
- })
-
- })
-
describe('#saveSelectedServiceNamesToDB', function() {
beforeEach(function() {
@@ -150,9 +108,9 @@ describe('App.InstallerStep4Controller',
App.db.setLoginName('tester');
App.db.setClusterName('test');
controller.saveSelectedServiceNamesToDB();
- // console.log('controller length=' + controller.get('length'));
+ console.log('controller length=' + controller.get('length'));
var selectedServiceNames = App.db.getSelectedServiceNames();
- // console.log('service length=' + selectedServiceNames.get('length'));
+ console.log('service length=' + selectedServiceNames.get('length'));
expect(selectedServiceNames.length === DEFAULT_SERVICES.length + OPTIONAL_SERVICES.length).to.equal(true);
})