Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename variable MANAGEMENT_API_URL to API_URL #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Common to all modules:

**Required:**

* `MANAGEMENT_API_URL`: URL to the REST API application, example: `https://my-gravitee-rest-api.osc-fr1.scalingo.io`
* `API_URL`: URL to the REST API application, example: `https://my-gravitee-rest-api.osc-fr1.scalingo.io` (old name: `MANAGEMENT_API_URL`)

**Optional:**

Expand All @@ -116,7 +116,7 @@ Common to all modules:

**Required:**

* `MANAGEMENT_API_URL`: URL to the REST API application, example: `https://my-gravitee-rest-api.osc-fr1.scalingo.io`
* `API_URL`: URL to the REST API application, example: `https://my-gravitee-rest-api.osc-fr1.scalingo.io` (old name: `MANAGEMENT_API_URL`)

**Optional:**

Expand Down
2 changes: 1 addition & 1 deletion gravitee/graviteeio-management-ui/config/constants.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"baseURL": "MANAGEMENT_API_URL/management/organizations/DEFAULT/environments/DEFAULT"
"baseURL": "API_URL/management/organizations/DEFAULT/environments/DEFAULT"
}
2 changes: 1 addition & 1 deletion gravitee/graviteeio-management-ui/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ GRAVITEE_MODULE=graviteeio-management-ui
# folder name (used by buildpack to determine the module to install)
PROJECT_DIR=graviteeio-management-ui
# API url
MANAGEMENT_API_URL=
API_URL=
4 changes: 3 additions & 1 deletion gravitee/graviteeio-management-ui/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ CONFIG_DIR=${HOME}/config

CONSTANTS_FILE=constants.json

sed "s#MANAGEMENT_API_URL#${MANAGEMENT_API_URL}#" "${CONFIG_DIR}/${CONSTANTS_FILE}" > ${INSTALL_DIR}/${CONSTANTS_FILE}
API_URL="${API_URL:-$MANAGEMENT_API_URL}"

sed "s#API_URL#${API_URL}#" "${CONFIG_DIR}/${CONSTANTS_FILE}" > ${INSTALL_DIR}/${CONSTANTS_FILE}

if [ -d "$CONFIG_DIR/themes" ] ; then
echo "-----> Copying theme assets…"
Expand Down
2 changes: 1 addition & 1 deletion gravitee/graviteeio-portal-ui/config/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"baseURL": "MANAGEMENT_API_URL/portal/environments/DEFAULT",
"baseURL": "API_URL/portal/environments/DEFAULT",
"loaderURL": "assets/images/gravitee-loader.gif",
"pagination": {
"size": {
Expand Down
2 changes: 1 addition & 1 deletion gravitee/graviteeio-portal-ui/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ GRAVITEE_MODULE=graviteeio-portal-ui
# folder name (used by buildpack to determine the module to install)
PROJECT_DIR=graviteeio-portal-ui
# API url
MANAGEMENT_API_URL=
API_URL=
4 changes: 3 additions & 1 deletion gravitee/graviteeio-portal-ui/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ INSTALL_DIR="/${HOME}/${GRAVITEE_MODULE}"
CONFIG_DIR=/${HOME}/config
CONFIG_FILE="${CONFIG_DIR}/config.json"

cat $CONFIG_FILE | sed "s#MANAGEMENT_API_URL#${MANAGEMENT_API_URL}#" > ${INSTALL_DIR}/assets/config.json
API_URL="${API_URL:-$MANAGEMENT_API_URL}"

cat $CONFIG_FILE | sed "s#API_URL#${API_URL}#" > ${INSTALL_DIR}/assets/config.json