diff --git a/Components/AAA/BExIS.Security.Services/Utilities/MessageHelper.cs b/Components/AAA/BExIS.Security.Services/Utilities/MessageHelper.cs index 503d11de4f..0702f4e616 100644 --- a/Components/AAA/BExIS.Security.Services/Utilities/MessageHelper.cs +++ b/Components/AAA/BExIS.Security.Services/Utilities/MessageHelper.cs @@ -160,7 +160,7 @@ public static string GetSendRequestMessage(long datasetid, string title, string public static string GetWithdrawRequestHeader(long datasetid, string requester) { - return $"Data request from {requester} for dataset with ID {datasetid} withdrawn"; + return $"Data request from {requester} for dataset with ID {datasetid} withdrawn"; } public static string GetWithdrawRequestMessage(long datasetid, string title, string requester) @@ -173,7 +173,7 @@ public static string GetWithdrawRequestMessage(long datasetid, string title, str public static string GetAcceptRequestHeader(long datasetid, string requester) { - return $"Data request from {requester} for dataset with ID {datasetid} granted"; + return $"Data request from {requester} for dataset with ID {datasetid} granted"; } public static string GetAcceptRequestMessage(long datasetid, string title) @@ -186,7 +186,7 @@ public static string GetAcceptRequestMessage(long datasetid, string title) public static string GetRejectedRequestHeader(long datasetid, string requester) { - return $"Data request from {requester} for dataset with ID {datasetid} rejected"; + return $"Data request from {requester} for dataset with ID {datasetid} rejected"; } public static string GetRejectedRequestMessage(long datasetid, string title) @@ -342,7 +342,7 @@ public static string GetUnsetPublicMessage(string userName, long datasetid, stri public static string GetPushApiStoreHeader(long datasetid, string title) { - return $"Receive data for dataset '{title}' with ID {datasetid}"; + return $"Receive data for dataset '{title}' with ID {datasetid}"; } public static string GetPushApiStoreMessage(long datasetid, string userName, string[] errors = null) @@ -386,7 +386,7 @@ public static string GetPushApiValidateMessage(long datasetid, string userName, public static string GetPushApiUploadSuccessHeader(long datasetid, string title) { - return $"Upload completed for dataset: '{title}' with ID {datasetid}"; + return $"Upload completed for dataset: '{title}' with ID {datasetid}"; } public static string GetPushApiUploadSuccessMessage(long datasetid, string userName) @@ -396,7 +396,7 @@ public static string GetPushApiUploadSuccessMessage(long datasetid, string userN public static string GetPushApiUploadFailHeader(long datasetid, string title) { - return $"Upload was not successful for dataset '{title}' with ID {datasetid}"; + return $"Upload was not successful for dataset '{title}' with ID {datasetid}"; } public static string GetPushApiUploadFailMessage(long datasetid, string userName, string[] errors) diff --git a/Console/BExIS.Web.Shell.Svelte/package.json b/Console/BExIS.Web.Shell.Svelte/package.json index 7631b994d9..4f43fac141 100644 --- a/Console/BExIS.Web.Shell.Svelte/package.json +++ b/Console/BExIS.Web.Shell.Svelte/package.json @@ -52,7 +52,7 @@ }, "type": "module", "dependencies": { - "@bexis2/bexis2-core-ui": "0.4.64", + "@bexis2/bexis2-core-ui": "0.4.65", "@sveltejs/adapter-static": "3.0.2", "buffer": "6.0.3", "gray-matter": "4.0.3", diff --git a/Console/BExIS.Web.Shell/App_Data/BExIS.Web.Shell.xml b/Console/BExIS.Web.Shell/App_Data/BExIS.Web.Shell.xml index e4a12259e1..e9568006b0 100644 --- a/Console/BExIS.Web.Shell/App_Data/BExIS.Web.Shell.xml +++ b/Console/BExIS.Web.Shell/App_Data/BExIS.Web.Shell.xml @@ -595,5 +595,14 @@ + + + defaul menubar load with bar name like + menubarRoot + Accountbar + + + + diff --git a/Console/BExIS.Web.Shell/Areas/BAM/BAM.Manifest.xml b/Console/BExIS.Web.Shell/Areas/BAM/BAM.Manifest.xml index 81de70cef5..1e255aafa1 100644 --- a/Console/BExIS.Web.Shell/Areas/BAM/BAM.Manifest.xml +++ b/Console/BExIS.Web.Shell/Areas/BAM/BAM.Manifest.xml @@ -27,10 +27,7 @@ title="Get partyTypes for account" description="Get partyTypes for account which are defined in setting.xml" icon="" controller="PartyService" action="GetPartyTypesForAccount" extends="" /> - + -

 

-

2. Manage Parties

-

 

-

- Through Manage Parties, you can see all the available entities, create, edit and delete them. - The red warning icon in action-required column shows that this party needs some relationships to be valid. -

-
-

Manage_Parties_img 

-

 

-

2.1. Create and Edit

-

 

-

- After clicking on Create Party in Manage Parties in the first step, you should select party type and its date range. Click on Next you will navigate to the next step.
- Here depends on the selected party type you will see some additional attributes. You have to fill the required fields.
- To edit later a party you will navigate to this page again. You will able to change all the fields except party type. -
-

create_party_1_img

-

 

-

2.2. Manage Relationship

-

- Every party could have some relationships with the other parties. If you do not define relationships, the party will save but it is not valid. You can add relationship later as well.
- Party relationships tab in the edit, or create party is to manage these relationships.
- To create a new relationship, click on create and you see the following window. Here you see all the available party relationship types depend on the definitions, which we already defined. The numbers in parentheses show the number of current relationships and the maximum relationships that this party to this relationship type can have.
- Clicking on one of them, you see some more options and available parties to make a relationship.
-

- - - -
-

new_party_relation_img 

-
-

Selecting a party, it asks you to enter some information and by default, it fills some of the fields. The title here is the title of the relationship. Start and end dates are important and will set the duration of the relationship. This duration should fit the duration of a source party and the target party; otherwise, you will face an error.

-

new_party_relation2_img 

-

- Click on the edit icon on the last column of each relationship make you able to edit the relationship.
- Click on the view icon make you able to see the detail of a relationship.
- Click on delete icon make you able to delete a relationship if the minimum cardinality of its relationship types preserved. -

-

 

-

3. Party creates while registration

-
-

A party type Person is created while registration. User guides to fill information fields needed for its party. - This page is available in tab "Additional attributes" during edit a party type Person.

-

 

-

registration_img 

- -

 

-

 

- - Go to top \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/BAM/Views/Help/Informations.xml b/Console/BExIS.Web.Shell/Areas/BAM/Views/Help/Informations.xml deleted file mode 100644 index e5865b3c5e..0000000000 --- a/Console/BExIS.Web.Shell/Areas/BAM/Views/Help/Informations.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - On this page you are able to ...
-
- -
- - - - This guide will walk you through the ... - - - -
\ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/package.json b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/package.json index 0fc8b844a9..cdd9212694 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/package.json +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/package.json @@ -34,6 +34,7 @@ "@types/node": "22.0.2", "@typescript-eslint/eslint-plugin": "8.0.0", "@typescript-eslint/parser": "8.0.0", + "@ts4nfdi/terminology-service-suite-js": "^6.0.0", "autoprefixer": "10.4.19", "eslint": "9.8.0", "eslint-config-prettier": "9.1.0", @@ -50,7 +51,7 @@ }, "type": "module", "dependencies": { - "@bexis2/bexis2-core-ui": "0.4.64", + "@bexis2/bexis2-core-ui": "0.4.65", "@bexis2/bexis2-rpm-ui": "0.2.15", "@floating-ui/dom": "1.6.8", "@fortawesome/free-solid-svg-icons": "6.6.0", diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/+page.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/+page.svelte similarity index 94% rename from Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/+page.svelte rename to Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/+page.svelte index 1091371937..239b11b36a 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/+page.svelte +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/+page.svelte @@ -15,7 +15,7 @@ } from '@xyflow/svelte'; import { writable, type Writable, get } from 'svelte/store'; import '@xyflow/svelte/dist/style.css'; - import { onMount } from 'svelte'; + import { onMount, tick } from 'svelte'; // import custom components import TreeComponent from './TreeComponent.svelte'; @@ -43,13 +43,20 @@ } from './Services/fileHelpers'; import componentManifestJson from './componentManifest.json'; + import { Page, pageContentLayoutType } from '@bexis2/bexis2-core-ui'; + import { SaveConfig, LoadConfig } from './Services/apiCalls'; + import { getEntityTemplateList } from '$services/EntityTemplateCaller'; + // separate configs for edit/view modes let componentConfig_edit: ConfigFile = createEmptyConfig(); let componentConfig_view: ConfigFile = createEmptyConfig(); let componentPositions: PositionFile = createEmptyPositions(); - const componentManifest = componentManifestJson; + const componentManifestList = Array.isArray(componentManifestJson) + ? componentManifestJson + : [componentManifestJson]; + let selectedComponentManifest: any = componentManifestList[0] ?? null; // schema nodes from treecomponent let schemaNodes: any[] = []; @@ -60,10 +67,40 @@ // initial interaction mode let currentInteractionMode = 'edit'; let selectedMode: any = null; + let selectedEntityTemplate: any = null; + let selectedEntityTemplateId: string | number = ''; // store for node specific modes let nodeSpecificModes = new Map(); + // reactive: convert template ID to full object + $: if (selectedEntityTemplateId && entityTemplateList.length > 0) { + const found = entityTemplateList.find(t => String(t.id) === String(selectedEntityTemplateId)); + if (found) { + selectedEntityTemplate = found; + } + } + + // reactive: handle template changes + $: if (selectedEntityTemplate && selectedEntityTemplate.id) { + // reset state from previous template + componentConfig_edit = createEmptyConfig(); + componentConfig_view = createEmptyConfig(); + componentPositions = createEmptyPositions(); + editModeNodes = []; + viewModeNodes = []; + nodeSpecificModes.clear(); + selectedNode.set(null); + selectedEdge.set(null); + sidebarMode = 'empty'; + activeTab = 0; + edges.set([]); + nodes.set([]); + lastNodesSnapshot = ''; + + load(); + } + // popup state for mode switch warning let showModeChangeWarning = false; let pendingInteractionMode = ''; @@ -80,16 +117,69 @@ // track last node state let lastNodesSnapshot = ''; + // entity template list + let entityTemplateList: any[] = []; + + // load configs from file and apply component position & edges reconstruct on mount onMount(async () => { + // get teamplate id from url + + await getEntityTemplateList().then((list) => { + entityTemplateList = list; + }); + + const urlParams = new URLSearchParams(window.location.search); + const templateIdParam = urlParams.get('id'); + if (templateIdParam) { + const templateId = Number(templateIdParam); + selectedEntityTemplateId = templateId; + // reactive statement will set selectedEntityTemplate automatically + } + + load(); + + }); + + async function load(){ + + + console.log('Loading configs for template:', selectedEntityTemplate); try { - const loaded = await loadConfigsFromDownloads(); + await LoadConfig(selectedEntityTemplate.id, 'edit').then((loadedEdit) => { + if (loadedEdit) { + componentConfig_edit = JSON.parse(JSON.stringify(loadedEdit)); + } + else { + componentConfig_edit = createEmptyConfig(); + } + }); + await LoadConfig(selectedEntityTemplate.id, 'view').then((loadedView) => { + if (loadedView) { + componentConfig_view = JSON.parse(JSON.stringify(loadedView)); + } + else { + componentConfig_view = createEmptyConfig(); + } + }); + await LoadConfig(selectedEntityTemplate.id, 'positions').then((loadedPositions) => { + if (loadedPositions) { + componentPositions = JSON.parse(JSON.stringify(loadedPositions)); + } + else { + componentPositions = createEmptyPositions(); + } + }); + + + /* const loaded = await loadConfigsFromDownloads(); + console.log('🚀 ~ onMount ~ loaded:', loaded); if (loaded) { componentConfig_edit = JSON.parse(JSON.stringify(loaded.edit)); componentConfig_view = JSON.parse(JSON.stringify(loaded.view)); componentPositions = loaded.positions; - + */ editModeNodes = []; viewModeNodes = []; @@ -100,22 +190,27 @@ reconstructEdgesForMode('edit'); // load only edit edges (view loads on mode switch) }, 500); } - } catch (error) { - // silent fail - } + catch (error) { + console.error('Error loading configs on mount:', error); + } // set initial sub-mode based on first manifest component const firstComponent = getCurrentConfig()?.components?.[0]; if (firstComponent?.mode?.mode_name) { - const manifestModes = componentManifest?.modes?.edit || []; + const manifestModes = selectedComponentManifest?.modes?.edit || []; const foundMode = manifestModes.find((mode: any) => mode.mode_name === firstComponent.mode.mode_name); if (foundMode) { selectedMode = foundMode; forceNodeUpdate(); } } - }); + } + + // reload configs when entity template changes (via reactive statement) + function handleEntityTemplateChange() { + // no longer needed - reactive statement handles it + } // get current config based on interaction mode function getCurrentConfig(): ConfigFile { @@ -182,7 +277,7 @@ // structure as in config files const componentData: any = { meta: { - component_name: node.data.componentName || componentManifest.meta.component_name, + component_name: node.data.componentName || selectedComponentManifest?.meta?.component_name, component_ui_id: node.id }, globalSettings: { @@ -202,7 +297,7 @@ }; const modeKey = node.data.interactionMode || currentInteractionMode; - const manifestModes = componentManifest?.modes?.[modeKey as string] || []; + const manifestModes = selectedComponentManifest?.modes?.[modeKey as string] || []; const manifestMode = manifestModes.find((m: any) => m.mode_name === node.data.modeName); const currentConfigRef = modeKey === 'edit' ? componentConfig_edit : componentConfig_view; @@ -211,7 +306,7 @@ ); // global settings - const manifestGlobalSettings = componentManifest?.globalSettings?.globalsetting || []; + const manifestGlobalSettings = selectedComponentManifest?.globalSettings?.globalsetting || []; const configGlobalSettings = existingComponent?.globalSettings?.globalsetting || []; // cycle through manifest global settings and fill from config or default @@ -414,7 +509,7 @@ } // get manifest submodes for new interaction mode - const newModes = componentManifest?.modes?.[newMode]; + const newModes = selectedComponentManifest?.modes?.[newMode]; if (newModes && newModes.length > 0) { selectedMode = newModes[0]; } else { @@ -557,8 +652,12 @@ // force config reactivity componentConfig_edit = { ...componentConfig_edit }; componentConfig_view = { ...componentConfig_view }; - - downloadAllConfigs(componentConfig_edit, componentConfig_view, componentPositions); + + SaveConfig(componentConfig_edit, 1, 'edit'); + SaveConfig(componentConfig_view, 1, 'view'); + SaveConfig(componentPositions, 1, 'positions'); + + (componentConfig_edit, componentConfig_view, componentPositions); alert(`Configuration saved! @@ -659,10 +758,15 @@ } } }); + + + SaveConfig(componentConfig_edit, 1, 'edit'); + SaveConfig(componentConfig_view, 1, 'view'); + SaveConfig(componentPositions, 1, 'positions'); // download all configs downloadAllConfigs(componentConfig_edit, componentConfig_view, componentPositions); - + // alert('Mappings saved!'); } @@ -857,7 +961,7 @@ } // dynamically create nodes - $: configNodes = createConfigNodes(currentInteractionMode, getCurrentConfig(), componentManifest, nodeVersion, editModeNodes, viewModeNodes); + $: configNodes = createConfigNodes(currentInteractionMode, getCurrentConfig(), selectedComponentManifest, nodeVersion, editModeNodes, viewModeNodes); // function to create config nodes on start or mode change based on config / saved nodes function createConfigNodes( @@ -888,7 +992,7 @@ const components = config?.components || []; if (!components || !Array.isArray(components)) return []; - const currentManifest = manifest || componentManifest; + const currentManifest = manifest || selectedComponentManifest; const configNodesArray: Node[] = []; // create nodes for each component in config matching current interaction mode @@ -1274,7 +1378,7 @@ if (selectedMode) return selectedMode; // fallback to first available mode in manifest - const availableModes = componentManifest?.modes?.[currentInteractionMode] || []; + const availableModes = selectedComponentManifest?.modes?.[currentInteractionMode] || []; return availableModes[0] || null; } @@ -1289,7 +1393,7 @@ if ($selectedNode.data?.modeName) { const interactionMode = $selectedNode.data?.interactionMode || currentInteractionMode; - const manifestModes = componentManifest?.modes?.[interactionMode as string] || []; + const manifestModes = selectedComponentManifest?.modes?.[interactionMode as string] || []; const nodeMode = manifestModes.find((mode: any) => mode.mode_name === $selectedNode.data.modeName); if (nodeMode) { @@ -2113,15 +2217,202 @@ }; + + + + +
+
+
+ Data Configuration Project +
+ + + +
+ + +
+
+ +
+
+ + + + + + + +
+ + +
+
+ + +{#if showModeChangeWarning} + +{/if} + + +{#if showCancelWarning} + +{/if} + + +{#if showDeleteWarning} + +{/if} + + + + +
+ - -
-
-
- Data Configuration Project -
- -
- - -
-
- -
-
- - - - - - - -
- - -
-
- -{#if showModeChangeWarning} - -{/if} - - -{#if showCancelWarning} - -{/if} - - -{#if showDeleteWarning} - -{/if} - - - \ No newline at end of file + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/ButtonEdge.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/ButtonEdge.svelte similarity index 100% rename from Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/ButtonEdge.svelte rename to Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/ButtonEdge.svelte diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/ComponentLibrary.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/ComponentLibrary.svelte similarity index 92% rename from Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/ComponentLibrary.svelte rename to Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/ComponentLibrary.svelte index ee4ae6344b..5bc64cc1d4 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/ComponentLibrary.svelte +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfig/ComponentLibrary.svelte @@ -1,5 +1,5 @@ {#if path && simpleComponent.properties} +
+
+
+
+
+ aaaaaaa +
+
+
{/if} \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/Services/apiCalls.ts b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/Services/apiCalls.ts deleted file mode 100644 index 7a2b9ef1a3..0000000000 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/Services/apiCalls.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Api } from '@bexis2/bexis2-core-ui'; - -export const GetMetadataSchema = async (id: number) => { - try { - // // API - // const response = await Api.get('/api/MetadataStructure/' + id); - // return response.data; - - // local load - const response = await fetch(`/src/routes/componentconfiguration/Schema/metadataSchema_${id}.json`); - if (!response.ok) { - throw new Error(`Schema file not found: metadataSchema_${id}.json`); - } - const data = await response.json(); - return data; - } catch (error) { - throw error; - } -}; \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/componentManifest.json b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/componentManifest.json deleted file mode 100644 index ecc8e7d68a..0000000000 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/componentconfiguration/componentManifest.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "meta": { - "title": "Map Component", - "component_name": "map_v1.17.6.25", - "author": "GeoTeam", - "version": "1.0.0", - "description": "Component for geographic data visualization" - }, - "globalSettings": { - "globalsetting": [ - { - "name": "Default SRS", - "description": "Default spatial reference system", - "type": "string", - "target_variable": "defaultSRS", - "default_value": { - "type": "string", - "value": "EPSG:4326" - } - }, - { - "name": "Map Provider", - "description": "Base map provider", - "type": "string", - "target_variable": "mapProvider", - "default_value": { - "type": "string", - "value": "OpenStreetMap" - } - } - ] - }, - "modes": { - "edit": [ - { - "mode_name": "coordinates_area", - "description": "Berechnet eine Area aus xmin, xmax, ymin, ymax und gibt area als Output.", - "settings": { - "setting": [ - { - "name": "Initial View Extent", - "description": "Initial map view extent", - "type": "string", - "target_variable": "initViewExtent", - "default_value": { - "type": "string", - "value": "[10,10,35,40]" - } - } - ] - }, - "variables": { - "variable": [ - { - "name": "X Minimum", - "description": "Minimum X coordinate (longitude)", - "type": "number", - "format": "decimal", - "target_variable": "xmin", - "allowregex_input": true, - "allowregex_output": true, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "20.0" - } - }, - { - "name": "X Maximum", - "description": "Maximum X coordinate (longitude)", - "type": "number", - "format": "decimal", - "target_variable": "xmax", - "allowregex_input": false, - "allowregex_output": false, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "23.0" - } - }, - { - "name": "Y Minimum", - "description": "Minimum Y coordinate (latitude)", - "type": "number", - "format": "decimal", - "target_variable": "ymin", - "allowregex_input": true, - "allowregex_output": false, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "20.0" - } - }, - { - "name": "Y Maximum", - "description": "Maximum Y coordinate (latitude)", - "type": "number", - "format": "decimal", - "target_variable": "ymax", - "allowregex_input": false, - "allowregex_output": true, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "25.0" - } - }, - { - "name": "Area", - "description": "Geographic area in square meters", - "type": "number", - "format": "m^2", - "target_variable": "area", - "allowregex_input": false, - "allowregex_output": true, - "is_input": false, - "is_output": true, - "default_value": { - "type": "number", - "value": "800000.0" - } - } - ] - } - }, - { - "mode_name": "coordinates", - "description": "Gibt xmin, xmax, ymin, ymax als Input und Output weiter.", - "settings": { - "setting": [ - { - "name": "Fit to Data", - "description": "Automatically fit map bounds to the data extent", - "type": "boolean", - "target_variable": "fitToData", - "default_value": { - "type": "boolean", - "value": "true" - } - } - ] - }, - "variables": { - "variable": [ - { - "name": "X Minimum", - "description": "Minimum X coordinate (longitude)", - "type": "number", - "format": "decimal", - "target_variable": "xmin", - "allowregex_input": true, - "allowregex_output": true, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "8.0" - } - }, - { - "name": "X Maximum", - "description": "Maximum X coordinate (longitude)", - "type": "number", - "format": "decimal", - "target_variable": "xmax", - "allowregex_input": true, - "allowregex_output": true, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "12.0" - } - }, - { - "name": "Y Minimum", - "description": "Minimum Y coordinate (latitude)", - "type": "number", - "format": "decimal", - "target_variable": "ymin", - "allowregex_input": true, - "allowregex_output": true, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "8.0" - } - }, - { - "name": "Y Maximum", - "description": "Maximum Y coordinate (latitude)", - "type": "number", - "format": "decimal", - "target_variable": "ymax", - "allowregex_input": true, - "allowregex_output": true, - "is_input": true, - "is_output": true, - "default_value": { - "type": "number", - "value": "11.0" - } - } - ] - } - } - ], - "view": [ - { - "mode_name": "display_area", - "description": "Mode for area display", - "settings": { - "setting": [ - { - "name": "View Extent", - "description": "Map extent for view mode", - "type": "string", - "target_variable": "viewExtent", - "default_value": { - "type": "string", - "value": "[15,15,25,25]" - } - } - ] - }, - "variables": { - "variable": [ - { - "name": "Display Area", - "description": "Area to display", - "type": "string", - "target_variable": "displayArea", - "allowregex_input": true, - "allowregex_output": false, - "is_input": true, - "is_output": false, - "default_value": { - "type": "string", - "value": "" - } - } - ] - } - } - ] - } -} \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/BExIS.Modules.Dcm.UI.csproj b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/BExIS.Modules.Dcm.UI.csproj index 77f3c7189a..11c40f1b3e 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/BExIS.Modules.Dcm.UI.csproj +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/BExIS.Modules.Dcm.UI.csproj @@ -66,7 +66,6 @@ - @@ -408,7 +407,6 @@ - @@ -417,7 +415,6 @@ - @@ -796,6 +793,10 @@ {0815d220-3625-4e23-bbbc-8152345637fe} Vaiona.Entities + + {29A7BE0F-A17C-4AE8-8CA1-15FE4DD74129} + Vaiona.IoC + {e8b37581-1cac-463d-903b-b4bee8b2b0e3} Vaiona.Logging @@ -848,6 +849,10 @@ {d17cdd9d-b87b-441b-9248-5c54e92ffc81} BExIS.Dcm.Wizard + + {8519EAC6-FBF8-48B3-813F-E0B9D3CC4A52} + BExIS.Ddm.Api + {34cad2a2-6928-458b-b8dc-af71d55f20cc} BExIS.Dim.Entities diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/DatasetInController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/DatasetInController.cs index e5bd0129a2..299db46b14 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/DatasetInController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/DatasetInController.cs @@ -135,7 +135,7 @@ public HttpResponseMessage Post([FromBody] PostApiDatasetModel dataset) datasetId = newDataset.Id; // add security - entityPermissionManager.CreateAsync(user.UserName, "Dataset", typeof(Dataset), newDataset.Id, Enum.GetValues(typeof(RightType)).Cast().ToList()); + entityPermissionManager.CreateAsync(user.UserName, entityTemplate.EntityType.Name, typeof(Dataset), newDataset.Id, Enum.GetValues(typeof(RightType)).Cast().ToList()); //add title and description to the metadata diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/MetadataInController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/MetadataInController.cs index f1fcfcf3da..252e6949b7 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/MetadataInController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/API/MetadataInController.cs @@ -73,6 +73,7 @@ public async Task Put(int id) var request = Request.CreateResponse(); User user = null; string error = ""; + string comment = "Update via API"; DatasetManager datasetManager = new DatasetManager(); UserManager userManager = new UserManager(); @@ -207,6 +208,12 @@ public async Task Put(int id) { return Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, "the json does not have the expected structure"); } + + var commentProperty = metadataJson.Property("@comment"); + if (commentProperty != null && commentProperty.Value != null && commentProperty.Value.ToString().Length > 0) + { + comment = commentProperty.Value.ToString(); + } } else { @@ -254,12 +261,12 @@ public async Task Put(int id) workingCopy.ModificationInfo = new EntityAuditInfo() { Performer = user.UserName, - Comment = "via API", - ActionType = AuditActionType.Create + Comment = "Metadata", + ActionType = AuditActionType.Create, }; datasetManager.EditDatasetVersion(workingCopy, null, null, null); - datasetManager.CheckInDataset(id, "via API", user.Name, ViewCreationBehavior.None); + datasetManager.CheckInDataset(id, comment, user.Name, ViewCreationBehavior.None); } LoggerFactory.LogData(id.ToString(), typeof(Dataset).Name, Vaiona.Entities.Logging.CrudState.Created); diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ComponentConfigController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ComponentConfigController.cs new file mode 100644 index 0000000000..628366059b --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ComponentConfigController.cs @@ -0,0 +1,84 @@ +using BExIS.App.Bootstrap.Attributes; +using BExIS.UI.Helpers; +using Newtonsoft.Json; +using System.IO; +using System.Web.Mvc; +using Vaiona.Utils.Cfg; + + +namespace BExIS.Modules.Dcm.UI.Controllers +{ + public class ComponentConfigController : Controller + { + public ActionResult Index(long id = 0) + { + string module = "DCM"; + ViewData["app"] = SvelteHelper.GetApp(module); + ViewData["start"] = SvelteHelper.GetStart(module); + ViewData["id"] = id; + return View(); + } + + + [BExISApiAuthorize] + [JsonNetFilter] + [System.Web.Http.HttpPost] + public bool SavConfige(Data data) + { + + string filename = data.Id + "_" + data.Type + ".json"; + + string directory = Path.Combine(AppConfiguration.GetModuleWorkspacePath("DCM"), "ComponentConfig"); + // combine datapath + path + filename + string filepath = Path.Combine(directory, filename); + + if (System.IO.File.Exists(filepath)) + { + System.IO.File.Delete(filepath); // check if file exist, delete maybe? } + } + + if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); // create directory if not exist + + System.IO.File.WriteAllText(filepath, data.Content); + + return true; + } + + [JsonNetFilter] + [System.Web.Http.HttpGet] + public JsonResult LoadConfig(string id, string type) + { + + string filename = id + "_" + type + ".json"; + + string directory = Path.Combine(AppConfiguration.GetModuleWorkspacePath("DCM"), "ComponentConfig"); + // combine datapath + path + filename + string filepath = Path.Combine(directory, filename); + + // if file not exist return empty data + if (!System.IO.File.Exists(filepath)) + { + return Json(new Data(), JsonRequestBehavior.AllowGet); + } + + var content = JsonConvert.DeserializeObject(System.IO.File.ReadAllText(filepath)); + + return Json(content, JsonRequestBehavior.AllowGet); + } + + public class Data + { + public string Id { get; set; } + public string Content { get; set; } + public string Type { get; set; } + + public Data() + { + Id = ""; + Content = ""; + Type = ""; + } + } + + } +} \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/FormController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/FormController.cs index 2a0d6ab475..32d20bd56a 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/FormController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/FormController.cs @@ -6,6 +6,7 @@ using BExIS.Dim.Helpers.Mappings; using BExIS.Dlm.Entities.Common; using BExIS.Dlm.Entities.Data; +using BExIS.Dlm.Entities.DataStructure; using BExIS.Dlm.Entities.MetadataStructure; using BExIS.Dlm.Services.Administration; using BExIS.Dlm.Services.Data; @@ -13,7 +14,7 @@ using BExIS.Dlm.Services.TypeSystem; using BExIS.IO; using BExIS.IO.Transform.Output; -using BExISExceptions = BExIS.IO.Transform.Validation.Exceptions; +using BExIS.IO.Transform.Validation.Exceptions; using BExIS.Modules.Dcm.UI.Helpers; using BExIS.Modules.Dcm.UI.Models.CreateDataset; using BExIS.Modules.Dcm.UI.Models.Metadata; @@ -26,7 +27,10 @@ using BExIS.Xml.Helpers; using BExIS.Xml.Helpers.Mapping; using BEXIS.JSON.Helpers; -using JsonSchema = Newtonsoft.Json.Schema; +using DocumentFormat.OpenXml.EMMA; +using DocumentFormat.OpenXml.Spreadsheet; +using Newtonsoft.Json.Schema; +using NHibernate.Util; using System; using System.Collections.Generic; using System.IO; @@ -38,18 +42,15 @@ using System.Web.Routing; using System.Xml; using System.Xml.Linq; +using Telerik.Web.Mvc.Extensions; using Vaiona.Persistence.Api; using Vaiona.Utils.Cfg; using Vaiona.Web.Extensions; using Vaiona.Web.Mvc; using Vaiona.Web.Mvc.Models; using Vaiona.Web.Mvc.Modularity; -using Newtonsoft.Json.Schema; -using NHibernate.Util; -using Telerik.Web.Mvc.Extensions; -using DocumentFormat.OpenXml.EMMA; -using DocumentFormat.OpenXml.Spreadsheet; -using BExIS.Dlm.Entities.DataStructure; +using BExISExceptions = BExIS.IO.Transform.Validation.Exceptions; +using JsonSchema = Newtonsoft.Json.Schema; namespace BExIS.Modules.Dcm.UI.Controllers { @@ -3228,7 +3229,25 @@ public ActionResult Validate(long entityId) }); } - private void validationAgainstJsonSchema() + public JsonResult IsValid(long entityId) + { + TaskManager = FormHelper.GetTaskManager(entityId); + + List errors = new List(); + + if (TaskManager != null && TaskManager.Bus.ContainsKey(CreateTaskmanager.METADATA_STEP_MODEL_HELPER)) + { + + var stepInfoModelHelpers = (List)TaskManager.Bus[CreateTaskmanager.METADATA_STEP_MODEL_HELPER]; + ValidateModels(stepInfoModelHelpers.Where(s => s.Activated && s.IsParentActive()).ToList()); + errors = validationAgainstJsonSchema(); + } + + bool valid = !errors.Any(); + return Json(valid, JsonRequestBehavior.AllowGet); + } + + private List validationAgainstJsonSchema() { // check if metadata is valid against the metadatastructure XmlMetadataConverter xmlMetadataConverter = new XmlMetadataConverter(); @@ -3247,6 +3266,8 @@ private void validationAgainstJsonSchema() validationErrors.ForEach(e => errors.Add(e.Message.ToString())); ViewData["ValidationErrors"] = errors; + + return errors; } //XX number of index des values nötig diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Hooks/EntityReferenceController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Hooks/EntityReferenceController.cs index 9d50c85025..97af932b61 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Hooks/EntityReferenceController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Hooks/EntityReferenceController.cs @@ -64,7 +64,7 @@ public ActionResult Start(long id, int version) } } - [BExISEntityAuthorize(typeof(Dataset), "id", RightType.Read)] + public ActionResult StartView(long id, int version) { var sourceTypeId = 0; diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/CreateDatasetController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/CreateDatasetController.cs index 10bc1ae15f..f2aa8406e0 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/CreateDatasetController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/CreateDatasetController.cs @@ -1,5 +1,6 @@ using BExIS.Dcm.CreateDatasetWizard; using BExIS.Dcm.Wizard; +using BExIS.Ddm.Api; using BExIS.Dim.Entities.Mappings; using BExIS.Dim.Helpers.Mappings; using BExIS.Dlm.Entities.Administration; @@ -24,28 +25,31 @@ using BExIS.Security.Services.Utilities; using BExIS.UI.Helpers; using BExIS.UI.Models; +using BExIS.Utils.Config; +using BExIS.Utils.Data.Helpers; using BExIS.Utils.Data.Upload; using BExIS.Utils.Extensions; using BExIS.Xml.Helpers; -using NHibernate.Cfg.MappingSchema; using BEXIS.JSON.Helpers; using Newtonsoft.Json.Schema; +using NHibernate.Cfg.MappingSchema; using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using System.Web.Mvc; using System.Web.Routing; using System.Xml; using System.Xml.Linq; using Vaiona.Entities.Common; +using Vaiona.IoC; using Vaiona.Logging; using Vaiona.Persistence.Api; using Vaiona.Web.Extensions; using Vaiona.Web.Mvc; using Vaiona.Web.Mvc.Models; using Vaiona.Web.Mvc.Modularity; -using BExIS.Utils.Data.Helpers; -using BExIS.Utils.Config; + namespace BExIS.Modules.Dcm.UI.Controllers { @@ -57,13 +61,13 @@ public class CreateDatasetController : BaseController #region Submit And Create And Finish And Cancel and Reset - public JsonResult Submit(bool valid, string commitMessage, long entityId) + public async Task Submit(bool valid, string commitMessage, long entityId) { try { // create and submit Dataset - long datasetId = SubmitDataset(entityId, valid, "Dataset", commitMessage); + long datasetId = await SubmitDataset(entityId, valid, "Dataset", commitMessage); return Json(new { result = "redirect", url = Url.Action("Show", "Data", new { area = "DDM", id = datasetId }) }, JsonRequestBehavior.AllowGet); } @@ -77,7 +81,7 @@ public JsonResult Submit(bool valid, string commitMessage, long entityId) /// Submit a Dataset based on the imformations /// in the CreateTaskManager /// - public long SubmitDataset(long entityId, bool valid, string entityname, string commitMessage = "") + public async Task SubmitDataset(long entityId, bool valid, string entityname, string commitMessage = "") { #region create dataset @@ -205,10 +209,7 @@ public long SubmitDataset(long entityId, bool valid, string entityname, string c #endregion set references - if (this.IsAccessible("DDM", "SearchIndex", "ReIndexSingle")) - { - var x = this.Run("DDM", "SearchIndex", "ReIndexSingle", new RouteValueDictionary() { { "id", datasetId } }); - } + Task.Run(() => reindex(datasetId)); LoggerFactory.LogData(datasetId.ToString(), typeof(Dataset).Name, Vaiona.Entities.Logging.CrudState.Created); @@ -845,6 +846,16 @@ private DatasetVersion setModificationInfo(DatasetVersion workingCopy, bool newD return workingCopy; } + private async Task reindex(long datasetId) + { + // reindex + ISearchProvider provider = IoCFactory.Container.ResolveForSession(); + provider?.UpdateSingleDatasetIndex(datasetId, (IndexingAction)Enum.Parse(typeof(IndexingAction), "CREATE"), false); + + return true; + + } + #endregion Helper } } \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/HelpController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/HelpController.cs deleted file mode 100644 index 68e5bcd462..0000000000 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/HelpController.cs +++ /dev/null @@ -1,19 +0,0 @@ -using BExIS.Utils.Helpers; -using System; -using System.Web.Mvc; -using Vaiona.Web.Mvc.Modularity; - -namespace BExIS.Modules.Dcm.UI.Controllers -{ - public class HelpController : Controller - { - // - // GET: /DDM/Help/ - - public ActionResult Index() - { - string helpurl = ModuleManager.GetModuleSettings("DCM").GetValueByKey("help").ToString(); - return Redirect(ManualHelper.GetUrl(helpurl)); - } - } -} \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ViewController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ViewController.cs index c3b1a6a63c..b7e354b632 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ViewController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/ViewController.cs @@ -136,13 +136,7 @@ public ActionResult StartData(long id, int version) } } - /// - /// Start from DataSrtucturePreview Hook - view - /// - /// - /// - /// - [BExISEntityAuthorize(typeof(Dataset), "id", RightType.Read)] + public ActionResult StartDataStructure(long id, int version) { //throw new NotImplementedException(); diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Dcm.Manifest.xml b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Dcm.Manifest.xml index 0a63541248..d161057190 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Dcm.Manifest.xml +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Dcm.Manifest.xml @@ -30,11 +30,6 @@ controller="Push" action="index" extends="./menubarRoot/collect" />--> - - + @Html.Partial("_sveltePage") + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Form/MetadataEditor.cshtml b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Form/MetadataEditor.cshtml index 3b84874096..9459b61d06 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Form/MetadataEditor.cshtml +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Form/MetadataEditor.cshtml @@ -293,14 +293,20 @@ @*@if (@Model.FromEditMode) - { - - }*@ + { + + }*@ +
@if (@submit.IsComplete()) { + + + - + + + } @if (@Model.FromEditMode) @@ -308,6 +314,7 @@ }
+ } @@ -529,23 +536,16 @@ function submit() { + $("#savecontainer").preloader(20, "saving", 50); + var commit_message = $('#commit_message').val(); console.log("commit_message", commit_message) - - $.get('@Url.Action("Validate", "Form", new RouteValueDictionary {{"area", "DCM"}, { "entityId", entityId } })', + $.get('@Url.Action("IsValid", "Form", new RouteValueDictionary {{"area", "DCM"}, { "entityId", entityId }})', function (response) { - - $('#MetadataEditor').replaceWith(response); - bindMinimap(true); - var errors = $('.bx-input-error'); - - var errorsFromJsonSchema = $('.bx-error'); - - console.log(errors); - if (errors.length == 0 && errorsFromJsonSchema.length == 0) { + if (response == true) { callSubmitAction(true, commit_message); } else { @@ -553,17 +553,27 @@ if ('@Model.SaveWithErrors.ToString().ToLowerInvariant()' == "true") { - console.log("inside"); + if (confirm('Warning: Some fields are not complete or contain entries that do not meet the requirements. Press OK to save anyways and resume later.')) { callSubmitAction(false, commit_message); } + else { + $("#savecontainer").removePreloader(); + } + } } + + }) + + } function callSubmitAction(valid, commit_message) { + + var entityId = '@Model.DatasetId'; $.get('@Url.Action( @submit.ActionName, diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Help/Index.cshtml b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Help/Index.cshtml deleted file mode 100644 index eab79ffc40..0000000000 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Help/Index.cshtml +++ /dev/null @@ -1,290 +0,0 @@ -@section Information -{ - This guide will walk you through the basics of data collection including how to upload data and how to import a metadata structure. -} -@section leftPane{ - -} - - - -

1. Overview

-

 

-

The Data Collection Module provides tools to create new datasets, enter metadata, upload data to the system, and import metadata structures (i.e. schemas). There are some workflows available under the Collect tab and also in the Setup:

-
    -
  • Create Dataset
  • -
  • Upload Data
  • -
  • Import Data
  • -
  • Push Big File
  • -
  • Manage Metadata Structure
  • - -
-

 

-

2. Create Dataset

-

 

-

This wizard will assist you in creating a new dataset in BEXIS2. The Wizard is very flexible and builds up differently depending on the selected Metadata structure. Therefore, we describe only the basic functions here.

-

The first step is to generate an empty or a copy of an existing dataset based on your selection of the two mandatory elements: Data Structure, and Metadata Structure.

-

Create Dataset 

-

The next stage is determined by the selected metadata structure.

-

 

-

2.1. Copy an existing Dataset

-

By choosing an existing Dataset instead of creating a new one, you are able to make a copy of that dataset. Related to the Dataset, you can choose a Data Structure, but there is only one related Metadata Structure for each dataset.

-

You are able to use predefined content or change fields as you want.

- -

 

-

2.2. Content

-

The content area is where you enter metadata describing your dataset. The forms provided here may look different and contain different attributes depending on the metadata schema (structure) you have chosen in the first step.

-

 

-

Required           Required attributes

-

Add        Add an attribute

-

Mines        Remove an attribute

-

Up Down  Change order of the attribute

-

ExpandCollapse      Expand / collapse

-

 

-

On the bottom of the page, there is a button titled Validate to examine whether required attributes have been filled and whether the information complies with the business logic. The validation may also be triggered by clicking on the Submit button.

-

You could edit a submitted dataset or make a copy of that by clicking on the Edit or Copy buttons.

- -

When an input is faulty, the input field is highlighted in red. If you go with the mouse over the box, you get information about what is wrong.

- - -

2.3. Messages

-

The content area is where you enter metadata describing your dataset. The forms provided here may look different and contain different attributes depending on the metadata schema (structure) you have chosen in the first step.

- -

messages

- -

 

-

3. Upload Data

-

 

-

To upload your data, please go to the Collect > Upload Data via main menu. This wizard will assist you in uploading data into the BEXIS2 repository. A dataset can be structured or unstructured (i.e tabular or file).

-

 

-

Upload Data 

-

 

-

3.1. Upload Tabular Data

-

The term "Tabular data" is used for all datasets where there internal structure of the data is "known" to the system. For example, in a data table the header, which defines the columns (i.e. variables) is the structure of the data. Before uploading/importing data to the system the data structure needs to be created through the Data Structure Manager.

-

Uploading a tabular data follows the following steps.

-

 

- -

Select File

-

- In the first step an existing file containing your data needs to be selected. You can either select a file from your local computer or a file that has been uploaded to the server prior to starting the Upload Wizard. - The second option is designed for files larger than 4 MB that may take several minutes to transfer. The wizard supports file formats of Microsoft Excel or ASCII. - Microsoft Excel files are required to use a template created while creating a Data Structure (refer to Data Planning User Guide for more details). - Once a file has been successfully selected, click the Next button and proceed to the next step. -

-

Upload_Tabular 

-

 

- - - -

Get File Information

-

- For all Microsoft Excel files using a BEXIS2 template the file information and data structure is automatically extracted and this step is omitted. Please refer to the Data Planning User Guide for more details on how to create such a template. -

-

- For all other Excel files, users need to provide the information by selection the data on the screen. -

-

Upload_Tabular 

- -

- For all ASCII files users need to provide information on the file structure and formatting. -

-

First, please choose a separator that is being used to separate data values from each other in your ASCII file.

-

Depending on your language different punctuation is used for decimal values. Please choose the one present in your ASCII file.

-

Next please specify whether the orientation of your data is column-wise or row-wise (see figure below).

- -

Datasets may contain empty rows or columns on top or to the left before the header and the actual data values start. Please specify this offset in number of columns or rows. 

-

Further, your data file may contain a header defining variable names, types etc. The row/column where this header starts needs to be specified (see figure below).

-

Offset.JPGVariables.JPG 

-

Finally, the row/column where the actual data values start needs to be specified.

-

 

-

Specify Dataset

-

In BEXIS2 your data is stored and managed as part of a dataset. A dataset may contain one or more of your data files. But all data files within one dataset must be of the same data structure, i.e. the number of variables and their properties must be identical in each file. To upload your data to the system, please select one existing dataset from the dropdown list.

- - -

Choose Update Method

-

While adding data to an existing dataset you need to specify how you want to update.

-

- By Update the user need to specify a unique identifier (e.g. primary key) for each tuple (i.e. row) in your dataset. If your dataset already contains a variable with such a key, please select it. Otherwise, a primary key can be created by combining available variables. Please click the Check button to verify whether the selected combination is unique. If you go back and change something in the process of uploading, you need to check the primary key again. -

-

Choose Update Method 

-

By Append, the lines are uploaded directly to the data without checking for duplication.

-

 

-

Validation

-

With this step, the selected data file is validated against the selected data structure. Both, the structure of the data (e.g. variable properties) and whether the data values fit to the specified structure (e.g. data type, value range) is evaluated.

-

Click on Validate button to validate the data file.

-

If you go back and change something in the process of uploading, you need to validate the file again.

- -

Summary

-

With this final step a summary of your uploaded data file is provided. Please check the information and click the Finish button to confirm and finalize the upload.

-

 

-

3.2. Upload File

-

An unstructured data could be either selected from your local computer or could be a file that has been uploaded to the server. In the case of unstructured data, we do not read the contents of the data. We copy the files to the server and place them in relation to the dataset.

-

BEXIS2 application can support many file formats which are referred on the relevant page.

-

The Maximum acceptable file size up to now is: 1024 MB.

-

Select File

-

 

- -

4. Import Data

-

The Import Data wizard enables you to import both a tabular data structure and data in a single workflow. Import a file follows the following steps.

-

 

- -

Select File

-

In the first step an existing file containing both your data and the names of the variables needs to be selected. You can either select a file from your local computer or a file that has been uploaded to the server prior to starting the Upload Wizard. The second option is designed for files larger than 4 MB that may take several minutes to transfer. The wizard supports file formats of Microsoft Excel (*.xlsm, *.xlsx). Once a file has been successfully selected, click the Next button to proceed to the next step.

-

 

-

Select File

-

 

- -

Metadata

-

This step allows you to select the metadata schema that you would like to use for the dataset. There is no need to enter any metadata yet - after the last step you will be redirected to a page that allows you to enter the metadata. You can, however, change the title of the dataset. If you don't wish to change it, it will default to the name of the file you are using. Once you have selected a schema, click the Next button to proceed to the next step.

-

 

-

Metadata Schema

-

 

- -

Select Areas

-

You will see a table that represents the file that you selected during the first step. Here you can select, which part of the file should be used as variables and which parts should be interpreted as data.

-

For the variables, select a row or one part of a row and click the "Header" button. The selected area should now be highlighted in red. If you are using a BEXIS2 template file there is no need to select the whole header with unit, datatype, etc. Just select the names of the variables.

-

For the data, you can select multiple rows and click the "Data" button. The selected area should now be highlighted in blue. Please make sure that the data area contains as many columns as the header area. You can skip one or more rows by selecting the area above them, mark it as data, and then select the area below them and mark it as well. You can use the "Expand Selection" button to expand the last data area you selected to the last row of the file. This can be very helpful when working with large datasets.

-

If you made any mistakes during the selection process just use the "Reset" button to remove all markings and start over.

-

If you wish to upload data from a different worksheet you can select it from the dropdown-menu and click the "Change Worksheet" button. Please be aware that you can only upload data from one sheet at a time. Once you have selected the header and at least one data area, click the Next Button to proceed to the next step.

-

 

-

Select Areas

-

 

-

The representation of the data you will see in the table might differ from what you see in Microsoft Excel or similar programs.

-

Don't worry, your data will be uploaded correctly if you choose the correct datatypes during the next step.

-The following differences are known: -
    -
  • Dates and times
  • -
      -
    • Microsoft Excel users: Dates and times will be displayed as full timestamps, containing both a time and a date.
    • -
    • Libre Office users: Dates and times will be displayed as real numbers.
    • -
    -
  • Boolean values
  • -
      -
    • Libre Office users: Boolean values might be displayed as "0" and "1".
    • -
    -
  • Real Numbers
  • -
      -
    • Real numbers might be displayed with scientific notation.
    • -
    -
- - -

 

-

Verification

-

With this step you can define which units and datatypes your variables are using. The first column of dropdown-menus provides suggestions for attributes that are being used in other datasets and are similar to your variables. If you select one of the suggestions, unit and datatype are automatically adjusted. If you don't wish to use the suggestions, feel free to choose unit and datatype yourself.

-

The "Validate" button allows you to check if the datatypes you selected are suitable for the data you selected in the previous step. This allows you to recognize errors early and correct your selection. Once you've selected your units and datatypes, click the Next button to proceed.

-

 

-

Verification

-

 

- -

Summary

-

The summary step provides an overview of the dataset that is about to be created. When you click the Finish button, datastructure and dataset will be created and the data will be added. This might take a while, depending of the size of your file.

-

Upload_Tabular_1

-

As soon as this process is finished, you will be redirected to your new dataset and can add metadata, view primary data and datastructure, set permissions or publish the dataset.

- -

 

-

5. Push Big File

-

 

-

Each user has a personal folder on the server where files are stored temporary. On this page you can see the uploaded files. You can delete each file by clicking on the X, or use these files later, when you want to upload data to a dataset.

-

Push Big File

-

 

-

6. Manage Metadata Structure

-

 

-

Metadata structures (also called schemas or profiles) are typically created and imported by a data manager or administrator of the system. Thus this import function is available under the Setup > Import metadata Structure. The wizard will assist you in importing your metadata structure into the BEXIS2. A metadata structure must be defined in a XSD schema file.

-

When importing a metadata schema into BEXIS2, each element of the XSD file(s) is analyzed for its type, name, annotations, attributes, data types, constraints etc. Based on this information a form is automatically being created. For example, if an element is of data type Date, a date picker UI component will be used in the form. Also all names and descriptions are used exactly as they are in the XSD file(s).

-

NOTE: There are metadata standards available for almost any domain or type of data. It is good practice to follow one of them in order to ensure interoperability later on. However, although technical possible, most standards are very complex and should not be used as a whole. Users would just be overwhelmed and may need only a small selection of elements to describe their data. Standards are designed to cover a great range of use cases and data managers (in collaboration with their community) should make the effort in defining a set of feasible metadata elements in a profile (XSD file).

-

IMPORTANT: Please check, whether the XSD schema files have any dependencies to other files. You can find the dependencies in the import or include tags.

-

Metadata1

-

The current BEXIS2 system requires all referenced files to be locally available on the server (no URL to external resource). So you may need to store all references first to a local folder, change the schema location path in every file (e.g. ./fileName.xsd) and then upload all files to the server. (See section Push Big File).

-

metadata2

-

metadata3 

-

 

-Upload a Metadata Structure follows the following steps: -

 

- -

Select File

-

In the first step an existing file containing your data needs to be selected. You can either select a XSD file from your local computer or a file that has been uploaded to the server prior to starting the Wizard. You may use the "Push big data to server" function in the Collect menu to upload multiple related XSD files.

-

Note: Please upload a valid XSD structure. BEXIS2 does not check this kind of validation.

-

 

-

Select XSD File 

-

 

- -

Read Source

-

Please specify a name (i.e. display name) for the new metadata structure. You may also enter a root node if only a part of the XSD is to be used (optional).

-

Read XSD File

To find the root node open the XSD Schema file and have a look on the element tags. In the example of ABCD it looks like this.

-

img27

If no root node is selected then the wizard will automatically select the first element which is a complex type. But it is also possible to define the element "DataSet" as root node and the metadata structure starts from this element. The Name of a metadata structure must be unique and the root node must exist.

-

 

- -

Set Parameters

-

For the system to handle a dataset at least the title and a description is needed. In this step these two elements, which are typically available in all metadata structures, should be identified and made explicit to the system.

-

Set XSD Parameters 

-

 

- -

Summary

-

 

-

The Summary page is an overview about the created metadata structure.

-

Summary

-

 

-

 

-

 

- Go to top \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Help/Informations.xml b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Help/Informations.xml deleted file mode 100644 index 13c4c21801..0000000000 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Help/Informations.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - This wizard will assist you in creating a new dataset. Please select a data structure and a metadata structure below. - Or select a dataset as template to use the metadata structure and the metadata from the selected dataset. - - - - - - -

This guide will walk you through the basics of data collection including how to upload data and how to import a metadata structure.

-
- -
- - - - This wizard will assist you in adding a new metadata structure (i.e. schema) to the system. A metadata structure must be defined in XSD schema files. - Since XSD files can be defined in various ways this wizard is build on a few assumptions (e.g. with dependencies). Please consult the Help for more details. - - - - - - - Each user has a personal folder on the server where files are stored temporary. This wizard will assist you in pushing your files to server. You can also see the uploaded files, delete each file, or use these files later, when you want to upload data to a dataset. - - - - - - - This wizard will assist you in uploading data files to the system and adding them to a dataset. - - - -
\ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/package.json b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/package.json index ef07991092..82659ad452 100644 --- a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/package.json +++ b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/package.json @@ -50,7 +50,7 @@ }, "type": "module", "dependencies": { - "@bexis2/bexis2-core-ui": "0.4.64", + "@bexis2/bexis2-core-ui": "0.4.65", "@floating-ui/dom": "1.6.8", "@fortawesome/free-solid-svg-icons": "6.6.0", "@sveltejs/adapter-static": "3.0.2", diff --git a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/src/routes/taginfo/TagInfoEdit.svelte b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/src/routes/taginfo/TagInfoEdit.svelte index 553648627c..03f1358466 100644 --- a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/src/routes/taginfo/TagInfoEdit.svelte +++ b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI.Svelte/src/routes/taginfo/TagInfoEdit.svelte @@ -4,9 +4,18 @@ Table, notificationStore, notificationType, - ErrorMessage + ErrorMessage, + TextArea } from '@bexis2/bexis2-core-ui'; - import { add, get, save, updateSearch } from './services'; + import { + add, + get, + save, + updateSearch, + sendRequestForTagApproval, + isCurator, + isCuratorRequired + } from './services'; import { tagInfoModelStore, withMinorStore, originalTagInfoModelStore } from './stores.js'; import TablePublish from './table/tablePublish.svelte'; @@ -50,8 +59,18 @@ console.log('🚀 ~ reload ~ tagInfoModelStore:', $tagInfoModelStore); } + let isCuratorUser: boolean = false; + let isCuratorRequiredForTags: boolean = true; onMount(() => { + isCurator().then((res) => { + isCuratorUser = res; + console.log('🚀 ~ onMount ~ isCuratorUser:', isCuratorUser); + }); + isCuratorRequired().then((res) => { + isCuratorRequiredForTags = res; + console.log('🚀 ~ onMount ~ isCuratorRequired:', isCuratorRequiredForTags); + }); reload(); }); @@ -117,6 +136,25 @@ }); } } + + function sendRequestForTagApprovalFn(value: string) { + const data = { message: value, id: id }; + sendRequestForTagApproval(data).then((response) => { + if (response.status === 200) { + notificationStore.showNotification({ + notificationType: notificationType.success, + message: 'Request for tag approval sent.' + }); + } else { + notificationStore.showNotification({ + notificationType: notificationType.error, + message: 'Request for tag approval not sent.' + }); + } + }); + } + + let requestTagApprovalMessage: string = ''; {#await promise} @@ -125,6 +163,49 @@ {:then model}

Release Tag Management - Dataset ID {id}

+ +
+

+ To make your dataset visible in the search, at least one released dataset version is required. {#if !isCuratorUser && isCuratorRequiredForTags}Only + curators can create releases.{/if} +

+

+ Once released, the specific dataset version will be visible to users. As long as you only make + changes to the metadata, the latest version is shown automatically. If changes are made to the + data itself, a new release request is required so that these updates become visible to all + users. +

+ {#if !isCuratorUser && isCuratorRequiredForTags} +

+ Use the form below to request a new release from a curator. Please provide a short release + message and specify the version you refer to (if not specified the latest version will be + used). +

+

+ The curator will review your request, create the release accordingly, and may contact you if + needed. +

+
+
+