Merge pull request #437 from wso2/IoTS-1.0.0

Freezing code for the release
revert-70aa11f8
Charitha Goonetilleke 8 years ago committed by GitHub
commit a040be18d8

@ -50,15 +50,17 @@ under the License. --}}
{{defineZone "header"}}
<div class="navbar-wrapper">
{{defineZone "navbars"}}
</div>
{{defineZone "sidePanes"}}
<!-- page-content-wrapper -->
<div class="page-content-wrapper">
{{defineZone "contentTitle"}}
<div class="navbar-wrapper">
{{defineZone "navbars"}}
</div>
{{!defineZone "contentTitle"}}
<div class="container-fluid ">
<div class="body-wrapper">
{{defineZone "content"}}

@ -117,18 +117,7 @@
<h4>
Select user roles to manage group sharing
<br><br>
<div style="max-height: 200px; overflow: scroll">
<br />
{{#each userRoles}}
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input class="roleCheckBoxes" type="checkbox"
data-role-name="{{this}}" />
<span class="helper"
title="{{this}}">{{this}}</span>
</label>
</div>
{{/each}}
<div style="max-height: 200px; overflow: scroll" id="rolesListing">
</div>
</h4>
</div>
@ -144,7 +133,7 @@
</a>
{{/if}}
<a href="#" id="share-group-next-link" class="btn-operations">
Next
Share
</a>
</div>
</div>

@ -23,10 +23,6 @@ function onRequest(context) {
var groupPermissions = require("/app/pages/cdmf.page.groups/public/group-permissions.json");
var currentUser = session.get(constants.USER_SESSION_KEY);
var page = {};
var rolesResult = userModule.getRoles();
if (rolesResult.status == "success") {
page.userRoles = rolesResult.content;
}
if (currentUser) {
page.permissions = userModule.getUIPermissions();
page.permissions.list = stringify(page.permissions);

@ -372,7 +372,7 @@ function attachEvents() {
$(modalPopupContent).html($('#share-group-w1-modal-content').html());
showPopup();
markAlreadySavedUsersRoles(groupId);
listAllRoles(groupId);
var shareGroupNextLink = $("a#share-group-next-link");
shareGroupNextLink.click(function () {
var roles = [];
@ -512,6 +512,41 @@ function markAlreadySavedUsersRoles(groupId) {
});
}
function listAllRoles(groupId) {
var successCallback = function (data, textStatus, xhr) {
data = JSON.parse(data);
if (xhr.status == 200) {
if (data.roles.length > 0) {
var html = "<br/>";
for (var i = 0; i < data.roles.length; i++) {
html += '<div class="wr-input-control"><label class="wr-input-control checkbox">' +
'<input class="roleCheckBoxes" type="checkbox" data-role-name="' + data.roles[i] + '" />' +
'<span class="helper" title="' + data.roles[i] + '">' + data.roles[i] +
'</span></label></div>';
$('.roleCheckBoxes').each(
function () {
if (data.roles[i] == $(this).data('role-name')) {
$(this).attr('checked', true);
}
}
);
}
$("#rolesListing").html(html);
markAlreadySavedUsersRoles(groupId);
} else {
$("#rolesListing").html("No roles available");
}
} else {
displayErrors(xhr);
}
};
invokerUtil.get("/api/device-mgt/v1.0/roles?offset=0&limit=100&user-store=all",
successCallback, function (message) {
displayErrors(message);
});
}
function addNewRole(roles) {
$(modalPopupContent).html($('#share-group-w3-modal-content').html());
$("a#share-group-w3-yes-link").click(function () {
@ -547,10 +582,6 @@ function togglePermissionAction(element) {
function updateGroupShare(groupId, roles) {
var successCallback = function (data) {
$(modalPopupContent).html($('#share-group-200-content').html());
setTimeout(function () {
hidePopup();
location.reload(false);
}, 2000);
};
invokerUtil.post("/api/device-mgt/v1.0/groups/id/" + groupId + "/share",

@ -13,61 +13,59 @@
<div class="page-content-wrapper">
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media">
<div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Policy Overview
</div>
{{#defineZone "policy-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: 14%;">Platform</td>
<td id="policy-platform" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">Ownership</td>
<td id="policy-assignment" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Action upon non-compliance</td>
<td id="policy-action" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Status</td>
<td id="policy-status" style="padding:10px 15px;"></td>
</tr>
<tr role="row" id="users-row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Assigned Users</td>
<td id="policy-users" style="padding:10px 15px;"></td>
</tr>
<tr role="row" id="roles-row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Assigned Roles</td>
<td id="policy-roles" style="padding:10px 15px;"></td>
</tr>
</tbody>
</table>
{{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Description
</div>
<div class="add-margin-top-4x">
<div id="policy-description" class="panel-title-description"></div>
</div>
<br>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Profile Information
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Policy Overview
</div>
{{#defineZone "policy-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: 14%;">Platform</td>
<td id="policy-platform" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">Ownership</td>
<td id="policy-assignment" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Action upon non-compliance</td>
<td id="policy-action" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Status</td>
<td id="policy-status" style="padding:10px 15px;"></td>
</tr>
<tr role="row" id="users-row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Assigned Users</td>
<td id="policy-users" style="padding:10px 15px;"></td>
</tr>
<tr role="row" id="roles-row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Assigned Roles</td>
<td id="policy-roles" style="padding:10px 15px;"></td>
</tr>
</tbody>
</table>
{{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Description
</div>
<div class="add-margin-top-4x">
<div id="policy-description" class="panel-title-description"></div>
</div>
<br>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Profile Information
</div>
<div class="add-margin-top-4x">
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<div class="add-margin-top-4x">
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<div class="wr-advance-operations">
<div class="wr-advance-operations-init">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading platform features . . .
<br>
<br>
</div>
<div class="wr-advance-operations">
<div class="wr-advance-operations-init">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading platform features . . .
<br>
<br>
</div>
</div>
</div>

@ -3522,7 +3522,7 @@ a.btn-operations {
font-size: 13px;
color: #fff;
background: #11375B;
padding: 10px 24px;
padding: 5px 20px;
display: inline-block;
margin-right: 2px;
text-decoration: none;

Loading…
Cancel
Save