Commit 2f0ec5c0 authored by Enrique Alcantara's avatar Enrique Alcantara

Add updateSuccessful/Failed props to knative app

They are used to indicate when knative domain name
has changed
parent 60c58c75
...@@ -89,6 +89,10 @@ export default { ...@@ -89,6 +89,10 @@ export default {
type: Boolean, type: Boolean,
required: false, required: false,
}, },
updateable: {
type: Boolean,
default: true,
},
updateSuccessful: { updateSuccessful: {
type: Boolean, type: Boolean,
required: false, required: false,
...@@ -326,36 +330,38 @@ export default { ...@@ -326,36 +330,38 @@ export default {
</ul> </ul>
</div> </div>
<div <div v-if="updateable">
v-if="shouldShowUpgradeDetails" <div
class="form-text text-muted label p-0 js-cluster-application-upgrade-details" v-if="shouldShowUpgradeDetails"
> class="form-text text-muted label p-0 js-cluster-application-upgrade-details"
{{ versionLabel }}
<span v-if="updateSuccessful">to</span>
<gl-link
v-if="updateSuccessful"
:href="chartRepo"
target="_blank"
class="js-cluster-application-upgrade-version"
>chart v{{ version }}</gl-link
> >
</div> {{ versionLabel }}
<span v-if="updateSuccessful">to</span>
<div <gl-link
v-if="updateFailed && !isUpgrading" v-if="updateSuccessful"
class="bs-callout bs-callout-danger cluster-application-banner mt-2 mb-0 js-cluster-application-upgrade-failure-message" :href="chartRepo"
> target="_blank"
{{ upgradeFailureDescription }} class="js-cluster-application-upgrade-version"
>chart v{{ version }}</gl-link
>
</div>
<div
v-if="updateFailed && !isUpgrading"
class="bs-callout bs-callout-danger cluster-application-banner mt-2 mb-0 js-cluster-application-upgrade-failure-message"
>
{{ upgradeFailureDescription }}
</div>
<loading-button
v-if="upgradeAvailable || updateFailed || isUpgrading"
class="btn btn-primary js-cluster-application-upgrade-button mt-2"
:loading="isUpgrading"
:disabled="isUpgrading"
:label="upgradeButtonLabel"
@click="upgradeClicked"
/>
</div> </div>
<loading-button
v-if="upgradeAvailable || updateFailed || isUpgrading"
class="btn btn-primary js-cluster-application-upgrade-button mt-2"
:loading="isUpgrading"
:disabled="isUpgrading"
:label="upgradeButtonLabel"
@click="upgradeClicked"
/>
</div> </div>
<div <div
:class="{ 'section-25': showManageButton, 'section-15': !showManageButton }" :class="{ 'section-25': showManageButton, 'section-15': !showManageButton }"
......
...@@ -77,6 +77,8 @@ export default class ClusterStore { ...@@ -77,6 +77,8 @@ export default class ClusterStore {
isEditingHostName: false, isEditingHostName: false,
externalIp: null, externalIp: null,
externalHostname: null, externalHostname: null,
updateSuccessful: false,
updateFailed: false,
}, },
}, },
}; };
......
...@@ -133,6 +133,8 @@ describe('Clusters Store', () => { ...@@ -133,6 +133,8 @@ describe('Clusters Store', () => {
uninstallable: false, uninstallable: false,
uninstallSuccessful: false, uninstallSuccessful: false,
uninstallFailed: false, uninstallFailed: false,
updateSuccessful: false,
updateFailed: false,
}, },
cert_manager: { cert_manager: {
title: 'Cert-Manager', title: 'Cert-Manager',
......
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