1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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;
});
|