Adds APP_URL as base tag href to enable loading via ui via ingress routes (#2195)
This commit is contained in:
		
							parent
							
								
									42e005f041
								
							
						
					
					
						commit
						8356ebf097
					
				|  | @ -46,7 +46,7 @@ spec: | |||
|             {{- toYaml .Values.resources | nindent 12 }} | ||||
|           env: | ||||
|             - name: "APP_URL" | ||||
|               value: "http://localhost:8081" | ||||
|               value: {{ .Values.envs.appUrl }} | ||||
|             - name: "OPERATOR_API_URL" | ||||
|               value: {{ .Values.envs.operatorApiUrl | quote }} | ||||
|             - name: "OPERATOR_CLUSTER_NAME_LABEL" | ||||
|  |  | |||
|  | @ -41,6 +41,7 @@ resources: | |||
| envs: | ||||
|   # IMPORTANT: While operator chart and UI chart are independent, this is the interface between | ||||
|   # UI and operator API. Insert the service name of the operator API here! | ||||
|   appUrl: "http://localhost:8081" | ||||
|   operatorApiUrl: "http://postgres-operator:8080" | ||||
|   operatorClusterNameLabel: "cluster-name" | ||||
|   resourcesVisible: "False" | ||||
|  |  | |||
|  | @ -311,7 +311,7 @@ def send_js(path): | |||
| @app.route('/') | ||||
| @authorize | ||||
| def index(): | ||||
|     return render_template('index.html', google_analytics=GOOGLE_ANALYTICS) | ||||
|     return render_template('index.html', google_analytics=GOOGLE_ANALYTICS, app_url=APP_URL) | ||||
| 
 | ||||
| 
 | ||||
| DEFAULT_UI_CONFIG = { | ||||
|  |  | |||
|  | @ -2,6 +2,7 @@ | |||
| <html lang="en"> | ||||
|   <head> | ||||
|     <meta charset="utf-8"> | ||||
|     <base href="{{app_url}}"> | ||||
|     <title>PostgreSQL Operator UI</title> | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue