summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/plugins/certprofile.js
blob: 8f777e891734e237a67826501a13144d5350e5c8 (plain)
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
//
// 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;
});