]>
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'),
15 who
: gettext('Who Objects'),
16 what
: gettext('What Objects'),
17 when
: gettext('When Objects'),
18 action
: gettext('Action Objects')
21 rule_direction_text
: {
24 2: gettext('In & Out')
27 format_rule_direction: function(dir
) {
28 return PMG
.Utils
.rule_direction_text
[dir
] || dir
;
31 format_otype: function(otype
) {
32 var editor
= PMG
.Utils
.object_editors
[otype
];
34 return editor
.subject
;
39 format_ldap_protocol: function(p
) {
40 if (p
=== undefined) return 'LDAP';
41 if (p
=== 'ldap') return 'LDAP';
42 if (p
=== 'ldaps') return 'LDAPS';
48 xtype
: 'proxmoxWindowEdit',
50 subject
: gettext("Regular Expression"),
57 fieldLabel
: gettext("Regular Expression")
62 xtype
: 'pmgLDAPGroupEditor',
64 subject
: gettext("LDAP Group")
67 xtype
: 'pmgLDAPUserEditor',
69 subject
: gettext("LDAP User")
72 xtype
: 'proxmoxWindowEdit',
73 subdir
: 'receiver_regex',
74 subject
: gettext("Regular Expression"),
82 fieldLabel
: gettext("Regular Expression")
87 xtype
: 'proxmoxWindowEdit',
89 subject
: gettext("Email"),
95 fieldLabel
: gettext("Email")
100 xtype
: 'proxmoxWindowEdit',
102 subject
: gettext("Email"),
109 fieldLabel
: gettext("Email")
114 xtype
: 'proxmoxWindowEdit',
116 subject
: gettext("Domain"),
122 fieldLabel
: gettext("Domain")
127 xtype
: 'proxmoxWindowEdit',
128 subdir
: 'receiver_domain',
129 subject
: gettext("Domain"),
136 fieldLabel
: gettext("Domain")
141 xtype
: 'proxmoxWindowEdit',
143 subject
: gettext("IP Address"),
149 fieldLabel
: gettext("IP Address")
154 xtype
: 'proxmoxWindowEdit',
156 subject
: gettext("IP Network"),
162 fieldLabel
: gettext("IP Network")
167 xtype
: 'proxmoxWindowEdit',
169 subject
: gettext("TimeFrame"),
175 fieldLabel
: gettext("Start Time")
181 fieldLabel
: gettext("End Time")
186 xtype
: 'proxmoxWindowEdit',
188 subject
: gettext('BCC'),
195 fieldLabel
: gettext('Name')
198 xtype
: 'textareafield',
200 fieldLabel
: gettext("Description")
206 fieldLabel
: gettext("Target")
209 xtype
: 'proxmoxcheckbox',
212 fieldLabel
: gettext("send orig. Mail")
219 openVNCViewer: function(consoletype
, nodename
) {
220 var url
= Ext
.urlEncode({
221 console
: consoletype
, // upgrade or shell
225 var nw
= window
.open("?" + url
, '_blank',
226 "innerWidth=745,innerheight=427");
230 constructor: function() {
233 // do whatever you want here