diff --git a/public/plugins/plugin-list.json b/public/plugins/plugin-list.json index 63c9e1e..a8c7ff2 100644 --- a/public/plugins/plugin-list.json +++ b/public/plugins/plugin-list.json @@ -40,6 +40,14 @@ "defaultBuckets": ["wis2box-public"], "defaultFilePattern": "^WIGOS_(\\d-\\d+-\\d+-\\w+)_.*\\.bufr4$", "hint": "The regex pattern must contain the WIGOS station identifier" + }, + { + "title": "CAP messages", + "id": "wis2box.data.cap_message.CAPMessageData", + "defaultFileExtension": "xml", + "defaultBuckets": ["wis2box-incoming"], + "defaultFilePattern": "^.*\\.xml$", + "hint": "" } ], "templates": [ diff --git a/src/components/DatasetEditorForm.vue b/src/components/DatasetEditorForm.vue index f21ed40..871fec7 100644 --- a/src/components/DatasetEditorForm.vue +++ b/src/components/DatasetEditorForm.vue @@ -1003,6 +1003,8 @@ export default defineComponent({ console.error(error); // Display error message to the user message.value = 'Error loading discovery metadata list.'; + // Empty items + items.value = [] } // Now add the option to create a new dataset, regardless of whether // the list could be loaded or not diff --git a/src/templates/cap-template.json b/src/templates/cap-template.json new file mode 100644 index 0000000..daf9a79 --- /dev/null +++ b/src/templates/cap-template.json @@ -0,0 +1,35 @@ +{ + "label": "weather/advisories-warnings", + "title": "CAP Alerts published by $CENTRE_ID", + "identifier": "urn:wmo:md:$CENTRE_ID:$DATA_POLICY.weather.cap", + "topicHierarchy": "$CENTRE_ID/data/$DATA_POLICY/weather/advisories-warnings", + "language": "en", + "resolution": "", + "keywords": [ + "CAP", + "warnings", + "alerts" + ], + "themes": [ + { + "concepts": [{ "id": "weather", "label": "weather" }], + "scheme": "http://codes.wmo.int/wis/topic-hierarchy/earth-system-discipline" + } + ], + "wis2box": { + "retention": "P30D", + "topic_hierarchy": "$CENTRE_ID.data.$DATA_POLICY.weather.advisories-warnings", + "data_mappings": { + "plugins": { + "xml": [ + { + "plugin": "wis2box.data.cap_message.CAPMessageData", + "notify": true, + "buckets": ["wis2box-incoming"], + "file-pattern": "^.*\\.xml$" + } + ] + } + } + } +} \ No newline at end of file