diff --git a/web/public/js/components.js b/web/public/js/components.js index 3bebc773..029dc22e 100755 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -321,6 +321,33 @@ Vue.component("cluster-selector", { ` }) +Vue.component("node-cluster-combo-box", { + props: ["v-cluster-id"], + data: function () { + let that = this + Tea.action("/clusters/options") + .post() + .success(function (resp) { + that.clusters = resp.data.clusters + }) + return { + clusters: [] + } + }, + methods: { + change: function (item) { + if (item == null) { + this.$emit("change", 0) + } else { + this.$emit("change", item.value) + } + } + }, + template: `