• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geonetwork / geonetwork-ui / 12069834722

28 Nov 2024 01:27PM UTC coverage: 83.926% (+0.2%) from 83.736%
12069834722

push

github

jahow
chore: fix formatting on PULL_REQUEST_TEMPLATE.md

3159 of 4250 branches covered (74.33%)

Branch coverage included in aggregate %.

9116 of 10376 relevant lines covered (87.86%)

201.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.26
/libs/ui/elements/src/lib/api-card/api-card.component.ts
1
import { DatasetServiceDistribution } from '@geonetwork-ui/common/domain/model/record'
1✔
2
import {
1✔
3
  ChangeDetectionStrategy,
4
  Component,
5
  EventEmitter,
6
  Input,
7
  OnChanges,
8
  OnInit,
9
  Output,
10
  SimpleChanges,
11
} from '@angular/core'
12
import { CommonModule } from '@angular/common'
1✔
13
import { CopyTextButtonComponent } from '@geonetwork-ui/ui/inputs'
1✔
14
import { TranslateModule } from '@ngx-translate/core'
1✔
15
import { MatTooltipModule } from '@angular/material/tooltip'
1✔
16
import { NgIcon, provideIcons } from '@ng-icons/core'
1✔
17
import { matMoreHoriz } from '@ng-icons/material-icons/baseline'
1✔
18

19
@Component({
20
  selector: 'gn-ui-api-card',
21
  templateUrl: './api-card.component.html',
22
  styleUrls: ['./api-card.component.css'],
23
  changeDetection: ChangeDetectionStrategy.OnPush,
24
  standalone: true,
25
  imports: [
26
    CommonModule,
27
    CopyTextButtonComponent,
28
    TranslateModule,
29
    MatTooltipModule,
30
    NgIcon,
31
  ],
32
  viewProviders: [
33
    provideIcons({
34
      matMoreHoriz,
35
    }),
36
  ],
37
})
38
export class ApiCardComponent implements OnInit, OnChanges {
1✔
39
  @Input() link: DatasetServiceDistribution
40
  @Input() currentLink: DatasetServiceDistribution
41
  displayApiFormButton: boolean
42
  currentlyActive = false
3✔
43
  @Output() openRecordApiForm: EventEmitter<DatasetServiceDistribution> =
3✔
44
    new EventEmitter<DatasetServiceDistribution>()
45

46
  ngOnInit() {
47
    this.displayApiFormButton =
4✔
48
      this.link.accessServiceProtocol === 'ogcFeatures' ||
4!
49
      this.link.accessServiceProtocol === 'wfs'
50
  }
51

52
  ngOnChanges(changes: SimpleChanges) {
53
    this.currentlyActive =
×
54
      changes.currentLink.currentValue === this.link ? true : false
×
55
  }
56

57
  openRecordApiFormPanel() {
58
    if (this.displayApiFormButton) {
1✔
59
      this.currentlyActive = !this.currentlyActive
1✔
60
      this.openRecordApiForm.emit(this.currentlyActive ? this.link : undefined)
1!
61
    }
62
  }
63
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc