]>
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
: 'proxmoxWindowEdit',
69 subdir
: 'receiver_regex',
70 subject
: gettext("Regular Expression"),
78 fieldLabel
: gettext("Regular Expression")
83 xtype
: 'proxmoxWindowEdit',
85 subject
: gettext("Email"),
91 fieldLabel
: gettext("Email")
96 xtype
: 'proxmoxWindowEdit',
98 subject
: gettext("Email"),
105 fieldLabel
: gettext("Email")
110 xtype
: 'proxmoxWindowEdit',
112 subject
: gettext("Domain"),
118 fieldLabel
: gettext("Domain")
123 xtype
: 'proxmoxWindowEdit',
124 subdir
: 'receiver_domain',
125 subject
: gettext("Domain"),
132 fieldLabel
: gettext("Domain")
137 xtype
: 'proxmoxWindowEdit',
139 subject
: gettext("IP Address"),
145 fieldLabel
: gettext("IP Address")
150 xtype
: 'proxmoxWindowEdit',
152 subject
: gettext("IP Network"),
158 fieldLabel
: gettext("IP Network")
163 xtype
: 'proxmoxWindowEdit',
165 subject
: gettext("TimeFrame"),
171 fieldLabel
: gettext("Start Time")
177 fieldLabel
: gettext("End Time")
182 xtype
: 'proxmoxWindowEdit',
184 subject
: gettext('BCC'),
191 fieldLabel
: gettext('Name')
194 xtype
: 'textareafield',
196 fieldLabel
: gettext("Description")
202 fieldLabel
: gettext("Target")
205 xtype
: 'proxmoxcheckbox',
208 fieldLabel
: gettext("send orig. Mail")
215 openVNCViewer: function(consoletype
, nodename
) {
216 var url
= Ext
.urlEncode({
217 console
: consoletype
, // upgrade or shell
221 var nw
= window
.open("?" + url
, '_blank',
222 "innerWidth=745,innerheight=427");
226 constructor: function() {
229 // do whatever you want here