<template>
  <div class="columns is-multiline mx-0" v-if="data">
    <div class="column is-4" v-for="v in data">
      <div class="field is-grouped">
        <div class="control">
          <span class="icon-text has-text-warning">
            <span class="fsb-20">{{ v.name }}</span>
          </span>
        </div>
      </div>
      <CpuRam v-bind="{ssh: v.id}"></CpuRam>
      <DiskInfo class="mt-3" v-bind="{ssh: v.id, vpagename: v.vpagename}"></DiskInfo>
    </div>
  </div>
</template>
<script>
import CpuRam from "@/components/server/CpuRam"
import DiskInfo from "@/components/server/DiskInfo"
export default {
  components: {CpuRam, DiskInfo},
  data() {
    return {
      data: undefined,
      showmodal: undefined
    }
  },
  async created() {
    let found = this.$findapi('ssh')
    let rs = await this.$getapi([found])
    this.data = this.$copy(rs[0].data.rows)
    this.data.map((v,i)=>{
      v.vpagename = `pagedata8.8.${i+1}`
    })
  }
}
</script>