Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Added refresh button
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalpshekhar Gupta committed Jun 28, 2022
1 parent ee27443 commit 9403177
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div style="margin-left: 15px; margin-right: 15px;">
<div class="d-flex" style="margin-bottom: 20px;">
<div class="d-flex j-c-between" style="margin-bottom: 20px;">
<div style="margin-right: 20px;">
<!-- SHOW TICKETS IN TABLE -->
<table class="table table-striped c8y-table-responsive" style="margin-bottom: 20px; ">
Expand Down Expand Up @@ -37,5 +37,13 @@
<pagination [totalItems]="tickets.length" previousText=" "
nextText=" " [itemsPerPage]="totalTicketsPerPage" (pageChanged)="ticketsPageChanged($event)"></pagination>
</div>
<div>

</div>
<div>
<button type="button" class="btn btn-clean btn-icon p-0" title="Refresh tickets" (click)="refreshTickets()">
<span class="dlt-c8y-icon-refresh"></span>
</button>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,12 @@ export class CumulocityTicketingIntegrationViewerWidget implements OnInit {
window.open("/apps/devicemanagement/index.html#/device/"+deviceId+"/device-info", "_blank");
}

public refreshTickets() {
let deviceId = "";
if(this.config.device !== undefined) {
deviceId = this.config.device.id;
}
this.fetchTickets(deviceId);
}

}

0 comments on commit 9403177

Please sign in to comment.