ui: Fixes #2666 conditional template filter (#2669)

This fixes issue of warning when deploying vm as non-root admin user account.
This commit is contained in:
dahn 2018-05-24 09:29:57 +02:00 committed by Rohit Yadav
parent 7a3a882d12
commit 2fad5bea31

View File

@ -377,6 +377,10 @@
// Step 4: Data disk offering
function(args) {
var isRequired = (args.currentData["select-template"] == "select-iso" ? true : false);
var templateFilter = 'executable'
if (isAdmin()) {
templateFilter = 'all'
}
$.ajax({
url: createURL("listDiskOfferings"),
dataType: "json",
@ -389,7 +393,7 @@
url: createURL("listTemplates"),
data: {
id: args.currentData.templateid,
templatefilter: 'all'
templatefilter: templateFilter
},
dataType: "json",
async: false,