mirror of
https://github.com/louislam/dockge.git
synced 2026-05-22 14:32:16 +00:00
Init (#1)
This commit is contained in:
63
frontend/src/pages/ContainerTerminal.vue
Normal file
63
frontend/src/pages/ContainerTerminal.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user