From 3321bfb9ca0d7bf03110eb728164a5e3d3bc20a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Prod=27homme?= Date: Wed, 13 Nov 2024 16:12:01 +0100 Subject: [PATCH] refactor(cms): Improve display of dataset metadata --- .../sync/admin-role.strapi-super-admin.json | 30 ++- ...nfiguration_components##metadata.item.json | 199 ++++++++++++++++++ ...n_content_types##api##dataset.dataset.json | 32 ++- 3 files changed, 252 insertions(+), 9 deletions(-) create mode 100644 cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json diff --git a/cms/config/sync/admin-role.strapi-super-admin.json b/cms/config/sync/admin-role.strapi-super-admin.json index 52d7c6e..23b5607 100644 --- a/cms/config/sync/admin-role.strapi-super-admin.json +++ b/cms/config/sync/admin-role.strapi-super-admin.json @@ -13,7 +13,15 @@ "layers", "default_layer", "topic", - "sub_topic" + "sub_topic", + "metadata.source", + "metadata.website", + "metadata.description", + "metadata.main_applications", + "metadata.temporal_resolution", + "metadata.temporal_coverage", + "metadata.spatial_resolution", + "metadata.units" ] }, "conditions": [] @@ -35,7 +43,15 @@ "layers", "default_layer", "topic", - "sub_topic" + "sub_topic", + "metadata.source", + "metadata.website", + "metadata.description", + "metadata.main_applications", + "metadata.temporal_resolution", + "metadata.temporal_coverage", + "metadata.spatial_resolution", + "metadata.units" ] }, "conditions": [] @@ -50,7 +66,15 @@ "layers", "default_layer", "topic", - "sub_topic" + "sub_topic", + "metadata.source", + "metadata.website", + "metadata.description", + "metadata.main_applications", + "metadata.temporal_resolution", + "metadata.temporal_coverage", + "metadata.spatial_resolution", + "metadata.units" ] }, "conditions": [] diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json b/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json new file mode 100644 index 0000000..952ecb5 --- /dev/null +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json @@ -0,0 +1,199 @@ +{ + "key": "plugin_content_manager_configuration_components::metadata.item", + "value": { + "settings": { + "bulkable": true, + "filterable": true, + "searchable": true, + "pageSize": 10, + "mainField": "source", + "defaultSortBy": "source", + "defaultSortOrder": "ASC" + }, + "metadatas": { + "id": { + "edit": {}, + "list": { + "label": "id", + "searchable": false, + "sortable": false + } + }, + "source": { + "edit": { + "label": "source", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "source", + "searchable": true, + "sortable": true + } + }, + "website": { + "edit": { + "label": "website", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "website", + "searchable": true, + "sortable": true + } + }, + "description": { + "edit": { + "label": "description", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "description", + "searchable": true, + "sortable": true + } + }, + "main_applications": { + "edit": { + "label": "main_applications", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "main_applications", + "searchable": false, + "sortable": false + } + }, + "temporal_resolution": { + "edit": { + "label": "temporal_resolution", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "temporal_resolution", + "searchable": true, + "sortable": true + } + }, + "temporal_coverage": { + "edit": { + "label": "temporal_coverage", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "temporal_coverage", + "searchable": false, + "sortable": false + } + }, + "spatial_resolution": { + "edit": { + "label": "spatial_resolution", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "spatial_resolution", + "searchable": true, + "sortable": true + } + }, + "units": { + "edit": { + "label": "units", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "units", + "searchable": true, + "sortable": true + } + } + }, + "layouts": { + "list": [ + "id", + "source", + "website", + "description" + ], + "edit": [ + [ + { + "name": "source", + "size": 6 + } + ], + [ + { + "name": "website", + "size": 12 + } + ], + [ + { + "name": "description", + "size": 12 + } + ], + [ + { + "name": "main_applications", + "size": 12 + } + ], + [ + { + "name": "temporal_resolution", + "size": 12 + } + ], + [ + { + "name": "temporal_coverage", + "size": 12 + } + ], + [ + { + "name": "spatial_resolution", + "size": 12 + } + ], + [ + { + "name": "units", + "size": 12 + } + ] + ] + }, + "uid": "metadata.item", + "isComponent": true + }, + "type": "object", + "environment": null, + "tag": null +} \ No newline at end of file diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json index d7c6c17..9f57406 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json @@ -93,6 +93,20 @@ "sortable": true } }, + "metadata": { + "edit": { + "label": "metadata", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "metadata", + "searchable": false, + "sortable": false + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -153,6 +167,12 @@ } }, "layouts": { + "list": [ + "id", + "topic", + "sub_topic", + "name" + ], "edit": [ [ { @@ -179,13 +199,13 @@ "name": "default_layer", "size": 6 } + ], + [ + { + "name": "metadata", + "size": 12 + } ] - ], - "list": [ - "id", - "topic", - "sub_topic", - "name" ] }, "uid": "api::dataset.dataset"