Skip to content

Commit

Permalink
Merge pull request #4321 from AlanRoth/PAYARA-4219-2
Browse files Browse the repository at this point in the history
PAYARA-4219 Problem when trying to override System Properties of an instance
  • Loading branch information
AlanRoth committed Nov 20, 2019
2 parents b658393 + 495d2fc commit 11830c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009-2013 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009-2019 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
Expand Down Expand Up @@ -885,7 +885,7 @@ public static RestResponse post(String address, Object payload, String contentTy
}
Response cr = target.request(RESPONSE_TYPE).header("Content-Type", contentType)
.cookie(new Cookie(REST_TOKEN_COOKIE, getRestToken()))
// .header("Content-type", MediaType.APPLICATION_FORM_URLENCODED)
// .header("Content-type", MediaType.APPLICATION_FORM_URLENCODED)
.post(Entity.entity(payload, contentType), Response.class);
RestResponse rr = RestResponse.getRestResponse(cr);
return rr;
Expand Down
Expand Up @@ -2,7 +2,7 @@

DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010-2019 Oracle and/or its affiliates. All rights reserved.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
Expand Down Expand Up @@ -56,8 +56,8 @@
setPageSessionAttribute(key="selfPage", value="#{request.contextPath}/common/configuration/sysInstanceValues.jsf?configName=#{pageSession.configName}");
setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}");
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/system-properties");
gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/system-property/#{pageSession.propName}", method="get",
result="#{requestScope.result}");
gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/system-property/#{pageSession.propName}",
method="get", result="#{requestScope.result}");
setPageSessionAttribute(key="defaultValue", value="#{requestScope.result.data.extraProperties.entity.value}");

// Get instance to cluster mapping
Expand Down Expand Up @@ -107,9 +107,9 @@
<!command
foreach (var="row" list="#{pageSession.tableList}") {
createMap(result="#{requestScope.attrs}");
mapPut(map="#{requestScope.attrs}", key="value", value="#{row.overrideValue}");
gf.restRequest(endpoint="#{sessionScope.REST_URL}/servers/server/#{row.instance}/system-properties/#{pageSession.propName}", method="POST",
data="#{requestScope.attrs}", contentType="application/x-www-form-urlencoded", result="#{requestScope.restResponse}");
mapPut(map="#{requestScope.attrs}", key="#{pageSession.propName}", value="#{row.overrideValue}");
gf.restRequest(endpoint="#{sessionScope.REST_URL}/servers/server/#{row.instance}/system-properties", method="POST",
attrs="#{requestScope.attrs}", contentType="application/x-www-form-urlencoded", result="#{requestScope.restResponse}");
}
prepareSuccessfulMsg();
//gf.redirect(page="#{pageSession.parentPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
Expand Down
Expand Up @@ -256,7 +256,7 @@ protected String convertPropertyMapToString(Map<String, String> data) {

return options.toString();
}

protected Response saveProperties(Map<String, String> data) {
return saveProperties(null, data);
}
Expand Down

0 comments on commit 11830c3

Please sign in to comment.