From 6224983839ba792b6ee2661251273d150cecfd25 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Fri, 27 Mar 2020 17:43:56 +0100 Subject: [PATCH] Change status page name --- backend/backend/services/statusPageService.js | 2 +- helm-chart/README.md | 10 +++++----- helm-chart/public/fyipe/templates/admin-dashboard.yaml | 2 +- helm-chart/public/fyipe/templates/ingress.yaml | 8 ++++++-- helm-chart/public/fyipe/values.yaml | 3 ++- kubernetes/values-saas-staging.yaml | 2 +- smoke-test/status-page.test.js | 2 +- status-page/src/components/Main.js | 2 +- 8 files changed, 18 insertions(+), 13 deletions(-) diff --git a/backend/backend/services/statusPageService.js b/backend/backend/services/statusPageService.js index f7ba18e502..0f823db87b 100755 --- a/backend/backend/services/statusPageService.js +++ b/backend/backend/services/statusPageService.js @@ -338,7 +338,7 @@ module.exports = { }); statusPage.monitorsData = _.flatten(filteredMonitorData); } else { - const error = new Error('Status Page Not present'); + const error = new Error('Page Not Found'); error.code = 400; ErrorService.log('statusPageService.getStatus', error); throw error; diff --git a/helm-chart/README.md b/helm-chart/README.md index c32ce8d4cc..e34fd148ed 100755 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -8,11 +8,6 @@ Please run these commands from `root` helm lint ./helm-chart/public/fyipe ``` -### Uninstall and Install the chart -``` -helm uninstall fi -``` - ### Install as an Enterprise Cluster with default values ``` helm install fi ./helm-chart/public/fyipe @@ -28,6 +23,11 @@ helm install -f ./kubernetes/values-saas-staging.yaml fi ./helm-chart/public/fyi helm install -f ./kubernetes/values-saas-production.yaml fi ./helm-chart/public/fyipe ``` +### Uninstall and Install the chart +``` +helm uninstall fi +``` + ### Docker build and push to docker repo with `:test` tag ``` chmod +x ./kubernetes/ci/docker-build.sh diff --git a/helm-chart/public/fyipe/templates/admin-dashboard.yaml b/helm-chart/public/fyipe/templates/admin-dashboard.yaml index 35076ae0a6..2a0f228e46 100644 --- a/helm-chart/public/fyipe/templates/admin-dashboard.yaml +++ b/helm-chart/public/fyipe/templates/admin-dashboard.yaml @@ -28,7 +28,7 @@ spec: value: {{ .Values.fyipe.licenseUrl }} {{- end }} - name: NODE_ENV - value: 'production' + value: 'production' ports: - containerPort: {{ .Values.host.adminDashboardPort }} hostPort: {{ .Values.host.adminDashboardPort }} diff --git a/helm-chart/public/fyipe/templates/ingress.yaml b/helm-chart/public/fyipe/templates/ingress.yaml index d996e09294..9ff2306b38 100644 --- a/helm-chart/public/fyipe/templates/ingress.yaml +++ b/helm-chart/public/fyipe/templates/ingress.yaml @@ -72,14 +72,14 @@ spec: ########################################################################## ############----STATUS-PAGE-INGRESS--##################################### -{{- if .Values.fyipe.enableStatusPageIngress }} +{{- if .Values.enableStatusPageIngress }} apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: nginx ingress.kubernetes.io/ssl-redirect: "true" - name: {{ printf "%s-%s" .Release.Name "status-page-ingress" }} + name: {{ printf "%s-%s" .Release.Name "status-page" }} spec: {{- if .Values.fyipe.tls.enabled }} tls: @@ -88,8 +88,12 @@ spec: secretName: {{ printf "%s-%s" .Release.Name "secret" }} {{- end }} rules: + {{- if .Values.fyipe.host }} - host: {{ printf "%s.%s" "status-page" .Values.fyipe.host }} http: + {{- else }} + - http: + {{- end }} paths: - path: / backend: diff --git a/helm-chart/public/fyipe/values.yaml b/helm-chart/public/fyipe/values.yaml index b3537e3f16..41928703a1 100644 --- a/helm-chart/public/fyipe/values.yaml +++ b/helm-chart/public/fyipe/values.yaml @@ -5,6 +5,7 @@ saas: isSaasService: false +enableStatusPageIngress: false ################################################################################### fyipe: host: @@ -16,7 +17,7 @@ fyipe: callEnabled: true smsEnabled: true licenseUrl: https://fyipe.com/license - enableStatusPageIngress: false + host: backendPort: 3002 diff --git a/kubernetes/values-saas-staging.yaml b/kubernetes/values-saas-staging.yaml index dc6390b5a6..e65ea5f4a8 100644 --- a/kubernetes/values-saas-staging.yaml +++ b/kubernetes/values-saas-staging.yaml @@ -23,4 +23,4 @@ saas: support: slackToken: xoxp-369430749728-370026359715-370129302482-08f43c6a1306d2e8f4be4b0d8abbdb80 -fyipe.enableStatusPageIngress: false \ No newline at end of file +enableStatusPageIngress: true \ No newline at end of file diff --git a/smoke-test/status-page.test.js b/smoke-test/status-page.test.js index 44198ac5ee..8349ff9d96 100644 --- a/smoke-test/status-page.test.js +++ b/smoke-test/status-page.test.js @@ -21,6 +21,6 @@ describe('Check status-page up', () => { const response = await page.$eval('#app-loading > div', e => { return e.innerHTML; }); - expect(response).toBe('Status Page Not present'); + expect(response).toBe('Page Not Found'); }); }); diff --git a/status-page/src/components/Main.js b/status-page/src/components/Main.js index 6343d6005e..4198abedf5 100755 --- a/status-page/src/components/Main.js +++ b/status-page/src/components/Main.js @@ -205,7 +205,7 @@ class Main extends Component { renderError = () => { const { error } = this.props.status; if (error === 'Input data schema mismatch.') { - return 'Status Page Not present'; + return 'Page Not Found'; } else if (error === 'Project Not present') { return 'Invalid Project.'; } else return error;