Skip to content

Commit 1a7dbdc

Browse files
author
Jessica Wang
committed
cloudstack UI - advanced search on project page - add domain dropdown, account text field.
1 parent c0c0ae1 commit 1a7dbdc

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

ui/scripts/projects.js

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,46 @@
646646
}
647647
});
648648
}
649-
},
649+
},
650+
domainid: {
651+
label: 'Domain',
652+
select: function(args) {
653+
$.ajax({
654+
url: createURL('listDomains'),
655+
data: {
656+
listAll: true,
657+
details: 'min'
658+
},
659+
success: function(json) {
660+
var array1 = [{id: '', description: ''}];
661+
var domains = json.listdomainsresponse.domain;
662+
if(domains != null && domains.length > 0) {
663+
for(var i = 0; i < domains.length; i++) {
664+
array1.push({id: domains[i].id, description: domains[i].path});
665+
}
666+
}
667+
args.response.success({
668+
data: array1
669+
});
670+
}
671+
});
672+
},
673+
isHidden: function(args) {
674+
if(isAdmin() || isDomainAdmin())
675+
return false;
676+
else
677+
return true;
678+
}
679+
},
680+
account: {
681+
label: 'Account',
682+
isHidden: function(args) {
683+
if(isAdmin() || isDomainAdmin())
684+
return false;
685+
else
686+
return true;
687+
}
688+
},
650689
tagKey: { label: 'Tag Key' },
651690
tagValue: { label: 'Tag Value' }
652691
},

0 commit comments

Comments
 (0)