summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/clusters/stores/clusters_store.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-02-20 12:44:20 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-02-20 13:07:43 +0000
commit3619c9174558bd2b2ae625ac6db480c437eb8484 (patch)
tree7040e779b522a9656b36abf4b8372378f5f5f63b /app/assets/javascripts/clusters/stores/clusters_store.js
parent7efb28515f4d25120638a7025ebb26afc6114975 (diff)
downloadgitlab-ce-3619c9174558bd2b2ae625ac6db480c437eb8484.tar.gz
Adds missing links, uses value instead of placeholder in input field and properly sets the ip key
Diffstat (limited to 'app/assets/javascripts/clusters/stores/clusters_store.js')
-rw-r--r--app/assets/javascripts/clusters/stores/clusters_store.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js
index 904ee5fd475..e0a15348e42 100644
--- a/app/assets/javascripts/clusters/stores/clusters_store.js
+++ b/app/assets/javascripts/clusters/stores/clusters_store.js
@@ -21,6 +21,7 @@ export default class ClusterStore {
statusReason: null,
requestStatus: null,
requestReason: null,
+ externalIp: null,
},
runner: {
title: s__('ClusterIntegration|GitLab Runner'),
@@ -40,9 +41,10 @@ export default class ClusterStore {
};
}
- setHelpPaths(helpPath, ingressHelpPath) {
+ setHelpPaths(helpPath, ingressHelpPath, ingressDnsHelpPath) {
this.state.helpPath = helpPath;
this.state.ingressHelpPath = ingressHelpPath;
+ this.state.ingressDnsHelpPath = ingressDnsHelpPath;
}
setManagePrometheusPath(managePrometheusPath) {
@@ -64,6 +66,7 @@ export default class ClusterStore {
updateStateFromServer(serverState = {}) {
this.state.status = serverState.status;
this.state.statusReason = serverState.status_reason;
+
serverState.applications.forEach((serverAppEntry) => {
const {
name: appId,
@@ -76,6 +79,10 @@ export default class ClusterStore {
status,
statusReason,
};
+
+ if (appId === 'ingress') {
+ this.state.applications.ingress.externalIp = serverAppEntry.external_ip;
+ }
});
}
}