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

revert-70aa11f8
Imesh Chandrasiri 8 years ago
commit 3786ef2636

@ -91,7 +91,8 @@
<div id="device_overview"> <div id="device_overview">
<div class="media-left col-lg-2"> <div class="media-left col-lg-2">
<div class="icon"> <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> </div>
<div class="media-body asset-desc add-padding-left-5x"> <div class="media-body asset-desc add-padding-left-5x">
@ -236,13 +237,13 @@
<i class="fw fw-devices fw-3x"></i> <i class="fw fw-devices fw-3x"></i>
</h3> </h3>
<h3 class="text-muted"> <h3 class="text-muted">
You don't have any device You don't have any
{{#if group}} {{#if group}}
assigned to this group devices assigned to this group. Let's add a device!
{{else}} {{else}}
enrolled enrolled devices. Let's enroll a device!
{{/if}} {{/if}}
at the moment.
</h3> </h3>
<h3> <h3>
{{#if group}} {{#if group}}
@ -458,8 +459,9 @@
<div class="modal-content"> <div class="modal-content">
<div class="row"> <div class="row">
<div class="col-lg-5 col-md-6 col-centered"> <div class="col-lg-5 col-md-6 col-centered">
<h3>You don't have any groups to add this device. Please add group <h3>
first.</h3> You don't have any device group to add this device. Let's add a new
device group!</h3>
<br/> <br/>
<div class="buttons"> <div class="buttons">
<a href="{{@app.context}}/group/add" class="btn-operations"> <a href="{{@app.context}}/group/add" class="btn-operations">

@ -65,7 +65,7 @@
{{else}} {{else}}
<div id="ast-container" class="ast-container list-view"> <div id="ast-container" class="ast-container list-view">
<div class="ctrl-info-panel col-centered text-center wr-login"> <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/> <br/>
<p class="text-center"> <p class="text-center">
<a href="{{@app.context}}/devices" class="wr-btn"> <a href="{{@app.context}}/devices" class="wr-btn">

@ -21,11 +21,18 @@
{{#zone "content"}} {{#zone "content"}}
<div class="container container-bg white-bg"> <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 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 --> <!-- validation -->
<span class="wr-validation-summary hidden center-block col-centered"> <span class="wr-validation-summary hidden center-block col-centered">
@ -51,12 +58,34 @@
<div class="wr-input-control"> <div class="wr-input-control">
<button class="wr-btn" id="add-group-btn"> <button class="wr-btn" id="add-group-btn">
Add</button> Add
</button>
<button class="wr-btn" onclick="window.location = '{{@app.context}}/groups';return false;"> <button class="wr-btn" onclick="window.location = '{{@app.context}}/groups';return false;">
Cancel</button> Cancel
</button>
</div> </div>
</div> </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> </div>
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}

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

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

@ -82,7 +82,7 @@
<h3 class="text-muted"> <h3 class="text-muted">
<i class="fw fw-group fw-3x"></i> <i class="fw fw-group fw-3x"></i>
</h3> </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}} {{#if permissions.ADD_GROUP}}
<h3> <h3>
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->

@ -91,7 +91,7 @@
<h3 class="text-muted"> <h3 class="text-muted">
<i class="fw fw-policy fw-3x"></i> <i class="fw fw-policy fw-3x"></i>
</h3> </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}} {{#if permissions.ADD_ADMIN_POLICY}}
<h3> <h3>
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->

Loading…
Cancel
Save