mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #482 from rasika/release-2.0.x
Fixing IOTS-333: Devices listing page doesn't honor analyticsEnabled and groupingEnabled configs
This commit is contained in:
commit
099fc99bce
@ -65,7 +65,9 @@ function onRequest(context) {
|
|||||||
"type": data[i],
|
"type": data[i],
|
||||||
"category": deviceType.category,
|
"category": deviceType.category,
|
||||||
"label": deviceType.label,
|
"label": deviceType.label,
|
||||||
"thumb": utility.getDeviceThumb(data[i])
|
"thumb": utility.getDeviceThumb(data[i]),
|
||||||
|
"analyticsEnabled": deviceType.analyticsEnabled,
|
||||||
|
"groupingEnabled": deviceType.groupingEnabled
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,7 @@ $(document).ready(function () {
|
|||||||
$.hasPermission = function (permission) {
|
$.hasPermission = function (permission) {
|
||||||
return permissionSet[permission];
|
return permissionSet[permission];
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceListing = $("#device-listing");
|
deviceListing = $("#device-listing");
|
||||||
currentUser = deviceListing.data("current-user");
|
currentUser = deviceListing.data("current-user");
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ function loadDevices(searchType, searchParam) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// In JS Boolean("false") returns TRUE => http://stackoverflow.com/a/264037/1560536
|
// In JS Boolean("false") returns TRUE => http://stackoverflow.com/a/264037/1560536
|
||||||
return (analyticsEnabled == "true");
|
return (groupingEnabled == "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -351,7 +351,7 @@ function loadDevices(searchType, searchParam) {
|
|||||||
'<span class="hidden-xs hidden-on-grid-view">Analytics</span>';
|
'<span class="hidden-xs hidden-on-grid-view">Analytics</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!groupName || !groupId) {
|
if ((!groupName || !groupId) && groupingEnabled(row.deviceType)) {
|
||||||
html +=
|
html +=
|
||||||
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view group-device-link" '
|
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view group-device-link" '
|
||||||
+
|
+
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user