]>
git.proxmox.com Git - pmg-gui.git/blob - js/Utils.js
3 console
.log("Starting PMG Manager");
6 Ext
.define('PMG.Utils', {
9 // this singleton contains miscellaneous utilities
11 senderText
: gettext('Sender'),
12 receiverText
: gettext('Receiver'),
13 anyProfileText
: gettext('Any Profile'),
16 who
: gettext('Who Objects'),
17 what
: gettext('What Objects'),
18 when
: gettext('When Objects'),
19 action
: gettext('Action Objects')
22 rule_direction_text
: {
25 2: gettext('In & Out')
28 format_rule_direction: function(dir
) {
29 return PMG
.Utils
.rule_direction_text
[dir
] || dir
;
32 format_otype: function(otype
) {
33 var editor
= PMG
.Utils
.object_editors
[otype
];
35 return editor
.subject
;
40 format_ldap_protocol: function(p
) {
41 if (p
=== undefined) return 'LDAP';
42 if (p
=== 'ldap') return 'LDAP';
43 if (p
=== 'ldaps') return 'LDAPS';
49 xtype
: 'proxmoxWindowEdit',
51 subject
: gettext("Regular Expression"),
58 fieldLabel
: gettext("Regular Expression")
63 xtype
: 'pmgLDAPGroupEditor',
65 subject
: gettext("LDAP Group")
68 xtype
: 'pmgLDAPUserEditor',
70 subject
: gettext("LDAP User")
73 xtype
: 'proxmoxWindowEdit',
74 subdir
: 'receiver_regex',
75 subject
: gettext("Regular Expression"),
83 fieldLabel
: gettext("Regular Expression")
88 xtype
: 'proxmoxWindowEdit',
90 subject
: gettext("Email"),
96 fieldLabel
: gettext("Email")
101 xtype
: 'proxmoxWindowEdit',
103 subject
: gettext("Email"),
110 fieldLabel
: gettext("Email")
115 xtype
: 'proxmoxWindowEdit',
117 subject
: gettext("Domain"),
123 fieldLabel
: gettext("Domain")
128 xtype
: 'proxmoxWindowEdit',
129 subdir
: 'receiver_domain',
130 subject
: gettext("Domain"),
137 fieldLabel
: gettext("Domain")
142 xtype
: 'proxmoxWindowEdit',
144 subject
: gettext("IP Address"),
150 fieldLabel
: gettext("IP Address")
155 xtype
: 'proxmoxWindowEdit',
157 subject
: gettext("IP Network"),
163 fieldLabel
: gettext("IP Network")
168 xtype
: 'proxmoxWindowEdit',
170 subject
: gettext("TimeFrame"),
176 fieldLabel
: gettext("Start Time")
182 fieldLabel
: gettext("End Time")
187 xtype
: 'proxmoxWindowEdit',
189 subject
: gettext('BCC'),
196 fieldLabel
: gettext('Name')
199 xtype
: 'textareafield',
201 fieldLabel
: gettext("Description")
207 fieldLabel
: gettext("Target")
210 xtype
: 'proxmoxcheckbox',
213 fieldLabel
: gettext("send orig. Mail")
220 openVNCViewer: function(consoletype
, nodename
) {
221 var url
= Ext
.urlEncode({
222 console
: consoletype
, // upgrade or shell
226 var nw
= window
.open("?" + url
, '_blank',
227 "innerWidth=745,innerheight=427");
231 constructor: function() {
234 // do whatever you want here