Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • kit/ki-allianz/datenplattform-core/piveau-hub/piveau-ui
  • till.riedel/piveau-ui
2 results
Show changes
Commits on Source (10)
Showing
with 23 additions and 15 deletions
<template>
<div class="dataset-formats">
<slot name="formats" :formats="formats">
<slot name="formats" :formats="filteredFormats">
<PvBadge
v-for="(format, i) in formats.slice(0, 10)"
v-for="(format, i) in filteredFormats.slice(0, 10)"
:key="`badge@${i}`"
class="format-badge"
:value="format"
......@@ -11,7 +11,7 @@
:type="format.id"
:title="$t('message.tooltip.datasetDetails.format')"
>
{{ format.label || format.id || "UNKNOWN" }}
{{ format.label || format.id || "" }}
</PvBadge>
<span v-if="formats.length >= 10">...</span>
</slot>
......@@ -32,6 +32,11 @@ export default defineComponent({
required: true,
},
},
computed: {
filteredFormats() {
return this.formats.filter((format) => (format.label || format.id) && format.label !== "UNKNOWN");
}
}
});
</script>
......
......@@ -112,7 +112,7 @@ export default {
if (!isEmpty(dist['dct:format'])) {
return dist['dct:format'].substring(dist['dct:format'].lastIndexOf('/') + 1);
} else {
return 'UNKNOWN';
return '';
}
},
redirectToDistributionForm(distributionIndex) {
......
......@@ -3,9 +3,9 @@
<span v-if="date">
{{ date }}
</span>
<div v-else type="UNKNOWN" data-toggle="tooltip" data-placement="top" title="" class="unknown" data-original-title="UNKNOWN">
<!--<div v-else type="UNKNOWN" data-toggle="tooltip" data-placement="top" title="" class="unknown" data-original-title="UNKNOWN">
<span>UNKNOWN</span>
</div>
</div>-->
</div>
</template>
......
......@@ -5,7 +5,7 @@
:data-toggle="distributionFormatTruncated(distribution) ? 'tooltip' : false"
:data-placement="distributionFormatTruncated(distribution) ? 'top' : false"
:title="distributionFormatTruncated(distribution) ? getDistributionFormat(distribution) : false">
<span :style="{ fontSize: embed ? '0.75rem' : '' }">{{ truncate(getDistributionFormat(distribution), 10, true) }}</span>
<span :style="{ fontSize: embed ? '0.75rem' : '' }">{{ truncate(getDistributionFormat(distribution), 6, true) }}</span>
</div>
</div>
</template>
......
......@@ -16,7 +16,7 @@
<div>
<app-link v-if="showValidateButton" class="btn btn-sm validate-btn pt-0"
:to="{ name: 'DatasetDetailsQuality', query: { locale: $route.query.locale, validate: distribution.id } }">
Validate
AI ready?
</app-link>
</div>
</div>
......
......@@ -174,7 +174,7 @@ export default {
return this.expandedPages.includes(id);
},
getPageFormat(page) {
return has(page, 'format.label') && !isNil(page.format.label) ? page.format.label : 'UNKNOWN';
return has(page, 'format.label') && !isNil(page.format.label) ? page.format.label : '';
},
pageFormatTruncated(page) {
return this.getPageFormat(page).length > 4;
......
......@@ -183,7 +183,7 @@ export default {
return this.visualisations.displayCount + incrementStep <= this.getVisualisations.length;
},
getVisualisationFormat(visualisation) {
return has(visualisation, 'format.label') && !isNil(visualisation.format.label) ? visualisation.format.label : 'UNKNOWN';
return has(visualisation, 'format.label') && !isNil(visualisation.format.label) ? visualisation.format.label : '';
},
visualisationFormatTruncated(visualisation) {
return this.getVisualisationFormat(visualisation).length > 4;
......
<template>
<div class="d-flex align-items-center dsd-header-catalogue">
<div>
<img v-if="showCountryFlag(getCountry)" class="mr-2 border border-dark flag" :class="{ 'io': getCountry.id === 'io' }" :src="getCountryFlagImg(getCountry.id)" alt="Catalog Flag">
<img v-if="showCountryFlag(getCountry)" class="mr-2 flag" :class="{ 'io': getCountry.id === 'io' }" :src="getCountryFlagImg(getCountry.id)" alt="Catalog Flag">
<app-link
:to="getCatalogLink"
:title="$t('message.tooltip.datasetDetails.catalogue')"
......@@ -56,7 +56,7 @@ export default {
<style scoped lang="scss">
.flag {
max-width: 30px;
max-height: 19px;
max-height: 30px;
margin-bottom: 3px;
border-radius: 1px;
}
......
......@@ -77,7 +77,7 @@ export default {
return properties;
},
fieldsArray() {
return this.propertyFields.split(',').map(item => item.trim());
return this.propertyFields.split(',').map(item => item.trim()).filter(item => item !== "spatial" && item !== "catalogRecord");
},
showMoreVisible() {
return this.initialHeight > this.restrictedHeight;
......
......@@ -83,11 +83,14 @@ function getImg(image = '', defaultFallbackImage = '') {
* @returns { String } An image, represented by its absolute path.
*/
function getCountryFlagImg(countryId) {
// temporary workaround
return imageModules[`${RELATIVE_PATH_TO_IMAGES}/archive.png`].default;
let img;
try {
img = imageModules[`${RELATIVE_PATH_TO_IMAGES}/flags/${countryId.toLowerCase()}.png`];
} catch (err) {
img = imageModules[`${RELATIVE_PATH_TO_IMAGES}/flags/eu.png`];
img = imageModules[`${RELATIVE_PATH_TO_IMAGES}/archive.png`];
}
return img.default;
}
......
{
"name": "@piveau/piveau-hub-ui-modules",
"private": false,
"version": "4.6.31",
"version": "4.6.32",
"license": "Apache-2.0",
"type": "module",
"exports": {
......