diff --git a/nezha-fronted/src/components/cli/console.vue b/nezha-fronted/src/components/cli/console.vue new file mode 100644 index 000000000..1304005b0 --- /dev/null +++ b/nezha-fronted/src/components/cli/console.vue @@ -0,0 +1,116 @@ + + + + + + + diff --git a/nezha-fronted/src/components/cli/webSSH.scss b/nezha-fronted/src/components/cli/webSSH.scss new file mode 100644 index 000000000..2578831d4 --- /dev/null +++ b/nezha-fronted/src/components/cli/webSSH.scss @@ -0,0 +1,62 @@ + +.console-dialog { + .menu { + + } + .console{ + + } + + .console-title-icon{ + font-size:18px; + color: #909399; + position: absolute; + top:9px; + } + .console-title-icon:hover:before{ + color: #1989fa; + } + + .el-dialog { + .el-dialog__body{ + padding: 0px !important; + } + .el-dialog__header{ + padding: 0px !important; + } + } + .el-tabs--border-card>.el-tabs__content { + padding: 0px !important; + } + + .el-tabs { + /*background-color: #F5F7FA;*/ + } + + .el-tabs .el-tabs__header { + margin-left:90px; + margin-right:150px; + } + + .el-menu--horizontal>.el-submenu .el-submenu__title { + height: 40px; + line-height: 40px; + } + + .el-menu.el-menu--horizontal .el-submenu__title i:first-child:before{ + color: #909399; + font-size:22px; + } + .el-menu.el-menu--horizontal .el-submenu__title i:first-child:hover:before{ + color: #1989fa; + } + + .el-submenu__title:hover{ + background-color:#FFF !important; + } + + +} +.dailog-custom{ + width:100%; +} diff --git a/nezha-fronted/src/components/cli/webSSH.vue b/nezha-fronted/src/components/cli/webSSH.vue new file mode 100644 index 000000000..2afad366c --- /dev/null +++ b/nezha-fronted/src/components/cli/webSSH.vue @@ -0,0 +1,230 @@ + + + + + + + + + + 文字大小 + 最小 + 小 + 中 + 大 + + + 字体 + Monosapace + Courier New + + + + + 下载 + 上传 + + + + + + + {{item.title}} + + + + + + + + + + + + + + + + diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 66ba498fc..d94f618f6 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -164,7 +164,7 @@ class="el-icon-delete"> - @@ -195,6 +195,7 @@ ref="elementset" > + @@ -202,11 +203,14 @@ import bus from "../../../libs/bus"; import exportXLSX from "../../common/exportXLSX"; import endpointStatusPop from "./endpointStatusPop"; + import webSSH from "../../cli/webSSH"; + export default { name: "asset", components:{ 'export-excel':exportXLSX, - 'endpoint-status-pop':endpointStatusPop + 'endpoint-status-pop':endpointStatusPop, + 'web-ssh':webSSH, }, data() { return { @@ -498,6 +502,15 @@ }); window.open(routeData.href); }, + cli(id,host,accounts){ + let port = ''; + let accountId = ''; + if(accounts && accounts.length>0 && accounts[0].port){ + port = accounts[0].port; + accountId = accounts[0].id; + } + this.$refs.webSsh.show(id,host,accountId,port); + }, jumpToAlertMsg(assetId) { this.$store.commit('assetForAlertListChange', assetId); bus.$emit("menu-change", 'alertList');