summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-06-10 16:12:45 +0200
committerMartin Basti <mbasti@redhat.com>2016-06-15 09:59:50 +0200
commit6e78169e3bc71c5ff3824e91cce8a0d6d9580d7a (patch)
tree8d024d47bfb2d0f65bf8146874050238f3da6697 /install
parentf0915e61986f545ad9b282fa90a4b1d0538829c5 (diff)
downloadfreeipa-6e78169e3bc71c5ff3824e91cce8a0d6d9580d7a.tar.gz
freeipa-6e78169e3bc71c5ff3824e91cce8a0d6d9580d7a.tar.xz
freeipa-6e78169e3bc71c5ff3824e91cce8a0d6d9580d7a.zip
Add new webui plugin - ca
Whole new entity for CAs. https://fedorahosted.org/freeipa/ticket/5939 Reviewed-By: Fraser Tweedale <ftweedal@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'install')
-rw-r--r--install/ui/src/freeipa/app.js1
-rw-r--r--install/ui/src/freeipa/navigation/menu_spec.js5
-rw-r--r--install/ui/src/freeipa/plugins/ca.js91
3 files changed, 97 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index daf17b7ba..4eb045d7a 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -29,6 +29,7 @@ define([
'./aci',
'./automember',
'./automount',
+ './plugins/ca',
'./plugins/caacl',
'./plugins/certprofile',
'./dns',
diff --git a/install/ui/src/freeipa/navigation/menu_spec.js b/install/ui/src/freeipa/navigation/menu_spec.js
index 442e7c771..2e47761ce 100644
--- a/install/ui/src/freeipa/navigation/menu_spec.js
+++ b/install/ui/src/freeipa/navigation/menu_spec.js
@@ -142,6 +142,11 @@ var nav = {};
entity: 'caacl',
facet: 'search',
hidden: true
+ },
+ {
+ entity: 'ca',
+ facet: 'search',
+ hidden: true
}
]
},
diff --git a/install/ui/src/freeipa/plugins/ca.js b/install/ui/src/freeipa/plugins/ca.js
new file mode 100644
index 000000000..8e2fb702f
--- /dev/null
+++ b/install/ui/src/freeipa/plugins/ca.js
@@ -0,0 +1,91 @@
+//
+// Copyright (C) 2016 FreeIPA Contributors see COPYING for license
+//
+
+define([
+ '../ipa',
+ '../jquery',
+ '../phases',
+ '../reg',
+ '../certificate'
+],
+function(IPA, $, phases, reg, cert) {
+
+/**
+ * ca module
+ * @class plugins.ca
+ * @singleton
+ */
+ var ca = IPA.ca = {};
+
+ var make_ca_spec = function() {
+ var spec = {
+ name: 'ca',
+ facets: [
+ {
+ $type: 'search',
+ disable_facet_tabs: false,
+ tabs_in_sidebar: true,
+ tab_label: '@mo:ca.label',
+ facet_groups: [cert.facet_group],
+ facet_group: 'certificates',
+ columns: [
+ 'cn',
+ 'ipacasubjectdn',
+ 'description'
+ ]
+ },
+ {
+ $type: 'details',
+ disable_facet_tabs: true,
+ fields: [
+ 'cn',
+ {
+ $type: 'textarea',
+ name: 'description'
+ },
+ 'ipacaid',
+ 'ipacaissuerdn',
+ 'ipacasubjectdn'
+ ]
+ }
+ ],
+ adder_dialog: {
+ fields: [
+ {
+ $type: 'text',
+ name: 'cn',
+ required: true
+ },
+ 'ipacasubjectdn',
+ {
+ $type: 'textarea',
+ name: 'description'
+ }
+ ]
+ }
+ };
+
+ return spec;
+ };
+
+ /**
+ * CA entity specification object
+ * @member plugins.ca
+ */
+ca.ca_spec = make_ca_spec();
+
+/**
+ * Register entity
+ * @member plugins.ca
+ */
+ca.register = function() {
+ var e = reg.entity;
+
+ e.register({type: 'ca', spec: ca.ca_spec});
+};
+
+phases.on('registration', ca.register);
+
+return ca;
+});