Skip to content

Commit

Permalink
Feat (api-card) style
Browse files Browse the repository at this point in the history
  • Loading branch information
AxelLosco committed May 21, 2024
1 parent d85d856 commit ea9d49f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ export class Gn4FieldMapper {
const distributions = rawLinks
.map((link) => this.mapLink(link))
.filter((v) => v !== null)
console.log("je suis la distribution" ,distributions)
return {
...output,
distributions,
Expand Down Expand Up @@ -318,7 +317,6 @@ export class Gn4FieldMapper {

getLinkType(url: string, protocol?: string): DatasetDistributionType {

console.log("hello proto",protocol);
if (!protocol) {
return 'link'
}
Expand Down Expand Up @@ -371,14 +369,11 @@ export class Gn4FieldMapper {
const accessServiceProtocol = matchProtocol(protocol)
const mimeTypeMatches =
protocol && protocol.match(/^WWW:DOWNLOAD:(.+\/.+)$/)
console.log("je suis le mimetypeMatches" ,mimeTypeMatches)
const mimeType = mimeTypeMatches && mimeTypeMatches[1]
console.log("je suis le mimeTyep", mimeType)
const distribution = {
...(name && { name }),
...(description && { description }),
}
console.log("hello type",type);

switch (type) {
case 'service':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface Field {
export class IgnApiDlComponent implements OnInit {
@Input() set apiLink(value: DatasetServiceDistribution) {
this.apiBaseUrl = value ? value.url.href : undefined
console.log(this.apiBaseUrl)
this.resetUrl()
}

Expand Down
4 changes: 3 additions & 1 deletion libs/ui/elements/src/lib/api-card/api-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export class ApiCardComponent implements OnInit, OnChanges {

ngOnInit() {
this.displayApiFormButton =
this.link.accessServiceProtocol === 'ogcFeatures' ? true : false
this.link.accessServiceProtocol === 'ogcFeatures' ||
this.link.accessServiceProtocol === 'ignDl'
console.log('je suis le link', this.link)
}

ngOnChanges(changes: SimpleChanges) {
Expand Down

0 comments on commit ea9d49f

Please sign in to comment.