Commit 218e7223 authored by Filipa Lacerda's avatar Filipa Lacerda

Changes after review

parent 95d8b8ac
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import clipboardButton from '../../vue_shared/components/clipboard_button.vue'; import clipboardButton from '../../vue_shared/components/clipboard_button.vue';
import { import {
APPLICATION_INSTALLED, APPLICATION_INSTALLED,
INGRESS,
} from '../constants'; } from '../constants';
export default { export default {
...@@ -53,6 +54,9 @@ ...@@ -53,6 +54,9 @@
false, false,
); );
}, },
ingressId() {
return INGRESS;
},
ingressInstalled() { ingressInstalled() {
return this.applications.ingress.status === APPLICATION_INSTALLED; return this.applications.ingress.status === APPLICATION_INSTALLED;
}, },
...@@ -150,7 +154,7 @@ ...@@ -150,7 +154,7 @@
</div> </div>
</application-row> </application-row>
<application-row <application-row
id="ingress" :id="ingressId"
:title="applications.ingress.title" :title="applications.ingress.title"
title-link="https://kubernetes.io/docs/concepts/services-networking/ingress/" title-link="https://kubernetes.io/docs/concepts/services-networking/ingress/"
:status="applications.ingress.status" :status="applications.ingress.status"
...@@ -167,7 +171,7 @@ ...@@ -167,7 +171,7 @@
<template v-if="ingressInstalled"> <template v-if="ingressInstalled">
<div class="form-group"> <div class="form-group">
<label for="ipAddress"> <label for="ingress-ip-address">
{{ s__("ClusterIntegration| Ingress IP Address") }} {{ s__("ClusterIntegration| Ingress IP Address") }}
</label> </label>
<div <div
...@@ -176,7 +180,7 @@ ...@@ -176,7 +180,7 @@
> >
<input <input
type="text" type="text"
id="ipAddress" id="ingress-ip-address"
class="form-control js-ip-address" class="form-control js-ip-address"
:placeholder="ingressExternalIp" :placeholder="ingressExternalIp"
readonly readonly
...@@ -210,7 +214,7 @@ ...@@ -210,7 +214,7 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
{{ __("More information") }} {{ __('More information') }}
</a> </a>
</p> </p>
...@@ -223,16 +227,16 @@ ...@@ -223,16 +227,16 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
{{ __("More information") }} {{ __('More information') }}
</a> </a>
</p> </p>
</template> </template>
<template <div
v-else v-else
v-html="ingressDescription" v-html="ingressDescription"
> >
</template> </div>
</div> </div>
</application-row> </application-row>
<application-row <application-row
......
...@@ -10,3 +10,4 @@ export const APPLICATION_ERROR = 'errored'; ...@@ -10,3 +10,4 @@ export const APPLICATION_ERROR = 'errored';
export const REQUEST_LOADING = 'request-loading'; export const REQUEST_LOADING = 'request-loading';
export const REQUEST_SUCCESS = 'request-success'; export const REQUEST_SUCCESS = 'request-success';
export const REQUEST_FAILURE = 'request-failure'; export const REQUEST_FAILURE = 'request-failure';
export const INGRESS = 'ingress';
import { s__ } from '../../locale'; import { s__ } from '../../locale';
import { INGRESS } from '../constants';
export default class ClusterStore { export default class ClusterStore {
constructor() { constructor() {
...@@ -80,7 +81,7 @@ export default class ClusterStore { ...@@ -80,7 +81,7 @@ export default class ClusterStore {
statusReason, statusReason,
}; };
if (appId === 'ingress') { if (appId === INGRESS) {
this.state.applications.ingress.externalIp = serverAppEntry.external_ip; this.state.applications.ingress.externalIp = serverAppEntry.external_ip;
} }
}); });
......
...@@ -88,11 +88,7 @@ describe('Applications', () => { ...@@ -88,11 +88,7 @@ describe('Applications', () => {
vm.$el.querySelector('.js-ip-address').getAttribute('placeholder'), vm.$el.querySelector('.js-ip-address').getAttribute('placeholder'),
).toEqual('?'); ).toEqual('?');
expect( expect(vm.$el.querySelector('.js-no-ip-message')).not.toBe(null);
vm.$el.querySelector('.js-no-ip-message').textContent.replace(/\n(\s)+/g, ' ').trim(),
).toEqual(
'The IP address is still in the process of being assigned, please check your Kubernetes cluster or Quotas on GKE if it takes a long time. More information',
);
}); });
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment