From a0d5775e9bf78bcd9d9cb48acac22d2adb86186a Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Wed, 3 Jan 2024 21:05:16 +0200 Subject: [PATCH 01/11] - feat: add serialNumber field in NodeInfo type - feat: add NodeDetailsCard showing more details in node selector - refactor: use node card in node selector - refactor: turn node selector into VSelect instead of VAutocomplete --- packages/grid_client/src/primitives/nodes.ts | 1 + .../node_selector/TfAutoNodeSelector.vue | 36 ++++-- .../node_selector/TfNodeDetailsCard.vue | 116 ++++++++++++++++++ .../ResourceDetails.vue | 34 +++++ 4 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 packages/playground/src/components/node_selector/TfNodeDetailsCard.vue create mode 100644 packages/playground/src/components/node_selector/node_details_internals/ResourceDetails.vue diff --git a/packages/grid_client/src/primitives/nodes.ts b/packages/grid_client/src/primitives/nodes.ts index 422e1faffb..25960373ad 100644 --- a/packages/grid_client/src/primitives/nodes.ts +++ b/packages/grid_client/src/primitives/nodes.ts @@ -59,6 +59,7 @@ interface NodeInfo { extraFee: number; rentedByTwinId: number; rentContractId: number; + serialNumber?: string; } interface PublicConfig { domain: string; diff --git a/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue b/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue index 527c1cf839..201bd4b1e9 100644 --- a/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue +++ b/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue @@ -6,9 +6,13 @@ + +
- + + - + , validFilters: { type: Boolean, required: true }, @@ -256,3 +260,9 @@ export default { }, }; + + diff --git a/packages/playground/src/components/node_selector/TfNodeDetailsCard.vue b/packages/playground/src/components/node_selector/TfNodeDetailsCard.vue new file mode 100644 index 0000000000..763b329597 --- /dev/null +++ b/packages/playground/src/components/node_selector/TfNodeDetailsCard.vue @@ -0,0 +1,116 @@ + + + diff --git a/packages/playground/src/components/node_selector/node_details_internals/ResourceDetails.vue b/packages/playground/src/components/node_selector/node_details_internals/ResourceDetails.vue new file mode 100644 index 0000000000..279fc07ca3 --- /dev/null +++ b/packages/playground/src/components/node_selector/node_details_internals/ResourceDetails.vue @@ -0,0 +1,34 @@ + + + From 65c274f817025fef414842aff5032c9f0ebc467f Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Thu, 4 Jan 2024 14:55:10 +0200 Subject: [PATCH 02/11] feat: rewrite node-selector (VSelect part) into a table alike component with same functions --- .../node_selector/TfAutoNodeSelector.vue | 193 ++++++++++-------- .../node_selector/TfNodeDetailsCard.vue | 98 +++++---- .../ResourceDetails.vue | 7 +- 3 files changed, 178 insertions(+), 120 deletions(-) diff --git a/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue b/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue index 201bd4b1e9..d3b65dad4d 100644 --- a/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue +++ b/packages/playground/src/components/node_selector/TfAutoNodeSelector.vue @@ -1,95 +1,103 @@