Skip to content

Commit

Permalink
Refactor Category and Severity JS views
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Mar 29, 2024
1 parent 995709a commit 666bc6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { className } from "../../decorators/index";
import template from "./CategoryView.hbs";

@className("pane__section")
class SeverityView extends View {
class CategoryView extends View {
template = template;

serializeData() {
Expand All @@ -14,4 +14,4 @@ class SeverityView extends View {
}
}

export default SeverityView;
export default CategoryView;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{#if severity}}
{{t 'testResult.severity.name'}}:
{{t (concat 'testResult.severity.' severity)}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { View } from "backbone.marionette";
import { className } from "../../decorators/index";
import translate from "../../helpers/t";
import { className } from "../../decorators";
import template from "./SeverityView.hbs";

@className("pane__section")
class SeverityView extends View {
template({ severity }) {
return severity
? `${translate("testResult.severity.name")}: ${translate(`testResult.severity.${severity}`)}`
: "";
}
template = template;

serializeData() {
const extra = this.model.get("extra");
Expand Down

0 comments on commit 666bc6d

Please sign in to comment.