A new facet has been added to show entitlement status and download
the registration certificate.
--
Endi S. Dewata
From 34b60284da66082b7d7a954ed02b545665fd1d16 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata edew...@redhat.com
Date: Wed, 27 Apr 2011 12:17:13 -0500
Subject: [PATCH] Entitlement status.
A new facet has been added to show entitlement status and download
the registration certificate.
---
install/ui/associate.js|6 +-
install/ui/automount.js|1 +
install/ui/details.js | 49 +++--
install/ui/dns.js |4 +-
install/ui/entitle.js | 252 +---
install/ui/entity.js |8 +-
install/ui/hbac.js |3 +-
install/ui/ipa.css | 32 +--
install/ui/policy.js |1 +
install/ui/search.js | 33 ++-
install/ui/serverconfig.js |1 +
install/ui/sudo.js |8 -
install/ui/test/data/entitle_find_offline.json | 32 +++
...{entitle_find.json = entitle_find_online.json} |0
install/ui/widget.js |1 +
15 files changed, 321 insertions(+), 110 deletions(-)
create mode 100644 install/ui/test/data/entitle_find_offline.json
rename install/ui/test/data/{entitle_find.json = entitle_find_online.json} (100%)
diff --git a/install/ui/associate.js b/install/ui/associate.js
index 657839f29a497df24fd0f262dec9258a9661f440..3a90f260e8fad67f82e8663169776136579c4496 100644
--- a/install/ui/associate.js
+++ b/install/ui/associate.js
@@ -666,8 +666,7 @@ IPA.association_table_widget = function (spec) {
function on_error(xhr, text_status, error_thrown) {
var summary = $('span[name=summary]', that.tfoot).empty();
-summary.append('pError: '+error_thrown.name+'/p');
-summary.append('p'+error_thrown.message+'/p');
+summary.append(error_thrown.name+': '+error_thrown.message);
}
var pkey = $.bbq.getState(that.entity_name+'-pkey');
@@ -1027,8 +1026,7 @@ IPA.association_facet = function (spec) {
function(xhr, text_status, error_thrown) {
that.table.empty();
var summary = that.table.summary.empty();
-summary.append('pError: '+error_thrown.name+'/p');
-summary.append('p'+error_thrown.message+'/p');
+summary.append(error_thrown.name+': '+error_thrown.message);
}
);
}
diff --git a/install/ui/automount.js b/install/ui/automount.js
index d008c964fd1fe2e2f310ed72b9db3ce1862dc5c8..73419f70baaa982fad901423ee53e0e33358b4e0 100644
--- a/install/ui/automount.js
+++ b/install/ui/automount.js
@@ -31,6 +31,7 @@ IPA.entity_factories.automountlocation = function() {
entity({name:'automountlocation',
title:IPA.messages.tabs.automount}).
search_facet({
+title: IPA.metadata.objects.automountlocation.label,
columns:['cn']
}).
nested_search_facet({
diff --git a/install/ui/details.js b/install/ui/details.js
index c0b560cd63effc917ef4e2802b0701902cedd81b..7fa72eff5963ea98233fda7707af7e877ca902d9 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -266,7 +266,7 @@ IPA.details_facet = function(spec) {
var that = IPA.facet(spec);
-that.label = (IPA.messages IPA.messages.facets IPA.messages.facets.details) || spec.label;
+that.label = spec.label || IPA.messages IPA.messages.facets IPA.messages.facets.details;
that.facet_group = spec.facet_group || 'settings';
that.sections = $.ordered_map();
@@ -334,18 +334,7 @@ IPA.details_facet = function(spec) {
return pkey;
};
-that.create_header = function(container) {
-
-that.facet_create_header(container);
-
-that.pkey = $.bbq.getState(that.entity_name+'-pkey');
-var label = IPA.metadata.objects[that.entity_name].label;
-
-var title = that.title;
-title = title.replace('${entity}', label);
-title = title.replace('${primary_key}', that.pkey);
-
-that.set_title(container, title);
+that.create_controls = function() {
that.reset_button = IPA.action_button({
label: IPA.messages.buttons.reset,
@@ -366,11 +355,27 @@ IPA.details_facet = function(spec) {
return false;
}
}).appendTo(that.controls);
+};
-that.expand_button = $('a/', {
+that.create_header = function(container) {
+
+that.facet_create_header(container);
+
+that.pkey = $.bbq.getState(that.entity_name+'-pkey');
+var label = IPA.metadata.objects[that.entity_name].label;
+
+var title = that.title;