实现基本的域名、记录管理

This commit is contained in:
GoEdgeLab
2021-05-27 17:09:53 +08:00
parent 04db86a919
commit c0c80f32c9
48 changed files with 1386 additions and 9 deletions

View File

@@ -2,6 +2,6 @@ Vue.component("not-found-box", {
props: ["message"],
template: `<div style="text-align: center; margin-top: 5em;">
<div style="font-size: 2em; margin-bottom: 1em"><i class="icon exclamation triangle large grey"></i></div>
<p class="comment">{{message}}</p>
<p class="comment">{{message}}<slot></slot></p>
</div>`
})

View File

@@ -0,0 +1,28 @@
Vue.component("ns-cluster-selector", {
mounted: function () {
let that = this
Tea.action("/ns/clusters/options")
.post()
.success(function (resp) {
that.clusters = resp.data.clusters
})
},
props: ["v-cluster-id"],
data: function () {
let clusterId = this.vClusterId
if (clusterId == null) {
clusterId = 0
}
return {
clusters: [],
clusterId: clusterId
}
},
template: `<div>
<select class="ui dropdown auto-width" name="clusterId" v-model="clusterId">
<option value="0">[选择集群]</option>
<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
</select>
</div>`
})

View File

@@ -0,0 +1,28 @@
Vue.component("ns-user-selector", {
mounted: function () {
let that = this
Tea.action("/ns/users/options")
.post()
.success(function (resp) {
that.users = resp.data.users
})
},
props: ["v-user-id"],
data: function () {
let userId = this.vUserId
if (userId == null) {
userId = 0
}
return {
users: [],
userId: userId
}
},
template: `<div>
<select class="ui dropdown auto-width" name="userId" v-model="userId">
<option value="0">[选择用户]</option>
<option v-for="user in users" :value="user.id">{{user.fullname}} ({{user.username}})</option>
</select>
</div>`
})