From a6118f44e3284f82a79962e026f16ce85bf97557 Mon Sep 17 00:00:00 2001 From: amentis Date: Wed, 24 Apr 2024 12:02:01 +0300 Subject: [PATCH 1/2] fix dmp, description, home title tabs --- dmp-frontend/src/app/app-routing.module.ts | 3 ++- .../description/editor/description-editor.routing.ts | 12 ++++++++---- dmp-frontend/src/app/ui/dmp/dmp.routing.ts | 6 ++++-- .../src/app/ui/dmp/overview/dmp-overview.routing.ts | 4 ++-- dmp-frontend/src/assets/i18n/en.json | 6 +++++- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/dmp-frontend/src/app/app-routing.module.ts b/dmp-frontend/src/app/app-routing.module.ts index 713f61220..928379264 100644 --- a/dmp-frontend/src/app/app-routing.module.ts +++ b/dmp-frontend/src/app/app-routing.module.ts @@ -16,7 +16,8 @@ const appRoutes: Routes = [ path: 'home', loadChildren: () => import('./ui/dashboard/dashboard.module').then(m => m.DashboardModule), data: { - breadcrumb: true + breadcrumb: true, + title: 'GENERAL.TITLES.HOME' } }, { diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts index e86406d08..2d1ea28a0 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts @@ -21,7 +21,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION' // , // authContext: { // permissions: [AppPermission.EditDescription] @@ -39,7 +40,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION' // , // authContext: { // permissions: [AppPermission.EditDescription] @@ -57,7 +59,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-NEW' // , // authContext: { // permissions: [AppPermission.EditDescription] @@ -75,7 +78,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-NEW' // , // authContext: { // permissions: [AppPermission.EditDescription] diff --git a/dmp-frontend/src/app/ui/dmp/dmp.routing.ts b/dmp-frontend/src/app/ui/dmp/dmp.routing.ts index 3b98458db..46a213860 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp.routing.ts +++ b/dmp-frontend/src/app/ui/dmp/dmp.routing.ts @@ -13,14 +13,16 @@ const routes: Routes = [ path: 'new', loadChildren: () => import('./dmp-editor-blueprint/dmp-editor.module').then(m => m.DmpEditorModule), data: { - breadcrumb: true + breadcrumb: true, + title: 'DMP-EDITOR.TITLE-NEW' } }, { path: 'edit', loadChildren: () => import('./dmp-editor-blueprint/dmp-editor.module').then(m => m.DmpEditorModule), data: { - breadcrumb: true + breadcrumb: true, + title: 'DMP-EDITOR.TITLE-EDIT' } }, { diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.routing.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.routing.ts index b210ddec8..3e5832727 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.routing.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.routing.ts @@ -8,7 +8,7 @@ const routes: Routes = [ component: DmpOverviewComponent, data: { breadcrumb: true, - title: 'GENERAL.TITLES.DATASET-OVERVIEW' + title: 'GENERAL.TITLES.PLAN-OVERVIEW' }, }, { @@ -16,7 +16,7 @@ const routes: Routes = [ component: DmpOverviewComponent, data: { breadcrumb: true, - title: 'GENERAL.TITLES.DATASET-OVERVIEW' + title: 'GENERAL.TITLES.PLAN-OVERVIEW' }, } ]; diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 7fc76d511..600264c9a 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -93,8 +93,10 @@ "USERS": "Users", "PROFILE": "My Profile", "LOGIN": "Login", + "PLAN-OVERVIEW": "Plan Overview", "DATASET-OVERVIEW": "Description Overview", - "MAINTENANCE-TASKS": "Maintenance" + "MAINTENANCE-TASKS": "Maintenance", + "HOME": "Home" }, "FILE-TRANSFORMER": { "PDF": "PDF", @@ -754,6 +756,7 @@ "EMPTY-LIST": "Nothing here yet." }, "DESCRIPTION-EDITOR": { + "TITLE-NEW": "New Description", "TITLE-ADD-DESCRIPTION": "Adding Description", "TITLE-EDIT-DESCRIPTION": "Editing Description", "TITLE-PREVIEW-DESCRIPTION": "Previewing Description", @@ -1446,6 +1449,7 @@ } }, "DMP-EDITOR": { + "TITLE-NEW": "New Plan", "TITLE-EDIT": "Editing Plan", "TITLE": "Plan Blueprint", "UNSAVED-CHANGES": "unsaved changes", From e7112ccfab4be078a469d10cf94dc711f87925e8 Mon Sep 17 00:00:00 2001 From: Thomas Georgios Giannos Date: Wed, 24 Apr 2024 12:03:56 +0300 Subject: [PATCH 2/2] Added docs for reference types --- .../administration/notification-templates.md | 2 +- .../administration/reference-types.md | 134 +++++++++++++++++- 2 files changed, 134 insertions(+), 2 deletions(-) diff --git a/docs/docs/documentation/administration/notification-templates.md b/docs/docs/documentation/administration/notification-templates.md index e342f6b61..e429c569d 100644 --- a/docs/docs/documentation/administration/notification-templates.md +++ b/docs/docs/documentation/administration/notification-templates.md @@ -48,7 +48,7 @@ You can also clear any filters already applied, by pressing the `clear all filte ## Edit form -When you try to add new notification templates or edit existing ones, the **notification template editing form** will appear containing the following controls: +When you try to add new notification templates or edit existing ones, the **notification template editing form** will appear containing the following sections. ### Main information section diff --git a/docs/docs/documentation/administration/reference-types.md b/docs/docs/documentation/administration/reference-types.md index 2d32016fd..eaf271499 100644 --- a/docs/docs/documentation/administration/reference-types.md +++ b/docs/docs/documentation/administration/reference-types.md @@ -1,5 +1,137 @@ --- sidebar_position: 5 +description: Manage all reference types --- -# Reference Types \ No newline at end of file +# Reference Types + +In this page, there is a listing where you can view details about all the available reference types. + +:::info + +A **reference type** is any type of information that is made available to the users when they fill [plan](/docs/category/plans) forms. This information is either static, or coming from an outside source (*an external API*). These sources are extremely configurable as we will see in this section. + +::: + +The information displayed by default is: the `name`, the `status`, the `identification code` and timestamps for the `creation` and `updates` of the records. At the top right corner of the listing you can also select which columns to display. + +:::tip + +For reference types, all the columns are visible by default. + +::: + +You can also create new or edit / remove reference types by clicking to the `+ Create Reference Type` button at the top right of the page or to the three dots at the last column, respectively. + +## Authorization + +Only users that have the **Admin** role can access this page. + +## Pagination + +Not all the records are being displayed at once. By default, there is a pagination of 10 records applied to them. + +You can control how many records are being displayed at any time, by adjusting the `items per page` control at the bottom left corner of the table. + +## Filtering + +There is a filtering option available for reference types. + +- **Is Active**: By toggling this control you can view only the active or only the disabled reference types.
*By default, this option is set to true.* + +In order for the filters to apply, you have to click the `Apply filters` button. + +You can also clear any filters already applied, by pressing the `clear all filters` option, located at the top of the popup. + +## Edit form + +When you try to add new reference types or edit existing ones, the **reference type editing form** will appear containing the following sections. + +### Main information section + +- **Name**: The label of this reference type. +- **Code**: The identification code which is used internally for this type. + +### Fields section + +In this section we can add custom fields made available from the source. When the `Add Field` button is pressed, a form appears containing the following controls: + +- **Label**: The label of the field. +- **Description**: A short description for the field.
*This is optional* +- **Code**: An identification code for this field, used for the information mappings we will discuss about shortly. +- **Data Type**: The data type of a field information can either be `Text` or `Date`. + +:::tip + +There is no limit on the fields that can be configured. To remove a field configuration, press the `delete` icon on the right side of the field form. + +::: + +### Sources section + +In this section we can add configuration for the sources of this reference type. The configured sources can be more than one. This is useful when there is a need to 'merge' information coming from multiple sources at the same time. The basic information we can provide for a source is the following: + +- **Key**: An identification key for our source.
*Used internally by the system.* +- **Label**: A display name for our source. +- **Ordinal**: This specifies the order in which the source will be called. +- **Dependencies**: A source can be dependent on other reference types. Here we can specify these dependencies. +- **Source Type**: It can either be `API` or `Static`. + +:::info + +All the options that follow are only applicable if the source type we select is `API`. In case we select `Static` the only thing we can add are the static fields of the source and their values. + +::: + +- **Url**: The url of our source. +- **Pagination Path**: The path inside the response in which the pagination information is located. This is only needed if the results are coming paginated from the source. +- **Content Type**: The content type of the responses of the source.
*In most cases, this is `application/json`.* +- **First Page**: We can specify the first page to be different than the default 0. +- **HTTP Method**: The http method the source expects. This can either be `GET` or `POST`. +- **Filter Type**: How filtering is handled when this source is used. This can be set as `local` or `remote`.
*In most cases, this is `remote`, meaning that the source handles the filtering. If set to `null`, the filtering (if any) is also handled remotely by the source.* +- **Results**: The path inside the source response where the results are located. + +### Mappings section + +In this section we can specify how we will be consuming the information coming from our sources by mapping all the source fields we are interested in. + +For every field we have to specify the response path on which the information resides. + +By default, there are three fields available for mapping from the start. + +- **reference_id**: This can be used for identifier fields +- **label** +- **description** + +If we have specified more fields for our source, these will also appear by their code in this form for configuring their paths. + +### Authentication section + +Some APIs require authentication. In this section we can specify the information about how our source API handles authentication. It is optional, and the form can be enabled by checking the `Authentication` checkbox. The options we have are the following: + +- **Url**: The url where the API listens for authentication. +- **HTTP Method**: The HTTP method for the authentication request. +- **Token Path**: The path of the token, concatinated after the token type.
*In most cases, it is `null`.* +- **Type**: The token type.
*In most cases, it is `Bearer`.* +- **Request Body**: The body contents of the request, if required. + +### Queries section + +In this section we can specify query parameters we can apply to our requests. + +- Name: The name of the query parameter.
*For example, `like`.* +- Default Value: The default value of the parameter.
*This is optional.* + +## End notes + +:::tip + +The path fields on this form are using the [JsonPath](https://github.com/json-path/JsonPath) format. + +::: + +:::note + +For every source we add, the form gets populated with new `field mapping`, `authentication` and `queries` sections we can configure as we saw above. + +::: \ No newline at end of file