mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-06-27 10:24:07 +00:00
apt repos: move Official to the right & use checkbox to render enabled
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3fc020f417
commit
03c4c65bab
@ -123,27 +123,12 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
|||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
header: gettext('Official'),
|
xtype: 'checkcolumn',
|
||||||
dataIndex: 'OfficialHost',
|
|
||||||
renderer: function(value, cell, record) {
|
|
||||||
let icon = (cls) => `<i class="fa fa-fw ${cls}"></i>`;
|
|
||||||
|
|
||||||
const enabled = record.data.Enabled;
|
|
||||||
|
|
||||||
if (value === undefined || value === null) {
|
|
||||||
return icon('fa-question-circle-o');
|
|
||||||
}
|
|
||||||
if (!value) {
|
|
||||||
return icon('fa-times ' + (enabled ? 'critical' : 'faded'));
|
|
||||||
}
|
|
||||||
return icon('fa-check ' + (enabled ? 'good' : 'faded'));
|
|
||||||
},
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: gettext('Enabled'),
|
header: gettext('Enabled'),
|
||||||
dataIndex: 'Enabled',
|
dataIndex: 'Enabled',
|
||||||
renderer: Proxmox.Utils.format_enabled_toggle,
|
listeners: {
|
||||||
|
beforecheckchange: () => false, // veto, we don't want to allow inline change - to subtle
|
||||||
|
},
|
||||||
width: 90,
|
width: 90,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -205,6 +190,23 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
|||||||
},
|
},
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
header: gettext('Official'),
|
||||||
|
dataIndex: 'OfficialHost',
|
||||||
|
renderer: function(value, cell, record) {
|
||||||
|
let icon = (cls) => `<i class="fa fa-fw ${cls}"></i>`;
|
||||||
|
|
||||||
|
if (value === undefined || value === null) {
|
||||||
|
return icon('fa-question-circle-o');
|
||||||
|
}
|
||||||
|
const enabled = record.data.Enabled;
|
||||||
|
if (!value) {
|
||||||
|
return icon('fa-question ' + (enabled ? 'warning' : 'faded'));
|
||||||
|
}
|
||||||
|
return icon('fa-check ' + (enabled ? 'good' : 'faded'));
|
||||||
|
},
|
||||||
|
width: 70,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
dataIndex: 'Comment',
|
dataIndex: 'Comment',
|
||||||
|
Loading…
Reference in New Issue
Block a user