ui improvements to device cloud

revert-70aa11f8
kamidu 8 years ago
parent 8a07639d6b
commit 587f847934

@ -78,6 +78,7 @@
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/group/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
@ -85,6 +86,7 @@
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>
@ -109,6 +111,7 @@
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/user/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
@ -116,6 +119,7 @@
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>
@ -140,6 +144,7 @@
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/policy/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
@ -147,6 +152,7 @@
</span>
Add
</a>
{{/unless}}
</span>
</div>
</div>
@ -171,6 +177,7 @@
</a>
{{/if}}
<!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/role/add">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
@ -178,6 +185,7 @@
</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;
}

@ -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;
}

@ -54,9 +54,12 @@
<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="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}}';"
@ -64,10 +67,12 @@
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-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Profile Overview</div>
<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>

@ -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};
}

@ -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">
{{#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;

@ -29,80 +29,80 @@
</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"

@ -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;
}
Loading…
Cancel
Save