mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-17 11:04:00 +01:00
Handle case where no storage tags exist yet
This commit is contained in:
parent
6115a90c70
commit
a698daafff
@ -16897,18 +16897,25 @@
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
var item = json.liststoragetagsresponse.storagetag;
|
var item = json.liststoragetagsresponse.storagetag;
|
||||||
var tags = $.map(item, function (tag) {
|
var tags = [];
|
||||||
return {
|
|
||||||
id: tag.name,
|
if (item != null)
|
||||||
name: tag.name
|
{
|
||||||
};
|
tags = $.map(item, function (tag) {
|
||||||
});
|
return {
|
||||||
|
id: tag.name,
|
||||||
|
name: tag.name
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
args.response.success({
|
args.response.success({
|
||||||
data: tags
|
data: tags
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error: function (XMLHttpResponse) {
|
error: function (XMLHttpResponse) {
|
||||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||||
|
|
||||||
args.response.error(errorMsg);
|
args.response.error(errorMsg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user