Fix policy UI

merge-requests/69/head
Charitha Goonetilleke 6 years ago
parent 3565e03c1b
commit ea4954ba9d

@ -59,10 +59,10 @@ if (uriMatcher.match("/{context}/api/data-tables/invoker/filters")) {
result.deviceTypes = []; result.deviceTypes = [];
var deviceTypesRes = deviceModule.getDeviceTypes(); var deviceTypesRes = deviceModule.getDeviceTypes();
if (deviceTypesRes.status === "success") { if (deviceTypesRes.status === "success") {
var deviceTypes = deviceTypesRes["content"]["deviceTypes"]; var deviceTypes = deviceTypesRes["content"];
for (i = 0; i < deviceTypes.length; i++) { for (i = 0; i < deviceTypes.length; i++) {
var deviceTypeName = deviceTypes[i]; var deviceTypeName = deviceTypes[i].name;
var deviceTypeLabel = deviceTypeName; var deviceTypeLabel = deviceTypeName.charAt(0).toUpperCase() + deviceTypeName.slice(1);
var configs = utility.getDeviceTypeConfig(deviceTypeLabel); var configs = utility.getDeviceTypeConfig(deviceTypeLabel);
if (configs) { if (configs) {
if (configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY]) { if (configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY]) {

Loading…
Cancel
Save