summaryrefslogtreecommitdiff
path: root/src/dashboard/static/js/dashboard.js
diff options
context:
space:
mode:
authorckonstanski <kostcarl@isu.edu>2026-07-30 18:17:14 -0600
committerckonstanski <kostcarl@isu.edu>2026-07-30 18:17:14 -0600
commit640ff61422bc0ee3966941b93d9889ddbbd38d77 (patch)
treeabf1c08f5d38ee53ec8b29dc4f425722517505e6 /src/dashboard/static/js/dashboard.js
parent22dae02a86c1fce71091bfa5289cf99abba1b217 (diff)
more filesHEADmaster
Diffstat (limited to 'src/dashboard/static/js/dashboard.js')
-rw-r--r--src/dashboard/static/js/dashboard.js76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/dashboard/static/js/dashboard.js b/src/dashboard/static/js/dashboard.js
new file mode 100644
index 0000000..e171f59
--- /dev/null
+++ b/src/dashboard/static/js/dashboard.js
@@ -0,0 +1,76 @@
+// Setup dxGrid with data from Django
+function initInstallGrid(installs) {
+ $("#gridContainer").dxDataGrid({
+ dataSource: installs,
+ showColumnLines: false,
+ showRowLines: true,
+ rowAlternationEnabled: true,
+ columnAutoWidth: true,
+ showBorders: true,
+ searchPanel: {
+ visible: true,
+ width: 240,
+ placeholder: "Search..."
+ },
+ groupPanel: {
+ visible: true
+ },
+ paging: {
+ pageSize: 50
+ },
+ pager: {
+ showPageSizeSelector: true,
+ allowedPageSizes: [5, 10, 20],
+ showInfo: true
+ },
+ columns: [
+ {
+ dataField: "cluster__cluster_name",
+ dataType: "string",
+ caption: "Cluster Name"
+ },
+ {
+ dataField: "date_completed",
+ dataType: "datetime",
+ format: "M/d/yyyy, HH:mm",
+ caption: "Date Completed"
+ },
+ {
+ dataField: "date_last_failed",
+ dataType: "datetime",
+ format: "M/d/yyyy, HH:mm",
+ caption: "Date Last Failed"
+ },
+ {
+ dataField: "date_scheduled",
+ dataType: "datetime",
+ format: "M/d/yyyy, HH:mm",
+ caption: "Date Scheduled"
+ },
+ {
+ dataField: "kirke_ticket_completed",
+ dataType: "datetime",
+ format: "M/d/yyyy, HH:mm",
+ caption: "Kirke Ticket Completed"
+ },
+ {
+ dataField: "kirke_ticket_number",
+ dataType: "int",
+ caption: "Kirke Ticket Number",
+ cellTemplate: function (container, options) {
+ $('<a/>').addClass('dx-link')
+ .text(options.data.kirke_ticket_number)
+ .on('dxclick', function () {
+ window.open('https://kirke.verizon.com/changeRequest/' + options.data.kirke_ticket_number)
+ })
+ .appendTo(container);
+ }
+ },
+ {
+ dataField: "kirke_ticket_status",
+ dataType: "string",
+ caption: "Kirke Ticket Status"
+ }
+ ]
+ });
+}; \ No newline at end of file