mirror of
https://github.com/unraid/webgui.git
synced 2026-01-23 09:59:59 -06:00
Remove View/Edit XML context menu item
This commit is contained in:
@@ -70,9 +70,8 @@ function addVMContext(name, uuid, template, state, vncurl, log){
|
||||
if (log !== "") {
|
||||
opts.push({text:"Logs", icon:"fa-navicon", action:function(e){e.preventDefault(); openWindow('/webGui/scripts/tail_log&arg1='+log, 'Log for:'+name, 600, 900);}});
|
||||
}
|
||||
opts.push({text:"Edit", icon:"fa-pencil", href:path+'/UpdateVM?uuid='+uuid});
|
||||
if (state == "shutoff") {
|
||||
opts.push({text:"Edit", icon:"fa-pencil", href:path+'/UpdateVM?uuid='+uuid});
|
||||
opts.push({text:"Edit XML", icon:"fa-code", href:path+'/UpdateVM?template=Custom&uuid='+uuid});
|
||||
opts.push({divider:true});
|
||||
opts.push({text:"Remove VM", icon:"fa-minus", action:function(e) {
|
||||
e.preventDefault();
|
||||
@@ -84,9 +83,6 @@ function addVMContext(name, uuid, template, state, vncurl, log){
|
||||
swal({title:"Are you sure?",text:"Completely REMOVE "+name+" disk image and definition",type:"warning",showCancelButton:true},function(){ajaxVMDispatch({action:"domain-delete",uuid:uuid});});
|
||||
}});
|
||||
}
|
||||
} else {
|
||||
opts.push({text:"Edit", icon:"fa-pencil", href:path+'/UpdateVM?uuid='+uuid});
|
||||
opts.push({text:"View XML", icon:"fa-code", href:path+'/UpdateVM?template=Custom&uuid='+uuid});
|
||||
}
|
||||
context.attach('#vm-'+uuid, opts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user