-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
143 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,23 +20,23 @@ class OrganisationsServiceMock { | |
of( | ||
'contact' in source | ||
? { | ||
...record, | ||
contact: { | ||
name: 'Main Contact', | ||
...record, | ||
contact: { | ||
name: 'Main Contact', | ||
email: '[email protected]', | ||
organisation: source.contact[0].organisation, | ||
}, | ||
resourceContacts: [ | ||
{ | ||
name: 'Resource Contact 1', | ||
email: '[email protected]', | ||
organisation: source.contact[0].organisation, | ||
}, | ||
resourceContacts: [ | ||
{ | ||
name: 'Resource Contact 1', | ||
email: '[email protected]', | ||
}, | ||
{ | ||
name: 'Resource Contact 2', | ||
email: '[email protected]', | ||
}, | ||
], | ||
} | ||
{ | ||
name: 'Resource Contact 2', | ||
email: '[email protected]', | ||
}, | ||
], | ||
} | ||
: record | ||
) | ||
) | ||
|
@@ -78,6 +78,7 @@ describe('ElasticsearchMapper', () => { | |
abstract: 'The grid is based on proposal ', | ||
id: '12456', | ||
metadataUrl: 'url', | ||
qualityScore: 25, | ||
thumbnailUrl: 'data:image/png;base64,', | ||
title: 'EEA reference grid for Germany (10km), May 2013', | ||
uuid: '20e9e1a1-83c1-4f13-89ef-c19767d6ee18f', | ||
|
@@ -90,6 +91,7 @@ describe('ElasticsearchMapper', () => { | |
abstract: 'Reference layer of the rivers sensitive areas, ', | ||
id: '12442', | ||
metadataUrl: 'url', | ||
qualityScore: 25, | ||
thumbnailUrl: 'data:image/png;base64,', | ||
title: | ||
'Urban Waste Water Treatment Directive, Sensitive areas - rivers reported under UWWTD data call 2015, Nov. 2017', | ||
|
@@ -428,9 +430,13 @@ describe('ElasticsearchMapper', () => { | |
], | ||
metadataUrl: 'url', | ||
ownerInfo: 'testadmin|ADMIN|Test|Administrator', | ||
qualityScore: 100, | ||
thumbnailUrl: | ||
'https://sextant.ifremer.fr/geonetwork/srv/api/records/cf5048f6-5bbf-4e44-ba74-e6f429af51ea/attachments/parametres.gif', | ||
title: 'Surval - Données par paramètre', | ||
topic: [ | ||
'Océans', | ||
], | ||
uuid: 'cf5048f6-5bbf-4e44-ba74-e6f429af51ea', | ||
contact: { | ||
name: 'Main Contact', | ||
|
@@ -512,11 +518,12 @@ describe('ElasticsearchMapper', () => { | |
'Sète', | ||
'La Rochelle', | ||
], | ||
legalConstraints: [ | ||
"Restriction légale d'utilisation à préciser", | ||
], | ||
lineage: | ||
'Les données sont bancarisées dans la base de données Quadrige.', | ||
constraints: [ | ||
'Restriction lié à l’exercice du droit moral', | ||
"Restriction légale d'utilisation à préciser", | ||
'Pas de restriction d’accès public', | ||
'Licence Ouverte version 2.0 https://www.etalab.gouv.fr/wp-content/uploads/2017/04/ETALAB-Licence-Ouverte-v2.0.pdf', | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { | ||
TRANSLATE_DEFAULT_CONFIG, | ||
UtilI18nModule, | ||
} from '@geonetwork-ui/util/i18n' | ||
import { TranslateModule } from '@ngx-translate/core' | ||
import { Meta, moduleMetadata, Story } from '@storybook/angular' | ||
import { MetadataQualityComponent } from './metadata-quality.component' | ||
import { UiElementsModule } from '../ui-elements.module' | ||
import { RECORDS_FULL_FIXTURE } from '@geonetwork-ui/util/shared/fixtures' | ||
|
||
export default { | ||
title: 'Elements/MetadataQualityComponent', | ||
component: MetadataQualityComponent, | ||
decorators: [ | ||
moduleMetadata({ | ||
imports: [ | ||
UiElementsModule, | ||
UtilI18nModule, | ||
TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG), | ||
], | ||
}), | ||
], | ||
} as Meta<MetadataQualityComponent> | ||
|
||
const Template: Story<MetadataQualityComponent> = ( | ||
args: MetadataQualityComponent | ||
) => ({ | ||
component: MetadataQualityComponent, | ||
props: args, | ||
}) | ||
|
||
export const Primary = Template.bind({}) | ||
Primary.args = { | ||
metadata: RECORDS_FULL_FIXTURE[1], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/ui/widgets/src/lib/progress-bar/progress-bar.component.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,4 +159,21 @@ export const RECORDS_FULL_FIXTURE: MetadataRecord[] = deepFreeze([ | |
}, | ||
catalogUuid: '6731be1e-6533-44e0-9b8a-580b45e36e80', | ||
}, | ||
{ | ||
id: '10421', | ||
uuid: 'cf5048f6-5bbf-4e44-ba74-e6f429af51eb', | ||
metadataUrl: 'url', | ||
title: 'Test', | ||
abstract: "La description du test", | ||
updateFrequency: null, | ||
keywords: [], | ||
contact: { | ||
name: 'Jean-Michel', | ||
organisation: 'Ifremer', | ||
email: '[email protected]', | ||
}, | ||
topic: [], | ||
legalConstraints: [], | ||
qualityScore: 50 | ||
} | ||
]) |