summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2015-07-02 17:55:12 +0200
committerTomas Babej <tbabej@redhat.com>2015-07-08 17:12:29 +0200
commita3727387ee924305c060f8793c0dc1ef7669736d (patch)
tree682a36d193087d6119e6965a6476b034e1a95a90 /install
parente51bb1bc668bf3008c8cca1dcbb0ebda7fa5c703 (diff)
downloadfreeipa-a3727387ee924305c060f8793c0dc1ef7669736d.tar.gz
freeipa-a3727387ee924305c060f8793c0dc1ef7669736d.tar.xz
freeipa-a3727387ee924305c060f8793c0dc1ef7669736d.zip
webui: certificate profiles
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'install')
-rw-r--r--install/ui/doc/categories.json1
-rw-r--r--install/ui/src/freeipa/app.js1
-rwxr-xr-xinstall/ui/src/freeipa/certificate.js14
-rw-r--r--install/ui/src/freeipa/navigation/menu_spec.js18
-rw-r--r--install/ui/src/freeipa/plugins/certprofile.js84
5 files changed, 117 insertions, 1 deletions
diff --git a/install/ui/doc/categories.json b/install/ui/doc/categories.json
index 3a7c2ebc2..34ca7e839 100644
--- a/install/ui/doc/categories.json
+++ b/install/ui/doc/categories.json
@@ -256,6 +256,7 @@
"topology",
"user",
"plugins.api_browser",
+ "plugins.certprofile",
"plugins.load",
"plugins.login",
"plugins.login_process",
diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index 92613b4a4..6efb6b0c0 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -29,6 +29,7 @@ define([
'./aci',
'./automember',
'./automount',
+ './plugins/certprofile',
'./dns',
'./group',
'./hbac',
diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js
index 182ec7e66..b2d740dcb 100755
--- a/install/ui/src/freeipa/certificate.js
+++ b/install/ui/src/freeipa/certificate.js
@@ -1019,6 +1019,15 @@ exp.create_cert_metadata = function() {
return entity;
};
+exp.facet_group = {
+ name: 'certificates',
+ label: '@i18n:tabs.cert',
+ facets: {
+ certificates: 'cert_search',
+ profiles: 'certprofile_search'
+ }
+};
+
var make_spec = function() {
return {
name: 'cert',
@@ -1051,6 +1060,11 @@ return {
{
$type: 'search',
$factory: IPA.cert.search_facet,
+ disable_facet_tabs: false,
+ tabs_in_sidebar: true,
+ tab_label: '@i18n:tabs.cert',
+ facet_groups: [exp.facet_group],
+ facet_group: 'certificates',
pagination: false,
no_update: true,
columns: [
diff --git a/install/ui/src/freeipa/navigation/menu_spec.js b/install/ui/src/freeipa/navigation/menu_spec.js
index 4265e9871..713f205de 100644
--- a/install/ui/src/freeipa/navigation/menu_spec.js
+++ b/install/ui/src/freeipa/navigation/menu_spec.js
@@ -123,7 +123,23 @@ var nav = {};
name: 'authentication',
label: '@i18n:tabs.authentication',
children: [
- { entity: 'cert', label: '@i18n:tabs.cert' },
+ {
+ entity: 'cert',
+ facet: 'search',
+ label: '@i18n:tabs.cert',
+ children: [
+ {
+ entity: 'certprofile',
+ facet: 'search',
+ hidden: true
+ },
+ {
+ entity: 'cert',
+ facet: 'search',
+ hidden: true
+ }
+ ]
+ },
{ entity: 'otptoken' },
{ entity: 'radiusproxy' }
]
diff --git a/install/ui/src/freeipa/plugins/certprofile.js b/install/ui/src/freeipa/plugins/certprofile.js
new file mode 100644
index 000000000..8f777e891
--- /dev/null
+++ b/install/ui/src/freeipa/plugins/certprofile.js
@@ -0,0 +1,84 @@
+//
+// Copyright (C) 2015 FreeIPA Contributors see COPYING for license
+//
+
+define([
+ '../ipa',
+ '../jquery',
+ '../phases',
+ '../reg',
+ '../certificate'
+],
+function(IPA, $, phases, reg, cert) {
+/**
+ * certprofile module
+ * @class plugins.certprofile
+ * @singleton
+ */
+var certprofile = IPA.certprofile = {
+};
+
+var make_certprofile_spec = function() {
+return {
+ name: 'certprofile',
+ facets: [
+ {
+ $type: 'search',
+ $pre_ops: [
+ { $del: [[ 'control_buttons', [{ name: 'add'}] ]] }
+ ],
+ disable_facet_tabs: false,
+ tabs_in_sidebar: true,
+ tab_label: '@mo:certprofile.label',
+ facet_groups: [cert.facet_group],
+ facet_group: 'certificates',
+ columns: [
+ 'cn',
+ 'description',
+ 'ipacertprofilestoreissued'
+ ]
+ },
+ {
+ $type: 'details',
+ disable_facet_tabs: true,
+ sections: [
+ {
+ name: 'details',
+ fields: [
+ 'cn',
+ {
+ $type: 'textarea',
+ name: 'description'
+ },
+ {
+ $type: 'checkbox',
+ name: 'ipacertprofilestoreissued'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+};};
+
+
+/**
+ * Certificate profile entity specification object
+ * @member plugins.certprofile
+ */
+certprofile.certprofile_spec = make_certprofile_spec();
+
+
+/**
+ * Register entity
+ * @member plugins.certprofile
+ */
+certprofile.register = function() {
+ var e = reg.entity;
+ e.register({type: 'certprofile', spec: certprofile.certprofile_spec});
+};
+
+phases.on('registration', certprofile.register);
+
+return certprofile;
+});