mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 07:08:44 +08:00
fced35de15
Some reports, like the Web Crawler User Agents report, have very long strings that need to be truncated when displayed. However, there is no way to see the full value without exporting the report or inspecting the elements using dev tools. This PR set a `title` attribute with the full value to the reports `<td>` elements so that the full value is shown on hover.
22 lines
661 B
JavaScript
22 lines
661 B
JavaScript
import Component from "@ember/component";
|
|
import { alias } from "@ember/object/computed";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
export default Component.extend({
|
|
tagName: "td",
|
|
classNames: ["admin-report-table-cell"],
|
|
classNameBindings: ["type", "property"],
|
|
attributeBindings: ["value:title"],
|
|
options: null,
|
|
|
|
@discourseComputed("label", "data", "options")
|
|
computedLabel(label, data, options) {
|
|
return label.compute(data, options || {});
|
|
},
|
|
|
|
type: alias("label.type"),
|
|
property: alias("label.mainProperty"),
|
|
formatedValue: alias("computedLabel.formatedValue"),
|
|
value: alias("computedLabel.value"),
|
|
});
|