mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
GUI modifications related to host tags
This commit is contained in:
parent
8bc7ae695d
commit
aadb5f4ad5
@ -15173,9 +15173,39 @@
|
||||
//always appear (begin)
|
||||
hosttags: {
|
||||
label: 'label.host.tags',
|
||||
isTokenInput: true,
|
||||
docID: 'helpHostTags',
|
||||
validation: {
|
||||
required: false
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listHostTags"),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var item = json.listhosttagsresponse.hosttag;
|
||||
var tags = [];
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
tags = $.map(item, function(tag) {
|
||||
return {
|
||||
id: tag.name,
|
||||
name: tag.name
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
args.response.success({
|
||||
data: tags
|
||||
});
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//always appear (end)
|
||||
@ -15739,7 +15769,37 @@
|
||||
},
|
||||
hosttags: {
|
||||
label: 'label.host.tags',
|
||||
isEditable: true
|
||||
isEditable: true,
|
||||
isTokenInput: true,
|
||||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listHostTags"),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var item = json.listhosttagsresponse.hosttag;
|
||||
var tags = [];
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
tags = $.map(item, function(tag) {
|
||||
return {
|
||||
id: tag.name,
|
||||
name: tag.name
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
args.response.success({
|
||||
data: tags
|
||||
});
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
hahost: {
|
||||
label: 'label.ha.enabled',
|
||||
@ -16895,7 +16955,7 @@
|
||||
$.ajax({
|
||||
url: createURL("listStorageTags"),
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
success: function(json) {
|
||||
var item = json.liststoragetagsresponse.storagetag;
|
||||
var tags = [];
|
||||
|
||||
@ -16913,7 +16973,7 @@
|
||||
data: tags
|
||||
});
|
||||
},
|
||||
error: function (XMLHttpResponse) {
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
|
||||
args.response.error(errorMsg);
|
||||
@ -17272,7 +17332,7 @@
|
||||
data: tags
|
||||
});
|
||||
},
|
||||
error: function (XMLHttpResponse) {
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
|
||||
args.response.error(errorMsg);
|
||||
|
||||
@ -487,7 +487,7 @@
|
||||
{
|
||||
$token = $value;
|
||||
}
|
||||
else if ($input.attr('name') === "tags")
|
||||
else if (($input.attr('name') === "tags") || ($input.attr('name') === "hosttags"))
|
||||
{
|
||||
tags_value = $input.attr('value');
|
||||
}
|
||||
@ -570,7 +570,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
data['token-input-'] = data['tags'];
|
||||
$editButton.fadeOut('fast', function() {
|
||||
$editButton.remove();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user