mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-06-03 03:37:21 +00:00
improving oclass formatter
this adds from/to to the oclass text object adds a new oclass_icon object and a new format_oclass function, which combines the icon with the text this will be used in the new ruleinfo sidebar Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
f1ab2a1476
commit
076d6a72ad
19
js/Utils.js
19
js/Utils.js
@ -15,7 +15,24 @@ Ext.define('PMG.Utils', {
|
||||
who: gettext('Who Objects'),
|
||||
what: gettext('What Objects'),
|
||||
when: gettext('When Objects'),
|
||||
action: gettext('Action Objects')
|
||||
action: gettext('Action Objects'),
|
||||
from: gettext('From'),
|
||||
to: gettext('To')
|
||||
},
|
||||
|
||||
oclass_icon: {
|
||||
who: '<span class="fa fa-fw fa-user-circle"></span> ',
|
||||
what: '<span class="fa fa-fw fa-cube"></span> ',
|
||||
when: '<span class="fa fa-fw fa-clock-o"></span> ',
|
||||
action: '<span class="fa fa-fw fa-flag"></span> ',
|
||||
from: '<span class="fa fa-fw fa-user-circle"></span> ',
|
||||
to: '<span class="fa fa-fw fa-user-circle"></span> ',
|
||||
},
|
||||
|
||||
format_oclass: function(oclass) {
|
||||
var icon = PMG.Utils.oclass_icon[oclass] || '';
|
||||
var text = PMG.Utils.oclass_text[oclass] || oclass;
|
||||
return icon + text;
|
||||
},
|
||||
|
||||
rule_direction_text: {
|
||||
|
Loading…
Reference in New Issue
Block a user