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

Fix farms public IPs table selection #2713

Merged
merged 1 commit into from
May 19, 2024
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
@@ -1,20 +1,10 @@
<template>
<div>
<v-data-table
:loading="loadingIps"
loading-text="Loading farm IPs..."
<ListTable
:headers="headers"
:items="copyPublicIps"
:items-length="publicIps.length"
:items-per-page="size"
:page="page"
@update:items-per-page="size => updateIPPageSize(size)"
@update:page="page => updateIPPage(page)"
class="elevation-1 v-data-table-header"
:disable-sort="true"
hide-default-header
hover
show-select
:loading="loading"
:deleting="isRemoving"
v-model="selectedItems"
>
<template v-slot:top>
Expand All @@ -35,7 +25,7 @@
<template #bottom>
<div class="d-flex align-end justify-end">
<v-btn
class="ma-5"
class="ma-3"
color="error"
variant="outlined"
prepend-icon="mdi-delete"
Expand All @@ -46,7 +36,7 @@
</v-btn>
</div>
</template>
</v-data-table>
</ListTable>
<v-dialog v-model="showDialogue" max-width="600">
<v-card>
<v-toolbar color="primary" class="custom-toolbar">
Expand All @@ -64,7 +54,8 @@
<v-btn @click="showDialogue = false" variant="outlined" color="anchor">Close</v-btn>
<v-btn
variant="outlined"
:text="isRemoving ? 'Deleting..' : 'Confirm'"
text="Confirm"
:loading="isRemoving"
color="error"
:disabled="isRemoving"
@click="removeFarmIps"
Expand All @@ -80,13 +71,14 @@ import type { RemoveFarmIPModel } from "@threefold/grid_client";
import type { PublicIp } from "@threefold/tfchain_client";
import { onMounted, ref, watch } from "vue";

import ListTable from "@/components/list_table.vue";
import { useGrid } from "@/stores";
import { IPType } from "@/utils/types";

import { createCustomToast, ToastType } from "../../utils/custom_toast";

export default {
name: "PublicIPsTable",
components: { ListTable },
props: {
farmId: {
type: Number,
Expand Down
Loading