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

geonetwork / geonetwork-ui / 14092675744

26 Mar 2025 08:18PM UTC coverage: 81.764% (-0.1%) from 81.86%
14092675744

push

github

web-flow
Merge pull request #1185 from geonetwork/feat/metadata-quality-light-theme

[Datahub] Update the UI for Metadata Quality Component

1891 of 2660 branches covered (71.09%)

Branch coverage included in aggregate %.

6 of 7 new or added lines in 3 files covered. (85.71%)

6256 of 7304 relevant lines covered (85.65%)

9.9 hits per line

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

52.63
/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.ts
1
import { Component, Input } from '@angular/core'
1✔
2
import { NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common'
1✔
3

4
interface ColorScheme {
5
  outerBar: string
6
  innerBar: string
7
  text: string
8
}
9

10
@Component({
11
  selector: 'gn-ui-progress-bar',
12
  templateUrl: './progress-bar.component.html',
13
  styleUrls: ['./progress-bar.component.css'],
14
  standalone: true,
15
  imports: [NgSwitch, NgSwitchCase, NgSwitchDefault],
16
})
17
export class ProgressBarComponent {
1✔
18
  @Input() value = 0
1✔
19
  @Input() type: 'primary' | 'secondary' | 'default' | 'light' = 'default'
1✔
20

21
  get progress() {
22
    return this.value > 0 ? (this.value < 100 ? this.value : 100) : 0
4!
23
  }
24

25
  get color(): ColorScheme {
26
    switch (this.type) {
6!
27
      case 'default':
28
        return {
6✔
29
          outerBar: 'bg-gray-200',
30
          innerBar: 'bg-gray-100',
31
          text: 'text-gray-900',
32
        }
33
      case 'primary':
34
        return {
×
35
          outerBar: 'bg-primary',
36
          innerBar: 'bg-primary-lighter',
37
          text: 'text-white',
38
        }
39
      case 'secondary':
40
        return {
×
41
          outerBar: 'bg-secondary',
42
          innerBar: 'bg-secondary-lighter',
43
          text: 'text-white',
44
        }
45
      case 'light':
NEW
46
        return {
×
47
          outerBar: 'bg-primary-white',
48
          innerBar: 'bg-primary',
49
          text: 'text-main',
50
        }
51
    }
52
  }
53
}
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