-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jianwei Mao <[email protected]>
- Loading branch information
1 parent
1a39c6e
commit 0d9cb59
Showing
3 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,50 @@ | ||
<template> | ||
<iframe src="https://dev.maojianwei.com:4433/onos/ui" width="100%" height="100%"></iframe> | ||
<!-- <div id="onosOrTips" style="height: 100%; width: 100%;"></div>--> | ||
|
||
<el-text id="onosTips" :type="tipsType" size="large"></el-text> | ||
|
||
<!--<iframe src="https://dev.maojianwei.com:4433/onos/ui" width="100%" height="100%"></iframe>--> | ||
</template> | ||
|
||
|
||
|
||
<script> | ||
export default { | ||
name: "DeviceControl", | ||
name: "ONOS", | ||
data() { | ||
return {} | ||
return { | ||
tipsType:"danger", | ||
}; | ||
}, | ||
mounted() { | ||
this.queryOnosPage(); | ||
}, | ||
methods: { | ||
queryOnosPage() { | ||
var vueThis = this; | ||
this.$http.get("/api/getOnosInfo") | ||
.then(function (res) { | ||
var addrPort = res.data["addrPort"]; | ||
if (addrPort != null && addrPort !== "") { | ||
vueThis.tipsType = "success"; | ||
document.getElementById("onosTips").innerText = "在新窗口中查看拓扑"; | ||
window.open("http://" + addrPort + "/onos/ui", "_blank"); | ||
} else { | ||
vueThis.tipsType = "warning"; | ||
document.getElementById("onosTips").innerText = "拓扑接口暂未配置"; | ||
} | ||
}) | ||
.catch(function (err) { | ||
console.log("errMao: " + err); | ||
vueThis.tipsType = "danger"; | ||
document.getElementById("onosTips").innerText = "拓扑接口获取异常:" + err; | ||
}); | ||
}, | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ export default createRouter({ | |
} | ||
}, | ||
{ | ||
path: '/onos', | ||
path: '/topo', | ||
components: { | ||
maoMain: ONOS | ||
} | ||
|