diff options
author | Enrique Alcantara <ealcantara@gitlab.com> | 2019-04-26 17:20:04 +0300 |
---|---|---|
committer | Enrique Alcantara <ealcantara@gitlab.com> | 2019-04-26 18:17:05 +0300 |
commit | 8703fdaae8243e9934d2456d57859f066020ccc4 (patch) | |
tree | 7c04313a14ab6b47b367d9017b5ec262a82fcecb /app/assets/javascripts/clusters | |
parent | 5065f1873902490441d14f2e85540ac3470f7a19 (diff) |
Fix base domain help text update
Diffstat (limited to 'app/assets/javascripts/clusters')
-rw-r--r-- | app/assets/javascripts/clusters/clusters_bundle.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js index 4f47f1b6550..8461e01de7b 100644 --- a/app/assets/javascripts/clusters/clusters_bundle.js +++ b/app/assets/javascripts/clusters/clusters_bundle.js @@ -279,14 +279,10 @@ export default class Clusters { this.store.acknowledgeSuccessfulUpdate(appId); } - toggleIngressDomainHelpText(ingressPreviousState, ingressNewState) { - const { externalIp, status } = ingressNewState; - const helpTextHidden = status !== APPLICATION_STATUS.INSTALLED || !externalIp; - const domainSnippetText = `${externalIp}${INGRESS_DOMAIN_SUFFIX}`; - - if (ingressPreviousState.status !== status) { - this.ingressDomainHelpText.classList.toggle('hide', helpTextHidden); - this.ingressDomainSnippet.textContent = domainSnippetText; + toggleIngressDomainHelpText({ externalIp }, { externalIp: newExternalIp }) { + if (externalIp !== newExternalIp) { + this.ingressDomainHelpText.classList.toggle('hide', !newExternalIp); + this.ingressDomainSnippet.textContent = `${newExternalIp}${INGRESS_DOMAIN_SUFFIX}`; } } |