PortIO/resources/js/views/Status.vue

41 lines
949 B
Vue
Raw Normal View History

2023-08-11 02:22:50 +00:00
<template>
<div>
<h3>节点状态</h3>
<table class="table table-hover table-bordered table-responsive align-middle mt-3">
<thead class="text-center">
<tr>
<th scope="col">节点名称</th>
<th scope="col">节点状态</th>
</tr>
</thead>
<tbody class="text-center">
<tr v-for="server in servers">
<td>
{{ server.name }}
</td>
<td>
<ServerStatus :status="server.status"/>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script setup>
import ServerStatus from "../components/ServerStatus.vue";
import http from "../plugins/http"
import {ref} from "vue";
const servers = ref([])
2023-08-14 04:07:49 +00:00
http.get("servers").then(res => {
servers.value = res.data
})
2023-08-11 02:22:50 +00:00
</script>
<style scoped>
</style>