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 2a9027a15e

@ -91,7 +91,8 @@
<div id="device_overview">
<div class="media-left col-lg-2">
<div class="icon">
<img src="/devicemgt/public/cdmf.page.groups/images/group-icon.png" style="background-color: #11375b; height: 152px;">
<img src="/devicemgt/public/cdmf.page.groups/images/group-icon.png"
style="background-color: #11375b; height: 152px;">
</div>
</div>
<div class="media-body asset-desc add-padding-left-5x">
@ -236,13 +237,13 @@
<i class="fw fw-devices fw-3x"></i>
</h3>
<h3 class="text-muted">
You don't have any device
You don't have any
{{#if group}}
assigned to this group
devices assigned to this group. Let's add a device!
{{else}}
enrolled
enrolled devices. Let's enroll a device!
{{/if}}
at the moment.
</h3>
<h3>
{{#if group}}
@ -458,8 +459,9 @@
<div class="modal-content">
<div class="row">
<div class="col-lg-5 col-md-6 col-centered">
<h3>You don't have any groups to add this device. Please add group
first.</h3>
<h3>
You don't have any device group to add this device. Let's add a new
device group!</h3>
<br/>
<div class="buttons">
<a href="{{@app.context}}/group/add" class="btn-operations">

@ -315,7 +315,7 @@ function loadDevices(searchType, searchParam) {
{
targets: 6,
data: 'status',
class: 'text-right content-fill text-left-on-grid-view no-wrap',
class: 'text-right content-fill text-left-on-grid-view no-wrap tooltip-overflow-fix',
render: function (status, type, row, meta) {
var deviceType = row.deviceType;
var deviceIdentifier = row.deviceIdentifier;
@ -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" data-placement="bottom" data-toggle="tooltip" data-original-title="Analytics"><span class="fw-stack">' +
' class="btn padding-reduce-on-grid-view" data-placement="top" 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 + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Group"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>' +
row.name + '" data-placement="top" 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-placement="bottom" data-toggle="tooltip" data-original-title="Edit">'
+ '" data-devicename="' + row.name + '" data-placement="top" 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-placement="bottom" data-toggle="tooltip" data-original-title="Remove from group">'
+ '" data-devicename="' + row.name + '" data-placement="top" 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-placement="bottom" data-toggle="tooltip" data-original-title="Delete">'
+ '" data-devicename="' + row.name + '" data-placement="top" 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>';

@ -65,7 +65,7 @@
{{else}}
<div id="ast-container" class="ast-container list-view">
<div class="ctrl-info-panel col-centered text-center wr-login">
<h2>You don't have any device assigned to this group to view analytics.</h2>
<h2>You don't have any device assigned to this group to view analytics. Let's add a new device group!</h2>
<br/>
<p class="text-center">
<a href="{{@app.context}}/devices" class="wr-btn">

@ -21,11 +21,18 @@
{{#zone "content"}}
<div class="container container-bg white-bg">
<div class="col-md-12 col-lg-6 col-centered wr-content wr-login col-centered sign-panel">
<div class="col-md-12 col-lg-6 col-centered wr-content wr-login col-centered sign-panel" id="group-create-form">
<p class="page-sub-title">Add New Group</p>
<p>Create new device group on IoT Server</p>
<p>Create new device group on
{{#if isCloud}}
Device Cloud
{{else}}
IoT Server
{{/if}}
.
</p>
<!-- validation -->
<span class="wr-validation-summary hidden center-block col-centered">
@ -51,12 +58,34 @@
<div class="wr-input-control">
<button class="wr-btn" id="add-group-btn">
Add</button>
Add
</button>
<button class="wr-btn" onclick="window.location = '{{@app.context}}/groups';return false;">
Cancel</button>
Cancel
</button>
</div>
</div>
</div>
<div id="group-created-msg" class="container col-centered wr-content hidden">
<div class="wr-form">
<p class="page-sub-title">Group was created successfully.</p>
<br>Please click <b>"Add Another Group"</b>, if you wish to add another group or click
<b>"View Group List"</b> to complete the process and go back to the group list.
<hr/>
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/groups'">View User List
</button>
<a href="{{@app.context}}/group/add" class="cu-btn-inner">
<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 Another Group
</a>
</div>
</div>
</div>
{{/zone}}
{{#zone "bottomJs"}}

@ -25,6 +25,7 @@
function onRequest(context) {
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var page = {};
page["isCloud"] = devicemgtProps.isCloud;
page["groupNameJSRegEx"] = devicemgtProps.groupValidationConfig.groupNameJSRegEx;
page["groupNameRegExViolationErrorMsg"] = devicemgtProps.groupValidationConfig.groupNameRegExViolationErrorMsg;
page["groupNameHelpMsg"] = devicemgtProps.groupValidationConfig.groupNameHelpMsg;

@ -45,13 +45,8 @@ $(function () {
var successCallback = function (jqXHR, status, resp) {
if (resp.status == 201) {
$('.wr-validation-summary strong').text("Group created. You will be redirected to groups");
$('.wr-validation-summary').removeClass("hidden");
$('.wr-validation-summary strong').removeClass("label-danger");
$('.wr-validation-summary strong').addClass("label-success");
setTimeout(function () {
window.location = "../groups";
}, 1500);
$("#group-create-form").addClass("hidden");
$("#group-created-msg").removeClass("hidden");
} else {
displayErrors(resp.status);
}

@ -82,7 +82,7 @@
<h3 class="text-muted">
<i class="fw fw-group fw-3x"></i>
</h3>
<h3 class="text-muted">You don't have any group registered at the moment</h3>
<h3 class="text-muted">You don't have any device group. Let's add a new device group!</h3>
{{#if permissions.ADD_GROUP}}
<h3>
<!--suppress HtmlUnknownTarget -->

@ -180,13 +180,13 @@ function loadGroups() {
{
targets: 4,
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 tooltip-overflow-fix',
render: function (id, type, row, meta) {
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" ' +
'data-placement="bottom" data-toggle="tooltip" data-original-title="Analytics">' +
'data-placement="top" 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>';
@ -197,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
+ '" 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>'
+ '" data-placement="top" 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>';
}
@ -207,7 +207,7 @@ function loadGroups() {
+ row.name + '" ' +
'data-group-owner="' + row.owner + '" data-group-description="' + row.description
+ '" data-group-id="' + row.groupId
+ '" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i>' +
+ '" data-placement="top" 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")) {
@ -215,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
+ '" 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>'
+ '" data-placement="top" 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>';
}

@ -91,7 +91,7 @@
<h3 class="text-muted">
<i class="fw fw-policy fw-3x"></i>
</h3>
<h3 class="text-muted">You do not have any device policy at the moment</h3>
<h3 class="text-muted">You don't have any device policies. Let's add a new policy!</h3>
{{#if permissions.ADD_ADMIN_POLICY}}
<h3>
<!--suppress HtmlUnknownTarget -->

@ -337,31 +337,31 @@ function loadUsers() {
}
},
{
class: "text-right content-fill text-left-on-grid-view no-wrap",
class: "text-right content-fill text-left-on-grid-view no-wrap tooltip-overflow-fix",
data: null,
render: function (data, type, row, meta) {
var editbtn = '<a data-toggle="tooltip" data-placement="bottom" title="Edit User"href="' + context +
var editbtn = '<a data-toggle="tooltip" data-placement="top" 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" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit"> ' +
'class="btn padding-reduce-on-grid-view edit-user-link" data-placement="top" 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>';
var resetPasswordbtn = '<a data-toggle="tooltip" data-placement="bottom" title="Reset Password" href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
var resetPasswordbtn = '<a data-toggle="tooltip" data-placement="top" 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" data-placement="bottom" data-toggle="tooltip" data-original-title="Reset Password">' +
'class="btn padding-reduce-on-grid-view remove-user-link" data-placement="top" 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>' +
'</span><span class="hidden-xs hidden-on-grid-view">Reset Password</span></a>';
var removebtn = '<a data-toggle="tooltip" data-placement="bottom" title="Remove User" href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
var removebtn = '<a data-toggle="tooltip" data-placement="top" 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" data-placement="bottom" data-toggle="tooltip" data-original-title="Remove">' +
'class="btn padding-reduce-on-grid-view remove-user-link" data-placement="top" 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>' +

Loading…
Cancel
Save