Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit disk name in full vm #458

Merged
merged 2 commits into from
Jun 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<CopyReadonlyInput
v-for="disk of contract.mounts"
:key="disk.name"
:label="'Disk( ' + disk.mountPoint + ' ) GB'"
:label="getDiskLabel(contract, disk)"
:data="Math.ceil(disk.size / (1024 * 1024 * 1024))"
/>
<CopyReadonlyInput label="WireGuard IP" :data="contract.interfaces[0].ip" />
Expand Down Expand Up @@ -195,13 +195,21 @@ function getType(key: string): string {

return "text";
}

function getDiskLabel(contract: any, disk: Disk) {
if (contract.metadata.includes("fullvm") && contract.mounts.indexOf(disk) > 0) {
return "Disk";
}
return "Disk( " + disk.mountPoint + " ) GB";
}
</script>

<script lang="ts">
import { useProfileManager } from "@/stores/profile_manager";
import { GrafanaStatistics } from "@/utils/getMetricsUrl";
import { getGrid } from "@/utils/grid";

import type { Disk } from "../utils/deploy_vm";
import CopyReadonlyInput from "./copy_readonly_input.vue";
import { HighlightDark, HighlightLight } from "./highlight_themes";

Expand Down