mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-07-06 04:01:15 +00:00
add icons to the object types
and show them in the editwindow, the grid and the add menu Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
8ddd9c44f5
commit
ea4f2a7923
@ -164,6 +164,7 @@ Ext.define('PMG.ObjectGroup', {
|
|||||||
|
|
||||||
menu_items.push({
|
menu_items.push({
|
||||||
text: config.subject,
|
text: config.subject,
|
||||||
|
iconCls: config.iconCls || 'fa fa-question-circle',
|
||||||
handler: function() {
|
handler: function() {
|
||||||
if (me.baseurl == undefined) {
|
if (me.baseurl == undefined) {
|
||||||
return;
|
return;
|
||||||
|
24
js/Utils.js
24
js/Utils.js
@ -116,10 +116,13 @@ Ext.define('PMG.Utils', {
|
|||||||
|
|
||||||
format_otype: function(otype) {
|
format_otype: function(otype) {
|
||||||
var editor = PMG.Utils.object_editors[otype];
|
var editor = PMG.Utils.object_editors[otype];
|
||||||
|
var iconCls = 'fa fa-question-circle';
|
||||||
if (editor) {
|
if (editor) {
|
||||||
return editor.subject;
|
var icon = '<span class="fa-fw ' + (editor.iconCls || iconCls) + '"></span> ';
|
||||||
|
return icon + editor.subject;
|
||||||
}
|
}
|
||||||
return 'unknown';
|
|
||||||
|
return '<span class="fa-fw ' + iconCls + '"></span> unknown';
|
||||||
},
|
},
|
||||||
|
|
||||||
format_ldap_protocol: function(p) {
|
format_ldap_protocol: function(p) {
|
||||||
@ -135,6 +138,7 @@ Ext.define('PMG.Utils', {
|
|||||||
|
|
||||||
object_editors: {
|
object_editors: {
|
||||||
1000: {
|
1000: {
|
||||||
|
iconCls: 'fa fa-filter',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'regex',
|
subdir: 'regex',
|
||||||
subject: gettext("Regular Expression"),
|
subject: gettext("Regular Expression"),
|
||||||
@ -149,16 +153,19 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1005: {
|
1005: {
|
||||||
|
iconCls: 'fa fa-users',
|
||||||
xtype: 'pmgLDAPGroupEditor',
|
xtype: 'pmgLDAPGroupEditor',
|
||||||
subdir: 'ldap',
|
subdir: 'ldap',
|
||||||
subject: gettext("LDAP Group")
|
subject: gettext("LDAP Group")
|
||||||
},
|
},
|
||||||
1006: {
|
1006: {
|
||||||
|
iconCls: 'fa fa-user',
|
||||||
xtype: 'pmgLDAPUserEditor',
|
xtype: 'pmgLDAPUserEditor',
|
||||||
subdir: 'ldapuser',
|
subdir: 'ldapuser',
|
||||||
subject: gettext("LDAP User")
|
subject: gettext("LDAP User")
|
||||||
},
|
},
|
||||||
1009: {
|
1009: {
|
||||||
|
iconCls: 'fa fa-filter',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'receiver_regex',
|
subdir: 'receiver_regex',
|
||||||
subject: gettext("Regular Expression"),
|
subject: gettext("Regular Expression"),
|
||||||
@ -174,6 +181,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1001: {
|
1001: {
|
||||||
|
iconCls: 'fa fa-envelope-o',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'email',
|
subdir: 'email',
|
||||||
subject: gettext("Email"),
|
subject: gettext("Email"),
|
||||||
@ -187,6 +195,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1007: {
|
1007: {
|
||||||
|
iconCls: 'fa fa-envelope-o',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'receiver',
|
subdir: 'receiver',
|
||||||
subject: gettext("Email"),
|
subject: gettext("Email"),
|
||||||
@ -201,6 +210,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1002: {
|
1002: {
|
||||||
|
iconCls: 'fa fa-globe',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'domain',
|
subdir: 'domain',
|
||||||
subject: gettext("Domain"),
|
subject: gettext("Domain"),
|
||||||
@ -214,6 +224,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1008: {
|
1008: {
|
||||||
|
iconCls: 'fa fa-globe',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'receiver_domain',
|
subdir: 'receiver_domain',
|
||||||
subject: gettext("Domain"),
|
subject: gettext("Domain"),
|
||||||
@ -228,6 +239,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1003: {
|
1003: {
|
||||||
|
iconCls: 'fa fa-globe',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'ip',
|
subdir: 'ip',
|
||||||
subject: gettext("IP Address"),
|
subject: gettext("IP Address"),
|
||||||
@ -241,6 +253,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
1004: {
|
1004: {
|
||||||
|
iconCls: 'fa fa-globe',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'network',
|
subdir: 'network',
|
||||||
subject: gettext("IP Network"),
|
subject: gettext("IP Network"),
|
||||||
@ -254,6 +267,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
2000: {
|
2000: {
|
||||||
|
iconCls: 'fa fa-clock-o',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'timeframe',
|
subdir: 'timeframe',
|
||||||
subject: gettext("TimeFrame"),
|
subject: gettext("TimeFrame"),
|
||||||
@ -273,6 +287,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
3000: {
|
3000: {
|
||||||
|
iconCls: 'fa fa-bullhorn',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'spamfilter',
|
subdir: 'spamfilter',
|
||||||
subject: gettext('Spam Filter'),
|
subject: gettext('Spam Filter'),
|
||||||
@ -287,6 +302,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
3001: {
|
3001: {
|
||||||
|
iconCls: 'fa fa-bug',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'virusfilter',
|
subdir: 'virusfilter',
|
||||||
subject: gettext('Virus Filter'),
|
subject: gettext('Virus Filter'),
|
||||||
@ -299,6 +315,7 @@ Ext.define('PMG.Utils', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
3002: {
|
3002: {
|
||||||
|
iconCls: 'fa fa-code',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'matchfield',
|
subdir: 'matchfield',
|
||||||
subject: gettext('Match Field'),
|
subject: gettext('Match Field'),
|
||||||
@ -328,6 +345,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
3003: {
|
3003: {
|
||||||
|
iconCls: 'fa fa-file-image-o',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'contenttype',
|
subdir: 'contenttype',
|
||||||
width: 400,
|
width: 400,
|
||||||
@ -368,6 +386,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
3004: {
|
3004: {
|
||||||
|
iconCls: 'fa fa-file-o',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'filenamefilter',
|
subdir: 'filenamefilter',
|
||||||
width: 400,
|
width: 400,
|
||||||
@ -391,6 +410,7 @@ Ext.define('PMG.Utils', {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
3005: {
|
3005: {
|
||||||
|
iconCls: 'fa fa-file-archive-o',
|
||||||
xtype: 'proxmoxWindowEdit',
|
xtype: 'proxmoxWindowEdit',
|
||||||
subdir: 'archivefilter',
|
subdir: 'archivefilter',
|
||||||
width: 400,
|
width: 400,
|
||||||
|
Loading…
Reference in New Issue
Block a user