feat:新增功能

webshell模块(以下功能有待认真测试,此次提交为方便后端接口调试)
1.界面布局基本完成
2.多tab页实现多xshell连接(存在问题有待调整)
3.关闭功能(关闭所有连接)
This commit is contained in:
hanyuxia
2020-03-02 17:44:52 +08:00
parent 1b77d2061b
commit 4a8d9f1920
4 changed files with 423 additions and 2 deletions

View File

@@ -164,7 +164,7 @@
class="el-icon-delete"></i>
</span>&nbsp;&nbsp;&nbsp;
&nbsp;
<span title="CLI" @click="ssss(scope.row.id ,scope.row.host)" class="content-right-option" :id="'asset-ssh-'+scope.row.id"><i
<span title="CLI" @click="cli(scope.row.id ,scope.row.host,scope.row.accounts)" class="content-right-option" :id="'asset-ssh-'+scope.row.id"><i
class="nz-icon nz-icon-cli"></i>
</span>
</template>
@@ -195,6 +195,7 @@
ref="elementset"
></element-set>
<module-box :module="module" @reload="getAssetData" ref="moduleBox"></module-box>
<web-ssh ref="webSsh" ></web-ssh>
</div>
</template>
@@ -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');