Skip to content

Commit c8f9439

Browse files
committed
fix(deployment): 历史版本增加详情信息
1 parent b3baa21 commit c8f9439

File tree

9 files changed

+61
-61
lines changed

9 files changed

+61
-61
lines changed

go.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ require (
1818
github.com/golang/snappy v0.0.4 // indirect
1919
github.com/google/go-cmp v0.5.6 // indirect
2020
github.com/google/uuid v1.2.0
21+
github.com/imdario/mergo v0.3.12 // indirect
2122
github.com/kataras/iris/v12 v12.2.0-alpha2.0.20210427211137-fa175eb84754
2223
github.com/klauspost/compress v1.13.5 // indirect
24+
github.com/onsi/gomega v1.15.0 // indirect
2325
github.com/pkg/errors v0.9.1
2426
github.com/prometheus/common v0.29.0 // indirect
2527
github.com/sirupsen/logrus v1.8.1
26-
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
28+
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
2729
github.com/spf13/cobra v1.2.1
2830
github.com/spf13/viper v1.8.1
2931
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
30-
github.com/xlzd/gotp v0.0.0-20220110052318-fab697c03c2c // indirect
31-
go.uber.org/zap v1.19.1 // indirect
32+
github.com/xlzd/gotp v0.0.0-20220110052318-fab697c03c2c
3233
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
3334
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
3435
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
@@ -45,7 +46,6 @@ require (
4546
k8s.io/cli-runtime v0.22.1
4647
k8s.io/client-go v0.22.2
4748
k8s.io/klog/v2 v2.9.0
48-
sigs.k8s.io/controller-runtime v0.10.3
4949
)
5050

5151
replace github.com/KubeOperator/webkubectl/gotty v0.0.0-20210927072155-e9ce79172471 => ./thirdparty/gotty

go.sum

-17
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd3
145145
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible h1:Ppm0npCCsmuR9oQaBtRuZcmILVE74aXE+AmrJj8L2ns=
146146
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
147147
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
148-
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
149148
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
150149
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
151150
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
@@ -372,7 +371,6 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
372371
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
373372
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
374373
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
375-
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
376374
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
377375
github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs=
378376
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
@@ -420,8 +418,6 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7
420418
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
421419
github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc=
422420
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
423-
github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM=
424-
github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk=
425421
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
426422
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
427423
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
@@ -632,7 +628,6 @@ github.com/iris-contrib/jade v1.1.4/go.mod h1:EDqR+ur9piDl6DUgs6qRrlfzmlx/D5Uybo
632628
github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw=
633629
github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA=
634630
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
635-
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
636631
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
637632
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
638633
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
@@ -1107,18 +1102,12 @@ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee33
11071102
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o=
11081103
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
11091104
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
1110-
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
11111105
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
11121106
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
1113-
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
11141107
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
1115-
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
11161108
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
11171109
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
11181110
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
1119-
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
1120-
go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
1121-
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
11221111
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
11231112
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
11241113
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -1356,7 +1345,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
13561345
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13571346
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13581347
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1359-
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13601348
golang.org/x/sys v0.0.0-20210927052749-1cf2251ac284 h1:lBPNCmq8u4zFP3huKCmUQ2Fx8kcY4X+O12UgGnyKsrg=
13611349
golang.org/x/sys v0.0.0-20210927052749-1cf2251ac284/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13621350
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
@@ -1440,14 +1428,11 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
14401428
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
14411429
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
14421430
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
1443-
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
14441431
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
14451432
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
14461433
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
14471434
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
14481435
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
1449-
gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY=
1450-
gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY=
14511436
google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
14521437
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
14531438
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@@ -1699,8 +1684,6 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
16991684
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
17001685
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
17011686
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
1702-
sigs.k8s.io/controller-runtime v0.10.3 h1:s5Ttmw/B4AuIbwrXD3sfBkXwnPMMWrqpVj4WRt1dano=
1703-
sigs.k8s.io/controller-runtime v0.10.3/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY=
17041687
sigs.k8s.io/kustomize/api v0.8.11 h1:LzQzlq6Z023b+mBtc6v72N2mSHYmN8x7ssgbf/hv0H8=
17051688
sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g=
17061689
sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs=

web/dashboard/src/business/cluster/nodes/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</el-button>
1414
<el-button type="primary" size="small"
1515
v-has-permissions="{scope:'cluster',apiGroup:'',resource:'nodes',verb:'update'}"
16-
@click="drain()" icon="el-icon-refresh-right">
16+
@click="drain()" icon="el-icon-position">
1717
{{$t('business.node.drain')}}
1818
</el-button>
1919
</div>

web/dashboard/src/business/workloads/daemonsets/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default {
9292
},
9393
{
9494
label: this.$t("commons.button.restart"),
95-
icon: "el-icon-refresh-right",
95+
icon: "el-icon-refresh",
9696
click: (row) => {
9797
this.onRestart(row)
9898
},

web/dashboard/src/business/workloads/deployments/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default {
125125
},
126126
{
127127
label: this.$t("commons.button.restart"),
128-
icon: "el-icon-refresh-right",
128+
icon: "el-icon-refresh",
129129
click: (row) => {
130130
this.onRestart(row)
131131
},

web/dashboard/src/business/workloads/statefulsets/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default {
125125
},
126126
{
127127
label: this.$t("commons.button.restart"),
128-
icon: "el-icon-refresh-right",
128+
icon: "el-icon-refresh",
129129
click: (row) => {
130130
this.onRestart(row)
131131
},

web/dashboard/src/components/detail/detail-replicasets.vue

+47-33
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,38 @@
99
<el-table-column :label="$t('commons.table.image')" prop="image" min-width="80" show-overflow-tooltip>
1010
<template v-slot:default="{row}">
1111
<span v-for="(k, index) in row.spec.template.spec.containers" :key="index">
12-
<span class="label-custom wd" type="info">{{ k.image }}</span>
12+
<span class="label-custom wd" type="info">{{ k.image }}</span>
1313
</span>
1414
</template>
1515
</el-table-column>
1616
<el-table-column :label="$t('commons.table.time')" prop="time" min-width="80" show-overflow-tooltip>
1717
<template v-slot:default="{row}">
18-
<span>{{ row.metadata.creationTimestamp | age }}</span>
18+
<span>{{ row.metadata.creationTimestamp | datetimeFormat }}</span>
1919
</template>
2020
</el-table-column>
2121
<ko-table-operations :buttons="buttons" :label="$t('commons.table.action')"></ko-table-operations>
2222
</complex-table>
23+
24+
<el-dialog :title="$t('business.workload.specific_information')" width="70%" :close-on-click-modal="false" :visible.sync="dialogSpecificVisible">
25+
<yaml-editor :value="itemVerisonForm" :read-only="true" />
26+
<div slot="footer" class="dialog-footer">
27+
<el-button size="small" @click="dialogSpecificVisible = false">{{ $t("commons.button.cancel") }}</el-button>
28+
</div>
29+
</el-dialog>
2330
</div>
2431
</template>
2532

2633
<script>
2734
import ComplexTable from "@/components/complex-table"
2835
import KoTableOperations from "@/components/ko-table-operations"
29-
import {checkPermissions} from "@/utils/permission"
30-
import {listNsReplicaSetsWorkload} from "@/api/replicasets"
36+
import { checkPermissions } from "@/utils/permission"
37+
import { listNsReplicaSetsWorkload } from "@/api/replicasets"
3138
import { patchDeployment } from "@/api/deployments"
32-
39+
import YamlEditor from "@/components/yaml-editor"
3340
3441
export default {
3542
name: "KoDetailReplicasets",
36-
components: { ComplexTable, KoTableOperations },
43+
components: { ComplexTable, KoTableOperations, YamlEditor },
3744
props: {
3845
cluster: String,
3946
namespace: String,
@@ -43,43 +50,49 @@ export default {
4350
},
4451
watch: {
4552
selector: {
46-
handler (newSelector) {
53+
handler(newSelector) {
4754
if (newSelector) {
4855
this.search()
4956
}
5057
},
5158
immediate: true,
5259
},
5360
fieldSelector: {
54-
handler (newSelector) {
61+
handler(newSelector) {
5562
if (newSelector) {
5663
this.search()
5764
}
5865
},
5966
immediate: true,
6067
},
6168
},
62-
data () {
69+
data() {
6370
return {
6471
buttons: [
6572
{
6673
label: this.$t("commons.button.rollback"),
67-
icon: "el-icon-back",
74+
icon: "el-icon-refresh-left",
6875
click: (row) => {
6976
this.OptionRollback(row)
7077
},
71-
disabled: () => {
72-
return !checkPermissions({ scope: "namespace", apiGroup: "", resource: "pods/log", verb: "*" })
78+
},
79+
{
80+
label: this.$t("business.workload.specific_information"),
81+
icon: "el-icon-tickets",
82+
click: (row) => {
83+
this.SpecificInformation(row)
7384
},
7485
},
7586
],
7687
loading: false,
7788
pods: [],
7889
podUsage: [],
90+
itemVerisonForm: {},
91+
dialogSpecificVisible: false,
7992
}
8093
},
8194
methods: {
82-
search (resetPage) {
95+
search(resetPage) {
8396
this.loading = true
8497
if (resetPage) {
8598
this.paginationConfig.currentPage = 1
@@ -94,30 +107,31 @@ export default {
94107
this.pods.push(res.items[i])
95108
}
96109
})
97-
98110
},
99-
OptionRollback (row) {
100-
this.$confirm(
101-
this.$t("commons.confirm_message.rollback"),
102-
this.$t("commons.message_box.prompt"), {
103-
confirmButtonText: this.$t("commons.button.confirm"),
104-
cancelButtonText: this.$t("commons.button.cancel"),
105-
type: "warning",
106-
}).then(() => {
107-
patchDeployment(this.cluster, row.metadata.namespace, this.name, {"spec": {"template": row.spec.template}})
108-
.then(() => {
109-
this.dialogModifyVersionVisible = false
110-
this.loading = true
111-
this.$message({
112-
type: "success",
113-
message: this.$t("commons.msg.operation_success"),
114-
})
115-
})
116-
.finally(() => {
117-
this.loading = false
111+
OptionRollback(row) {
112+
this.$confirm(this.$t("commons.confirm_message.rollback"), this.$t("commons.message_box.prompt"), {
113+
confirmButtonText: this.$t("commons.button.confirm"),
114+
cancelButtonText: this.$t("commons.button.cancel"),
115+
type: "warning",
116+
}).then(() => {
117+
patchDeployment(this.cluster, row.metadata.namespace, this.name, { spec: { template: row.spec.template } })
118+
.then(() => {
119+
this.dialogModifyVersionVisible = false
120+
this.loading = true
121+
this.$message({
122+
type: "success",
123+
message: this.$t("commons.msg.operation_success"),
118124
})
125+
})
126+
.finally(() => {
127+
this.loading = false
128+
})
119129
})
120130
},
131+
SpecificInformation(row) {
132+
this.itemVerisonForm = row
133+
this.dialogSpecificVisible = true
134+
},
121135
},
122136
mounted() {
123137
this.clusterName = this.$route.query.cluster

web/dashboard/src/i18n/lang/en-US.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const message = {
5353
scale: "Scale",
5454
restart: "Restart",
5555
modifying_version: "Modifying version",
56-
sync: "Sync"
56+
sync: "Sync",
5757
rollback: "Roll Back"
5858
},
5959
table: {
@@ -113,6 +113,7 @@ const message = {
113113
delete: "This operation cannot be undone, do you want to continue?",
114114
back_form: "Return form editing does not preserve all changes made to YAML",
115115
open_yaml: ", still want to open YAML edit?",
116+
rollback: "This action rolls back the current Deployment to the changed version, do you want to continue?",
116117
},
117118
login: {
118119
username: "Username",
@@ -259,6 +260,7 @@ const message = {
259260
container_type: "Container type",
260261
current_version: "Current version",
261262
new_version: "New version",
263+
specific_information: "Specific information",
262264
initContainer: "InitContainer",
263265
standardContainer: "StandardContainer",
264266
schedule: "Schedule",

web/dashboard/src/i18n/lang/zh-CN.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const message = {
5454
scale: "伸缩",
5555
restart: "重启",
5656
modifying_version: "修改镜像版本",
57-
sync: "同步"
57+
sync: "同步",
5858
rollback: "回滚到该版本"
5959
},
6060
table: {
@@ -114,6 +114,7 @@ const message = {
114114
delete: "此操作不可撤销, 是否继续?",
115115
back_form: "返回表单编辑不会保留对 YAML 做出的所有更改",
116116
open_yaml: ",仍要打开 YAML 编辑?",
117+
rollback: "此操作将回滚当前 deployment 到改版本,是否继续?",
117118
},
118119
login: {
119120
username: "用户名",
@@ -260,6 +261,7 @@ const message = {
260261
container_type: "容器类型",
261262
current_version: "当前版本",
262263
new_version: "新版本",
264+
specific_information: "具体信息",
263265
initContainer: "初始化容器",
264266
standardContainer: "标准容器",
265267
schedule: "调度",
@@ -287,7 +289,6 @@ const message = {
287289
repo_image: "镜像",
288290
repo_disabled: "不使用镜像仓库",
289291

290-
291292
port: "服务端口",
292293
service_type: "服务类型",
293294
not_create: "不创建服务",

0 commit comments

Comments
 (0)