> {
+ const identifiers = [this.targetUsername];
+ if (this.targetEmail !== undefined) {
+ identifiers.push(this.targetEmail);
+ }
+ return new PoliciesApi(DEFAULT_CONFIG).policiesReputationScoresList({
+ identifierIn: identifiers,
+ ordering: this.order,
+ page: page,
+ pageSize: (await uiConfig()).pagination.perPage,
+ });
+ }
+
+ checkbox = true;
+ clearOnRefresh = true;
+ order = "identifier";
+
+ columns(): TableColumn[] {
+ return [
+ new TableColumn(msg("Identifier"), "identifier"),
+ new TableColumn(msg("IP"), "ip"),
+ new TableColumn(msg("Score"), "score"),
+ new TableColumn(msg("Updated"), "updated"),
+ ];
+ }
+
+ renderToolbarSelected(): TemplateResult {
+ const disabled = this.selectedElements.length < 1;
+ return html` {
+ return new PoliciesApi(DEFAULT_CONFIG).policiesReputationScoresUsedByList({
+ reputationUuid: item.pk || "",
+ });
+ }}
+ .delete=${(item: Reputation) => {
+ return new PoliciesApi(DEFAULT_CONFIG).policiesReputationScoresDestroy({
+ reputationUuid: item.pk || "",
+ });
+ }}
+ >
+
+ `;
+ }
+
+ row(item: Reputation): TemplateResult[] {
+ return [
+ html`${item.identifier}`,
+ html`${item.ipGeoData?.country
+ ? html` ${getUnicodeFlagIcon(item.ipGeoData.country)} `
+ : html``}
+ ${item.ip}`,
+ html`${item.score}`,
+ html`${getRelativeTime(item.updated)}
+ ${item.updated.toLocaleString()}`,
+ ];
+ }
+}