Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonar: Add a 'onKeyPress|onKeyDown|onKeyUp' attribute to this <span> tag #26107

Merged
merged 1 commit into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading