diff --git a/Components/App/BExIS.App.Bootstrap/app.config b/Components/App/BExIS.App.Bootstrap/app.config index 8a6963e7f..db4753479 100644 --- a/Components/App/BExIS.App.Bootstrap/app.config +++ b/Components/App/BExIS.App.Bootstrap/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/App/BExIS.App.Testing/app.config b/Components/App/BExIS.App.Testing/app.config index 64dfcb3dc..934ebb38b 100644 --- a/Components/App/BExIS.App.Testing/app.config +++ b/Components/App/BExIS.App.Testing/app.config @@ -8,7 +8,7 @@ - + @@ -66,6 +66,10 @@ + + + + \ No newline at end of file diff --git a/Components/DLM/BExIS.Dlm.Tests/app.config b/Components/DLM/BExIS.Dlm.Tests/app.config index fe6f32faa..a591c7768 100644 --- a/Components/DLM/BExIS.Dlm.Tests/app.config +++ b/Components/DLM/BExIS.Dlm.Tests/app.config @@ -141,7 +141,7 @@ - + diff --git a/Components/IO/BExIS.IO.DataType.DisplayPattern/app.config b/Components/IO/BExIS.IO.DataType.DisplayPattern/app.config index 114a2e070..15601c697 100644 --- a/Components/IO/BExIS.IO.DataType.DisplayPattern/app.config +++ b/Components/IO/BExIS.IO.DataType.DisplayPattern/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/IO/BExIS.IO.Transform.Input/app.config b/Components/IO/BExIS.IO.Transform.Input/app.config index efe3ceaa7..f3b14e169 100644 --- a/Components/IO/BExIS.IO.Transform.Input/app.config +++ b/Components/IO/BExIS.IO.Transform.Input/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/IO/BExIS.IO.Transform.Validation/app.config b/Components/IO/BExIS.IO.Transform.Validation/app.config index 16f3f079e..724a7c1fd 100644 --- a/Components/IO/BExIS.IO.Transform.Validation/app.config +++ b/Components/IO/BExIS.IO.Transform.Validation/app.config @@ -52,12 +52,16 @@ - + + + + + \ No newline at end of file diff --git a/Components/IO/BExIS.Io.Transform.Output/app.config b/Components/IO/BExIS.Io.Transform.Output/app.config index 114a2e070..15601c697 100644 --- a/Components/IO/BExIS.Io.Transform.Output/app.config +++ b/Components/IO/BExIS.Io.Transform.Output/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/IO/BExIS.Io/app.config b/Components/IO/BExIS.Io/app.config index 4838246c8..77f222559 100644 --- a/Components/IO/BExIS.Io/app.config +++ b/Components/IO/BExIS.Io/app.config @@ -60,7 +60,11 @@ - + + + + + diff --git a/Components/JSON/BEXIS.JSON.Helpers/app.config b/Components/JSON/BEXIS.JSON.Helpers/app.config index 4b7ae75a0..25c885b14 100644 --- a/Components/JSON/BEXIS.JSON.Helpers/app.config +++ b/Components/JSON/BEXIS.JSON.Helpers/app.config @@ -54,6 +54,14 @@ + + + + + + + + \ No newline at end of file diff --git a/Components/UI/BExIS.UI/app.config b/Components/UI/BExIS.UI/app.config index 4b77dcc29..47e20a412 100644 --- a/Components/UI/BExIS.UI/app.config +++ b/Components/UI/BExIS.UI/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/Utils/BExIS.Utils.Data.Tests/app.config b/Components/Utils/BExIS.Utils.Data.Tests/app.config index 281805207..ba5fe9fdc 100644 --- a/Components/Utils/BExIS.Utils.Data.Tests/app.config +++ b/Components/Utils/BExIS.Utils.Data.Tests/app.config @@ -111,7 +111,7 @@ - + diff --git a/Components/Utils/BExIS.Utils.Data/Helpers/ShellSeedDataGenerator.cs b/Components/Utils/BExIS.Utils.Data/Helpers/ShellSeedDataGenerator.cs index a400b6ddc..5d9af40e3 100644 --- a/Components/Utils/BExIS.Utils.Data/Helpers/ShellSeedDataGenerator.cs +++ b/Components/Utils/BExIS.Utils.Data/Helpers/ShellSeedDataGenerator.cs @@ -40,9 +40,9 @@ public void GenerateSeedData() var o12 = operationManager.Find("Shell", "Settings", "*") ?? operationManager.Create("Shell", "Settings", "*", settings); - if (!versionManager.Exists("Shell", "4.3.0")) + if (!versionManager.Exists("Shell", "4.3.1")) { - versionManager.Create("Shell", "4.3.0"); + versionManager.Create("Shell", "4.3.1"); } } } diff --git a/Components/Utils/BExIS.Utils.Data/app.config b/Components/Utils/BExIS.Utils.Data/app.config index 52e7a6fe1..a05a308d7 100644 --- a/Components/Utils/BExIS.Utils.Data/app.config +++ b/Components/Utils/BExIS.Utils.Data/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/Utils/BExIS.Utils.Tests/app.config b/Components/Utils/BExIS.Utils.Tests/app.config index 6f32408f8..16c539e1a 100644 --- a/Components/Utils/BExIS.Utils.Tests/app.config +++ b/Components/Utils/BExIS.Utils.Tests/app.config @@ -173,7 +173,7 @@ - + diff --git a/Components/Utils/BExIS.Utils/BExIS.Utils.csproj b/Components/Utils/BExIS.Utils/BExIS.Utils.csproj index c12e497df..827f9b483 100644 --- a/Components/Utils/BExIS.Utils/BExIS.Utils.csproj +++ b/Components/Utils/BExIS.Utils/BExIS.Utils.csproj @@ -41,6 +41,9 @@ prompt + + ..\..\..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + ..\..\..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll @@ -49,6 +52,9 @@ + + ..\..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + @@ -59,10 +65,23 @@ ..\..\..\packages\System.Linq.Dynamic.Core.1.3.0\lib\net46\System.Linq.Dynamic.Core.dll + + ..\..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + ..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + ..\..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\..\..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + ..\..\..\packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.Helpers.dll diff --git a/Components/Utils/BExIS.Utils/Extensions/ZipArchiveExtensions.cs b/Components/Utils/BExIS.Utils/Extensions/ZipArchiveExtensions.cs index af84be9d2..bbd812fc3 100644 --- a/Components/Utils/BExIS.Utils/Extensions/ZipArchiveExtensions.cs +++ b/Components/Utils/BExIS.Utils/Extensions/ZipArchiveExtensions.cs @@ -1,8 +1,8 @@ using BExIS.Security.Entities.Authorization; +using ICSharpCode.SharpZipLib.Zip; using System; using System.Collections.Generic; using System.IO; -using System.IO.Compression; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -11,7 +11,7 @@ namespace BExIS.Utils.Extensions { public static class ZipArchiveExtensions { - public static void AddAllFilesFromDirectory(this ZipArchive archive, string folderPath, string zipPath = null) + public static void AddAllFilesFromDirectory(this ZipOutputStream zipStream, string folderPath, string zipPath = null) { var files = Directory.GetFiles(folderPath); @@ -19,58 +19,77 @@ public static void AddAllFilesFromDirectory(this ZipArchive archive, string fold { // Get the file name (not the full path) string fileName = Path.GetFileName(filePath); + string entryName = !string.IsNullOrEmpty(zipPath) ? $"{zipPath}{fileName}" : fileName; - var entry = !string.IsNullOrEmpty(zipPath) ? archive.CreateEntry($"{zipPath}{fileName}") : archive.CreateEntry($"{fileName}"); + var entry = new ZipEntry(entryName); + entry.DateTime = File.GetLastWriteTime(filePath); + entry.Size = new FileInfo(filePath).Length; + + zipStream.PutNextEntry(entry); - // Open the entry stream and copy the file content into it - using (var entryStream = entry.Open()) using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { - fileStream.CopyTo(entryStream); + fileStream.CopyTo(zipStream); } + + zipStream.CloseEntry(); } } - public static void AddFile(this ZipArchive archive, string filePath, string zipPath = null) + public static void AddFile(this ZipOutputStream zipStream, string filePath, string zipPath = null) { - // Open the file from disk + if (!File.Exists(filePath)) + return; + + string fileName = Path.GetFileName(filePath); + string entryName = !string.IsNullOrEmpty(zipPath) ? $"{zipPath}{fileName}" : fileName; + + var entry = new ZipEntry(entryName); + entry.DateTime = File.GetLastWriteTime(filePath); + entry.Size = new FileInfo(filePath).Length; + + zipStream.PutNextEntry(entry); + using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { - string fileName = Path.GetFileName(filePath); - // Create an entry in the archive for the file - var entry = !string.IsNullOrEmpty(zipPath) ? archive.CreateEntry($"{zipPath}{fileName}") : archive.CreateEntry($"{fileName}"); - - // Open the entry stream and copy the file content into it - using (var entryStream = entry.Open()) - { - fileStream.CopyTo(entryStream); - } + fileStream.CopyTo(zipStream); } + + zipStream.CloseEntry(); } - public static void AddFolderToArchive(this ZipArchive archive, string folderPath, string entryFolderName) + public static void AddFolderToArchive(this ZipOutputStream zipStream, string folderPath, string entryFolderName) { if (Directory.Exists(folderPath)) { var files = Directory.GetFiles(folderPath); foreach (var filePath in files) { - var relativePath = Path.Combine(entryFolderName, Path.GetFileName(filePath)); - AddFileToArchive(archive, filePath, relativePath); + var relativePath = Path.Combine(entryFolderName, Path.GetFileName(filePath)).Replace('\\', '/'); + AddFileToArchive(zipStream, filePath, relativePath); } } } - public static void AddFileToArchive(this ZipArchive archive, string filePath, string entryName) + public static void AddFileToArchive(this ZipOutputStream zipStream, string filePath, string entryName) { if (File.Exists(filePath)) { - var fileEntry = archive.CreateEntry(entryName); - using (var entryStream = fileEntry.Open()) + // Normalize path separators for ZIP format + entryName = entryName.Replace('\\', '/'); + + var entry = new ZipEntry(entryName); + entry.DateTime = File.GetLastWriteTime(filePath); + entry.Size = new FileInfo(filePath).Length; + + zipStream.PutNextEntry(entry); + using (var fileStream = File.OpenRead(filePath)) { - fileStream.CopyTo(entryStream); + fileStream.CopyTo(zipStream); } + + zipStream.CloseEntry(); } } } diff --git a/Components/Utils/BExIS.Utils/app.config b/Components/Utils/BExIS.Utils/app.config index d97ded8d5..021ff7b44 100644 --- a/Components/Utils/BExIS.Utils/app.config +++ b/Components/Utils/BExIS.Utils/app.config @@ -52,7 +52,7 @@ - + @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Components/Utils/BExIS.Utils/packages.config b/Components/Utils/BExIS.Utils/packages.config index 125b37b8a..4ed55dde5 100644 --- a/Components/Utils/BExIS.Utils/packages.config +++ b/Components/Utils/BExIS.Utils/packages.config @@ -5,5 +5,11 @@ + + + + + + \ No newline at end of file diff --git a/Components/XML/BExIS.Xml.Helpers/app.config b/Components/XML/BExIS.Xml.Helpers/app.config index 76dbdbe2c..375909be1 100644 --- a/Components/XML/BExIS.Xml.Helpers/app.config +++ b/Components/XML/BExIS.Xml.Helpers/app.config @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/BAM/web.config b/Console/BExIS.Web.Shell/Areas/BAM/web.config index 21a7d9d6d..1aa965f23 100644 --- a/Console/BExIS.Web.Shell/Areas/BAM/web.config +++ b/Console/BExIS.Web.Shell/Areas/BAM/web.config @@ -74,6 +74,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/app.html b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/app.html index 177448812..e83855e48 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/app.html +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/app.html @@ -9,9 +9,9 @@
-
+
-
+
%sveltekit.body%
diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/lib/components/utils/metadata/metadataComponentUtils.ts b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/lib/components/utils/metadata/metadataComponentUtils.ts index 7528024ce..422550abe 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/lib/components/utils/metadata/metadataComponentUtils.ts +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/lib/components/utils/metadata/metadataComponentUtils.ts @@ -15,6 +15,14 @@ export function getNodeByPath(path: string) { return path.split('.').reduce((acc, part) => acc && acc[part], obj); } +export function getByPath(path: string) { + let obj: any; + metadataStore.subscribe((v) => { + obj = v; + }); + return path.split('.').reduce((acc, part) => acc && acc[part], obj); +}; + export function getValueByPath(path: string) { path = path + '.#text'; return getNodeByPath(path); @@ -38,7 +46,7 @@ export function setValueByPath(obj: any, path: string, value: any) { return obj; } // Update metadata store with a new value at the specified path -export function updateMetadataStore(path: string, value: any, ref?: any): any { +export function updateMetadataStore(path: string, value: any, isMulti?: boolean, ref?: any): any { let obj: any = {}; if (path !== undefined && path !== null && path !== '') { @@ -47,19 +55,24 @@ export function updateMetadataStore(path: string, value: any, ref?: any): any { }); { if (value !== undefined && value !== null && value !== getValueByPath(path)) { - obj = setValueByPath(obj, path + '.#text', value); - if (ref !== undefined && ref !== null) { - obj = setValueByPath(obj, path + '.@ref', ref); - } - if ( - obj !== undefined && - obj !== null && - obj !== - metadataStore.subscribe((value) => { - obj = value; - }) - ) { - metadataStore.set(obj); + + if (isMulti) { + obj = setValueByPath(obj, path, value); + } else { + obj = setValueByPath(obj, path + '.#text', value); + if (ref !== undefined && ref !== null) { + obj = setValueByPath(obj, path + '.@ref', ref); + } + if ( + obj !== undefined && + obj !== null && + obj !== + metadataStore.subscribe((value) => { + obj = value; + }) + ) { + metadataStore.set(obj); + } } } diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/+page.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/+page.svelte index aead1f1b1..b940a4bb6 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/+page.svelte +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/+page.svelte @@ -3,7 +3,7 @@ import { NumberInput, Page } from '@bexis2/bexis2-core-ui'; - import MetadataView from './components/view/MetadataView.svelte'; + import { RadioGroup, RadioItem } from '@skeletonlabs/skeleton'; //export let schemaId: number = 3; @@ -24,35 +24,5 @@ -

Metadata

-
- Manage the metadata of the dataset here. Please fill in all required fields. -
- - -
- -
- - - VIEW - EDIT - - - {#if datasetId === 0} -
please select a id
- {:else} - {#key datasetId} - {#if mode === 'view'} - - {:else} - old - - {/if} - {/key} - {/if} +
diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/components/types.ts b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/components/types.ts new file mode 100644 index 000000000..7bb156ed0 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/components/types.ts @@ -0,0 +1,5 @@ +export interface JsonListItem { + "@ref":string; + "@partyid": number; + "#text": string; +} \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/components/view/MetadataView.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/components/view/MetadataView.svelte deleted file mode 100644 index cd8686342..000000000 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/components/view/MetadataView.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - -
- {#await load()} - - {:then} - - - ..... later - - - {/await} -
\ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/MetadataFunctions.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/MetadataFunctions.svelte index d130fd3bc..9cfed9f61 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/MetadataFunctions.svelte +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/MetadataFunctions.svelte @@ -10,6 +10,7 @@ import {metadataStore, validationStore} from '$lib/components/utils/metadata/stores'; import { notificationStore, notificationType, TextInput } from '@bexis2/bexis2-core-ui'; + import {convertDisplayName} from '../metadataShared'; import { goTo } from '$services/BaseCaller'; export let datasetId: number; @@ -155,7 +156,7 @@ {#each Object.entries(metadata) as [key, value]} {#if typeof value === 'object' && value !== null} - {key} + {convertDisplayName(key)} {#if validationStoreValues && hasErrors(key)} # {:else if validationStoreValues && !hasErrors(key)} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/arrayComponentWrapper.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/arrayComponentWrapper.svelte index c7a535f51..6396af0ac 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/arrayComponentWrapper.svelte +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/arrayComponentWrapper.svelte @@ -2,7 +2,7 @@ import ComplexComponent from './complexComponentWrapper.svelte'; import SimpleComponent from './simpleComponent.svelte'; import ChoiceComponent from './choiceComponentWrapper.svelte'; - import { setValueByPath, updateMetadataStore, schemaToJson, toggleShow, getNodeByPath } from '$lib/components/utils/metadata/metadataComponentUtils'; + import { setValueByPath, updateMetadataStore, schemaToJson, toggleShow, getNodeByPath, getByPath } from '$lib/components/utils/metadata/metadataComponentUtils'; import { faPlus, faChevronUp, faChevronDown, faTrash } from '@fortawesome/free-solid-svg-icons'; import Fa from 'svelte-fa'; import { slide, fade } from 'svelte/transition'; @@ -25,6 +25,9 @@ let maxItems: number = arrayComponent.maxItems ? arrayComponent.maxItems : 2147483647; let minItems: number = arrayComponent.minItems ? arrayComponent.minItems : 1; + + console.log('🚀 ~ getByPath:', getByPath(path)); + function addItem(idx: number) { value.push(schemaToJson(arrayComponent.items)); render = !render; @@ -133,7 +136,17 @@
{:else if arrayComponent.items.type === 'object' && arrayComponent.items.properties['#text']} {#if value && value.length > 0} - {#each value as item, index} + + + + {/if} {/if} {/key} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/simpleComponent.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/simpleComponent.svelte index ac979734f..6fe432f4d 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/simpleComponent.svelte +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/edit/simpleComponent.svelte @@ -19,6 +19,7 @@ import type { SimpleComponentData } from '$lib/components/utils/metadata/models'; import SveltyPicker from 'svelty-picker'; import {convertDisplayName} from '../metadataShared'; + import type { JsonListItem } from '../components/types'; //import { en, de } from 'svelty-picker/dist/i18n'; @@ -27,6 +28,7 @@ export let required: boolean = false; export let value: any; export let label: string; + export let isMulti:boolean = false; // for array of simple types, that should use multiselect ui component let date: Date = undefined as unknown as Date; // load form result object @@ -38,13 +40,20 @@ let min: number | undefined = -10000000; let max: number | undefined = 1000000; + // if mulitselect for array of simple types, create items array for multiselect component + // we need to convert the enum of the schema to a list entry of the jsons because we more informations on each value then only the value + // like ref and partyid + let jsonItems: JsonListItem[] = []; + // set overall validity $: ValidationStoreSetSimpleTypeValid(path, res.isValid(path), res.hasErrors(path) ? res.getErrors(path).join('. ') : ''); // update metadata store on value change - $: updateMetadataStore(path, value); + $: updateMetadataStore(path, value, isMulti); onMount(async () => { + console.log('🚀 ~ onMount ~ simpleComponent:', value) + // checks for date if(simpleComponent.properties['#text'].format === 'date' || simpleComponent.properties['#text'].format === 'datetime' || simpleComponent.properties['#text'].format === 'date and time' || simpleComponent.properties['#text'].format === 'time'){ // console.log("date format detected, set date value", value, value as Date); @@ -61,6 +70,17 @@ max = simpleComponent.properties['#text'].maximum; } + if(isMulti && simpleComponent.properties['#text'].enum){ + jsonItems = simpleComponent.properties['#text'].enum.map((item: any) => { + return { + "@ref": '', + "@partyid": 0, + "#text": item + } + + }); + } + //#### VALIDATION #### // create validation item and add to store let simpleComponentValidationItem: SimpleComponentData = createSimpleComponentValidationItem(path, label, required, simpleComponent); @@ -204,6 +224,8 @@ {:else if simpleComponent.properties['#text'].type === 'string' && simpleComponent.properties['#text'].enum} + {#if !isMulti} + {#if simpleComponent.properties['#text'].enum.length <= 10} {/if} + {:else} + {#if isMulti} + + {/if} + {/if} {:else if simpleComponent.properties['#text'].type === 'number'||simpleComponent.properties['#text'].type === 'integer'} @@ -257,12 +299,8 @@ id={path} label={convertDisplayName(label)} name={convertDisplayName(label)} - required={required} bind:checked={value} on:input={onChangeHandler} - valid={res.isValid(path)} - invalid={res.hasErrors(path)} - feedback={res.getErrors(path)} description={simpleComponent.description} size="sm" >{label} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/+page.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/+page.svelte new file mode 100644 index 000000000..12e1c0328 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/+page.svelte @@ -0,0 +1,101 @@ + + + + + + + + + + {#await load()} + + {:then} + + +
+ +
+
+ +
+
+
+ + {/await} +
+ + + + diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceAllOf.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceAllOf.svelte new file mode 100644 index 000000000..ca5405e5f --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceAllOf.svelte @@ -0,0 +1,8 @@ + + +

not implemented

\ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceAnyOf.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceAnyOf.svelte new file mode 100644 index 000000000..64eb708f8 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceAnyOf.svelte @@ -0,0 +1,117 @@ + + + +
+ + {#if !$hideStore.includes(path) && $activeStore.includes(path)} +
+
+ {#if choiceComponent.items && choiceComponent.items.anyOf} + + + {#if target && target.length > 0} + + {#each target as item} + + {#if choiceComponent.items.properties[item].type === 'object' && choiceComponent.items.properties[item].properties && !choiceComponent.items.properties[item].properties['#text']} +
+ + + {#if !$hideStore.includes(path + '.' + item) } +
+ +
+ + {/if} +
+ + {:else if choiceComponent.items.properties[item].type === 'object' && choiceComponent.items.properties[item].properties['#text']} +
+ +
+ + {/if} + + {/each} + {/if} + + + {/if} +
+ {/if} +
+ + + diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceOneOf.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceOneOf.svelte new file mode 100644 index 000000000..c89d5bad7 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/ChoiceOneOf.svelte @@ -0,0 +1,109 @@ + + +
+
+ {#if !$hideStore.includes(path) && $activeStore.includes(path)} +
+ {#if choiceComponent.oneOf} + + {#each choices as item} + {item.key} + {/each} + + {/if} + + {#if target && target.length > 0} + {#if choiceComponent.oneOf} + {#if choiceComponent.properties[target].type === 'object' && choiceComponent.properties[target].properties && !choiceComponent.properties[target].properties['#text']} + +
+ + + {#if !$hideStore.includes(path + '.' + target) && $activeStore.includes(path)} +
+ {#key target} + + {/key} +
+ {/if} +
+ {:else if choiceComponent.properties[path + '.' + target].type === 'object' && choiceComponent.properties[path + '.' + target].properties['#text']} +
+ +
+ {/if} + {/if} +{/if} +
+{/if} +
+ + + diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/MetadataComponentHeader.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/MetadataComponentHeader.svelte new file mode 100644 index 000000000..50f58302a --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/MetadataComponentHeader.svelte @@ -0,0 +1,65 @@ + + + + +
+
+

+ {convertDisplayName(label, true)} +

+
+ + {#if description && showDescription} +
{@html description}
+ {/if} +
+ {#if description} + + {/if} +
+ +
\ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/MetadataFunctions.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/MetadataFunctions.svelte new file mode 100644 index 000000000..d130fd3bc --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/MetadataFunctions.svelte @@ -0,0 +1,173 @@ + + + + +
+ diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/arrayComponentWrapper.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/arrayComponentWrapper.svelte new file mode 100644 index 000000000..d957f3074 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/arrayComponentWrapper.svelte @@ -0,0 +1,87 @@ + + +{#if arrayComponent.items} +
+ {#key render} + {#if arrayComponent.items.type === 'object' && arrayComponent.items.properties && !arrayComponent.items.properties['#text']} +
+ + {#if arrayComponent.items.anyOf || arrayComponent.items.allOf} + + {:else} + + {#if !$hideStore.includes(path) } + + + +
+ + {#if value && value.length > 0} + {#each value as item, index} +
+ +
+
+ {convertDisplayName(label, true)} {index+1} +
+ +
+
+ +
+
+ {/each} + {/if} +
+ {/if} + {/if} + +
+ {:else if arrayComponent.items.type === 'object' && arrayComponent.items.properties['#text']} + {#if value && value.length > 0} +
+
+
+ item["#text"]).join(", ")} + {label} + required={requiredList.includes(label)} + /> +
+
+
+ {/if} + {/if} + {/key} +
+{/if} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/choiceComponentWrapper.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/choiceComponentWrapper.svelte new file mode 100644 index 000000000..889500a43 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/choiceComponentWrapper.svelte @@ -0,0 +1,44 @@ + + + {#if type } + {#if type == 'oneOf'} + + {:else if type == 'anyOf'} + + {:else if type == 'allOf'} + + {/if} + {/if} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/complexComponentWrapper.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/complexComponentWrapper.svelte new file mode 100644 index 000000000..bdc170a94 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/complexComponentWrapper.svelte @@ -0,0 +1,76 @@ + + +{#if complexComponent && complexComponent.type === 'object' && complexComponent.properties} + {#each Object.entries(complexComponent.properties) as [key, value]} + {@const p = path = path ? path + '.' + key : key} + {@const l = label = key} + {#if (value.type === 'object' && value.properties && !value.properties['#text']) } + {#if value.oneOf || value.anyOf || value.allOf} + + {:else} +
+ + {#if !$hideStore.includes(path) && $activeStore.includes(path)} +
+ +
+ + +
+ {:else} +
+ +
+ + +
+ {/if} +
+ {/if} + {:else if value.type === 'object' && value.properties['#text']} +
+
+
+ +
+
+ +
+ {:else if value.type === 'array' && value.items} + + {/if} + {/each} + +{/if} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/simpleComponent.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/simpleComponent.svelte new file mode 100644 index 000000000..a95adc1eb --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/simpleComponent.svelte @@ -0,0 +1,88 @@ + + +{#if isVisible && !isAnchor} +
+
{convertDisplayName(label)}
+
{value}
+
+ +{:else if isAnchor} +
+ +
+{/if} diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/simpleComponentWrapper.svelte b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/simpleComponentWrapper.svelte new file mode 100644 index 000000000..5175b6e53 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/src/routes/m/view/simpleComponentWrapper.svelte @@ -0,0 +1,23 @@ + + +{#if path && simpleComponent.properties} + +{/if} + 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 66505e1b5..b09edc2a5 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 @@ -473,6 +473,7 @@ + Web.config @@ -499,6 +500,9 @@ ..\..\..\..\..\packages\EPPlus.5.0.3\lib\net45\EPPlus.dll + + ..\..\..\..\..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + ..\..\..\..\..\packages\Iesi.Collections.4.0.4\lib\net461\Iesi.Collections.dll True diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/ManageMetadataStructureController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/ManageMetadataStructureController.cs index 7c0e1eb3f..17f00848e 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/ManageMetadataStructureController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Legacy/ManageMetadataStructureController.cs @@ -9,6 +9,7 @@ using BExIS.Utils.Models; using BExIS.Xml.Helpers; using BExIS.Xml.Helpers.Mapping; +using ICSharpCode.SharpZipLib.Zip; using System; using System.Collections.Generic; using System.IO; @@ -76,7 +77,7 @@ public ActionResult DownloadSchema(long id) var memoryStream = new MemoryStream(); - using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, true)) + using (var archive = new ZipOutputStream(memoryStream)) { // Add each file from the folder to the archive archive.AddAllFilesFromDirectory(path); diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/MController.cs b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/MController.cs index eafc60039..856e5a05d 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/MController.cs +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/MController.cs @@ -44,6 +44,20 @@ public ActionResult Edit(long id, int version = 0) + return View(); + } + + [BExISEntityAuthorize(typeof(Dataset), "id", RightType.Read)] + public ActionResult View(long id, int version = 0) + { + + string module = "DCM"; + + ViewData["id"] = id; + ViewData["version"] = version; + ViewData["app"] = SvelteHelper.GetApp(module); + ViewData["start"] = SvelteHelper.GetStart(module); + return View(); } } diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/M/View.cshtml b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/M/View.cshtml new file mode 100644 index 000000000..beb224288 --- /dev/null +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/M/View.cshtml @@ -0,0 +1,17 @@ +@{ + ViewBag.Title = "Metadata"; + Layout = "~/Themes/Default/Layouts/_svelteLayout.cshtml"; + + long id = 0; + string saveWithErrors = ""; + + if (ViewData["id"] != null) { id = Convert.ToInt64(ViewData["id"]); } + + +} + + + +
+ @Html.Partial("_sveltePage") +
\ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Web.config b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Web.config index bee55f094..516721e87 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Web.config +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Web.config @@ -94,6 +94,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/packages.config b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/packages.config index 17a3f6437..ba8366ced 100644 --- a/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/packages.config +++ b/Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/packages.config @@ -28,6 +28,7 @@ + diff --git a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/BExIS.Modules.Ddm.UI.csproj b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/BExIS.Modules.Ddm.UI.csproj index 4017bc856..88511846c 100644 --- a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/BExIS.Modules.Ddm.UI.csproj +++ b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/BExIS.Modules.Ddm.UI.csproj @@ -49,6 +49,9 @@ ..\..\..\..\..\packages\Antlr3.Runtime.3.5.1\lib\net40-client\Antlr3.Runtime.dll + + ..\..\..\..\..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + ..\..\..\..\..\packages\Iesi.Collections.4.0.4\lib\net461\Iesi.Collections.dll diff --git a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/Controllers/DataController.cs b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/Controllers/DataController.cs index dbfc78b09..e2a86a1ad 100644 --- a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/Controllers/DataController.cs +++ b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/Controllers/DataController.cs @@ -34,6 +34,7 @@ using BExIS.Utils.Extensions; using BExIS.Utils.NH.Querying; using BExIS.Xml.Helpers; +using ICSharpCode.SharpZipLib.Zip; using System; using System.CodeDom; using System.Collections.Generic; @@ -1564,7 +1565,7 @@ public ActionResult DownloadAllFiles(long id) var memoryStream = new MemoryStream(); - using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, true)) + using (var archive = new ZipOutputStream(memoryStream)) { foreach (ContentDescriptor cd in datasetVersion.ContentDescriptors) { diff --git a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/packages.config b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/packages.config index fd066ded6..f3913469d 100644 --- a/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/packages.config +++ b/Console/BExIS.Web.Shell/Areas/DDM/BExIS.Modules.Ddm.UI/packages.config @@ -22,6 +22,7 @@ + diff --git a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/BExIS.Modules.Dim.UI.csproj b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/BExIS.Modules.Dim.UI.csproj index 088c19986..6b0707ef4 100644 --- a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/BExIS.Modules.Dim.UI.csproj +++ b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/BExIS.Modules.Dim.UI.csproj @@ -52,6 +52,9 @@ ..\..\..\..\..\packages\DataAnnotationsValidatorNetStandard.1.0.3\lib\netstandard2.0\DataAnnotationsValidatorNetStandard.dll + + ..\..\..\..\..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + ..\..\..\..\..\packages\LiteDB.5.0.21\lib\net45\LiteDB.dll diff --git a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/ExportController.cs b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/ExportController.cs index 240f2dde0..5344a3f30 100644 --- a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/ExportController.cs +++ b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/ExportController.cs @@ -25,6 +25,7 @@ using BExIS.Utils.Models; using BExIS.Utils.NH.Querying; using BExIS.Xml.Helpers; +using ICSharpCode.SharpZipLib.Zip; using Newtonsoft.Json; using System; using System.Data; @@ -314,7 +315,8 @@ public ActionResult GenerateZip(long id, long versionid, string format, bool wit FileHelper.CreateDicrectoriesIfNotExist(Path.GetDirectoryName(zipPath)); using (var zipFileStream = new FileStream(zipPath, FileMode.Create)) - using (var archive = new ZipArchive(zipFileStream, ZipArchiveMode.Update)) + using (var archive = new ZipOutputStream(zipFileStream)) + { // stored contentdescriptior key name in db for the format and the dataname string dataName = getCDTypeName(format); @@ -330,8 +332,8 @@ public ActionResult GenerateZip(long id, long versionid, string format, bool wit if (FileHelper.FileExist(path)) { - if (!archive.Entries.Any(entry => entry.Name.EndsWith(name))) - { + //if (!archive.Entries.Any(entry => entry.Name.EndsWith(name))) + //{ if (cd.Name.Equals("metadata")) { name = IOHelper.GetFileName(FileType.Metadata, id, datasetVersionNumber, dataStructureId,"", tagNr, useTags, useMinor) + ext; @@ -355,7 +357,7 @@ public ActionResult GenerateZip(long id, long versionid, string format, bool wit // if data is filtered, do not add full data file if (cd.Name.Contains("generated") == false || (cd.Name.Contains("generated") && withFilter == false)) archive.AddFileToArchive(path, name); - } + //} } } diff --git a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Web.config b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Web.config index dd00183b8..a5ec163a9 100644 --- a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Web.config +++ b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Web.config @@ -90,6 +90,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/packages.config b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/packages.config index 60f4dee50..2f73e7dc1 100644 --- a/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/packages.config +++ b/Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/packages.config @@ -33,6 +33,7 @@ + diff --git a/Console/BExIS.Web.Shell/Areas/MMM/IDIV.Modules.Mmm.UI.csproj b/Console/BExIS.Web.Shell/Areas/MMM/IDIV.Modules.Mmm.UI.csproj index 166d7dc7f..2443e057a 100644 --- a/Console/BExIS.Web.Shell/Areas/MMM/IDIV.Modules.Mmm.UI.csproj +++ b/Console/BExIS.Web.Shell/Areas/MMM/IDIV.Modules.Mmm.UI.csproj @@ -49,7 +49,8 @@ ..\..\..\..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll
- ..\..\..\..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll + ..\..\..\..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + True ..\..\..\..\packages\MediaInfoDotNet.0.7.79.40925\lib\net45\MediaInfoDotNet.dll @@ -74,11 +75,27 @@ ..\..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll + + ..\..\..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\..\..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + ..\..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + ..\..\..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\..\..\..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + ..\..\..\..\packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.Helpers.dll diff --git a/Console/BExIS.Web.Shell/Areas/MMM/packages.config b/Console/BExIS.Web.Shell/Areas/MMM/packages.config index 5365d9c14..ab76e712f 100644 --- a/Console/BExIS.Web.Shell/Areas/MMM/packages.config +++ b/Console/BExIS.Web.Shell/Areas/MMM/packages.config @@ -7,5 +7,10 @@ + + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/MMM/web.config b/Console/BExIS.Web.Shell/Areas/MMM/web.config index 6b3296c92..bbe38ea9b 100644 --- a/Console/BExIS.Web.Shell/Areas/MMM/web.config +++ b/Console/BExIS.Web.Shell/Areas/MMM/web.config @@ -40,15 +40,15 @@ - + - + - + @@ -98,6 +98,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/PUM/BExIS.Modules.PUM.UI/web.config b/Console/BExIS.Web.Shell/Areas/PUM/BExIS.Modules.PUM.UI/web.config index 5b65f6e79..1d7a8bc91 100644 --- a/Console/BExIS.Web.Shell/Areas/PUM/BExIS.Modules.PUM.UI/web.config +++ b/Console/BExIS.Web.Shell/Areas/PUM/BExIS.Modules.PUM.UI/web.config @@ -74,6 +74,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/BExIS.Modules.Rpm.UI.csproj b/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/BExIS.Modules.Rpm.UI.csproj index 38abcc9f2..33c154a21 100644 --- a/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/BExIS.Modules.Rpm.UI.csproj +++ b/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/BExIS.Modules.Rpm.UI.csproj @@ -69,10 +69,23 @@ + + ..\..\..\..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + ..\..\..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + ..\..\..\..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\..\..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\..\..\..\..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + ..\..\..\..\..\packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.Helpers.dll diff --git a/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/packages.config b/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/packages.config index b7538951f..36fefbe50 100644 --- a/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/packages.config +++ b/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/packages.config @@ -19,5 +19,9 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/web.config b/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/web.config index e8220c9f9..993c15fe0 100644 --- a/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/web.config +++ b/Console/BExIS.Web.Shell/Areas/RPM/BExIS.Modules.Rpm.UI/web.config @@ -40,15 +40,15 @@ - + - + - + @@ -86,6 +86,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/SAM/BExIS.Modules.Sam.UI/Web.config b/Console/BExIS.Web.Shell/Areas/SAM/BExIS.Modules.Sam.UI/Web.config index df5f5a8fa..ba5506285 100644 --- a/Console/BExIS.Web.Shell/Areas/SAM/BExIS.Modules.Sam.UI/Web.config +++ b/Console/BExIS.Web.Shell/Areas/SAM/BExIS.Modules.Sam.UI/Web.config @@ -79,6 +79,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/SMM/BExIS.Modules.SMM.UI/web.config b/Console/BExIS.Web.Shell/Areas/SMM/BExIS.Modules.SMM.UI/web.config index 5b65f6e79..1d7a8bc91 100644 --- a/Console/BExIS.Web.Shell/Areas/SMM/BExIS.Modules.SMM.UI/web.config +++ b/Console/BExIS.Web.Shell/Areas/SMM/BExIS.Modules.SMM.UI/web.config @@ -74,6 +74,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Areas/VIM/Web.config b/Console/BExIS.Web.Shell/Areas/VIM/Web.config index 4df28ddb5..6c8d72170 100644 --- a/Console/BExIS.Web.Shell/Areas/VIM/Web.config +++ b/Console/BExIS.Web.Shell/Areas/VIM/Web.config @@ -79,6 +79,10 @@ + + + + \ No newline at end of file diff --git a/Console/BExIS.Web.Shell/Web.config.sample b/Console/BExIS.Web.Shell/Web.config.sample index f782c18d5..59404dceb 100644 --- a/Console/BExIS.Web.Shell/Web.config.sample +++ b/Console/BExIS.Web.Shell/Web.config.sample @@ -22,7 +22,7 @@ - + diff --git a/Modules/DDM/BExIS.Ddm.Api/app.config b/Modules/DDM/BExIS.Ddm.Api/app.config index 3e814f6e0..15182a653 100644 --- a/Modules/DDM/BExIS.Ddm.Api/app.config +++ b/Modules/DDM/BExIS.Ddm.Api/app.config @@ -52,7 +52,7 @@ - + @@ -62,6 +62,10 @@ + + + + \ No newline at end of file diff --git a/Modules/DIM/BExIS.Dim.Helper/BExIS.Dim.Helpers.csproj b/Modules/DIM/BExIS.Dim.Helper/BExIS.Dim.Helpers.csproj index 3a2a57eb4..743f736ce 100644 --- a/Modules/DIM/BExIS.Dim.Helper/BExIS.Dim.Helpers.csproj +++ b/Modules/DIM/BExIS.Dim.Helper/BExIS.Dim.Helpers.csproj @@ -47,6 +47,9 @@ ..\..\..\packages\DataAnnotationsValidatorNetStandard.1.0.3\lib\netstandard2.0\DataAnnotationsValidatorNetStandard.dll + + ..\..\..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll + ..\..\..\Libraries\Ionic.Zip.dll diff --git a/Modules/DIM/BExIS.Dim.Helper/Export/GBIFDataRepoConverter.cs b/Modules/DIM/BExIS.Dim.Helper/Export/GBIFDataRepoConverter.cs index 9fcb96dbb..76ce81caa 100644 --- a/Modules/DIM/BExIS.Dim.Helper/Export/GBIFDataRepoConverter.cs +++ b/Modules/DIM/BExIS.Dim.Helper/Export/GBIFDataRepoConverter.cs @@ -12,12 +12,12 @@ using BExIS.Security.Entities.Objects; using BExIS.Security.Services.Objects; using BExIS.Utils.Extensions; +using ICSharpCode.SharpZipLib.Zip; using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.IO; -using System.IO.Compression; using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -95,7 +95,7 @@ public string Convert(long datasetVersionId) string xsdPath = Path.Combine(AppConfiguration.WorkspaceRootPath, concept.XSD); using (var zipFileStream = new FileStream(zipfilepath, FileMode.Create)) - using (var archive = new ZipArchive(zipFileStream, ZipArchiveMode.Update)) + using (var archive = new ZipOutputStream(zipFileStream)) { // generate metadata string metadataFilePath = helper.GenerateResourceMetadata(concept.Id, metadatastructureId, datasetversion.Metadata, folder, xsdPath); diff --git a/Modules/DIM/BExIS.Dim.Helper/Export/GenericDataRepoConverter.cs b/Modules/DIM/BExIS.Dim.Helper/Export/GenericDataRepoConverter.cs index e8c4b032d..660d4705b 100644 --- a/Modules/DIM/BExIS.Dim.Helper/Export/GenericDataRepoConverter.cs +++ b/Modules/DIM/BExIS.Dim.Helper/Export/GenericDataRepoConverter.cs @@ -9,6 +9,7 @@ using BExIS.IO.Transform.Output; using BExIS.Utils.Extensions; using BExIS.Xml.Helpers; +using ICSharpCode.SharpZipLib.Zip; using System; using System.Collections.Generic; using System.IO; @@ -58,7 +59,7 @@ public string Convert(long datasetVersionId) if (broker != null) { OutputMetadataManager.GetConvertedMetadata(datasetId, TransmissionType.mappingFileExport, - broker.MetadataFormat); + metadataStructureName); // get primary data // check the data sturcture type ... @@ -114,7 +115,7 @@ public string Convert(long datasetVersionId) #endregion datatructure using (var zipFileStream = new FileStream(zipFilePath, FileMode.Create)) - using (var archive = new ZipArchive(zipFileStream, ZipArchiveMode.Update)) + using (var archive = new ZipOutputStream(zipFileStream)) { datasetVersion = datasetManager.GetDatasetVersion(datasetVersionId); @@ -127,8 +128,8 @@ public string Convert(long datasetVersionId) if (FileHelper.FileExist(path)) { - if (!archive.Entries.Any(entry => entry.Name.EndsWith(name))) - archive.AddFileToArchive(path, name); + //if (!archive.Entries.Any(entry => entry.Name.EndsWith(name))) + archive.AddFileToArchive(path, name); } } diff --git a/Modules/DIM/BExIS.Dim.Helper/packages.config b/Modules/DIM/BExIS.Dim.Helper/packages.config index 8e3a7e3d8..b708ae50e 100644 --- a/Modules/DIM/BExIS.Dim.Helper/packages.config +++ b/Modules/DIM/BExIS.Dim.Helper/packages.config @@ -10,6 +10,7 @@ + diff --git a/README.md b/README.md index bd29f823d..c98e8a779 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,13 @@ BEXIS2 is published under a GNU LESSER GENERAL PUBLIC LICENSE Version 3 > In the release notes, you will find a list of all changes to the current version and updated scripts. -[RELEASE NOTES](https://github.com/BEXIS2/Core/blob/4.3.0/Release%20Notes/Release_Notes.md) +[RELEASE NOTES](https://github.com/BEXIS2/Core/blob/4.3.1/Release%20Notes/Release_Notes.md) # Installation A guide for the preparation of BEXIS2 on a server is available here. -[Installation Manual](https://github.com/BEXIS2/Documents/blob/4.3.0/Guides/Installation/installation.md) +[Installation Manual](https://github.com/BEXIS2/Documents/blob/4.3.1/Guides/Installation/installation.md) # Help for Users/Admins/Developers @@ -36,9 +36,9 @@ The page is divided into: The initial version of the workspace can be found here: -- [Workspace 4.3.0 Repo](https://github.com/BEXIS2/Workspace/tree/4.3.0) -- [Workspace 4.3.0 Release](https://github.com/BEXIS2/Workspace/releases/tag/4.3.0) +- [Workspace 4.3.1 Repo](https://github.com/BEXIS2/Workspace/tree/4.3.1) +- [Workspace 4.3.1 Release](https://github.com/BEXIS2/Workspace/releases/tag/4.3.1) # List of Modules -- [Modules Overview](https://github.com/BEXIS2/Core/blob/4.3.0/MODULES.md) +- [Modules Overview](https://github.com/BEXIS2/Core/blob/4.3.1/MODULES.md) diff --git a/Release Notes/Release_Notes.md b/Release Notes/Release_Notes.md index 99887523e..3d9a4283d 100644 --- a/Release Notes/Release_Notes.md +++ b/Release Notes/Release_Notes.md @@ -1,78 +1,30 @@ -# BEXIS2 Release Notes - Version 4.3.0 -> This release contains security updates and a very long list of enhancements and bugfixes across BEXIS2. +# BEXIS2 Release Notes - Version 4.3.1 +> This release includes minor bug fixes related to dataset copying, downloading, and settings. ### Workspace changes: -- Workspace changes: [4.2.1..4.3.0](https://github.com/BEXIS2/Workspace/compare/4.2.1..4.3.0) +- Workspace changes: [4.3.0..4.3.1](https://github.com/BEXIS2/Workspace/compare/4.3.0..4.3.1) ### Database Update(s): -- Update script from version 4.2.1 to 4.3.0: [Update_Script_4.2.1_4.3.0.sql](https://github.com/BEXIS2/Core/blob/rc/database%20update%20scripts/4.2.1-4.3.0.sql) +- Update script from version 4.3.0 to 4.3.1: [Update_Script_4.3.0_4.3.1.sql](https://github.com/BEXIS2/Core/blob/rc/database%20update%20scripts/4.3.0-4.3.1.sql) ### Web.config changes - ... ### Configuration -- General Settings: Additional Help Links - General Settings: Security Settings # Bugfixes and enhancements - - -### Maintenance -#### DOI -- **Vaelastrasz.Library**: Update from 6.1.7 to 6.2.2 ([#2429](https://github.com/BEXIS2/Core/issues/2429)) -- **DOI Service**: Update doi.bexis2.uni-jena.de to run v6.2.2 ([#2430](https://github.com/BEXIS2/Core/issues/2430)) -#### Security -- **Identity Framework**: Modify usage to follow best practice and prepare display name retrieval ([#2411](https://github.com/BEXIS2/Core/issues/2411)) -- **Identity Framework**: Dependency injection of identity-related classes (user manager, group manager, sign-in manager, etc.) ([#2412](https://github.com/BEXIS2/Core/issues/2412)) - ### Bugfixes and Enhancements -#### Access and navigation -- **Help Menu**: Refactor and move to general settings ([#2299](https://github.com/BEXIS2/Core/issues/2299)) -- **Help Menu Entries**: Not visible on non-svelte pages ([#2397](https://github.com/BEXIS2/Core/issues/2397)) -- **Main Menu**: Show display name instead of user name ([#2267](https://github.com/BEXIS2/Core/issues/2267)) - -#### Settings and versions -- **Settings**: Lists show key instead of title ([#2169](https://github.com/BEXIS2/Core/issues/2169)) -- **Settings Button**: Add ID ([#2375](https://github.com/BEXIS2/Core/issues/2375)) -- **Versions**: Release note is not editable ([#2396](https://github.com/BEXIS2/Core/issues/2396)) - -#### Accounts and identity -- **Parties**: When a user updates their account information (party), the start and end dates are overwritten ([#2384](https://github.com/BEXIS2/Core/issues/2384)) -- **Reset Password**: Revise text ([#2152](https://github.com/BEXIS2/Core/issues/2152)) -- **IControllerFactory**: Castle.Proxies.IControllerFactoryProxy did not return a controller for the name '' ([#2416](https://github.com/BEXIS2/Core/issues/2416)) - -#### Metadata and data structures -- **PUM - CSV Import**: Insert id into metadata (@comment) ([#2376](https://github.com/BEXIS2/Core/issues/2376)) -- **Data Structure**: Identical column name currently not checked during creation ([#2336](https://github.com/BEXIS2/Core/issues/2336)) -- **Data structure**: Select linked datasets ends in Not Found Exception ([#2423](https://github.com/BEXIS2/Core/issues/2423)) -- **Data structure**: Missing values are carried over when the data structure is copied.([#2444](https://github.com/BEXIS2/Core/issues/2444)) -- **JsonMaxLimit**: Reached by generation of a data structure ([#2417](https://github.com/BEXIS2/Core/issues/2417)) -- **Darwin Core Check**: Setting is false, but it is shown ([#2372](https://github.com/BEXIS2/Core/issues/2372)) -- **Primary key**: Combination of two keys does not work ([#2419](https://github.com/BEXIS2/Core/issues/2419)) -- **Entity Template Order**: Enable an actively defined order instead of magic by last edit ([#2379](https://github.com/BEXIS2/Core/issues/2379)) -- **Entity Template**: If the entity template supports many file formats, the icons are not right-aligned ([#2380](https://github.com/BEXIS2/Core/issues/2380)) -- **RPM Seed data**: Description improvements and boolean exists twice ([#2403](https://github.com/BEXIS2/Core/issues/2403)) -- **Citation API**: Remove check if a valid token is provided for non-public entities ([#2382](https://github.com/BEXIS2/Core/issues/2382)) -- **Citation API**: Expanding the API to include the ability to call tags. ([#2394](https://github.com/BEXIS2/Core/issues/2394)) +#### Settings +- **Enable JWT and SMTP configurations**: Added 'isActive' property to JWT and SMTP configurations. #### Data -- **Data**: Data count always count of latest version ([#2441](https://github.com/BEXIS2/Core/issues/2441)) -- **Display Pattern**: Add "yyyy-MM-dd hh:mm:ss" ([#2400](https://github.com/BEXIS2/Core/issues/2400)) -- **Missing Values**: String values are no longer replaced by numbers and remain constant. ([#2452](https://github.com/BEXIS2/Core/issues/2452)) +- **Dataset Download**: Package with big files are not possible. ([#2460](https://github.com/BEXIS2/Core/issues/2460)) +- **Dataset Copy**: Mapped system keys in the metadata are overwritten in the original dataset. ([#2462](https://github.com/BEXIS2/Core/issues/2462)) -#### Download and upload -- **Upload Attachement**: Error shown twice ([#2191](https://github.com/BEXIS2/Core/issues/2191)) -- **Download Dataset**: Add metadata as plain text ([#2243](https://github.com/BEXIS2/Core/issues/2243)) -- **Download Unstructured**: Dataset contains only one file ([#2404](https://github.com/BEXIS2/Core/issues/2404)) -- **Download**: Possible even without check policy by datasets with files ([#2406](https://github.com/BEXIS2/Core/issues/2406)) -- **Download package**: Use tags instead of version in tag mode ([#2424](https://github.com/BEXIS2/Core/issues/2424)) -#### Search and documentation -- **Documentation**: Add copy and tag icon ([#2371](https://github.com/BEXIS2/Core/issues/2371)) -- **Search**: Not updated on metadata edit (old and new form) ([#2434](https://github.com/BEXIS2/Core/issues/2434)) -- **Search**: Publication not added to search ([#2435](https://github.com/BEXIS2/Core/issues/2435)) diff --git a/database update scripts/4.3.0-4.3.1.sql b/database update scripts/4.3.0-4.3.1.sql new file mode 100644 index 000000000..7d1fae8ba --- /dev/null +++ b/database update scripts/4.3.0-4.3.1.sql @@ -0,0 +1,8 @@ +BEGIN TRANSACTION; + +-- BEXIS2 Version Update +INSERT INTO public.versions( + versionno, extra, module, value, date) + VALUES (1, null, 'Shell', '4.3.1',NOW()); + +commit;