On 07/28/2011 01:26 AM, Endi Sukma Dewata wrote:
On 7/27/2011 8:14 PM, Adam Young wrote:
59. The initialization area in IPA.association_adder_dialog
(association.js:212) should be marked with a comment.
Done


The default_columns() invocation should be moved into the
initialization area because this is not a precondition checking like
in #57. The default_columns() function itself should be moved outside
of the initialization area because the area should not contain
function definition, only invocations.

The columns need to be defined before the table setup in the base class,
which is why it is done at the top of the function, prior to calling the
baseclass. Going to leave this as is.

Please add a note near default_columns() definition saying that the columns map in IPA.adder_dialog should be removed and the add_column() should be modified to add the column directly into the available_table and selected_table. This way IPA.association_adder_dialog can call create_column() from the initialization area, no need to modify the parameters.
Done

62. Since the code in #60 and #61 is moved to initialization area, the
spec.link can be reverted back to that.link.

Removed link. I don't see where it is used. Tested without it and
everything seems to work fine.

The link flag is used to create a link from the association facet to
the target entity (see association.js:723 and widget.js:1152). The
original code sets the flag to true by default.

To test, create a netgroup and enroll a user. The user should be linked.
Still works. True is deduced by default. I think at this point you would
have to send link = false to disable, and that probably makes no sense.
Going to leave this as is.

OK, back to being spec.link, as it has to be set prior to the call to the base class. Put a comment in to this effect.


It still doesn't work for me. Make sure you are looking at "Members Users" facet in Netgroup, not the other way around. The reverse link from user to netgroup works because the flag is explicitly set in user.js. In netgroup.js and other files the link is not set, so it will use the default. All variables are undefined by default and considered false. The original code reversed the default.

79. Regression: The Unprovision button in host details page doesn't work. To test, enroll a host with this command:

ipa-getkeytab -s localhost -p host/test.example.com -k test.keytab

Fixed

Then open the host details page. Click the "Delete Key, Unprovision" button, click Unprovision again, it will fail. The that.entity_name in host.js:381 should be changed to that.entity.name.


From e9a4590f342481af062e8f89a4ae657edbbdb178 Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Thu, 28 Jul 2011 10:07:20 -0400
Subject: [PATCH] additional fixes for removal of init and setup

reset link logic
comments for future direction with add_columns

entity_name to entity.name for unprovision button
set entity explicitly for rights_widget

https://fedorahosted.org/freeipa/ticket/1534
---
 install/ui/aci.js         |    1 +
 install/ui/association.js |   14 ++++++++++++++
 install/ui/host.js        |    2 +-
 3 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/install/ui/aci.js b/install/ui/aci.js
index 3f808f792dcd68eaf8114847b4aa9f1650b168f0..9c1188afb29c2b1f27039cc1bf119f7d6005ae8d 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -382,6 +382,7 @@ IPA.rights_section = function(spec) {
     var that = IPA.details_section(spec);
 
     that.add_field(IPA.rights_widget({
+        entity: that.entity,
         name: 'permissions',
         join: true
     }));
diff --git a/install/ui/association.js b/install/ui/association.js
index 6a9b8dfb67aaad85f029d8784a9776b6532f7e02..83b7a39233e28ce52cd91d36cab711b8411da5ec 100644
--- a/install/ui/association.js
+++ b/install/ui/association.js
@@ -145,6 +145,13 @@ IPA.bulk_associator = function(spec) {
 IPA.association_adder_dialog = function (spec) {
 
     spec = spec || {};
+    /*
+      TODO: columns map in IPA.adder_dialog should be removed and add_column()
+      should be modified to add the column directly into the available_table
+      and selected_table. This way IPA.association_adder_dialog can call
+      create_column() from the initialization area, no need to modify the
+      parameters.
+    */
     default_columns(spec);
 
     var that = IPA.adder_dialog(spec);
@@ -658,7 +665,14 @@ IPA.association_facet = function (spec) {
 
     spec = spec || {};
 
+    /*
+       Link parameter is used to turn off the links in selfservice mode.
+       Default it to true if not set so that facets that would not otherwise
+       link by default get links set.
 
+       link must be set before the call to the base class, to affect the  table.
+     */
+    spec.link = spec.link === undefined ? true : spec.link;
 
     spec.managed_entity_name = spec.other_entity;
     var that = IPA.table_facet(spec);
diff --git a/install/ui/host.js b/install/ui/host.js
index 44b02ba1b2c825e9d2cfc86ba04091b61f822907..a84f54c190257e19efadcbdf0754b431eb4bd6de 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -378,7 +378,7 @@ IPA.host_provisioning_status_widget = function (spec) {
 
         var command = IPA.command({
             name: that.entity.name+'_disable_'+pkey,
-            entity: that.entity_name,
+            entity: that.entity.name,
             method: 'disable',
             args: pkey,
             options: { all: true, rights: true },
-- 
1.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to