[Freeipa-devel] [PATCH] 0252 Automount keys details

Endi Sukma Dewata edewata at redhat.com
Thu Jun 23 22:09:48 UTC 2011


On 6/23/2011 4:18 PM, Adam Young wrote:
>

Some issues:

1. Breadcrumb is not displayed in the automount key details facet. This 
is because usually when an entity only has 1 facet it will not have a 
back link/breadcrumb. That's not the case for automount key, so it has 
to be explicitly enabled.

2. The Add and Edit for automount key works but generates an error. This 
is because the show_edit_page() the key and info are arrays so we need 
to get the first elements in the arrays.

The patch can be pushed with the following changes:

diff --git a/install/ui/automount.js b/install/ui/automount.js
index 
cb7798001b1400613a1bc7b25da7513184d4bbfd..6ef97054495211763421989efd779fdc79589bc4 
100644
--- a/install/ui/automount.js
+++ b/install/ui/automount.js
@@ -130,6 +130,7 @@ IPA.entity_factories.automountkey = function() {
                          'automountinformation']
                  }
              ],
+            disable_breadcrumb: false,
              back_link_text: 'Back to Locations',
              pre_execute_hook : function (command){
                  var entity_name = this.entity_name;
@@ -151,8 +152,8 @@ IPA.entity_factories.automountkey = function() {
          }).
          adder_dialog({
              show_edit_page : function(entity_name, result){
-                var key = result.automountkey;
-                var info = result.automountinformation;
+                var key = result.automountkey[0];
+                var info = result.automountinformation[0];
                  var state = IPA.nav.get_path_state(entity_name);
                  state[entity_name + '-facet'] = 'default';
                  state[entity_name + '-info'] = info;
diff --git a/install/ui/details.js b/install/ui/details.js
index 
1046890ac89d4d977771bb8a2196361e42b6c6c6..8a43818b5984e1fd88c8487542b166384410961f 
100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -338,8 +338,8 @@ IPA.details_facet = function(spec) {

      that.create = function(container) {
          if (that.entity.facets.length == 1) {
-            that.disable_breadcrumb = true;
-            that.disable_facet_tabs = true;
+            if (that.disable_breadcrumb === undefined) 
that.disable_breadcrumb = true;
+            if (that.disable_facet_tabs === undefined) 
that.disable_facet_tabs = true;
          }

          that.facet_create(container);


-- 
Endi S. Dewata




More information about the Freeipa-devel mailing list