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/07 20:54:33 UTC
[1/2] git commit: AMBARI-5605. Usability UX: Default key actions for
dialog boxes.(xiwang)
Repository: ambari
Updated Branches:
refs/heads/trunk 9eb4aaa23 -> 3f929c697
AMBARI-5605. Usability UX: Default key actions for dialog boxes.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f929c69
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f929c69
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f929c69
Branch: refs/heads/trunk
Commit: 3f929c697eb7b0d25e64de14e32852c8aa77b014
Parents: 6d2743b
Author: Xi Wang <xi...@apache.org>
Authored: Mon Apr 28 17:13:22 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Wed May 7 11:53:44 2014 -0700
----------------------------------------------------------------------
ambari-web/app/styles/application.less | 5 +++--
ambari-web/app/views/application.js | 29 ++++++++++++++++++++++++-
ambari-web/app/views/common/modal_popup.js | 1 +
3 files changed, 32 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3f929c69/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 7599c7f..22f50a2 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -16,6 +16,7 @@
* limitations under the License.
*/
+
@space-s: 5px;
@space-m: 10px;
@space-l: 20px;
@@ -129,6 +130,7 @@ footer {
background-image: -webkit-linear-gradient(top, @top-nav-bg-color-from, @top-nav-bg-color-to);
background-image: -o-linear-gradient(top, @top-nav-bg-color-from, @top-nav-bg-color-to);
background-image: linear-gradient(to bottom, @top-nav-bg-color-from, @top-nav-bg-color-to);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= @top-nav-bg-color-from, endColorstr=@top-nav-bg-color-to); //for IE9-
-webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1);
@@ -156,7 +158,7 @@ footer {
.brand.cluster-name {
margin-left: 10px;
- .operations-count {
+ .label.operations-count {
background-color: #006DCC;
-webkit-animation-name: greenPulse;
-webkit-animation-duration: 1s;
@@ -167,7 +169,6 @@ footer {
animation-name: greenPulse;
animation-duration: 1s;
animation-iteration-count: infinite;
- //margin: 2px;
}
.label {
padding: 3px 5px 3px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/3f929c69/ambari-web/app/views/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/application.js b/ambari-web/app/views/application.js
index d0a7950..afe38f2 100644
--- a/ambari-web/app/views/application.js
+++ b/ambari-web/app/views/application.js
@@ -20,5 +20,32 @@
var App = require('app');
App.ApplicationView = Em.View.extend({
- templateName: require('templates/application')
+ templateName: require('templates/application'),
+
+ didInsertElement: function () {
+ // on 'Enter' pressed, trigger modal window primary button if primary button is enabled(green)
+ // on 'Esc' pressed, close the modal
+ $(document).keydown(function(event){
+ if (event.which == 13 || event.keyCode == 13 ) {
+ var primaryButton = $(document).find('#modal > .modal-footer > .btn-success').first();
+ if (primaryButton.length > 0 && primaryButton.attr('disabled') != 'disabled') {
+ event.preventDefault();
+ primaryButton.click();
+ return false;
+ }
+ }
+ return true;
+ });
+ $(document).keyup(function(event){
+ if (event.which == 27 || event.keyCode == 27) {
+ var closeButton = $(document).find('#modal > .modal-header > .close').first();
+ if (closeButton.length > 0) {
+ event.preventDefault();
+ closeButton.click();
+ return false;
+ }
+ }
+ return true;
+ });
+ }
});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3f929c69/ambari-web/app/views/common/modal_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popup.js b/ambari-web/app/views/common/modal_popup.js
index c8ed229..9be6050 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -169,6 +169,7 @@ App.showConfirmationFeedBackPopup = function (primary, bodyMessage, secondary) {
this.set('disablePrimary', true);
this.set('disableSecondary', true);
this.set('statusMessage', Em.I18n.t('popup.confirmationFeedBack.sending'));
+ this.hide();
primary(this.get('query'));
},
statusMessage: function () {
[2/2] git commit: AMBARI-5530. Add ui controls for deleting + adding
Ganglia Monitor to a host.(xiwang)
Posted by xi...@apache.org.
AMBARI-5530. Add ui controls for deleting + adding Ganglia Monitor to a host.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6d2743b5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d2743b5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d2743b5
Branch: refs/heads/trunk
Commit: 6d2743b5eb75701e6951e252d3ee8c29f5492e72
Parents: 9eb4aaa
Author: Xi Wang <xi...@apache.org>
Authored: Tue Apr 22 11:03:02 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Wed May 7 11:53:44 2014 -0700
----------------------------------------------------------------------
ambari-web/app/models/stack_service_component.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6d2743b5/ambari-web/app/models/stack_service_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service_component.js b/ambari-web/app/models/stack_service_component.js
index e855b31..5e48e7b 100644
--- a/ambari-web/app/models/stack_service_component.js
+++ b/ambari-web/app/models/stack_service_component.js
@@ -47,7 +47,7 @@ App.StackServiceComponent = DS.Model.extend({
}.property('componentName'),
isDeletable: function() {
- return ['SUPERVISOR', 'HBASE_MASTER', 'DATANODE', 'TASKTRACKER', 'NODEMANAGER', 'HBASE_REGIONSERVER'].contains(this.get('componentName'));
+ return ['SUPERVISOR', 'HBASE_MASTER', 'DATANODE', 'TASKTRACKER', 'NODEMANAGER', 'HBASE_REGIONSERVER', 'GANGLIA_MONITOR'].contains(this.get('componentName'));
}.property('componentName'),
isRollinRestartAllowed: function() {
@@ -63,7 +63,7 @@ App.StackServiceComponent = DS.Model.extend({
}.property('componentName'),
isAddableToHost: function() {
- return ["DATANODE", "TASKTRACKER", "NODEMANAGER", "HBASE_REGIONSERVER", "HBASE_MASTER", "ZOOKEEPER_SERVER", "SUPERVISOR"].contains(this.get('componentName'));
+ return ["DATANODE", "TASKTRACKER", "NODEMANAGER", "HBASE_REGIONSERVER", "HBASE_MASTER", "ZOOKEEPER_SERVER", "SUPERVISOR", "GANGLIA_MONITOR"].contains(this.get('componentName'));
}.property('componentName'),
isShownOnInstallerAssignMasterPage: function() {