Dileesha Rajapakse 7 years ago
parent c6d6d61df6
commit c41a704a35

@ -46,6 +46,22 @@ $(document).ready(function() {
}); });
function getLogStatusIcon(entry) {
switch (entry) {
case 'COMPLETED':
return 'fw-success'
break;
case 'PENDING':
return 'fw-pending'
break;
case 'ERROR':
return 'fw-error'
break;
default:
return 'fw-info'
}
};
function loadOperationsLog(update) { function loadOperationsLog(update) {
var operationsLogTable = "#operation-log"; var operationsLogTable = "#operation-log";
if (update) { if (update) {
@ -95,7 +111,7 @@ function loadOperationsLog(update) {
data: "status", data: "status",
class: "text-right extended-log-data log-record-status", class: "text-right extended-log-data log-record-status",
render: function(data, type, full, meta) { render: function(data, type, full, meta) {
return '<i class="icon fw fw-success"></i><span> ' + data + ' </span><i class="icon fw fw-down"></i>'; return '<i class="icon fw ' + getLogStatusIcon(data) + '"> </i><span> ' + data + ' </span><i class="icon fw fw-down"></i>';
}, },
width: "100%" width: "100%"
} }
@ -171,10 +187,13 @@ function loadOperationsLog(update) {
case 'PENDING': case 'PENDING':
return 'fw-pending' return 'fw-pending'
break; break;
case 'ERROR':
return 'fw-error'
break;
default: default:
return 'fw-info' return 'fw-info'
} }
} };
} }
} }

Loading…
Cancel
Save