mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-09 14:41:46 +00:00
node: repo: avoid using IDs on elements, as that breaks easily on clusters
Anything where more instances can exist, even if only for a very
short time, must NOT use `id` as that needs to be unique in all
current instances of components/elements of the whole gui.
Here it broke most of the gui when switching between node, as the new
nodes repo gui was instantiated before the old ones was completely
destroyed, so there where (at least) two elements with the same id ->
💥 boom.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
99829a9e78
commit
faacb77fb4
@ -159,7 +159,7 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
||||
},
|
||||
{
|
||||
text: gettext('Add'),
|
||||
id: 'addButton',
|
||||
name: 'addRepo',
|
||||
disabled: true,
|
||||
repoInfo: undefined,
|
||||
handler: function(button, event, record) {
|
||||
@ -192,7 +192,7 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
||||
text: gettext('Enable'),
|
||||
defaultText: gettext('Enable'),
|
||||
altText: gettext('Disable'),
|
||||
id: 'repoEnableButton',
|
||||
name: 'repoEnable',
|
||||
disabled: true,
|
||||
bind: {
|
||||
text: '{enableButtonText}',
|
||||
@ -602,9 +602,9 @@ Ext.define('Proxmox.node.APTRepositories', {
|
||||
let me = this;
|
||||
let vm = me.getViewModel();
|
||||
|
||||
let addButton = me.down('#addButton');
|
||||
addButton.repoInfo = [];
|
||||
let addButton = me.down('button[name=addRepo]');
|
||||
|
||||
addButton.repoInfo = [];
|
||||
for (const standardRepo of standardRepos) {
|
||||
const handle = standardRepo.handle;
|
||||
const status = standardRepo.status;
|
||||
|
Loading…
Reference in New Issue
Block a user