~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to views/task-page.twig

  • Committer: Dan Garner
  • Date: 2016-10-04 13:42:54 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: git-v1:503f3749134c312e5c1bf2d1c4e6dc5c16f19a1c
Convert maintenance to 3 x tasks and hook up the task runner XTR.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                            <tr>
49
49
                                <th>{% trans "ID" %}</th>
50
50
                                <th>{% trans "Name" %}</th>
 
51
                                <th>{% trans "Status" %}</th>
51
52
                                <th>{% trans "Next Run" %}</th>
 
53
                                <th>{% trans "Run Now" %}</th>
 
54
                                <th>{% trans "Last Run" %}</th>
 
55
                                <th>{% trans "Last Status" %}</th>
 
56
                                <th>{% trans "Last Duration" %}</th>
52
57
                                <th></th>
53
58
                            </tr>
54
59
                        </thead>
78
83
            "columns": [
79
84
                { "data": "taskId" },
80
85
                { "data": "name" },
 
86
                { "data": "status" },
81
87
                {
82
88
                    "data": "nextRunDt",
83
89
                    "render": dataTableDateFromUnix
84
90
                },
85
91
                {
 
92
                    "data": "runNow",
 
93
                    "render": dataTableTickCrossColumn
 
94
                },
 
95
                {
 
96
                    "data": "lastRunDt",
 
97
                    "render": dataTableDateFromUnix
 
98
                },
 
99
                {
 
100
                    "data": "lastRunStatus",
 
101
                    "render": function (data, type, row) {
 
102
                        if (type != "display")
 
103
                            return data;
 
104
 
 
105
                        var icon = "";
 
106
                        if (data == 4)
 
107
                            icon = "fa-check";
 
108
                        else
 
109
                            icon = "fa-times";
 
110
 
 
111
                        return "<span class='fa " + icon + "' title='" + ((row.lastRunMessage == null) ? "" : row.lastRunMessage) + "'></span>";
 
112
                    }
 
113
                },
 
114
                {
 
115
                    "data": "lastRunDuration",
 
116
                    "render": function (data, type, row) {
 
117
                        if (type != "display")
 
118
                            return data;
 
119
 
 
120
                        return (data == null) ? 0 : moment().startOf("day").seconds(data).format("H:mm:ss");
 
121
                    }
 
122
                },
 
123
                {
86
124
                    "orderable": false,
87
125
                    "data": dataTableButtonsColumn
88
126
                }