mirror of https://github.com/apache/cloudstack.git
config: add isdynamic flag in configuration response (#3729)
This commit is contained in:
parent
3ac03c8858
commit
2712decf50
|
|
@ -187,6 +187,7 @@ public class ApiConstants {
|
|||
public static final String IP_LIMIT = "iplimit";
|
||||
public static final String IP_TOTAL = "iptotal";
|
||||
public static final String IS_CLEANUP_REQUIRED = "iscleanuprequired";
|
||||
public static final String IS_DYNAMIC = "isdynamic";
|
||||
public static final String IS_EXTRACTABLE = "isextractable";
|
||||
public static final String IS_FEATURED = "isfeatured";
|
||||
public static final String IS_PORTABLE = "isportable";
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ public class ConfigurationResponse extends BaseResponse {
|
|||
@Param(description = "the description of the configuration")
|
||||
private String description;
|
||||
|
||||
@SerializedName(ApiConstants.IS_DYNAMIC)
|
||||
@Param(description = "true if the configuration is dynamic")
|
||||
private boolean isDynamic;
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
|
@ -87,4 +91,13 @@ public class ConfigurationResponse extends BaseResponse {
|
|||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
public boolean isDynamic() {
|
||||
return isDynamic;
|
||||
}
|
||||
|
||||
public void setIsDynamic(boolean isDynamic) {
|
||||
this.isDynamic = isDynamic;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -491,6 +491,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
} else {
|
||||
cfgResponse.setValue(cfg.getValue());
|
||||
}
|
||||
cfgResponse.setIsDynamic(cfg.isDynamic());
|
||||
cfgResponse.setObjectName("configuration");
|
||||
|
||||
return cfgResponse;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@
|
|||
data: data,
|
||||
success: function(json) {
|
||||
var item = json.updateconfigurationresponse.configuration;
|
||||
if (item.category == "Usage")
|
||||
if (item.category == "Usage" && item.isdynamic == false)
|
||||
cloudStack.dialog.notice({
|
||||
message: _l('message.restart.mgmt.usage.server')
|
||||
});
|
||||
else
|
||||
else if (item.isdynamic == false)
|
||||
cloudStack.dialog.notice({
|
||||
message: _l('message.restart.mgmt.server')
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue