summaryrefslogtreecommitdiff
path: root/src/dashboard/static/js/workflow_status.js
blob: b2224eef7e39e21fc893fa393d3ec875524b2b13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Setup dxGrid with data from Django
function WorkflowGrid(workflows) {
    console.log(workflows)
    $("#WorkflowGridContainer").dxDataGrid({
        dataSource: workflows,
        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: "pk",
            dataType: "integer",
            caption: "Cluster"
        },
        {
            dataField: "fields.online",
            dataType: "string",
            caption: "Online"
        },
        {
            dataField: "fields.bmc",
            dataType: "boolean",
            caption: "BMC"
        },
        {
            dataField: "fields.wr_installed",
            dataType: "boolean",
            caption: "WR installed"
        },
        {
            dataField: "fields.created_at",
            dataType: "datetime",
            format: "M/d/yyyy, HH:mm",
            caption: "Date Updated"
        }
    ]
    });
};