1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(kubernetes): add rolling restart button teaser [EE-4510] (#8126)

* rolling restart teaser button

* add be only rolling restart

* move position of button
This commit is contained in:
Matt Hook 2022-12-12 14:30:05 +13:00 committed by GitHub
parent a1528475ba
commit 2188005b48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 75 additions and 41 deletions

View file

@ -214,11 +214,11 @@
<div class="col-sm-12">
<rd-widget>
<rd-widget-body>
<div ng-if="!ctrl.isSystemNamespace()" style="margin-bottom: 15px">
<div ng-if="!ctrl.isSystemNamespace()" class="mb-4 flex items-center gap-1">
<button
ng-if="!ctrl.isExternalApplication()"
type="button"
class="btn btn-sm btn-light vertical-center"
class="btn btn-sm btn-light vertical-center ml-2"
ui-sref="kubernetes.applications.application.edit"
style="margin-left: 0"
data-cy="k8sAppDetail-editAppButton"
@ -229,18 +229,23 @@
authorization="K8sApplicationDetailsW"
ng-if="ctrl.isExternalApplication()"
type="button"
class="btn btn-sm btn-light"
class="btn btn-sm btn-light ml-2"
ui-sref="kubernetes.applications.application.edit"
style="margin-left: 0"
data-cy="k8sAppDetail-editAppButton"
>
<pr-icon icon="'code'" class-name="'mr-1'"></pr-icon>Edit External application
</button>
<be-only-button
icon="'refresh-cw'"
feature-id="ctrl.limitedFeature"
message="'A rolling restart of the application is performed.'"
heading="'Rolling restart'"
button-text="'Rolling restart'"
></be-only-button>
<button
ng-if="ctrl.application.ApplicationType !== ctrl.KubernetesApplicationTypes.POD"
type="button"
class="btn btn-sm btn-light"
style="margin-left: 0"
class="btn btn-sm btn-light ml-2"
ng-click="ctrl.redeployApplication()"
data-cy="k8sAppDetail-redeployButton"
>
@ -250,7 +255,6 @@
ng-if="!ctrl.isExternalApplication()"
type="button"
class="btn btn-sm btn-light"
style="margin-left: 0"
ng-click="ctrl.rollbackApplication()"
ng-disabled="ctrl.application.Revisions.length < 2 || ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.APPLICATION_FORM"
data-cy="k8sAppDetail-rollbackButton"

View file

@ -1,6 +1,7 @@
import angular from 'angular';
import _ from 'lodash-es';
import * as JsonPatch from 'fast-json-patch';
import { FeatureId } from '@/react/portainer/feature-flags/enums';
import {
KubernetesApplicationDataAccessPolicies,
@ -350,6 +351,8 @@ class KubernetesApplicationController {
}
async onInit() {
this.limitedFeature = FeatureId.K8S_ROLLING_RESTART;
this.state = {
activeTab: 0,
currentName: this.$state.$current.name,