Merge branch 'cloud-3.1.0' of https://github.com/wso2/carbon-device-mgt into cloud-3.1.0

revert-70aa11f8
Hasunie 8 years ago
commit 315be0a3c7

@ -2,24 +2,24 @@
"appContext": "/devicemgt/",
"isCloud": false,
"cloudConfig": {
"upgradeNowURL": "",
"monetizationURL": "",
"requestExtensionURL": "",
"upgradeNowURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/payment-plans.jag?cloud-type=device_cloud",
"monetizationURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/monetization-dashboard.jag",
"requestExtensionURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/contact-us.jag?cloud-type=device_cloud&request-extension=true",
"publisherURL": "",
"storeURL": "",
"contactUsURL": "",
"contactUsURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/contact-us.jag",
"apiCloudDocURL": "https://docs.wso2.com/display/APICloud/WSO2+API+Cloud+Documentation",
"appCloudDocURL": "https://docs.wso2.com/display/AppCloud/WSO2+App+Cloud+Documentation",
"deviceCloudDocURL": "https://docs.wso2.com/display/DeviceCloud/WSO2+Device+Cloud+Documentation",
"apiCloudWalkthroughURL": "https://api.clouddev.wso2.com/publisher?interactiveTutorial=true",
"profileURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/user-profile.jag",
"changePasswordURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/change-password.jag",
"logoutURL": "https://api.clouddev.wso2.com/publisher/site/pages/logout.jag",
"logoutURL": "https://devicemgt.cloud.wso2.com/devicemgt/logout",
"apiCloudURL": "",
"appCloudURL": "",
"deviceCloudURL": "",
"oraganizationURL": "",
"membersURL": ""
"oraganizationURL": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/organization.jag",
"membersURL": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/user.jag"
},
"httpsURL": "https://%iot.gateway.host%:%iot.gateway.https.port%",
"httpURL": "http://%iot.gateway.host%:%iot.gateway.http.port",

