Skip to content

Commit

Permalink
Sonar: Add a 'onKeyPress|onKeyDown|onKeyUp' attribute to this <span> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed May 11, 2024
1 parent 1d2b58a commit 152c707
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,40 @@

<div class="modal-body">
<div class="mb-3">
<span class="badge bg-primary hand" (click)="threadStateFilter = undefined">
<button class="badge bg-primary hand" (click)="threadStateFilter = undefined" (keydown.enter)="threadStateFilter = undefined">
@if (threadStateFilter === undefined) {
<fa-icon icon="check"></fa-icon>
}
All&nbsp;<span class="badge rounded-pill bg-default">{{ threadDumpAll }}</span>
</span>
</button>

<span class="badge bg-success hand" (click)="threadStateFilter = ThreadState.Runnable">
<button class="badge bg-success hand" (click)="threadStateFilter = ThreadState.Runnable" (keydown.enter)="threadStateFilter = ThreadState.Runnable">
@if (threadStateFilter === ThreadState.Runnable) {
<fa-icon icon="check"></fa-icon>
}
Runnable&nbsp;<span class="badge rounded-pill bg-default">{{ threadDumpRunnable }}</span>
</span>
</button>

<span class="badge bg-info hand" (click)="threadStateFilter = ThreadState.Waiting">
<button class="badge bg-info hand" (click)="threadStateFilter = ThreadState.Waiting" (keydown.enter)="threadStateFilter = ThreadState.Waiting">
@if (threadStateFilter === ThreadState.Waiting) {
<fa-icon icon="check"></fa-icon>
}
Waiting&nbsp;<span class="badge rounded-pill bg-default">{{ threadDumpWaiting }}</span>
</span>
</button>

<span class="badge bg-warning hand" (click)="threadStateFilter = ThreadState.TimedWaiting">
<button class="badge bg-warning hand" (click)="threadStateFilter = ThreadState.TimedWaiting" (keydown.enter)="threadStateFilter = ThreadState.TimedWaiting">
@if (threadStateFilter === ThreadState.TimedWaiting) {
<fa-icon icon="check"></fa-icon>
}
Timed Waiting&nbsp;<span class="badge rounded-pill bg-default">{{ threadDumpTimedWaiting }}</span>
</span>
</button>

<span class="badge bg-danger hand" (click)="threadStateFilter = ThreadState.Blocked">
<button class="badge bg-danger hand" (click)="threadStateFilter = ThreadState.Blocked" (keydown.enter)="threadStateFilter = ThreadState.Blocked">
@if (threadStateFilter === ThreadState.Blocked) {
<fa-icon icon="check"></fa-icon>
}
Blocked&nbsp;<span class="badge rounded-pill bg-default">{{ threadDumpBlocked }}</span>
</span>
</button>
</div>

@for (thread of getThreads(); track $index) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
@if (filters.hasAnyFilterSet()) {
<div class="filter-display">
<span>__jhiTranslateTag__('entity.filters.set')</span>
<fa-icon icon="times" (click)="clearAllFilters()" title="__jhiTranslatePipe__('entity.filters.clearAll')"></fa-icon>
<button class="btn" (click)="clearAllFilters()" (keydown.enter)="clearAllFilters()">
<fa-icon icon="times" title="__jhiTranslatePipe__('entity.filters.clearAll')"></fa-icon>
</button>
<ul>
@for (filterOption of filters.filterOptions; track filterOption.name) {
@for (value of filterOption.values; track value) {
<li>
<span>{{ filterOption.name }}:</span> {{ value }}
<fa-icon icon="times" (click)="clearFilter(filterOption.name, value)" title="__jhiTranslatePipe__('entity.filters.clear')"></fa-icon>
<button class="btn" (click)="clearFilter(filterOption.name, value)" (keydown.enter)="clearFilter(filterOption.name, value)">
<fa-icon icon="times" title="__jhiTranslatePipe__('entity.filters.clear')"></fa-icon>
</button>
</li>
}
}
Expand Down

0 comments on commit 152c707

Please sign in to comment.