Merge pull request #753 from madhawap/master

Fix for disabling reboot and upgrade-firmware operations on UI
4.x.x
Ayyoob Hamza 8 years ago committed by GitHub
commit 756ba08073

@ -345,11 +345,11 @@ public class PolicyManagementServiceImpl implements PolicyManagementService {
public Response updatePolicyPriorities(List<PriorityUpdatedPolicyWrapper> priorityUpdatedPolicies) {
PolicyManagerService policyManagementService = DeviceMgtAPIUtils.getPolicyManagementService();
List<Policy> policiesToUpdate = new ArrayList<>(priorityUpdatedPolicies.size());
int i;
for (i = 0; i < priorityUpdatedPolicies.size(); i++) {
for (PriorityUpdatedPolicyWrapper priorityUpdatedPolicy : priorityUpdatedPolicies) {
Policy policyObj = new Policy();
policyObj.setId(priorityUpdatedPolicies.get(i).getId());
policyObj.setPriorityId(priorityUpdatedPolicies.get(i).getPriority());
policyObj.setId(priorityUpdatedPolicy.getId());
policyObj.setPriorityId(priorityUpdatedPolicy.getPriority());
policiesToUpdate.add(policyObj);
}
boolean policiesUpdated;

@ -86,6 +86,14 @@ var operationModule = function () {
var iconIdentifier = operations[op].operation;
if (features && features[iconIdentifier]) {
var icon = features[iconIdentifier].icon;
var isCloud = devicemgtProps["isCloud"];
//TODO: remove isCloud check once able to verify features from the device agent
var isDisabled = features[iconIdentifier].isDisabled;
if (isDisabled && isCloud) {
operations[op]["isDisabled"] = isDisabled;
} else {
operations[op]["isDisabled"] = false;
}
if (icon) {
operations[op]["iconFont"] = icon;
} else if (iconPath) {

@ -265,4 +265,9 @@ header .username {
.add-padding-top-3x {
padding-top: 15px !important;
}
}
.op-disabled, .op-disabled i, .op-disabled span {
cursor: not-allowed;
+ color: #d2d2d2;
}

Loading…
Cancel
Save