@ -35,18 +35,18 @@
<div class="tile-icon"><i class="fw fw-mobile"></i></div>
<div class="tile-stats">
<span id="device-count">{{deviceCount}}</span>
<span class="tile-stats-free">
<span class="tile-stats-free">
<!--suppress HtmlUnknownTarget -->
{{#if deviceCount}}
<a href="{{@app.context}}/devices">
{{#if deviceCount}}
<a href="{{@app.context}}/devices">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
</span>
View
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
{{/if}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/device/enroll">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
@ -66,7 +66,7 @@
<div class="tile-icon"><i class="fw fw-group"></i></div>
<div class="tile-stats">
<span id="group-count">{{groupCount}}</span>
<span class="tile-stats-free">
<span class="tile-stats-free">
{{#if groupCount}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/groups">
@ -77,14 +77,16 @@
View
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/group/add">
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/group/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>
@ -97,7 +99,7 @@
<div class="tile-icon"><i class="fw fw-user"></i></div>
<div class="tile-stats">
<span id="user-count">{{userCount}}</span>
<span class="tile-stats-free">
<span class="tile-stats-free">
{{#if userCount}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/users">
@ -108,14 +110,16 @@
View
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/user/add">
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/user/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>
@ -128,7 +132,7 @@
<div class="tile-icon"><i class="fw fw-policy"></i></div>
<div class="tile-stats">
<span id="policy-count">{{policyCount}}</span>
<span class="tile-stats-free">
<span class="tile-stats-free">
{{#if policyCount}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/policies">
@ -139,14 +143,16 @@
View
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/policy/add">
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/policy/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>
@ -171,13 +177,15 @@
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/role/add">
{{#unless isCloud}}
<a href="{{@app.context}}/role/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>

@ -40,6 +40,7 @@ function onRequest() {
viewModel.userCount = userModule.getUsersCount();
viewModel.policyCount = policyModule.getPoliciesCount();
viewModel.roleCount = userModule.getRolesCount();
viewModel.isCloud = devicemgtProps.isCloud;
return viewModel;
}

@ -139,7 +139,7 @@
{{unit "cdmf.unit.device.operation-mod"}}
{{#if deviceCount}}
<div id="loading-content" class="col-centered">
<i class="fw fw-settings fw-spin fw-2x"></i>
<i class="fw fw-wso2-logo fw-pulse fw-2x"></i>
Loading devices . . .
<br>
</div>

@ -326,7 +326,7 @@ function loadDevices(searchType, searchParam) {
if (analyticsEnabled(row.deviceType)) {
html += '<a href="' + context + '/device/' + deviceType + '/analytics?deviceId=' +
deviceIdentifier + '&deviceName=' + row.name + '" ' + 'data-click-event="remove-form"' +
' class="btn padding-reduce-on-grid-view"><span class="fw-stack">' +
' class="btn padding-reduce-on-grid-view" data-placement="bottom" data-toggle="tooltip" data-original-title="Analytics"><span class="fw-stack">' +
'<i class="fw fw-circle-outline fw-stack-2x"></i><i class="fw fw-statistics fw-stack-1x"></i></span>' +
'<span class="hidden-xs hidden-on-grid-view">Analytics</span>';
}
@ -337,7 +337,7 @@ function loadDevices(searchType, searchParam) {
+
'data-deviceid="' + deviceIdentifier + '" data-devicetype="' + deviceType
+ '" data-devicename="' +
row.name + '"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>' +
row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Group"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>' +
'<i class="fw fw-group fw-stack-1x"></i></span>' +
'<span class="hidden-xs hidden-on-grid-view">Group</span></a>';
}
@ -345,7 +345,7 @@ function loadDevices(searchType, searchParam) {
html +=
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view edit-device-link" '
+ 'data-deviceid="' + deviceIdentifier + '" data-devicetype="' + deviceType
+ '" data-devicename="' + row.name + '">'
+ '" data-devicename="' + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit">'
+ '<span class="fw-stack"><i class="fw fw-circle-outline 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>';
@ -354,7 +354,7 @@ function loadDevices(searchType, searchParam) {
html +=
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view remove-device-link" '
+ 'data-deviceid="' + deviceIdentifier + '" data-devicetype="' + deviceType
+ '" data-devicename="' + row.name + '">'
+ '" data-devicename="' + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Remove from group">'
+ '<span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>'
+ '<i class="fw fw-delete fw-stack-1x"></i></span>'
+ '<span class="hidden-xs hidden-on-grid-view">Remove from group</span>';
@ -362,7 +362,7 @@ function loadDevices(searchType, searchParam) {
html +=
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view remove-device-link" '
+ 'data-deviceid="' + deviceIdentifier + '" data-devicetype="' + deviceType
+ '" data-devicename="' + row.name + '">'
+ '" data-devicename="' + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Delete">'
+ '<span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>'
+ '<i class="fw fw-delete fw-stack-1x"></i></span>'
+ '<span class="hidden-xs hidden-on-grid-view">Delete</span>';

@ -103,7 +103,7 @@
<div class="modal-header">
<h3 class="pull-left modal-title">
<span>
<span class="fw-stack">
<span class="fw-stack add-margin-right-2x">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-share fw-stack-1x"></i>
</span> Group Sharing
@ -145,7 +145,7 @@
<div class="modal-header">
<h3 class="pull-left modal-title">
<span>
<span class="fw-stack">
<span class="fw-stack add-margin-right-2x">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-bookmark fw-stack-1x"></i>
</span> Group Sharing Role
@ -262,7 +262,7 @@
<div class="modal-header">
<h3 class="pull-left modal-title">
<span>
<span class="fw-stack">
<span class="fw-stack add-margin-right-2x">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-edit fw-stack-1x"></i>
</span> Update Group

@ -185,7 +185,8 @@ function loadGroups() {
var html = '';
if ($.hasPermission("VIEW_GROUP_DEVICES")) {
html += '<a href="group/' + row.groupId
+ '/analytics" data-click-event="remove-form" class="btn padding-reduce-on-grid-view">' +
+ '/analytics" data-click-event="remove-form" class="btn padding-reduce-on-grid-view" ' +
'data-placement="bottom" data-toggle="tooltip" data-original-title="Analytics">' +
'<span class="fw-stack"><i class="fw fw-circle-outline 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>';
@ -196,7 +197,7 @@ function loadGroups() {
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view share-group-link" data-group-id="'
+ row.groupId + '" ' +
'data-group-owner="' + row.owner
+ '"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i><i class="fw fw-share fw-stack-1x"></i></span>'
+ '" data-placement="bottom" data-toggle="tooltip" data-original-title="Share"><span class="fw-stack"><i class="fw fw-circle-outline 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>';
}
@ -206,7 +207,7 @@ function loadGroups() {
+ row.name + '" ' +
'data-group-owner="' + row.owner + '" data-group-description="' + row.description
+ '" data-group-id="' + row.groupId
+ '"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>' +
+ '" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit"><span class="fw-stack"><i class="fw fw-circle-outline 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>';
}
if ($.hasPermission("REMOVE_GROUP")) {
@ -214,7 +215,7 @@ function loadGroups() {
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view remove-group-link" data-group-id="'
+ row.groupId + '" ' +
'data-group-owner="' + row.owner
+ '"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i><i class="fw fw-delete fw-stack-1x"></i>'
+ '" data-placement="bottom" data-toggle="tooltip" data-original-title="Delete"><span class="fw-stack"><i class="fw fw-circle-outline 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>';
}

@ -142,8 +142,14 @@ function loadRoles() {
class: "text-right content-fill text-left-on-grid-view no-wrap",
data: null,
render: function (data, type, row, meta) {
return '' +
'<a onclick="javascript:loadRoleBasedActionURL(\'edit\', \'' + data.name + '\')" ' +
var isCloud = false;
if ($('#is-cloud').length > 0){
isCloud = true;
}
var innerhtml = '';
var editLink = '<a onclick="javascript:loadRoleBasedActionURL(\'edit\', \'' + data.name + '\')" ' +
'data-role="' + data.name + '" ' +
'data-click-event="edit-form" ' +
'class="btn padding-reduce-on-grid-view edit-role-link">' +
@ -156,8 +162,9 @@ function loadRoles() {
'</span>' +
'</span>' +
'<span class="hidden-xs hidden-on-grid-view">Edit</span>' +
'</a>' +
'<a onclick="javascript:loadRoleBasedActionURL(\'edit-permission\', \'' + data.name + '\')" ' +
'</a>';
var editPermissionLink = '<a onclick="javascript:loadRoleBasedActionURL(\'edit-permission\', \'' + data.name + '\')" ' +
'data-role="' + data.name + '" ' +
'data-click-event="edit-form" ' +
'class="btn padding-reduce-on-grid-view edit-permission-link">' +
@ -170,8 +177,9 @@ function loadRoles() {
'</span>' +
'</span>' +
'<span class="hidden-xs hidden-on-grid-view">Edit Permission</span>' +
'</a>' +
'<a data-role="' + data.name + '" ' +
'</a>';
car removeLink = '<a data-role="' + data.name + '" ' +
'data-click-event="remove-form" ' +
'class="btn padding-reduce-on-grid-view remove-role-link">' +
'<span class="fw-stack">' +
@ -180,6 +188,11 @@ function loadRoles() {
'</span>' +
'<span class="hidden-xs hidden-on-grid-view">Remove</span>' +
'</a>';
if (!isCloud){
innerhtml = editLink + editPermissionLink + removeLink;
}
return innerhtml;
}
}
];

@ -35,6 +35,7 @@
{{/zone}}
{{#zone "navbarActions"}}
{{#unless isCloud}}
<li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/role/add" class="cu-btn">
@ -45,16 +46,22 @@
Add Role
</a>
</li>
{{/unless}}
{{/zone}}
{{#zone "content"}}
<div id="loading-content" class="col-centered">
{{#unless isCloud}}
{{#if removePermitted}}
<input type="hidden" id="can-remove" value="true" />
{{/if}}
{{#if editPermitted}}
<input type="hidden" id="can-edit" value="true" />
{{/if}}
{{/unless}}
{{#if isCloud}}
<input type="hidden" id="is-cloud" value="true" />
{{/if}}
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading roles . . .
<br>

@ -32,6 +32,7 @@ function onRequest(context) {
}
context["adminRole"] = deviceMgtProps["adminRole"];
context["isCloud"] = deviceMgtProps["isCloud"];
return context;
}

@ -37,94 +37,99 @@
{{#zone "content"}}
{{#if canView}}
{{#zone "contentTitle"}}
<div class="row wr-device-board">
<div class="col-lg-12 wr-secondary-bar">
<label class="device-id device-select" data-username="{{user.username}}">
{{#if user.firstname}}
{{user.firstname}} {{user.lastname}}
{{else}}
{{user.username}}
{{/if}}
</label>
{{#zone "contentTitle"}}
<div class="row wr-device-board">
<div class="col-lg-12 wr-secondary-bar">
<label class="device-id device-select" data-username="{{user.username}}">
{{#if user.firstname}}
{{user.firstname}} {{user.lastname}}
{{else}}
{{user.username}}
{{/if}}
</label>
</div>
</div>
</div>
{{/zone}}
{{/zone}}
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media">
<div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2">
<div class="thumbnail icon" style="margin-bottom: 43px"><i class="square-element text fw fw-user"></i>
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media">
<div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2">
<div class="thumbnail icon" style="margin-bottom: 43px"><i
class="square-element text fw fw-user"></i>
</div>
<div class="media">
{{#unless isCloud}}
{{#if editPermitted}}
<button class="wr-btn"
onclick="location.href='{{@app.context}}/users/edit-user?username={{user.username}}';"
id="sortUpdateBtn"
style="width: 100%; vertical-align: bottom; background-color: #7fa030;"><span><i
class="fw fw-edit"></i> Edit</span></button>
{{/if}}
{{/unless}}
</div>
</div>
<div class="media">
{{#if editPermitted}}
<button class="wr-btn"
onclick="location.href='{{@app.context}}/users/edit-user?username={{user.username}}';"
id="sortUpdateBtn"
style="width: 100%; vertical-align: bottom; background-color: #7fa030;"><span><i
class="fw fw-edit"></i> Edit</span></button>
{{/if}}
<div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Profile Overview
</div>
{{#defineZone "user-detail-properties"}}
<table class="table table-responsive table-striped" id="members">
<tbody>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 7%;">Username</td>
<td style="padding:10px 15px;">{{user.username}}</td>
</tr>
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">First Name</td>
<td style="padding:10px 15px;">{{user.firstname}}</td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Last Name</td>
<td style="padding:10px 15px;">{{user.lastname}}</td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Email</td>
<td style="padding:10px 15px;">{{user.emailAddress}}</td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Roles</td>
<td style="padding:10px 15px;">
{{#each userRoles}}
<option selected="selected">{{this}}</option>
{{/each}}
</td>
</tr>
</tbody>
</table>
{{/defineZone}}
</div>
</div>
<div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Profile Overview</div>
{{#defineZone "user-detail-properties"}}
<table class="table table-responsive table-striped" id="members">
<tbody>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 7%;">Username</td>
<td style="padding:10px 15px;">{{user.username}}</td>
</tr>
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">First Name</td>
<td style="padding:10px 15px;">{{user.firstname}}</td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Last Name</td>
<td style="padding:10px 15px;">{{user.lastname}}</td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Email</td>
<td style="padding:10px 15px;">{{user.emailAddress}}</td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Roles</td>
<td style="padding:10px 15px;">
{{#each userRoles}}
<option selected="selected">{{this}}</option>
{{/each}}
</td>
</tr>
</tbody>
</table>
{{/defineZone}}
</div>
</div>
<div class="media">
<div class="media-left col-xs-12 col-sm-2 col-md-2 col-lg-2">
<ul class="list-group" role="tablist">
<li class="active"><a class="list-group-item" href="#enrolled_devices" role="tab"
data-toggle="tab" aria-controls="enrolled_devices">Enrolled Devices</a>
</li>
</ul>
</div>
{{#defineZone "user-enrolled-devices"}}
<div class="media-body add-padding-left-5x remove-padding-xs tab-content">
<div class="panel-group tab-content">
<div class="panel panel-default tab-pane active" id="enrolled_devices"
role="tabpanel" aria-labelledby="enrolled_devices">
<div class="panel-heading">Enrolled Devices by
{{#if user.firstname}}
{{user.firstname}} {{user.lastname}}
{{else}}
{{user.username}}
{{/if}}
</div>
<div class="panel-body">
<div id="enrolled_devices-container">
<div class="panel-body">
{{#each devices}}
<div class="wr-list-group wr-sortable policy-list">
<div class="media">
<div class="media-left col-xs-12 col-sm-2 col-md-2 col-lg-2">
<ul class="list-group" role="tablist">
<li class="active"><a class="list-group-item" href="#enrolled_devices" role="tab"
data-toggle="tab" aria-controls="enrolled_devices">Enrolled Devices</a>
</li>
</ul>
</div>
{{#defineZone "user-enrolled-devices"}}
<div class="media-body add-padding-left-5x remove-padding-xs tab-content">
<div class="panel-group tab-content">
<div class="panel panel-default tab-pane active" id="enrolled_devices"
role="tabpanel" aria-labelledby="enrolled_devices">
<div class="panel-heading">Enrolled Devices by
{{#if user.firstname}}
{{user.firstname}} {{user.lastname}}
{{else}}
{{user.username}}
{{/if}}
</div>
<div class="panel-body">
<div id="enrolled_devices-container">
<div class="panel-body">
{{#each devices}}
<div class="wr-list-group wr-sortable policy-list">
<span class="list-group-item" id="{{id}}">
<div class="row">
<div class="col-lg-3 clearfix">
@ -155,19 +160,19 @@
</div>
</div>
</span>
</div>
{{/each}}
</div>
{{/each}}
</div>
<br class="c-both"/>
</div>
<br class="c-both"/>
</div>
</div>
</div>
</div>
</div>
{{/defineZone}}
{{/defineZone}}
</div>
</div>
</div>
{{else}}
{{else}}
<h1 class="page-sub-title">
Permission Denied
</h1>

@ -20,6 +20,7 @@ function onRequest(context) {
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var username = request.getParameter("username");
var user = userModule.getUser(username)["content"];
var deviceMgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var userName = request.getParameter("username");
@ -45,5 +46,8 @@ function onRequest(context) {
if (userModule.isAuthorized("/permission/admin/device-mgt/users/view")) {
canView = true;
}
return {"user": user, "userRoles": userRoles, "devices": devices, "canView": canView};
var isCloud = deviceMgtProps.isCloud;
return {"user": user, "userRoles": userRoles, "devices": devices, "canView": canView, "isCloud" : isCloud};
}

@ -343,7 +343,7 @@ function loadUsers() {
var editbtn = '<a data-toggle="tooltip" data-placement="bottom" title="Edit User"href="' + context +
'/user/edit?username=' + encodeURIComponent(data.filter) + '" data-username="' + data.filter + '" ' +
'data-click-event="edit-form" ' +
'class="btn padding-reduce-on-grid-view edit-user-link"> ' +
'class="btn padding-reduce-on-grid-view edit-user-link" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit"> ' +
'<span class="fw-stack"> ' +
'<i class="fw fw-circle-outline fw-stack-2x"></i>' +
'<i class="fw fw-edit fw-stack-1x"></i>' +
@ -352,7 +352,7 @@ function loadUsers() {
var resetPasswordbtn = '<a data-toggle="tooltip" data-placement="bottom" title="Reset Password" href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
'data-click-event="edit-form" ' +
'onclick="javascript:resetPassword(\'' + data.filter + '\')" ' +
'class="btn padding-reduce-on-grid-view remove-user-link">' +
'class="btn padding-reduce-on-grid-view remove-user-link" data-placement="bottom" data-toggle="tooltip" data-original-title="Reset Password">' +
'<span class="fw-stack">' +
'<i class="fw fw-circle-outline fw-stack-2x"></i>' +
'<i class="fw fw-key fw-stack-1x"></i>' +
@ -361,7 +361,7 @@ function loadUsers() {
var removebtn = '<a data-toggle="tooltip" data-placement="bottom" title="Remove User" href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
'data-click-event="remove-form" ' +
'onclick="javascript:removeUser(\'' + data.filter + '\')" ' +
'class="btn padding-reduce-on-grid-view remove-user-link">' +
'class="btn padding-reduce-on-grid-view remove-user-link" data-placement="bottom" data-toggle="tooltip" data-original-title="Remove">' +
'<span class="fw-stack">' +
'<i class="fw fw-circle-outline fw-stack-2x"></i>' +
'<i class="fw fw-delete fw-stack-1x"></i>' +

@ -35,6 +35,7 @@
{{/zone}}
{{#zone "navbarActions"}}
{{#unless isCloud}}
<li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/user/add">
@ -45,18 +46,21 @@
Add User
</a>
</li>
{{/unless}}
{{/zone}}
{{#zone "content"}}
<input type="hidden" id="user" value="{{user.username}}">
<!-- content -->
<div id="loading-content" class="col-centered">
{{#if canManage}}
<input type="hidden" id="can-remove" value="true"/>
<input type="hidden" id="can-edit" value="true"/>
<input type="hidden" id="can-invite" value="true"/>
<input type="hidden" id="can-reset-password" value="true"/>
{{/if}}
{{#unless isCloud}}
{{#if canManage}}
<input type="hidden" id="can-remove" value="true"/>
<input type="hidden" id="can-edit" value="true"/>
<input type="hidden" id="can-invite" value="true"/>
<input type="hidden" id="can-reset-password" value="true"/>
{{/if}}
{{/unless}}
{{#if canView}}
<input type="hidden" id="can-view" value="true"/>
{{/if}}
@ -108,14 +112,16 @@
Enter new password
<br><br>
<div>
<input type="password" autocomplete="off" class="form-control modal-input operationDataKeys new-password"
<input type="password" autocomplete="off"
class="form-control modal-input operationDataKeys new-password"
data-key="message"/>
</div>
<br>
Retype new password
<br><br>
<div>
<input type="password" autocomplete="off" class="form-control modal-input operationDataKeys confirmed-password"
<input type="password" autocomplete="off"
class="form-control modal-input operationDataKeys confirmed-password"
data-key="message"/>
</div>
<br>

@ -33,6 +33,7 @@ function onRequest(context) {
page["currentUser"] = userModule.getCarbonUser().username;
page["adminUser"] = deviceMgtProps["adminUser"].split("@")[0];
page["isCloud"] = deviceMgtProps["isCloud"];
if (userModule.isAuthorized("/permission/admin/device-mgt/users/manage")) {
page.canManage = true;

@ -61,6 +61,14 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
ordering: false,
filter: false,
bSortCellsTop: true,
fnInitComplete: function(){
//loading tooltips
if (typeof $.fn.tooltip == 'function') {
$('[data-toggle="tooltip"]').tooltip();
} else {
console.warn('Warning : Dependency missing - Bootstrap Tooltip Library');
}
},
ajax: {
url: context + "/api/data-tables/invoker",
data: function (params) {

@ -6,7 +6,7 @@
* Opens a modal popup with input to enter multiple email addresses to send invites
*/
function toggleEmailInvite(){
modalDialog.header('<h4 class="pull-left modal-title"><span class="fw-stack add-margin-right-1x">' +
modalDialog.header('<h4 class="pull-left modal-title"><span class="fw-stack add-margin-right-2x">' +
'<i class="fw fw-user fw-stack-2x"></i>' +
'<span class="fw-stack fw-move-right fw-move-bottom">' +
'<i class="fw fw-circle-outline fw-stack-2x"></i>' +

@ -19,7 +19,7 @@
<div id="qr-code-modal" data-enrollment-url="{{@unit.params.enrollmentURL}}" class="hidden">
<div class="modal-header">
<h4 class="pull-left modal-title">
<span class="fw-stack">
<span class="fw-stack add-margin-right-2x">
<i class="fw fw-mobile fw-stack-2x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-circle-outline fw-stack-2x"></i>

@ -22,87 +22,87 @@
<span class="icon fw-stack fw-lg">
<i class="fw fw-organization fw-stack-1x" title=" {{@user.domain}}"></i>
</span>
<span class="hidden-xs">
<span class="hidden-xs username">
{{@user.domain}}
</span>
</a>
</li>
<li class="visible-inline-block">
<a href="#" target="_blank" class="dropdown" data-toggle="dropdown" title="Account">
<span class="icon fw-stack fw-lg" style="color: red">
<i class="fw fw-resource fw-stack-1x" title="Account"></i>
</span>
<span class="hidden-xs" style="color: red">
Trial 14 days to upgrade
</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
role="menu">
<li>
<a title="Upgrade Now"
href="{{upgradeNowURL}}"
target="_self">
<i class="fw fw-export" title="Upgrade Now"></i> Upgrade Now
</a>
</li>
<li>
<a title="Monetization"
href="{{monetizationURL}}"
target="_self">
<i class="fa fa-money fa-lg" title="Monetization"></i> Monetization
</a>
</li>
<li>
<a title="Request Extension"
href="{{requestExtensionURL}}"
target="_blank">
<i class="fw fw-mail" title="Request Extension"></i> Request Extension
</a>
</li>
</ul>
</li>
<li class="visible-inline-block">
<a href="#" target="null" class="dropdown" data-toggle="dropdown" title="App Management">
<span class="icon fw-stack fw-lg">
<i class="fw fw-settings fw-stack-1x" title="App Management"></i>
</span>
<span class="hidden-xs">
App Management
</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
role="menu">
<li class="visible-inline-block">
<a title="Mobile App Publisher" href="{{publisherURL}}"
target="_self">
<i class="fw fw-user" title="Mobilr App Publisher"></i> App Publisher
</a>
</li>
<li class="visible-inline-block">
<a title="App Store " href="{{storeURL}}"
target="_self">
<i class="fw fw-store" title="App Store"></i> App Store
</a>
</li>
</ul>
</li>
<!--<li class="visible-inline-block">-->
<!--<a href="#" target="_blank" class="dropdown" data-toggle="dropdown" title="Account">-->
<!--<span class="icon fw-stack fw-lg" style="color: red">-->
<!--<i class="fw fw-resource fw-stack-1x" title="Account"></i>-->
<!--</span>-->
<!--<span class="hidden-xs" style="color: red">-->
<!--Trial 14 days to upgrade-->
<!--</span>-->
<!--<span class="caret"></span>-->
<!--</a>-->
<!--<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"-->
<!--role="menu">-->
<!--<li>-->
<!--<a title="Upgrade Now"-->
<!--href="{{upgradeNowURL}}"-->
<!--target="_self">-->
<!--<i class="fw fw-export" title="Upgrade Now"></i> Upgrade Now-->
<!--</a>-->
<!--</li>-->
<!--<li>-->
<!--<a title="Monetization"-->
<!--href="{{monetizationURL}}"-->
<!--target="_self">-->
<!--<i class="fa fa-money fa-lg" title="Monetization"></i> Monetization-->
<!--</a>-->
<!--</li>-->
<!--<li>-->
<!--<a title="Request Extension"-->
<!--href="{{requestExtensionURL}}"-->
<!--target="_blank">-->
<!--<i class="fw fw-mail" title="Request Extension"></i> Request Extension-->
<!--</a>-->
<!--</li>-->
<!--</ul>-->
<!--</li>-->
<!--<li class="visible-inline-block">-->
<!--<a href="#" target="null" class="dropdown" data-toggle="dropdown" title="App Management">-->
<!--<span class="icon fw-stack fw-lg">-->
<!--<i class="fw fw-settings fw-stack-1x" title="App Management"></i>-->
<!--</span>-->
<!--<span class="hidden-xs">-->
<!--App Management-->
<!--</span>-->
<!--<span class="caret"></span>-->
<!--</a>-->
<!--<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"-->
<!--role="menu">-->
<!--<li class="visible-inline-block">-->
<!--<a title="Mobile App Publisher" href="{{publisherURL}}"-->
<!--target="_self">-->
<!--<i class="fw fw-user" title="Mobilr App Publisher"></i> App Publisher-->
<!--</a>-->
<!--</li>-->
<!--<li class="visible-inline-block">-->
<!--<a title="App Store " href="{{storeURL}}"-->
<!--target="_self">-->
<!--<i class="fw fw-store" title="App Store"></i> App Store-->
<!--</a>-->
<!--</li>-->
<!--</ul>-->
<!--</li>-->
<li class="visible-inline-block">
<a href="{{contactUsURL}}" target="_self"
@ -175,12 +175,8 @@
<i class="fw fw-circle-outline fw-stack-2x" title="User"></i>
<i class="fw fw-user fw-stack-1x" title="User"></i>
</span>
<span class="hidden-xs">
{{#if isSuperTenant }}
<span class="hidden-xs username">
{{@user.username}}</span><span class="caret"></span>
{{else}}
{{@user.username}}@{{@user.domain}}</span><span class="caret"></span>
{{/if}}
</a>
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
role="menu">
@ -229,17 +225,17 @@
<div id="popover-content" class="hide">
<div class="cloud-apps">
<a href="{{apiCloudURL}}https://api.cloud.wso2.com/publisher" target="_self" class="cloud-block add-padding-top-3x">
<a href="{{apiCloudURL}}" target="_self" class="cloud-block add-padding-top-3x">
<i class="fw fw-api fw-3x"></i>
<div class="cloud-name">API Cloud</div>
</a>
<a href="{{appCloudURL}}https://apps.cloud.wso2.com/appmgt" target="_self" class="cloud-block add-padding-top-3x">
<a href="{{appCloudURL}}" target="_self" class="cloud-block add-padding-top-3x">
<i class="fw fw-application fw-3x"></i>
<div class="cloud-name">App Cloud</div>
</a>
<a href="{{deviceCloudURL}}https://devicemgt.cloud.wso2.com/devicemgt" target="_self" class="cloud-block add-padding-top-3x">
<a href="{{deviceCloudURL}}" target="_self" class="cloud-block add-padding-top-3x">
<i class="fw fw-mobile fw-3x"></i>
<div class="cloud-name">Device Cloud</div>
</a>
@ -249,12 +245,12 @@
<div class="cloud-actions">
<h3>Manage your cloud</h3>
<a href="{{oraganizationURL}}https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/organization.jag" target="_self" class="cloud-block-invert add-padding-top-3x">
<a href="{{oraganizationURL}}" target="_self" class="cloud-block-invert add-padding-top-3x">
<i class="fw fw-organization fw-3x"></i>
<div class="cloud-name">Organization</div>
</a>
<a href="{{membersURL}}https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/user.jag" target="_self" class="cloud-block-invert add-padding-top-3x">
<a href="{{membersURL}}" target="_self" class="cloud-block-invert add-padding-top-3x">
<i class="fa fa-users fa-3x"></i>
<div class="cloud-name">Members</div>
</a>

@ -42,7 +42,7 @@
<div class="modal-header">
<h4 class="pull-left modal-title">
<span class="fw-stack">
<i class="fw fw-user fw-stack-2x"></i>
<i class="fw fw-user fw-stack-2x user-icon-black"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>

@ -18,8 +18,8 @@
{{#if isCloud}}
{{#zone "productName"}}WSO2 Cloud{{/zone}}
{{#zone "productNameResponsive"}}WSO2 Cloud{{/zone}}
{{#zone "productNameResponsive"}} Cloud{{/zone}}
{{else}}
{{#zone "productName"}}WSO2 IoT Server{{/zone}}
{{#zone "productNameResponsive"}}WSO2 IoT Server{{/zone}}
{{#zone "productNameResponsive"}} IoT Server{{/zone}}
{{/if}}

@ -30,6 +30,8 @@
</a>
</li>
{{/if}}
{{#unless isCloud}}
{{#if permissions.VIEW_DASHBOARD}}
<li>
<a href="javascript:statisticLoad('/portal/t/{{currentUser.domain}}/dashboards/device-statistics-dashboard/')">
@ -57,6 +59,9 @@
</div>
</li>
{{/if}}
{{/unless}}
{{#if permissions.LIST_GROUPS}}
<li>
<a href="{{@app.context}}/groups">
@ -81,6 +86,8 @@
{{#if permissions.LIST_POLICIES}}
<li><a href="{{@app.context}}/policies"><i class="fw fw-policy"></i>Policy Management</a></li>
{{/if}}
{{#unless isCloud}}
{{#if permissions.TENANT_CONFIGURATION}}
<li><a><i class="fw fw-settings"></i>Configuration Management</a>
<ul>
@ -92,6 +99,10 @@
</ul>
</li>
{{/if}}
{{/unless}}
{{/zone}}
{{#zone "navbarCollapsableRightItems"}}

@ -52,6 +52,7 @@ function onRequest(context) {
context["isAuthorizedForNotifications"] = isAuthorizedForNotifications;
context["currentUser"] = currentUser;
context["appContext"] = mdmProps["appContext"];
context["isCloud"] = mdmProps["isCloud"];
return context;
}

@ -16,12 +16,10 @@
* under the License.
*/
.wr-input-control .helper {
font-weight: 100;
}
.wr-input-control .cus-col-25 {
float: left;
width: 25%;
@ -53,6 +51,12 @@
/*padding-left:20px;*/
/*}*/
.user-icon-black {
color: black !important;
}
/**/
/* wizard */
.wr-wizard {
@ -99,6 +103,9 @@
}
@media only screen and (min-width: 768px) {
header .username {
max-width: calc(100% - 100px);
}
body > .page-content-wrapper > .container,
body > .page-content-wrapper > .container-fluid {
margin: 1% 1% 1%;
@ -110,6 +117,15 @@ header .brand h1 {
text-transform: none !important;
}
header .username {
display: inline-block;
max-width: 180px;
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis;
vertical-align: middle;
}
.visible-inline-block {
display: inline-block !important;
}
@ -121,18 +137,22 @@ header .brand h1 {
max-width: 32em;
background-color: #006690
}
.cloud-menu .popover-title,.navbar-header .popover-title {
.cloud-menu .popover-title, .navbar-header .popover-title {
background-color: #006690;
font-size: 16px;
border-bottom: none;
font-weight: 400;
}
.cloud-menu .popover.bottom>.arrow{
margin-left:-2px;
.cloud-menu .popover.bottom > .arrow {
margin-left: -2px;
}
.cloud-menu .popover.bottom>.arrow:after,.navbar-header .popover.bottom>.arrow:after{
.cloud-menu .popover.bottom > .arrow:after, .navbar-header .popover.bottom > .arrow:after {
border-bottom-color: #006690;
}
.cloud-block {
float: left;
width: 8.2em;
@ -142,11 +162,13 @@ header .brand h1 {
text-align: center;
vertical-align: middle;
}
.cloud-name {
font-size:14px;
font-size: 14px;
margin-top: .5em;
font-weight: 400;
}
.cloud-menu-popover {
position: relative;
float: right;
@ -158,42 +180,50 @@ header .brand h1 {
color: #fff;
cursor: pointer;
}
#cloud-menu-popover-xs {
color: #fff;
line-height:24px;
line-height: 24px;
border: none;
margin-right: 15px!important;
margin-right: 15px !important;
}
.navbar-toggle{
border:none;
.navbar-toggle {
border: none;
border-radius: 0px;
}
.navbar-header .popover {
border-radius: 0px;
width: 21em;
max-width:32em;
max-width: 32em;
background-color: #006690;
}
.navbar-header .popover .popover-content{
padding:0px;
.navbar-header .popover .popover-content {
padding: 0px;
}
.cloud-menu .popover-content {
padding: 0px;
}
.cloud-actions {
background-color: #005578;
float: left;
position: absolute;
width: 100%;
left: 0px;
overflow:hidden;
overflow: hidden;
}
.cloud-actions h3 {
font-size: 16px;
font-weight: 400;
padding-left: 14px;
margin-top: 10px;
}
.cloud-block-invert {
color: #fff;
float: left;
@ -210,21 +240,25 @@ header .brand h1 {
background-color: #fff;
cursor: pointer;
}
.cloud-actions a:hover {
color: #d7d5d5;
background-color: #3d3d3d;
text-decoration: none
}
.cloud-apps a {
text-decoration: none;
color: #006690 !important;
cursor: pointer
}
.cloud-apps a:hover {
text-decoration: none;
color: #006690;
background-color: #c5c5c5;
}
.cloud-apps .cloud-actions a {
color: #fff
}

@ -2028,6 +2028,11 @@ input[type=number].form-control {
.thumbnail.icon img {
width: 100%;
padding: 10px;
}
.table .icon-only{
cursor: pointer;
}
/* ========================================================================
@ -6549,6 +6554,27 @@ select > option:hover {
color : #C7C7C7;
}
/**
*
* Temporary navigation color fix for IoT cloud release
*
*/
header.header-default {
background: #181e22 !important;
height: 50px;
}
.navbar-collapse {
background: #37474F;
}
.dropdown-menu > li {
width: 100%;
}
/** End **/
/**
*
* Temporary responsive fix for table listing action button width issue

@ -17,7 +17,7 @@
}}
{{#zone "navbars"}}
<nav id="_uuf-navbar" class="navbar navbar-default affix" data-spy="affix" data-offset-top="50"
<nav id="_uuf-navbar" class="navbar navbar-default" data-spy="affix" data-offset-top="50"
data-offset-bottom="40">
<div class="container-fluid">
<div class="navbar-header">

Loading…
Cancel
Save