bug 14411: Add 'None' option for no host OS preference

This commit is contained in:
Brian Federle 2012-04-05 11:53:42 -07:00
parent 0eb036aba3
commit efb02c8687
1 changed files with 4 additions and 4 deletions

View File

@ -5536,10 +5536,8 @@
var array1 = [];
array1.push("&hosttags=" + todb(args.data.hosttags));
if (args.data.oscategoryid != null)
if (args.data.oscategoryid != null && args.data.oscategoryid != 'None')
array1.push("&osCategoryId=" + args.data.oscategoryid);
else //OS is none
array1.push("&osCategoryId=0");
$.ajax({
url: createURL("updateHost&id=" + args.context.hosts[0].id + array1.join("")),
@ -5740,7 +5738,9 @@
async: true,
success: function(json) {
var oscategoryObjs = json.listoscategoriesresponse.oscategory;
var items = [];
var items = [
{ id: null, description: _l('label.none') }
];
$(oscategoryObjs).each(function() {
items.push({id: this.id, description: this.name});
});