64 lines
1.4 KiB
Vue
64 lines
1.4 KiB
Vue
<template>
|
|
<transition name="slide-fade" appear>
|
|
<div>
|
|
<h1 class="mb-3">Terminal - {{ serviceName }} ({{ stackName }})</h1>
|
|
|
|
<div class="mb-3">
|
|
<router-link :to="sh" class="btn btn-normal me-2">Switch to sh</router-link>
|
|
</div>
|
|
|
|
<Terminal class="terminal" :rows="20" mode="interactive" :name="terminalName" :stack-name="stackName" :service-name="serviceName" :shell="shell"></Terminal>
|
|
</div>
|
|
</transition>
|
|
</template>
|
|
|
|
<script>
|
|
import { getContainerExecTerminalName } from "../../../backend/util-common";
|
|
|
|
export default {
|
|
components: {
|
|
},
|
|
data() {
|
|
return {
|
|
|
|
};
|
|
},
|
|
computed: {
|
|
stackName() {
|
|
return this.$route.params.stackName;
|
|
},
|
|
shell() {
|
|
return this.$route.params.type;
|
|
},
|
|
serviceName() {
|
|
return this.$route.params.serviceName;
|
|
},
|
|
terminalName() {
|
|
return getContainerExecTerminalName(this.stackName, this.serviceName, 0);
|
|
},
|
|
sh() {
|
|
return {
|
|
name: "containerTerminal",
|
|
params: {
|
|
stackName: this.stackName,
|
|
serviceName: this.serviceName,
|
|
type: "sh",
|
|
},
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
|
|
},
|
|
methods: {
|
|
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.terminal {
|
|
height: 410px;
|
|
}
|
|
</style>
|