mirror of https://github.com/rancher/dashboard.git
fixing upgrading tab
This commit is contained in:
parent
142a189ae9
commit
2cfc90ca63
|
|
@ -1509,8 +1509,8 @@ workload:
|
||||||
minReadySeconds:
|
minReadySeconds:
|
||||||
label: Minimum Ready
|
label: Minimum Ready
|
||||||
tip: The minimum duration a pod should be ready without containers crashing for it to be considered available.
|
tip: The minimum duration a pod should be ready without containers crashing for it to be considered available.
|
||||||
partition:
|
podManagementPolicy:
|
||||||
label: Partition
|
label: Pod Management Policy
|
||||||
progressDeadlineSeconds:
|
progressDeadlineSeconds:
|
||||||
label: Progress Deadline
|
label: Progress Deadline
|
||||||
tip: The minimum duration to wait for a deployment to progress before marking it failed.
|
tip: The minimum duration to wait for a deployment to progress before marking it failed.
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,15 @@ import { _VIEW } from '@/config/query-params';
|
||||||
export default {
|
export default {
|
||||||
components: { KeyValue, Tag },
|
components: { KeyValue, Tag },
|
||||||
|
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return { annotationsVisible: false, view: _VIEW };
|
return { annotationsVisible: false, view: _VIEW };
|
||||||
},
|
},
|
||||||
|
|
@ -88,9 +97,9 @@ export default {
|
||||||
<div class="detail-top row" :class="{empty: isEmpty}">
|
<div class="detail-top row" :class="{empty: isEmpty}">
|
||||||
<div v-if="hasLeft" class="col left" :class="leftSpan">
|
<div v-if="hasLeft" class="col left" :class="leftSpan">
|
||||||
<div v-for="detail in details" :key="detail.label || detail.slotName">
|
<div v-for="detail in details" :key="detail.label || detail.slotName">
|
||||||
<div class="label">
|
<span class="label">
|
||||||
{{ detail.label }}:
|
{{ detail.label }}:
|
||||||
</div>
|
</span>
|
||||||
<component
|
<component
|
||||||
:is="detail.formatter"
|
:is="detail.formatter"
|
||||||
v-if="detail.formatter"
|
v-if="detail.formatter"
|
||||||
|
|
|
||||||
|
|
@ -208,20 +208,21 @@ export default {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="strategy === 'RollingUpdate'">
|
|
||||||
<div v-if="isStatefulSet" class="row mb-20">
|
<div v-if="isStatefulSet" class="row mb-20">
|
||||||
<div class="col span-6">
|
<div class="col span-6">
|
||||||
<UnitInput v-model="partition" :suffix="partition == 1 ? 'Pod' : 'Pods'" :label="t('workload.upgrading.partition.label')" :mode="mode">
|
<RadioGroup v-model="value.podManagementPolicy" :label="t('workload.upgrading.podManagementPolicy.label')" :options="['OrderedReady', 'Parallel']" />
|
||||||
|
<!-- <UnitInput v-model="partition" :suffix="partition == 1 ? 'Pod' : 'Pods'" :label="t('workload.upgrading.partition.label')" :mode="mode">
|
||||||
<template #label>
|
<template #label>
|
||||||
<label :style="{'color':'var(--input-label)'}">
|
<label :style="{'color':'var(--input-label)'}">
|
||||||
{{ t('workload.upgrading.partition.label') }}
|
{{ t('workload.upgrading.partition.label') }}
|
||||||
<i v-tooltip="t('workload.upgrading.partition.tip')" class="icon icon-info" style="font-size: 14px" />
|
<i v-tooltip="t('workload.upgrading.partition.tip')" class="icon icon-info" style="font-size: 14px" />
|
||||||
</label>
|
</label>
|
||||||
</template>
|
</template>
|
||||||
</UnitInput>
|
</UnitInput> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="isDeployment || isDaemonSet" class="row mb-20">
|
<template v-if="strategy === 'RollingUpdate'">
|
||||||
|
<div v-if="isDeployment || isDaemonSet" class="row mb-20">
|
||||||
<div v-if="isDeployment" class="col span-6">
|
<div v-if="isDeployment" class="col span-6">
|
||||||
<InputWithSelect
|
<InputWithSelect
|
||||||
:text-value="maxSurge"
|
:text-value="maxSurge"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,142 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
details() {
|
details() {
|
||||||
return [
|
let out;
|
||||||
|
const type = this._type ? this._type : this.type;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case WORKLOAD_TYPES.DEPLOYMENT:
|
||||||
|
out = [
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
content: this._type ? this._type : this.type
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Replicas',
|
||||||
|
content: this?.spec?.replicas
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Available',
|
||||||
|
content: this?.status?.availableReplicas,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Unavailable',
|
||||||
|
content: this?.status?.unavailableReplicas,
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Ready',
|
||||||
|
content: this?.status?.readyReplicas,
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Updated',
|
||||||
|
content: this?.status?.updatedReplicas,
|
||||||
|
|
||||||
|
},
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case WORKLOAD_TYPES.STATEFUL_SET:
|
||||||
|
out = [
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
content: this._type ? this._type : this.type
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Replicas',
|
||||||
|
content: this?.spec?.replicas
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Services',
|
||||||
|
content: this?.spec?.serviceName
|
||||||
|
},
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case WORKLOAD_TYPES.DAEMON_SET:
|
||||||
|
out = [
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
content: this._type ? this._type : this.type
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Number',
|
||||||
|
content: this.status.currentNumberScheduled / this.status.desiredNumberScheduled
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Available',
|
||||||
|
content: this.status.numberAvailable
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Unavailable',
|
||||||
|
content: this.status.numberUnavailable
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Ready',
|
||||||
|
content: this.status.numberReady
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Updated',
|
||||||
|
content: this.status.numberUpdated
|
||||||
|
},
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case WORKLOAD_TYPES.REPLICA_SET:
|
||||||
|
out = [
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
content: this._type ? this._type : this.type
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Available',
|
||||||
|
content: this?.status?.availableReplicas,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Fully Labeled',
|
||||||
|
content: this?.status?.fullyLabeledReplicas,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case WORKLOAD_TYPES.JOB:
|
||||||
|
out = [
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
content: this._type ? this._type : this.type
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Succeeded',
|
||||||
|
content: this?.status?.succeeded,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Failed',
|
||||||
|
content: this?.status?.failed,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Start Time',
|
||||||
|
content: this?.status?.startTime,
|
||||||
|
formatter: 'LiveDate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Completion Time',
|
||||||
|
content: this?.status?.completionTime,
|
||||||
|
formatter: 'LiveDate'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case WORKLOAD_TYPES.CRON_JOB:
|
||||||
|
out = [
|
||||||
|
{
|
||||||
|
label: 'Type',
|
||||||
|
content: this._type ? this._type : this.type
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last Scheduled Time',
|
||||||
|
content: this?.status?.lastScheduleTime,
|
||||||
|
formatter: 'LiveDate'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
out = [
|
||||||
{
|
{
|
||||||
label: 'Image',
|
label: 'Image',
|
||||||
content: this.container.image
|
content: this.container.image
|
||||||
|
|
@ -65,6 +200,9 @@ export default {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return out;
|
||||||
},
|
},
|
||||||
|
|
||||||
redeploy() {
|
redeploy() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue