Merge branch 'release-3.0.x' of https://github.com/wso2/carbon-device-mgt into release-2.0.x

revert-70aa11f8
Hasunie 8 years ago
commit 1d6bf23d67

@ -37,7 +37,6 @@ import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -106,8 +105,13 @@ public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegi
jsonStringObject.put(ApiApplicationConstants.OAUTH_CLIENT_ID, registrationProfile.getConsumerKey()); jsonStringObject.put(ApiApplicationConstants.OAUTH_CLIENT_ID, registrationProfile.getConsumerKey());
jsonStringObject.put(ApiApplicationConstants.OAUTH_CLIENT_SECRET, jsonStringObject.put(ApiApplicationConstants.OAUTH_CLIENT_SECRET,
registrationProfile.getConsumerSecret()); registrationProfile.getConsumerSecret());
if (registrationProfile.getValidityPeriod() == 0) {
jsonStringObject.put(ApiApplicationConstants.JSONSTRING_VALIDITY_PERIOD_TAG, jsonStringObject.put(ApiApplicationConstants.JSONSTRING_VALIDITY_PERIOD_TAG,
ApiApplicationConstants.DEFAULT_VALIDITY_PERIOD); ApiApplicationConstants.DEFAULT_VALIDITY_PERIOD);
} else {
jsonStringObject.put(ApiApplicationConstants.JSONSTRING_VALIDITY_PERIOD_TAG,
registrationProfile.getValidityPeriod());
}
apiManagementProviderService.registerExistingOAuthApplicationToAPIApplication( apiManagementProviderService.registerExistingOAuthApplicationToAPIApplication(
jsonStringObject.toJSONString(), registrationProfile.getApplicationName(), jsonStringObject.toJSONString(), registrationProfile.getApplicationName(),
registrationProfile.getConsumerKey(), username, registrationProfile.isAllowedToAllDomains(), registrationProfile.getConsumerKey(), username, registrationProfile.isAllowedToAllDomains(),

@ -41,6 +41,8 @@ public class RegistrationProfile {
private boolean isMappingAnExistingOAuthApp; private boolean isMappingAnExistingOAuthApp;
private String consumerKey; private String consumerKey;
private String consumerSecret; private String consumerSecret;
@XmlElement(required = false)
private int validityPeriod;
public String getApplicationName() { public String getApplicationName() {
return applicationName; return applicationName;
@ -89,4 +91,12 @@ public class RegistrationProfile {
public void setConsumerSecret(String consumerSecret) { public void setConsumerSecret(String consumerSecret) {
this.consumerSecret = consumerSecret; this.consumerSecret = consumerSecret;
} }
public int getValidityPeriod() {
return validityPeriod;
}
public void setValidityPeriod(int validityPeriod) {
this.validityPeriod = validityPeriod;
}
} }

@ -105,6 +105,11 @@ public class GroupDAOImpl implements GroupDAO {
stmt.setInt(1, groupId); stmt.setInt(1, groupId);
stmt.setInt(2, tenantId); stmt.setInt(2, tenantId);
stmt.executeUpdate(); stmt.executeUpdate();
sql = "DELETE FROM DM_DEVICE_GROUP_POLICY WHERE DEVICE_GROUP_ID = ? AND TENANT_ID = ?";
stmt = conn.prepareStatement(sql);
stmt.setInt(1, groupId);
stmt.setInt(2, tenantId);
stmt.executeUpdate();
} catch (SQLException e) { } catch (SQLException e) {
throw new GroupManagementDAOException("Error occurred while removing mappings for group.'", e); throw new GroupManagementDAOException("Error occurred while removing mappings for group.'", e);
} finally { } finally {

@ -1903,6 +1903,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
defaultGroup = new DeviceGroup(groupName); defaultGroup = new DeviceGroup(groupName);
// Setting system level user (wso2.system.user) as the owner // Setting system level user (wso2.system.user) as the owner
defaultGroup.setOwner(CarbonConstants.REGISTRY_SYSTEM_USERNAME); defaultGroup.setOwner(CarbonConstants.REGISTRY_SYSTEM_USERNAME);
defaultGroup.setDescription("Default system group for devices with " + groupName + " ownership.");
try { try {
service.createGroup(defaultGroup, DeviceGroupConstants.Roles.DEFAULT_ADMIN_ROLE, service.createGroup(defaultGroup, DeviceGroupConstants.Roles.DEFAULT_ADMIN_ROLE,
DeviceGroupConstants.Permissions.DEFAULT_ADMIN_PERMISSIONS); DeviceGroupConstants.Permissions.DEFAULT_ADMIN_PERMISSIONS);

@ -500,10 +500,11 @@ var userModule = function () {
publicMethods.getUIPermissions = function () { publicMethods.getUIPermissions = function () {
var permissions = {}; var permissions = {};
if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/list")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/any-device")) {
permissions["LIST_DEVICES"] = true; permissions["LIST_DEVICES"] = true;
permissions["LIST_OWN_DEVICES"] = true;
} }
if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/devices/list")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/owning-device")) {
permissions["LIST_OWN_DEVICES"] = true; permissions["LIST_OWN_DEVICES"] = true;
} }
if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/groups/view")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/groups/view")) {
@ -524,10 +525,10 @@ var userModule = function () {
if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/policies/list")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/policies/list")) {
permissions["LIST_POLICIES"] = true; permissions["LIST_POLICIES"] = true;
} }
if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/devices/add")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/add")) {
permissions["ADD_DEVICE"] = true; permissions["ADD_DEVICE"] = true;
} }
if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/groups/add")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/add")) {
permissions["ADD_GROUP"] = true; permissions["ADD_GROUP"] = true;
} }
if (publicMethods.isAuthorized("/permission/admin/device-mgt/users/add")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/users/add")) {
@ -542,9 +543,6 @@ var userModule = function () {
if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/devices/view")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/devices/view")) {
permissions["VIEW_GROUP_DEVICES"] = true; permissions["VIEW_GROUP_DEVICES"] = true;
} }
if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/roles/create")) {
permissions["CREATE_GROUP_ROLES"] = true;
}
if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/roles/view")) { if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/roles/view")) {
permissions["VIEW_GROUP_ROLES"] = true; permissions["VIEW_GROUP_ROLES"] = true;
} }

@ -60,6 +60,8 @@ var WEB_SERVICE_ADDRESSING_VERSION = 1.0;
var TOKEN_PAIR = "tokenPair"; var TOKEN_PAIR = "tokenPair";
var ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS = "encodedTenantBasedClientAppCredentials"; var ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS = "encodedTenantBasedClientAppCredentials";
var CONTENT_TYPE_IDENTIFIER = "Content-Type"; var CONTENT_TYPE_IDENTIFIER = "Content-Type";
var ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS = "encodedTenantBasedWebSocketClientCredentials";
var CONTENT_DISPOSITION_IDENTIFIER = "Content-Disposition"; var CONTENT_DISPOSITION_IDENTIFIER = "Content-Disposition";
var APPLICATION_JSON = "application/json"; var APPLICATION_JSON = "application/json";
var APPLICATION_ZIP = "application/zip"; var APPLICATION_ZIP = "application/zip";
@ -76,4 +78,6 @@ var HTTP_CONFLICT = 409;
var HTTP_CREATED = 201; var HTTP_CREATED = 201;
var CACHED_CREDENTIALS = "tenantBasedCredentials"; var CACHED_CREDENTIALS = "tenantBasedCredentials";
var CACHED_CREDENTIALS_FOR_WEBSOCKET_APP = "tenantBasedWebSocketClientCredentials";
var ALLOWED_SCOPES = "scopes"; var ALLOWED_SCOPES = "scopes";

@ -29,7 +29,9 @@ var carbonServer = new carbonModule.server.Server({
application.put("carbonServer", carbonServer); application.put("carbonServer", carbonServer);
var permissions = { var permissions = {
"/permission/admin/device-mgt/devices": ["ui.execute"], "/permission/admin/device-mgt/devices/enroll": ["ui.execute"],
"/permission/admin/device-mgt/devices/disenroll": ["ui.execute"],
"/permission/admin/device-mgt/devices/owning-device": ["ui.execute"],
"/permission/admin/device-mgt/groups": ["ui.execute"], "/permission/admin/device-mgt/groups": ["ui.execute"],
"/permission/admin/device-mgt/notifications": ["ui.execute"], "/permission/admin/device-mgt/notifications": ["ui.execute"],
"/permission/admin/device-mgt/policies": ["ui.execute"], "/permission/admin/device-mgt/policies": ["ui.execute"],

@ -138,6 +138,63 @@ var utils = function () {
} }
}; };
publicMethods["getTenantBasedWebSocketClientAppCredentials"] = function (username) {
if (!username) {
log.error("{/app/modules/oauth/token-handler-utils.js} Error in retrieving tenant " +
"based client app credentials. No username " +
"as input - getTenantBasedWebSocketClientAppCredentials(x)");
return null;
} else {
//noinspection JSUnresolvedFunction, JSUnresolvedVariable
var tenantDomain = carbon.server.tenantDomain({username: username});
if (!tenantDomain) {
log.error("{/app/modules/oauth/token-handler-utils.js} Error in retrieving tenant " +
"based client application credentials. Unable to obtain a valid tenant domain for provided " +
"username - getTenantBasedWebSocketClientAppCredentials(x, y)");
return null;
} else {
var cachedBasedWebsocketClientAppCredentials = privateMethods.
getCachedBasedWebSocketClientAppCredentials(tenantDomain);
if (cachedBasedWebsocketClientAppCredentials) {
return cachedBasedWebsocketClientAppCredentials;
} else {
var adminUsername = deviceMgtProps["adminUser"];
var adminUserTenantId = deviceMgtProps["adminUserTenantId"];
//claims required for jwtAuthenticator.
var claims = {"http://wso2.org/claims/enduserTenantId": adminUserTenantId,
"http://wso2.org/claims/enduser": adminUsername};
var jwtToken = publicMethods.getJwtToken(adminUsername, claims);
// register a tenant based app at API Manager
var applicationName = "websocket_webapp_" + tenantDomain;
var requestURL = deviceMgtProps["oauthProvider"]["appRegistration"]
["apiManagerClientAppRegistrationServiceURL"] +
"?tenantDomain=" + tenantDomain + "&applicationName=" + applicationName;
var xhr = new XMLHttpRequest();
xhr.open("POST", requestURL, false);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("X-JWT-Assertion", "" + jwtToken);
xhr.send();
if (xhr["status"] == 201 && xhr["responseText"]) {
var responsePayload = parse(xhr["responseText"]);
var tenantTenantBasedWebsocketClientAppCredentials = {};
tenantTenantBasedWebsocketClientAppCredentials["clientId"] = responsePayload["client_id"];
tenantTenantBasedWebsocketClientAppCredentials["clientSecret"] =
responsePayload["client_secret"];
privateMethods.setCachedBasedWebSocketClientAppCredentials(tenantDomain,
tenantTenantBasedWebsocketClientAppCredentials);
return tenantTenantBasedWebsocketClientAppCredentials;
} else {
log.error("{/app/modules/oauth/token-handler-utils.js} Error in retrieving tenant " +
"based client application credentials from API " +
"Manager - getTenantBasedWebSocketClientAppCredentials(x, y)");
return null;
}
}
}
}
};
privateMethods["setCachedTenantBasedClientAppCredentials"] = function (tenantDomain, clientAppCredentials) { privateMethods["setCachedTenantBasedClientAppCredentials"] = function (tenantDomain, clientAppCredentials) {
var cachedTenantBasedClientAppCredentialsMap = application.get(constants["CACHED_CREDENTIALS"]); var cachedTenantBasedClientAppCredentialsMap = application.get(constants["CACHED_CREDENTIALS"]);
if (!cachedTenantBasedClientAppCredentialsMap) { if (!cachedTenantBasedClientAppCredentialsMap) {
@ -159,7 +216,32 @@ var utils = function () {
} }
}; };
publicMethods["getTokenPairAndScopesByPasswordGrantType"] = function (username, password, encodedClientAppCredentials, scopes) { privateMethods["getCachedBasedWebSocketClientAppCredentials"] = function (tenantDomain) {
var cachedBasedWebSocketClientAppCredentialsMap
= application.get(constants["CACHED_CREDENTIALS_FOR_WEBSOCKET_APP"]);
if (!cachedBasedWebSocketClientAppCredentialsMap ||
!cachedBasedWebSocketClientAppCredentialsMap[tenantDomain]) {
return null;
} else {
return cachedBasedWebSocketClientAppCredentialsMap[tenantDomain];
}
};
privateMethods["setCachedBasedWebSocketClientAppCredentials"] = function (tenantDomain, clientAppCredentials) {
var cachedBasedWebSocketClientAppCredentialsMap
= application.get(constants["CACHED_CREDENTIALS_FOR_WEBSOCKET_APP"]);
if (!cachedBasedWebSocketClientAppCredentialsMap) {
cachedBasedWebSocketClientAppCredentialsMap = {};
cachedBasedWebSocketClientAppCredentialsMap[tenantDomain] = clientAppCredentials;
application.put(constants["CACHED_CREDENTIALS_FOR_WEBSOCKET_APP"]
, cachedBasedWebSocketClientAppCredentialsMap);
} else if (!cachedBasedWebSocketClientAppCredentialsMap[tenantDomain]) {
cachedBasedWebSocketClientAppCredentialsMap[tenantDomain] = clientAppCredentials;
}
};
publicMethods["getTokenPairAndScopesByPasswordGrantType"] = function (username, password
, encodedClientAppCredentials, scopes) {
if (!username || !password || !encodedClientAppCredentials || !scopes) { if (!username || !password || !encodedClientAppCredentials || !scopes) {
log.error("{/app/modules/oauth/token-handler-utils.js} Error in retrieving access token by password " + log.error("{/app/modules/oauth/token-handler-utils.js} Error in retrieving access token by password " +
"grant type. No username, password, encoded client app credentials or scopes are " + "grant type. No username, password, encoded client app credentials or scopes are " +

@ -39,6 +39,7 @@ var handlers = function () {
"as input - setupTokenPairByPasswordGrantType(x, y)"); "as input - setupTokenPairByPasswordGrantType(x, y)");
} else { } else {
privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); privateMethods.setUpEncodedTenantBasedClientAppCredentials(username);
privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (!encodedClientAppCredentials) { if (!encodedClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair by " + throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair by " +
@ -81,6 +82,7 @@ var handlers = function () {
"as input - setupTokenPairByPasswordGrantType(x, y)"); "as input - setupTokenPairByPasswordGrantType(x, y)");
} else { } else {
privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); privateMethods.setUpEncodedTenantBasedClientAppCredentials(username);
privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (!encodedClientAppCredentials) { if (!encodedClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " + throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " +
@ -168,5 +170,44 @@ var handlers = function () {
} }
}; };
privateMethods["setUpEncodedTenantBasedWebSocketClientAppCredentials"] = function (username) {
if (!username) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
"client credentials to session context. No username of logged in user is found as " +
"input - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
} else {
if (devicemgtProps["apimgt-gateway"]) {
var tenantBasedWebSocketClientAppCredentials
= tokenUtil.getTenantBasedWebSocketClientAppCredentials(username);
if (!tenantBasedWebSocketClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " +
"based client credentials to session context as the server is unable " +
"to obtain such credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
} else {
var encodedTenantBasedWebSocketClientAppCredentials =
tokenUtil.encode(tenantBasedWebSocketClientAppCredentials["clientId"] + ":" +
tenantBasedWebSocketClientAppCredentials["clientSecret"]);
// setting up encoded tenant based client credentials to session context.
session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"],
encodedTenantBasedWebSocketClientAppCredentials);
}
} else {
var dynamicClientAppCredentials = tokenUtil.getDynamicClientAppCredentials();
if (!dynamicClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
"client credentials to session context as the server is unable to obtain " +
"dynamic client credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
}
var encodedTenantBasedWebSocketClientAppCredentials =
tokenUtil.encode(dynamicClientAppCredentials["clientId"] + ":" +
dynamicClientAppCredentials["clientSecret"]);
// setting up encoded tenant based client credentials to session context.
session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"],
encodedTenantBasedWebSocketClientAppCredentials);
}
}
};
return publicMethods; return publicMethods;
}(); }();

@ -36,9 +36,11 @@
<div class="form-login-box"> <div class="form-login-box">
<label class="wr-input-label">Group Name</label> <label class="wr-input-label">Group Name</label>
<div class="wr-input-control"> <div class="form-group wr-input-control">
<input type="text right" id="name" placeholder="Group Name" data-regex="{{groupNameJSRegEx}}" <input type="text right" id="name" placeholder="Group Name" data-regex="{{groupNameJSRegEx}}"
data-errormsg="{{groupNameRegExViolationErrorMsg}}"> data-errormsg="{{groupNameRegExViolationErrorMsg}}" class="form-control">
<span class="groupNameError hidden glyphicon glyphicon-remove form-control-feedback"></span>
<label class="error groupNameEmpty hidden" for="summary"></label>
</div> </div>
<label class="wr-input-label">Description</label> <label class="wr-input-label">Description</label>

@ -35,12 +35,10 @@ $(function () {
var description = $("input#description").val(); var description = $("input#description").val();
if (!name) { if (!name) {
$('.wr-validation-summary strong').text("Group Name is a required field. It cannot be empty."); triggerError($("input#name"),"Group Name is a required field. It cannot be empty.");
$('.wr-validation-summary').removeClass("hidden");
return false; return false;
} else if (!inputIsValid($("input#name").data("regex"), name)) { } else if (!inputIsValid($("input#name").data("regex"), name)) {
$('.wr-validation-summary strong').text($("input#name").data("errormsg")); triggerError($("input#name"),$("input#name").data("errormsg"));
$('.wr-validation-summary').removeClass("hidden");
return false; return false;
} else { } else {
var group = {"name": name, "description": description}; var group = {"name": name, "description": description};
@ -69,6 +67,61 @@ $(function () {
}); });
}); });
/**
* @param el
* @param errorMsg
*
* Triggers validation error for provided element.
* Note : the basic jQuery validation elements should be present in the markup
*
*/
function triggerError(el,errorMsg){
var parent = el.parents('.form-group'),
errorSpan = parent.find('span'),
errorMsgContainer = parent.find('label');
errorSpan.on('click',function(event){
event.stopPropagation();
removeErrorStyling($(this));
el.unbind('.errorspace');
});
el.bind('focusin.errorspace',function(){
removeErrorStyling($(this))
}).bind('focusout.errorspace',function(){
addErrorStyling($(this));
}).bind('keypress.errorspace',function(){
$(this).unbind('.errorspace');
removeErrorStyling($(this));
});
errorMsgContainer.text(errorMsg);
parent.addClass('has-error has-feedback');
errorSpan.removeClass('hidden');
errorMsgContainer.removeClass('hidden');
function removeErrorStyling(el){
var parent = el.parents('.form-group'),
errorSpan = parent.find('span'),
errorMsgContainer = parent.find('label');
parent.removeClass('has-error has-feedback');
errorSpan.addClass('hidden');
errorMsgContainer.addClass('hidden');
}
function addErrorStyling(el){
var parent = el.parents('.form-group'),
errorSpan = parent.find('span'),
errorMsgContainer = parent.find('label');
parent.addClass('has-error has-feedback');
errorSpan.removeClass('hidden');
errorMsgContainer.removeClass('hidden');
}
}
function displayErrors(message) { function displayErrors(message) {
$('#error-msg').html(message.responseText); $('#error-msg').html(message.responseText);
modalDialog.header('Unexpected error occurred!'); modalDialog.header('Unexpected error occurred!');

@ -93,7 +93,7 @@ function loadGroups() {
var currentUser = groupListing.data("currentUser"); var currentUser = groupListing.data("currentUser");
var serviceURL; var serviceURL;
if ($.hasPermission("LIST_ALL_GROUPS")) { if ($.hasPermission("LIST_ALL_GROUPS")) {
serviceURL = "/api/device-mgt/v1.0/groups"; serviceURL = "/api/device-mgt/v1.0/admin/groups";
} else if ($.hasPermission("LIST_GROUPS")) { } else if ($.hasPermission("LIST_GROUPS")) {
//Get authenticated users groups //Get authenticated users groups
serviceURL = "/api/device-mgt/v1.0/groups/user/" + currentUser; serviceURL = "/api/device-mgt/v1.0/groups/user/" + currentUser;
@ -113,8 +113,7 @@ function loadGroups() {
groupId: data.deviceGroups[index].id, groupId: data.deviceGroups[index].id,
name: data.deviceGroups[index].name, name: data.deviceGroups[index].name,
description: data.deviceGroups[index].description, description: data.deviceGroups[index].description,
owner: data.deviceGroups[index].owner, owner: data.deviceGroups[index].owner
dateOfCreation: data.deviceGroups[index].dateOfCreation
}) })
}); });
var json = { var json = {
@ -153,7 +152,7 @@ function loadGroups() {
data: 'id', data: 'id',
class: 'text-right content-fill text-left-on-grid-view no-wrap', class: 'text-right content-fill text-left-on-grid-view no-wrap',
render: function (id, type, row, meta) { render: function (id, type, row, meta) {
var html; var html = '';
if ($.hasPermission("VIEW_GROUP_DEVICES")) { if ($.hasPermission("VIEW_GROUP_DEVICES")) {
html = '<a href="devices?groupId=' + row.groupId + '&groupName=' + row.name html = '<a href="devices?groupId=' + row.groupId + '&groupName=' + row.name
+ '" data-click-event="remove-form" class="btn padding-reduce-on-grid-view">' + + '" data-click-event="remove-form" class="btn padding-reduce-on-grid-view">' +
@ -166,9 +165,8 @@ function loadGroups() {
'<span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-statistics fw-stack-1x"></i></span>' '<span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-statistics fw-stack-1x"></i></span>'
+ +
'<span class="hidden-xs hidden-on-grid-view">Analytics</span></a>'; '<span class="hidden-xs hidden-on-grid-view">Analytics</span></a>';
} else {
html = '';
} }
if (row.owner != "wso2.system.user") {
if ($.hasPermission("SHARE_GROUP")) { if ($.hasPermission("SHARE_GROUP")) {
html += html +=
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view share-group-link" data-group-id="' '<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view share-group-link" data-group-id="'
@ -177,8 +175,6 @@ function loadGroups() {
+ '"><span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-share fw-stack-1x"></i></span>' + '"><span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-share fw-stack-1x"></i></span>'
+ +
'<span class="hidden-xs hidden-on-grid-view">Share</span></a>'; '<span class="hidden-xs hidden-on-grid-view">Share</span></a>';
} else {
html += '';
} }
if ($.hasPermission("UPDATE_GROUP")) { if ($.hasPermission("UPDATE_GROUP")) {
html += html +=
@ -188,8 +184,6 @@ function loadGroups() {
+ '" data-group-id="' + row.groupId + '" data-group-id="' + row.groupId
+ '"><span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i>' + + '"><span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i>' +
'<i class="fw fw-edit fw-stack-1x"></i></span><span class="hidden-xs hidden-on-grid-view">Edit</span></a>'; '<i class="fw fw-edit fw-stack-1x"></i></span><span class="hidden-xs hidden-on-grid-view">Edit</span></a>';
} else {
html += '';
} }
if ($.hasPermission("REMOVE_GROUP")) { if ($.hasPermission("REMOVE_GROUP")) {
html += html +=
@ -199,13 +193,11 @@ function loadGroups() {
+ '"><span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-delete fw-stack-1x"></i>' + '"><span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-delete fw-stack-1x"></i>'
+ +
'</span><span class="hidden-xs hidden-on-grid-view">Delete</span></a>'; '</span><span class="hidden-xs hidden-on-grid-view">Delete</span></a>';
} else { }
html += '';
} }
return html; return html;
} }
} }
]; ];
var fnCreatedRow = function (row, data) { var fnCreatedRow = function (row, data) {

@ -20,6 +20,7 @@
var deviceId = $(".device-id"); var deviceId = $(".device-id");
var deviceIdentifier = deviceId.data("deviceid"); var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type"); var deviceType = deviceId.data("type");
var deviceOwner = deviceId.data("owner");
$(document).ready(function () { $(document).ready(function () {
$(".panel-body").removeClass("hidden"); $(".panel-body").removeClass("hidden");
@ -61,8 +62,9 @@
pageLength : 10, pageLength : 10,
order: [], order: [],
ajax: { ajax: {
url: context + "/api/operation/paginate",
data: {deviceId : deviceIdentifier, deviceType: deviceType}, url: "/devicemgt/api/operation/paginate",
data: {deviceId : deviceIdentifier, deviceType: deviceType, owner: deviceOwner},
dataSrc: function (json) { dataSrc: function (json) {
$("#operations-spinner").addClass("hidden"); $("#operations-spinner").addClass("hidden");
$("#operations-log-container").empty(); $("#operations-log-container").empty();
@ -102,6 +104,7 @@
} }
], ],
"createdRow": function(row, data) { "createdRow": function(row, data) {
$(row).attr("data-type", "selectable"); $(row).attr("data-type", "selectable");
$(row).attr("data-id", data["id"]); $(row).attr("data-id", data["id"]);
$.each($("td", row), $.each($("td", row),

@ -1,24 +0,0 @@
<table class="table table-striped table-hover table-bordered display data-table" id="operations-log-table">
<thead>
<tr class="sort-row">
<th>Operation Code</th>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
{{#each operations}}
<tr data-type="selectable" data-id="{{id}}">
<td data-display="{{code}}" data-grid-label="Code">{{code}}</td>
<td data-display="{{status}}" data-grid-label="Status">
{{#equal status "COMPLETED"}}<span><i class="fw fw-ok icon-success"></i> Completed</span>{{/equal}}
{{#equal status "PENDING"}}<span><i class="fw fw-warning icon-warning"></i> Pending</span>{{/equal}}
{{#equal status "ERROR"}}<span><i class="fw fw-error icon-danger"></i> Error</span>{{/equal}}
{{#equal status "IN_PROGRESS"}}<span><i class="fw fw-ok icon-warning"></i> In Progress</span>{{/equal}}
</td>
<td data-display="{{createdTimeStamp}}" data-grid-label="Created Timestamp">{{createdTimeStamp}}</td>
</tr>
{{/each}}
<br class="c-both" />
</tbody>
</table>

@ -59,142 +59,109 @@
</div> </div>
</div> </div>
{{#defineZone "device-detail-properties"}} <div class="media tab-responsive">
<div class="media"> <div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs">
<ul class="list-group nav nav-pills nav-stacked" role="tablist">
<div class="media-left col-xs-12 col-sm-2 col-md-2 col-lg-2"> {{#defineZone "device-view-tabs"}}
<ul class="list-group" role="tablist"> {{#defineZone "device-details-tab"}}
<li class="active"><a class="list-group-item" <li role="presentation" class="list-group-item active">
href="#device_details" <a href="#device_details_tab" role="tab" data-toggle="tab"
role="tab" data-toggle="tab" aria-controls="device_details_tab">
aria-controls="device_details">Device <i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span>
Details</a> </a>
</li>
<li><a class="list-group-item" href="#policies"
role="tab"
data-toggle="tab" aria-controls="policies">Policies</a>
</li>
<li><a class="list-group-item" href="#policy_compliance"
role="tab"
data-toggle="tab" aria-controls="policy_compliance">Policy
Compliance</a>
</li> </li>
<li><a class="list-group-item" href="#device_location" {{/defineZone}}
role="tab" {{#defineZone "device-details-tab-injected"}}
data-toggle="tab" aria-controls="device_location">Device {{/defineZone}}
Location</a> {{#defineZone "device-details-tab-operations"}}
<li role="presentation" class="list-group-item">
<a href="#event_log_tab" role="tab" data-toggle="tab" aria-controls="event_log_tab">
<i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span>
</a>
</li> </li>
<li><a class="list-group-item" href="#event_log" role="tab" {{/defineZone}}
data-toggle="tab" aria-controls="event_log">Operations {{/defineZone}}
Log</a></li>
</ul> </ul>
</div> </div>
<div class="media-body add-padding-left-5x remove-padding-xs">
<div class="panel-group tab-content remove-padding" id="tabs" role="tablist"
data-status="{{device.isNotRemoved}}" aria-multiselectable="true">
<div class="arrow-left hidden-xs"></div>
<div class="media-body add-padding-left-5x remove-padding-xs tab-content"> {{#defineZone "device-view-tab-contents"}}
<div class="panel-group tab-content"> {{#defineZone "device-details-tab-contents"}}
<div class="message message-info">
<div class="panel panel-default tab-pane active" <h4 class="remove-margin">
id="device_details" role="tabpanel" <i class="icon fw fw-info"></i>
aria-labelledby="device_details"> No Device details avaialbe yet.
{{unit "cdmf.unit.device.details" device=device}} </h4>
</div>
<div class="panel panel-default tab-pane" id="policies" role="tabpanel"
aria-labelledby="policies">
<div class="panel-heading">Policies</div>
<div class="panel-body">
<div id="policy-spinner" class="wr-advance-operations-init hidden">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading Policies . . .
<br>
<br>
</div>
<div id="policy-list-container">
<div class="panel-body">
No policies found
</div>
<br class="c-both" />
</div>
</div>
<a class="padding-left"
href="{{@app.context}}/policy/add/{{device.type}}?deviceId={{device.deviceIdentifier}}">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-policy fw-stack-1x"></i>
</span> Add device specific policy</a>
</div> </div>
{{/defineZone}}
<div class="panel panel-default tab-pane" id="policy_compliance" {{#defineZone "device-view-tab-injected-conents"}}
role="tabpanel" aria-labelledby="policy_compliance"> {{/defineZone}}
<div class="panel-heading">Policy Compliance <span><a
href="#" id="refresh-policy"><i
class="fw fw-refresh"></i></a></span></div>
<div class="panel-body">
<div id="policy-spinner"
class="wr-advance-operations-init hidden">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading Policy Compliance . . . {{#defineZone "device-view-tab-operations-log-conents"}}
<br> <div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab">
<br> <div class="panel-heading visible-xs collapsed" id="event_log">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
<i class="fw fw-text fw-2x"></i>
Operations Log
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">
Operations Log
<span>
<a href="javascript:void(0);" id="refresh-operations">
<i class="fw fw-refresh"></i>
</a>
</span>
</div> </div>
<div id="policy-list-container"> <div id="collapseFive" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="event_log">
<div class="panel-body"> <div class="panel-body">
Not available yet <span class="visible-xs add-padding-2x text-right">
</div> <a href="javascript:void(0);" id="refresh-operations">
<br class="c-both" /> <i class="fw fw-refresh"></i>
</div> </a>
</span>
<div id="operations-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log...
</div> </div>
<div id="operations-log-container">
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
There are no operations, performed yet on this device.
</h4>
</div> </div>
<div class="panel panel-default tab-pane" id="device_location"
role="tabpanel" aria-labelledby="device_location">
<div class="panel-heading">Device Location</div>
<div class="panel-body">
<div id="device-location"
data-lat="{{device.viewModel.location.latitude}}"
data-long="{{device.viewModel.location.longitude}}"
style="height:450px" class="panel-body">
</div> </div>
<div id="map-error" class="panel-body"> <table class="table table-striped table-hover table-bordered display data-table"
Not available yet id="operations-log-table">
<thead>
<tr class="sort-row">
<th>Operation Code</th>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> </div>
<br class="c-both" />
</div> </div>
</div> </div>
<div class="panel panel-default tab-pane" id="event_log" {{/defineZone}}
role="tabpanel" aria-labelledby="event_log"> {{/defineZone}}
<div class="panel-heading">Operations Log <span><a href="#"
id="refresh-operations"><i
class="fw fw-refresh"></i></a></span></div>
<div class="panel-body">
<div id="operations-spinner"
class="wr-advance-operations-init hidden">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading Operations Log . . .
<br>
<br>
</div>
<div id="operations-log-container">
<div class="panel-body">
Not available yet
</div>
<br class="c-both" />
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{/defineZone}}
</div>
{{else}} {{else}}
<h1 class="page-sub-title"> <h1 class="page-sub-title">
Permission Denied Permission Denied
@ -206,6 +173,7 @@
<h1 class="page-sub-title"> <h1 class="page-sub-title">
Device not found Device not found
</h1> </h1>
</h1>
<br> <br>
You have tried to access either a removed or non-existing device. You have tried to access either a removed or non-existing device.
{{/if}} {{/if}}
@ -221,7 +189,4 @@
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs" <script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}" data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
type="text/x-handlebars-template"></script> type="text/x-handlebars-template"></script>
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
type="text/x-handlebars-template"></script>
{{/zone}} {{/zone}}

@ -196,7 +196,7 @@ function onRequest(context) {
viewModel["deviceInfoAvailable"] = false; viewModel["deviceInfoAvailable"] = false;
} }
deviceViewData["deviceView"] = viewModel; deviceViewData["device"] = viewModel;
} else if (response["status"] == "unauthorized") { } else if (response["status"] == "unauthorized") {
deviceViewData["deviceFound"] = true; deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = false; deviceViewData["isAuthorized"] = false;

@ -59,6 +59,11 @@ var disableInlineError = function (inputField, errorMsg, errorSign) {
} }
}; };
/**
* Load all device groups.
*
* @param callback function to call on loading completion.
*/
function loadGroups(callback) { function loadGroups(callback) {
invokerUtil.get( invokerUtil.get(
"/api/device-mgt/v1.0/groups", "/api/device-mgt/v1.0/groups",
@ -68,6 +73,12 @@ function loadGroups(callback) {
}); });
} }
/**
* Creates DeviceGroupWrapper object from selected groups.
*
* @param selectedGroups
* @returns {Array} DeviceGroupWrapper list.
*/
var createDeviceGroupWrapper = function (selectedGroups) { var createDeviceGroupWrapper = function (selectedGroups) {
var groupObjects = []; var groupObjects = [];
loadGroups(function (deviceGroups) { loadGroups(function (deviceGroups) {
@ -136,7 +147,6 @@ stepForwardFrom["policy-platform"] = function (actionButton) {
$.template(policyOperationsTemplateCacheKey, policyOperationsTemplateSrc, function (template) { $.template(policyOperationsTemplateCacheKey, policyOperationsTemplateSrc, function (template) {
var content = template(); var content = template();
$("#device-type-policy-operations").html(content).removeClass("hidden"); $("#device-type-policy-operations").html(content).removeClass("hidden");
// $("#device-type-policy-operations").removeClass("hidden");
$(".policy-platform").addClass("hidden"); $(".policy-platform").addClass("hidden");
}); });

@ -63,7 +63,7 @@
<div id="policy-naming-main-error-msg" class="alert alert-danger hidden" role="alert"> <div id="policy-naming-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
<div> <div class="clearfix">
<label class="wr-input-label"> <label class="wr-input-label">
Set a name * to your policy<br> Set a name * to your policy<br>
( should be 1-to-30 characters long ) ( should be 1-to-30 characters long )

@ -63,6 +63,11 @@ var disableInlineError = function (inputField, errorMsg, errorSign) {
} }
}; };
/**
* Load all device groups.
*
* @param callback function to call on loading completion.
*/
function loadGroups(callback) { function loadGroups(callback) {
invokerUtil.get( invokerUtil.get(
"/api/device-mgt/v1.0/groups", "/api/device-mgt/v1.0/groups",
@ -72,6 +77,12 @@ function loadGroups(callback) {
}); });
} }
/**
* Creates DeviceGroupWrapper object from selected groups.
*
* @param selectedGroups
* @returns {Array} DeviceGroupWrapper list.
*/
var createDeviceGroupWrapper = function (selectedGroups) { var createDeviceGroupWrapper = function (selectedGroups) {
var groupObjects = []; var groupObjects = [];
loadGroups(function (deviceGroups) { loadGroups(function (deviceGroups) {
@ -132,7 +143,18 @@ skipStep["policy-platform"] = function (policyPayloadObj) {
currentlyEffected["roles"] = policyPayloadObj.roles; currentlyEffected["roles"] = policyPayloadObj.roles;
currentlyEffected["users"] = policyPayloadObj.users; currentlyEffected["users"] = policyPayloadObj.users;
currentlyEffected["groups"] = policyPayloadObj.deviceGroups; currentlyEffected["groups"] = [];
if (policyPayloadObj.deviceGroups) {
var deviceGroups = policyPayloadObj.deviceGroups;
for (var index in deviceGroups) {
if (deviceGroups.hasOwnProperty(index)) {
currentlyEffected["groups"].push(deviceGroups[index].name);
}
}
} else {
currentlyEffected["groups"].push("NONE");
}
if (currentlyEffected["roles"].length > 0) { if (currentlyEffected["roles"].length > 0) {
$("#user-roles-radio-btn").prop("checked", true); $("#user-roles-radio-btn").prop("checked", true);
@ -178,8 +200,8 @@ skipStep["policy-platform"] = function (policyPayloadObj) {
script.type = 'text/javascript'; script.type = 'text/javascript';
script.src = policyOperationsScriptSrc; script.src = policyOperationsScriptSrc;
$(".wr-advance-operations").prepend(script); $(".wr-advance-operations").prepend(script);
var configuredOperations = operationModule. var configuredOperations = operationModule.populateProfile(policy["platform"],
populateProfile(policy["platform"], policyPayloadObj["profile"]["profileFeaturesList"]); policyPayloadObj["profile"]["profileFeaturesList"]);
polulateProfileOperations(configuredOperations); polulateProfileOperations(configuredOperations);
} }
}); });
@ -222,7 +244,7 @@ stepForwardFrom["policy-criteria"] = function () {
} }
}); });
policy["selectedGroups"] = $("#groups-input").val(); policy["selectedGroups"] = $("#groups-input").val();
if (policy["selectedGroups"].length > 1 || policy["selectedGroups"][0] !== "NONE") { if (policy["selectedGroups"] && (policy["selectedGroups"].length > 1 || policy["selectedGroups"][0] !== "NONE")) {
policy["selectedGroups"] = createDeviceGroupWrapper(policy["selectedGroups"]); policy["selectedGroups"] = createDeviceGroupWrapper(policy["selectedGroups"]);
} }

@ -30,14 +30,6 @@
</a> </a>
</li> </li>
{{/if}} {{/if}}
{{#if permissions.LIST_DEVICES_ADMIN}}
<li>
<a href="{{@app.context}}/devices">
<i class="fw fw-mobile"></i>
Device Management
</a>
</li>
{{else}}
{{#if permissions.LIST_OWN_DEVICES}} {{#if permissions.LIST_OWN_DEVICES}}
<li> <li>
<a href="{{@app.context}}/devices"> <a href="{{@app.context}}/devices">
@ -46,7 +38,6 @@
</a> </a>
</li> </li>
{{/if}} {{/if}}
{{/if}}
{{#if permissions.LIST_GROUPS}} {{#if permissions.LIST_GROUPS}}
<li> <li>
<a href="{{@app.context}}/groups"> <a href="{{@app.context}}/groups">

@ -6511,3 +6511,13 @@ select > option:hover {
.required:before { .required:before {
content: "*"; content: "*";
} }
.table.list-table:not(.grid-view){
margin: 0px !important;
}
.table.list-table:not(.grid-view) > thead, .table.list-table:not(.grid-view) > tbody, .table.list-table:not(.grid-view) > tfoot{
margin-bottom: 10px !important;
}
.table.list-table:not(.grid-view) tbody{
margin: 0px !important;
}

@ -26,9 +26,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.mdm</groupId>
<artifactId>dynamic-client-web-proxy</artifactId> <artifactId>dynamic-client-web-proxy</artifactId>
<version>2.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service</name> <name>WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service</name>
<description>WSO2 Carbon - Dynamic Client Registration Web Proxy</description> <description>WSO2 Carbon - Dynamic Client Registration Web Proxy</description>
<packaging>war</packaging> <packaging>war</packaging>

@ -26,9 +26,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.mdm</groupId>
<artifactId>dynamic-client-web</artifactId> <artifactId>dynamic-client-web</artifactId>
<version>2.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Dynamic Client Registration Web Service</name> <name>WSO2 Carbon - Dynamic Client Registration Web Service</name>
<description>WSO2 Carbon - Dynamic Client Registration Web</description> <description>WSO2 Carbon - Dynamic Client Registration Web</description>
<packaging>war</packaging> <packaging>war</packaging>

@ -22,8 +22,12 @@ package org.wso2.carbon.policy.mgt.common;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
@ApiModel(value = "DeviceGroupWrapper", description = "This class carries information related to device groups expect users and devices.") @ApiModel(value = "DeviceGroupWrapper", description = "This class carries information related to device groups expect users and devices.")
public class DeviceGroupWrapper { public class DeviceGroupWrapper implements Serializable {
private static final long serialVersionUID = 1998101722L;
@ApiModelProperty(name = "id", value = "Id of the group", required = true) @ApiModelProperty(name = "id", value = "Id of the group", required = true)
private int id; private int id;

@ -18,7 +18,8 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
@ -96,7 +97,7 @@
<configuration> <configuration>
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.wso2.mdm</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-web</artifactId> <artifactId>dynamic-client-web</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
<type>war</type> <type>war</type>

@ -17,7 +17,8 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
@ -246,7 +247,7 @@
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.mdm</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-web</artifactId> <artifactId>dynamic-client-web</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
@ -920,6 +921,10 @@
<groupId>xerces</groupId> <groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId> <artifactId>xercesImpl</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>

Loading…
Cancel
Save