@allurereport/web-allure2
Version:
The static files for Allure Classic Report
26 lines (21 loc) • 583 B
JavaScript
import { View } from "backbone.marionette";
import { on } from "@/decorators/index.js";
import template from "./EnvironmentWidget.hbs";
export default class EnvironmentWidget extends View {
template = template;
initialize() {
this.listLimit = 5;
}
onExpandClick() {
this.listLimit = this.model.get("items").length;
this.render();
}
serializeData() {
const items = this.model.get("items");
return {
items: items.slice(0, this.listLimit),
overLimit: items.length > this.listLimit,
};
}
}