summaryrefslogtreecommitdiffstats
path: root/install/ui/ipa.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-07-25 12:15:14 -0400
committerAdam Young <ayoung@redhat.com>2011-07-28 14:17:25 -0400
commitb36df6e9b9c1104d37fe14782a7e21e57097a7c0 (patch)
tree1eca6d4b0f7127b01f2e366919981ed90090ee95 /install/ui/ipa.js
parent264ed38fa206537d7b160ea5d7586d071575c610 (diff)
downloadfreeipa-b36df6e9b9c1104d37fe14782a7e21e57097a7c0.tar.gz
freeipa-b36df6e9b9c1104d37fe14782a7e21e57097a7c0.tar.xz
freeipa-b36df6e9b9c1104d37fe14782a7e21e57097a7c0.zip
removing setters setup and init
change widget and widget unit tests to hold on to entity, not entity name. Replacing entity_name with entity.name in most places. The one exception is columns for table_widget. Widgets that refer to other entities have to have late resolution of the entity object, due to circular dependencies. cleanup entity assignment. removed template and layout, merged setup into create adder dialogs adjust height for external removed init from widget, isection, association, facet, host and service Make unit tests use factory. fix functional tests to click find link correctly. tweak to activation test, but still broken. moved initialization code to the end use --all for hbacrule find, so the type shows up now fixed dns exception code and exception handling for get_entity replace metadata look up with value from entity. fixed author lines removed duplicate columns in managed by facets. tweak to nav fix in order to initialize tab. more defensive code update metadata for true false one line init for entity_name in widget move init code to end of constructor functions moved constants to start of function for adder_dialog external fields for dialogs initialized at dialog creation sudo sections: move add fields and columns to widget definition. The parameter validation in IPA.column ...This is precondition checking. Note that it merely throws an exception if the entity_name is not set. I want this stuff at the top of the function so that it is obvious to people looking to use them what is required. I added a comment to make this clear, but I'd like to keep precondition checking at the top of the function. decreased the scope of the pkey_name and moved the initiailzation fof columns into the setup_column function for association_tables return false at the end of click handler removed blank labels in sudo command section fix radio buttons for sudo category fixed table side for adder dialogs with external fields comments for future direction with add_columns https://fedorahosted.org/freeipa/ticket/1451 https://fedorahosted.org/freeipa/ticket/1462 https://fedorahosted.org/freeipa/ticket/1493 https://fedorahosted.org/freeipa/ticket/1497 https://fedorahosted.org/freeipa/ticket/1532 https://fedorahosted.org/freeipa/ticket/1534
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r--install/ui/ipa.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index a6c9694cb..2f1c6969c 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -131,17 +131,29 @@ var IPA = ( function () {
return that.entities.values;
};
+
+
that.get_entity = function(name) {
var entity = that.entities.get(name);
if (!entity){
var factory = that.entity_factories[name];
+ if (!factory){
+ return null;
+ }
try {
entity = factory();
that.add_entity(entity);
- entity.init();
} catch (e) {
- /*exceptions thrown by builder just mean that entities
- are not to be registered. */
+ if (e.expected){
+ /*expected exceptions thrown by builder just mean that
+ entities are not to be registered. */
+ return null;
+ }
+ if (e.message){
+ alert(e.message);
+ }else{
+ alert(e);
+ }
return null;
}
}
@@ -597,4 +609,4 @@ IPA.dirty_dialog = function(spec) {
};
return that;
-}; \ No newline at end of file
+};