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/02/25 17:34:50 UTC
git commit: AMBARI-4819 Custom Property Override UX needs to improve.
(Mikhail Bayuk via ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 845355c5f -> 6f0f26a56
AMBARI-4819 Custom Property Override UX needs to improve. (Mikhail Bayuk via ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6f0f26a5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6f0f26a5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6f0f26a5
Branch: refs/heads/trunk
Commit: 6f0f26a56af765473490687ebaf9808b3dc72a6c
Parents: 845355c
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Feb 25 18:34:15 2014 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Feb 25 18:34:32 2014 +0200
----------------------------------------------------------------------
ambari-web/app/messages.js | 1 +
.../app/templates/common/configs/addPropertyWindow.hbs | 7 ++++++-
ambari-web/app/views/common/configs/services_config.js | 11 ++++++++++-
3 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6f0f26a5/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 31979fc..e3b3dea 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1180,6 +1180,7 @@ Em.I18n.translations = {
'services.service.config.failSaveConfigHostOverrides':'Failure in saving service configuration overrides',
'services.service.config.addPropertyWindow.errorMessage':'This is required',
'services.service.config.addPropertyWindow.error.derivedKey':'This property is already defined',
+ 'services.service.config.addPropertyWindow.filterKeyLink' : 'Find property',
'services.service.config.stopService.runningHostComponents':'{0} components on {1} hosts are running',
'services.service.config.stopService.unknownHostComponents':'{0} components on {1} hosts are in unknown state. These components might actually be running and need restarting later to make the changes effective.',
'services.service.config.confirmDirectoryChange':'You are about to make changes to service directories that are core to {0}. Before you proceed, be absolutely certain of the implications and that you have taken necessary manual steps, if any, for the changes. Are you sure you want to proceed?',
http://git-wip-us.apache.org/repos/asf/ambari/blob/6f0f26a5/ambari-web/app/templates/common/configs/addPropertyWindow.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/addPropertyWindow.hbs b/ambari-web/app/templates/common/configs/addPropertyWindow.hbs
index 162034b..59891f8 100644
--- a/ambari-web/app/templates/common/configs/addPropertyWindow.hbs
+++ b/ambari-web/app/templates/common/configs/addPropertyWindow.hbs
@@ -27,6 +27,11 @@
<div class="controls">
{{view Ember.TextField valueBinding="view.serviceConfigProperty.name" class="span4"}}
<span class="help-inline">{{view.serviceConfigProperty.errorMessage}}</span>
+ {{#if view.serviceConfigProperty.showFilterLink}}
+ <a href="#" class="btn-padding" {{action filterByKey target="view" }}>
+ {{t services.service.config.addPropertyWindow.filterKeyLink}}
+ </a>
+ {{/if}}
</div>
</div>
<div class="each-row">
@@ -35,4 +40,4 @@
{{view Ember.TextArea valueBinding="view.serviceConfigProperty.value" rows="4" classNames="span6" }}
</div>
</div>
- </form>
\ No newline at end of file
+ </form>
http://git-wip-us.apache.org/repos/asf/ambari/blob/6f0f26a5/ambari-web/app/views/common/configs/services_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index 68aa7e1..515d78f 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -439,6 +439,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
filename: '',
isUserProperty: true,
isKeyError: false,
+ showFilterLink: false,
isNotSaved: true,
errorMessage: "",
observeAddPropertyValue: function () {
@@ -450,6 +451,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
this.set("isKeyError", false);
this.set("errorMessage", "");
} else {
+ this.set("showFilterLink", true);
this.set("isKeyError", true);
this.set("errorMessage", Em.I18n.t('services.service.config.addPropertyWindow.error.derivedKey'));
}
@@ -506,7 +508,14 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
bodyClass: Ember.View.extend({
templateName: require('templates/common/configs/addPropertyWindow'),
controllerBinding: 'App.router.mainServiceInfoConfigsController',
- serviceConfigProperty: serviceConfigObj
+ serviceConfigProperty: serviceConfigObj,
+ filterByKey: function(event) {
+ var controller = (App.router.get('currentState.name') != 'configs')
+ ? App.router.get('wizardStep7Controller')
+ : App.router.get('mainServiceInfoConfigsController');
+ this.get('parentView').onClose();
+ controller.set('filter', event.view.get('serviceConfigProperty.name'));
+ }
})
});