Commit 02f99fee authored by Eric Eastwood's avatar Eric Eastwood

I18n general app error and update attributes from review

parent f4fb0340
<script> <script>
import { s__ } from '../../locale'; import { s__, sprintf } from '../../locale';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import loadingButton from '../../vue_shared/components/loading_button.vue'; import loadingButton from '../../vue_shared/components/loading_button.vue';
import { import {
...@@ -56,9 +56,6 @@ export default { ...@@ -56,9 +56,6 @@ export default {
rowJsClass() { rowJsClass() {
return `js-cluster-application-row-${this.id}`; return `js-cluster-application-row-${this.id}`;
}, },
titleElementType() {
return this.titleLink ? 'a' : 'span';
},
installButtonLoading() { installButtonLoading() {
return !this.status || return !this.status ||
this.status === APPLICATION_SCHEDULED || this.status === APPLICATION_SCHEDULED ||
...@@ -92,6 +89,13 @@ export default { ...@@ -92,6 +89,13 @@ export default {
hasError() { hasError() {
return this.status === APPLICATION_ERROR || this.requestStatus === REQUEST_FAILURE; return this.status === APPLICATION_ERROR || this.requestStatus === REQUEST_FAILURE;
}, },
generalErrorDescription() {
return sprintf(
s__('ClusterIntegration|Something went wrong while installing %{title}'), {
title: this.title,
},
);
}
}, },
methods: { methods: {
installClicked() { installClicked() {
...@@ -110,8 +114,8 @@ export default { ...@@ -110,8 +114,8 @@ export default {
class="gl-responsive-table-row-layout" class="gl-responsive-table-row-layout"
role="row" role="row"
> >
<component <a
:is="titleElementType" v-if="titleLink"
:href="titleLink" :href="titleLink"
target="blank" target="blank"
rel="noopener noreferrer" rel="noopener noreferrer"
...@@ -119,7 +123,13 @@ export default { ...@@ -119,7 +123,13 @@ export default {
class="table-section section-15 section-align-top js-cluster-application-title" class="table-section section-15 section-align-top js-cluster-application-title"
> >
{{ title }} {{ title }}
</component> </a>
<span
v-else
class="table-section section-15 section-align-top js-cluster-application-title"
>
{{ title }}
</span>
<div <div
class="table-section section-wrap" class="table-section section-wrap"
role="gridcell" role="gridcell"
...@@ -152,7 +162,7 @@ export default { ...@@ -152,7 +162,7 @@ export default {
> >
<div> <div>
<p class="js-cluster-application-general-error-message"> <p class="js-cluster-application-general-error-message">
Something went wrong while installing {{ title }} {{ generalErrorDescription }}
</p> </p>
<ul v-if="statusReason || requestReason"> <ul v-if="statusReason || requestReason">
<li <li
......
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
const extraCostParagraph = sprintf( const extraCostParagraph = sprintf(
_.escape(s__('ClusterIntegration|%{boldNotice} This will add some extra resources like a load balancer, which incur additional costs. See %{pricingLink}')), { _.escape(s__('ClusterIntegration|%{boldNotice} This will add some extra resources like a load balancer, which incur additional costs. See %{pricingLink}')), {
boldNotice: `<strong>${_.escape(s__('ClusterIntegration|Note:'))}</strong>`, boldNotice: `<strong>${_.escape(s__('ClusterIntegration|Note:'))}</strong>`,
pricingLink: `<a href="https://cloud.google.com/compute/pricing#lb" target="blank" rel="noopener noreferrer"> pricingLink: `<a href="https://cloud.google.com/compute/pricing#lb" target="_blank" rel="noopener noreferrer">
${_.escape(s__('ClusterIntegration|GKE pricing'))} ${_.escape(s__('ClusterIntegration|GKE pricing'))}
</a>`, </a>`,
}, },
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
</div> </div>
<div class="settings-content"> <div class="settings-content">
<div class="form_group append-bottom-20"> <div class="append-bottom-20">
<application-row <application-row
id="helm" id="helm"
:title="applications.helm.title" :title="applications.helm.title"
......
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