Skip to content

Commit

Permalink
[fix] fix benchmark item showing wrong severity (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
sijav authored Jun 26, 2024
1 parent 0448293 commit 68f938f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# yarn lint-staged
yarn lint-staged
4 changes: 2 additions & 2 deletions src/locales/de-DE/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ msgstr "Da die Daten über {0} liegen, werden nur die ersten {1} Elemente herunt
msgid "below"
msgstr ""

#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:101
#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:102
#: src/pages/panel/user-settings/UserSettingsNotification.tsx:46
#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:160
msgid "Benchmark"
Expand Down Expand Up @@ -1214,7 +1214,7 @@ msgstr "Ignoriert"
msgid "Improved"
msgstr "Verbessert"

#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:105
#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:106
msgid "in account"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions src/locales/en-US/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ msgstr "Because the data is over {0} Only first {1} items will be downloaded"
msgid "below"
msgstr "below"

#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:101
#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:102
#: src/pages/panel/user-settings/UserSettingsNotification.tsx:46
#: src/pages/panel/workspace-settings/workspace-alerting-settings/WorkspaceAlertingSettings.tsx:160
msgid "Benchmark"
Expand Down Expand Up @@ -1214,7 +1214,7 @@ msgstr "Ignored"
msgid "Improved"
msgstr "Improved"

#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:105
#: src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx:106
msgid "in account"
msgstr "in account"

Expand Down
5 changes: 3 additions & 2 deletions src/pages/panel/benchmark-detail/BenchmarkDetailTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export const BenchmarkDetailTree = () => {
}
from.numberOfResourceFailing += to.numberOfResourceFailing
if (
!from.severity ||
(to.severity && to.numberOfResourceFailing && sortedSeverities.indexOf(to.severity) < sortedSeverities.indexOf(from.severity))
to.severity &&
to.numberOfResourceFailing &&
(!from.severity || sortedSeverities.indexOf(to.severity) < sortedSeverities.indexOf(from.severity))
) {
from.severity = to.severity
}
Expand Down

0 comments on commit 68f938f

Please sign in to comment.