Skip to content

Commit

Permalink
Poin id api config change (#1719)
Browse files Browse the repository at this point in the history
* modify pointID in config.jsp

* modify pointID in config.jsp

* modify pointID in config.jsp

* modify pointID in config.jsp
  • Loading branch information
yzlucas authored Mar 18, 2024
1 parent 6fc12df commit 16cb926
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/terragrunt-deploy-manual-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ jobs:
WFDM_REST_URL: ${{vars.WFDM_REST_URL}}
FIRE_REPORT_API_URL: ${{vars.FIRE_REPORT_API_URL}}
NOTIFICATION_API_URL: ${{vars.NOTIFICATION_API_URL}}
POINT_ID_URL: ${{vars.POINT_ID_URL}}
WFIM_CLIENT_URL: ${{vars.WFIM_CLIENT_URL}}
WFIM_REST_URL: ${{vars.WFIM_REST_URL}}
WFIM_CODE_TABLES_URL: ${{vars.WFIM_CODE_TABLES_URL}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terragrunt-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ jobs:
WFDM_REST_URL: ${{vars.WFDM_REST_URL}}
FIRE_REPORT_API_URL: ${{vars.FIRE_REPORT_API_URL}}
NOTIFICATION_API_URL: ${{vars.NOTIFICATION_API_URL}}
POINT_ID_URL: ${{vars.POINT_ID_URL}}
WFIM_CLIENT_URL: ${{vars.WFIM_CLIENT_URL}}
WFIM_REST_URL: ${{vars.WFIM_REST_URL}}
WFIM_CODE_TABLES_URL: ${{vars.WFIM_CODE_TABLES_URL}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terragrunt-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
WFDM_REST_URL: ${{vars.WFDM_REST_URL}}
FIRE_REPORT_API_URL: ${{vars.FIRE_REPORT_API_URL}}
NOTIFICATION_API_URL: ${{vars.NOTIFICATION_API_URL}}
POINT_ID_URL: ${{vars.POINT_ID_URL}}
WFIM_CLIENT_URL: ${{vars.WFIM_CLIENT_URL}}
WFIM_REST_URL: ${{vars.WFIM_REST_URL}}
WFIM_CODE_TABLES_URL: ${{vars.WFIM_CODE_TABLES_URL}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ on:
NOTIFICATION_API_URL:
required: true
type: string
POINT_ID_URL:
required: true
type: string
WFIM_CODE_TABLES_URL:
required: true
type: string
Expand Down Expand Up @@ -233,6 +236,7 @@ jobs:
WFDM_REST_URL: ${{inputs.WFDM_REST_URL}}
FIRE_REPORT_API_URL: ${{inputs.FIRE_REPORT_API_URL}}
NOTIFICATION_API_URL: ${{inputs.NOTIFICATION_API_URL}}
POINT_ID_URL: ${{inputs.POINT_ID_URL}}
WFIM_CODE_TABLES_URL: ${{inputs.WFIM_CODE_TABLES_URL}}

run: terragrunt apply --terragrunt-non-interactive -auto-approve
Expand Down
7 changes: 6 additions & 1 deletion client/wfnews-war/src/main/webapp/config.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,19 @@
notificationUri = notificationUri.substring(0, notificationUri.length() - 1); //Strip off trailing slash, if it exists.
}
String pointidUri = EnvironmentVariable.getVariable("POINT_ID_URL");
if (pointidUri != null && pointidUri.endsWith("/")) {
pointidUri = pointidUri.substring(0, pointidUri.length() - 1); //Strip off trailing slash, if it exists.
}
json.append("\"rest\":{");
json.append("\"newsLocal\":\"").append(wfnewsUri).append("\"").append(",");
json.append("\"incidents\":\"").append(incidentsUri).append("\"").append(",");
json.append("\"wfnews\":\"").append(wfnewsUri).append("\"").append(",");
json.append("\"wfdm\":\"").append(wfdmUri).append("\"").append(",");
json.append("\"fire-report-api\":\"").append(fireReportUri).append("\"").append(",");
json.append("\"notification-api\":\"").append(notificationUri).append("\"").append(",");
json.append("\"pointId\":\"").append(properties.getProperty("pointid.url", "")).append("\"");
json.append("\"pointId\":\"").append(pointidUri).append("\"");
json.append("},");
// WebADE OAuth Section
Expand Down
2 changes: 2 additions & 0 deletions terraform/dev/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ locals {
WFDM_REST_URL = get_env("WFDM_REST_URL")
FIRE_REPORT_API_URL = get_env("FIRE_REPORT_API_URL")
NOTIFICATION_API_URL = get_env("NOTIFICATION_API_URL")
POINT_ID_URL = get_env("POINT_ID_URL")
WFIM_CLIENT_URL = get_env("WFIM_CLIENT_URL")
WFIM_REST_URL = get_env("WFIM_REST_URL")
WFIM_CODE_TABLES_URL = get_env("WFIM_CODE_TABLES_URL")
Expand Down Expand Up @@ -158,6 +159,7 @@ generate "dev_tfvars" {
WFDM_REST_URL ="${local.WFDM_REST_URL}"
FIRE_REPORT_API_URL ="${local.FIRE_REPORT_API_URL}"
NOTIFICATION_API_URL ="${local.NOTIFICATION_API_URL}"
POINT_ID_URL ="${local.POINT_ID_URL}"
WFIM_CLIENT_URL ="${local.WFIM_CLIENT_URL}"
WFIM_REST_URL ="${local.WFIM_REST_URL}"
WFIM_CODE_TABLES_URL ="${local.WFIM_CODE_TABLES_URL}"
Expand Down
12 changes: 12 additions & 0 deletions terraform/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ resource "aws_ecs_task_definition" "wfnews_server" {
name = "NOTIFICATION_API_URL",
value = var.NOTIFICATION_API_URL
},
{
name = "POINT_ID_URL",
value = var.POINT_ID_URL
},
{
name = "WFIM_CLIENT_URL",
value = var.WFIM_CLIENT_URL
Expand Down Expand Up @@ -344,6 +348,10 @@ resource "aws_ecs_task_definition" "wfnews_client" {
name = "NOTIFICATION_API_URL",
value = var.NOTIFICATION_API_URL
},
{
name = "POINT_ID_URL",
value = var.POINT_ID_URL
},
{
name = "ORG_UNIT_URL",
value = ""
Expand Down Expand Up @@ -1071,6 +1079,10 @@ resource "aws_ecs_task_definition" "wfone_notifications_api" {
name = "NOTIFICATION_API_URL",
value = var.NOTIFICATION_API_URL
},
{
name = "POINT_ID_URL",
value = var.POINT_ID_URL
},
{
name = "WFIM_CLIENT_URL",
value = var.WFIM_CLIENT_URL
Expand Down
2 changes: 2 additions & 0 deletions terraform/prod/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ locals {
WFDM_REST_URL = get_env("WFDM_REST_URL")
FIRE_REPORT_API_URL = get_env("FIRE_REPORT_API_URL")
NOTIFICATION_API_URL = get_env("NOTIFICATION_API_URL")
POINT_ID_URL = get_env("POINT_ID_URL")
WFIM_CLIENT_URL = get_env("WFIM_CLIENT_URL")
WFIM_REST_URL = get_env("WFIM_REST_URL")
WFIM_CODE_TABLES_URL = get_env("WFIM_CODE_TABLES_URL")
Expand Down Expand Up @@ -162,6 +163,7 @@ generate "prod_tfvars" {
WFDM_REST_URL ="${local.WFDM_REST_URL}"
FIRE_REPORT_API_URL ="${local.FIRE_REPORT_API_URL}"
NOTIFICATION_API_URL ="${local.NOTIFICATION_API_URL}"
POINT_ID_URL ="${local.POINT_ID_URL}"
WFIM_CLIENT_URL ="${local.WFIM_CLIENT_URL}"
WFIM_REST_URL ="${local.WFIM_REST_URL}"
WFIM_CODE_TABLES_URL ="${local.WFIM_CODE_TABLES_URL}"
Expand Down
2 changes: 2 additions & 0 deletions terraform/test/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ locals {
WFDM_REST_URL = get_env("WFDM_REST_URL")
FIRE_REPORT_API_URL = get_env("FIRE_REPORT_API_URL")
NOTIFICATION_API_URL = get_env("NOTIFICATION_API_URL")
POINT_ID_URL = get_env("POINT_ID_URL")
WFIM_CLIENT_URL = get_env("WFIM_CLIENT_URL")
WFIM_REST_URL = get_env("WFIM_REST_URL")
WFIM_CODE_TABLES_URL = get_env("WFIM_CODE_TABLES_URL")
Expand Down Expand Up @@ -156,6 +157,7 @@ generate "test_tfvars" {
WFDM_REST_URL ="${local.WFDM_REST_URL}"
FIRE_REPORT_API_URL ="${local.FIRE_REPORT_API_URL}"
NOTIFICATION_API_URL ="${local.NOTIFICATION_API_URL}"
POINT_ID_URL ="${local.POINT_ID_URL}"
WFIM_CLIENT_URL ="${local.WFIM_CLIENT_URL}"
WFIM_REST_URL ="${local.WFIM_REST_URL}"
WFIM_CODE_TABLES_URL ="${local.WFIM_CODE_TABLES_URL}"
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ variable "NOTIFICATION_API_URL" {
default = ""
}

variable "POINT_ID_URL" {
type = string
default = ""
}

variable "WFIM_CLIENT_URL" {
type = string
default = ""
Expand Down

0 comments on commit 16cb926

Please sign in to comment.