mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
feature #3748: Do not add panel if the creation fails
This commit is contained in:
1 parent
8e02b33af6
commit
a0739b7bc0
1 file changed
+13
-10
@@ -542,16 +542,19 @@ define(function(require) {
|
||||
active = true;
|
||||
}
|
||||
|
||||
var panelInstance = new Panel(info);
|
||||
|
||||
panelInstances.push(panelInstance);
|
||||
templatePanelsParams.push({
|
||||
'panelName': panelName,
|
||||
'icon': panelInstance.icon,
|
||||
'title': panelInstance.title,
|
||||
'html': panelInstance.html(),
|
||||
'active': active
|
||||
})
|
||||
try {
|
||||
var panelInstance = new Panel(info);
|
||||
panelInstances.push(panelInstance);
|
||||
templatePanelsParams.push({
|
||||
'panelName': panelName,
|
||||
'icon': panelInstance.icon,
|
||||
'title': panelInstance.title,
|
||||
'html': panelInstance.html(),
|
||||
'active': active
|
||||
})
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
active = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user