forked from JointCloud/JCC-RIP
add annotations
This commit is contained in:
parent
54f263243b
commit
5f45450ed7
|
@ -202,6 +202,7 @@ export default {
|
|||
this.getServiceList()
|
||||
},
|
||||
methods: {
|
||||
// 设备服务列表
|
||||
getServiceList() {
|
||||
getEdgeDataByIpPath({ address: this.$route.query.ip, path: `core-metadata/api/v2/deviceservice/all?offset=0&limit=-1` }).then(e => {
|
||||
this.blockList = e.data.services || []
|
||||
|
@ -214,15 +215,18 @@ export default {
|
|||
this.getProfileList()
|
||||
}
|
||||
},
|
||||
// 设备自动采集信息
|
||||
viewAutoEvents(row) {
|
||||
this.deviceItemData = row
|
||||
this.dialogAutoEventsVisible = true
|
||||
},
|
||||
// 设备服务设置信息
|
||||
viewSetting(row) {
|
||||
this.dialogSettingVisible = true
|
||||
// this.getEventData()
|
||||
this.serviceData = Object.assign({}, row)
|
||||
},
|
||||
// 删除设备or元信息
|
||||
deleteItem(row) {
|
||||
this.$confirm(`您确定要删除吗?`, { type: 'warning' }).then(() => {
|
||||
deleteService({ address: this.$route.query.ip, path: `/core-metadata/api/v2/${this.activeName === '2' ? 'device' : 'deviceprofile'}/name/` + row.name }).then(e => {
|
||||
|
@ -233,6 +237,7 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
// 修改元信息
|
||||
editProfile(row) {
|
||||
getProfileByIpPath({ address: this.$route.query.ip, path: '/api/v2/profile/yaml/name/' + row.name }).then(e => {
|
||||
this.dialogEditProfileVisible = true
|
||||
|
@ -240,11 +245,13 @@ export default {
|
|||
this.code = JSON.stringify(e.data, null, 2)
|
||||
})
|
||||
},
|
||||
// 添加元信息
|
||||
addProfile() {
|
||||
this.add = true
|
||||
this.code = ``
|
||||
this.dialogEditProfileVisible = true
|
||||
},
|
||||
// 提交元信息
|
||||
submitProfile() {
|
||||
this.add ? postYaml({ address: this.$route.query.ip, profile: JSON.parse(this.code) }).then(e => {
|
||||
if (e.code === 200) {
|
||||
|
@ -260,6 +267,7 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
// 修改设备服务 设置
|
||||
ok() {
|
||||
patchDeviceservice({ address: this.$route.query.ip, path: '/core-metadata/api/v2/deviceservice', updateDeviceServiceRequests: [{ apiVersion: 'v2', service: this.serviceData }] }).then(e => {
|
||||
if (e.code === 200) {
|
||||
|
@ -268,11 +276,13 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
// 设备列表
|
||||
getDevicelist(filterName) {
|
||||
getEdgeDataByIpPath({ address: this.$route.query.ip, path: `core-metadata/api/v2/device/all?offset=0&limit=-1` }).then(e => {
|
||||
this.blockList1 = e.data.devices || []
|
||||
})
|
||||
},
|
||||
// 元信息列表
|
||||
getProfileList(filterName) {
|
||||
getEdgeDataByIpPath({ address: this.$route.query.ip, path: `core-metadata/api/v2/deviceprofile/all?offset=0&limit=-1` }).then(e => {
|
||||
this.blockList2 = e.data.profiles || []
|
||||
|
|
Loading…
Reference in New Issue