Merge branch 'release-3.0.x' of github.com:wso2/carbon-device-mgt-plugins into release-3.0.x

revert-dabc3590
Chatura Dilan 8 years ago
commit 7dc3535af6

@ -37,81 +37,75 @@
</div> </div>
{{/zone}} {{/zone}}
{{#zone "device-detail-properties"}} {{#zone "device-view-tabs"}}
<div class="media"> <li class="active"><a class="list-group-item" href="#device_statistics" role="tab"
<div class="media-left col-xs-12 col-sm-2 col-md-2 col-lg-2"> data-toggle="tab" aria-controls="device_statistics">Device
<ul class="list-group" role="tablist"> Statistics</a>
<li class="active"><a class="list-group-item" href="#device_statistics" role="tab" </li>
data-toggle="tab" aria-controls="device_statistics">Device <li><a class="list-group-item" href="#policies" role="tab"
Statistics</a> data-toggle="tab" aria-controls="policies">Policies</a>
</li> </li>
<li><a class="list-group-item" href="#policies" role="tab" <li><a class="list-group-item" href="#event_log" role="tab" data-toggle="tab"
data-toggle="tab" aria-controls="policies">Policies</a> aria-controls="event_log">Operations Log</a></li>
</li> {{/zone}}
<li><a class="list-group-item" href="#event_log" role="tab" data-toggle="tab"
aria-controls="event_log">Operations Log</a></li>
</ul>
</div>
<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" {{#zone "device-view-tab-contents"}}
id="device_statistics" role="tabpanel" aria-labelledby="device_statistics">
<div class="panel-heading">Device Statistics</div>
{{unit "cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view" device=device}}
</div>
<div class="panel panel-default tab-pane" id="policies" role="tabpanel" <div class="panel panel-default tab-pane active"
aria-labelledby="policies"> id="device_statistics" role="tabpanel" aria-labelledby="device_statistics">
<div class="panel-heading">Policies</div> <div class="panel-heading">Device Statistics</div>
<div class="panel-body"> {{unit "cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view" device=device}}
<div id="policy-spinner" class="wr-advance-operations-init hidden"> </div>
<br>
<i class="fw fw-settings fw-spin fw-2x"></i> <div class="panel panel-default tab-pane" id="policies" role="tabpanel"
aria-labelledby="policies">
<div class="panel-heading">Policies</div>
<div class="panel-body">
<div id="policy-spinner" class="wr-advance-operations-init hidden">
<br>
Loading Policies . . . <i class="fw fw-settings fw-spin fw-2x"></i>
<br>
<br> Loading Policies . . .
</div> <br>
<div id="policy-list-container"> <br>
<div class="panel-body"> </div>
No policies found <div id="policy-list-container">
</div> <div class="panel-body">
<br class="c-both"/> No policies found
</div> </div>
</div> <br class="c-both"/>
<a class="padding-left" </div>
href="{{@app.context}}/policy/add/{{device.type}}?deviceId={{device.deviceIdentifier}}"> </div>
<a class="padding-left"
href="{{@app.context}}/policy/add/{{device.type}}?deviceId={{device.deviceIdentifier}}">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-policy fw-stack-1x"></i> <i class="fw fw-policy fw-stack-1x"></i>
</span> Add device specific policy</a> </span> Add device specific policy</a>
</div> </div>
<div class="panel panel-default tab-pane" id="event_log" role="tabpanel" <div class="panel panel-default tab-pane" id="event_log" role="tabpanel"
aria-labelledby="event_log"> aria-labelledby="event_log">
<div class="panel-heading">Operations Log <span><a href="#" <div class="panel-heading">Operations Log <span><a href="#"
id="refresh-operations"><i id="refresh-operations"><i
class="fw fw-refresh"></i></a></span></div> class="fw fw-refresh"></i></a></span></div>
<div class="panel-body"> <div class="panel-body">
<div id="operations-spinner" class="wr-advance-operations-init hidden"> <div id="operations-spinner" class="wr-advance-operations-init hidden">
<br> <br>
<i class="fw fw-settings fw-spin fw-2x"></i> <i class="fw fw-settings fw-spin fw-2x"></i>
Loading Operations Log . . . Loading Operations Log . . .
<br> <br>
<br> <br>
</div> </div>
<div id="operations-log-container"> <div id="operations-log-container">
<div class="panel-body"> <div class="panel-body">
Not available yet Not available yet
</div>
<br class="c-both"/>
</div>
</div>
</div> </div>
<br class="c-both"/>
</div> </div>
</div> </div>
</div> </div>
{{/zone}} {{/zone}}

@ -1,485 +1,406 @@
{{unit "cdmf.unit.device.type.android.leaflet"}} {{unit "cdmf.unit.device.type.android.leaflet"}}
{{unit "cdmf.unit.lib.qrcode"}} {{unit "cdmf.unit.lib.qrcode"}}
{{unit "cdmf.unit.device.type.android.qr-modal"}} {{unit "cdmf.unit.device.type.android.qr-modal"}}
{{unit "cdmf.unit.device.type.android.operation-bar"}}
{{#if deviceFound}} {{#if deviceFound}}
{{#if isAuthorized}} {{#if isAuthorized}}
{{#zone "device-details-header"}} {{#zone "device-details-header"}}
<h1 class="page-sub-title device-id device-select" <h1 class="page-sub-title device-id device-select"
data-deviceid="{{deviceView.deviceIdentifier}}" data-type="{{deviceView.type}}" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}"
data-ownership="{{deviceView.ownership}}"> data-ownership="{{device.ownership}}"
Device {{deviceView.name}} data-owner="{{device.owner}}">
{{#if deviceView.model}} Device {{device.name}}
<span class="lbl-device"> {{#if device.model}}
( {{deviceView.vendor}} {{deviceView.model}} ) <span class="lbl-device">
( {{device.vendor}} {{device.model}} )
</span> </span>
{{/if}} {{/if}}
</h1> </h1>
{{/zone}} {{/zone}}
{{#zone "overview-section"}} {{#zone "overview-section"}}
<div class="media-body asset-desc add-padding-left-5x"> <div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Device <div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Device
Overview Overview
</div> </div>
<table class="table table-responsive table-striped" id="members"> <table class="table table-responsive table-striped" id="members">
<tbody> <tbody>
{{#if deviceView.deviceIdentifier}} {{#if device.deviceIdentifier}}
<tr role="row" class="odd"> <tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Device ID</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Device ID</td>
<td style="padding:10px 15px;">{{deviceView.deviceIdentifier}}</td> <td style="padding:10px 15px;">{{device.deviceIdentifier}}</td>
</tr> </tr>
{{/if}}
{{#if deviceView.name}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Name</td>
<td style="padding:10px 15px;">{{deviceView.name}}</td>
</tr>
{{/if}}
{{#if deviceView.vendor}}
{{#if deviceView.model}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Model</td>
<td style="padding:10px 15px;">{{deviceView.vendor}} {{deviceView.model}}</td>
</tr>
{{/if}}
{{/if}}
{{#if deviceView.status}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td>
<td style="padding:10px 15px;">
{{#equal deviceView.status "ACTIVE"}}<span><i
class="fw fw-ok icon-success"></i>Active</span>{{/equal}}
{{#equal deviceView.status "INACTIVE"}}<span><i
class="fw fw-warning icon-warning"></i>Inactive</span>{{/equal}}
{{#equal deviceView.status "BLOCKED"}}<span><i
class="fw fw-remove icon-danger"></i>Blocked</span>{{/equal}}
{{#equal deviceView.status "REMOVED"}}<span><i
class="fw fw-delete icon-danger"></i>Removed</span>{{/equal}}
</td>
</tr>
{{/if}}
{{#if deviceView.owner}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Owner</td>
<td style="padding:10px 15px;">{{deviceView.owner}}</td>
</tr>
{{/if}}
{{#if deviceView.ownership}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Ownership</td>
<td style="padding:10px 15px;">{{deviceView.ownership}}</td>
</tr>
{{/if}}
{{#if deviceView.imei}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">IMEI</td>
<td style="padding:10px 15px;">{{deviceView.imei}}</td>
</tr>
{{/if}}
{{#if deviceView.udid}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">UDID</td>
<td style="padding:10px 15px;">{{deviceView.udid}}</td>
</tr>
{{/if}}
{{#if deviceView.osBuildDate}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build
Date
</td>
<td style="padding:10px 15px;">{{deviceView.osBuildDate}}</td>
</tr>
{{/if}}
{{#if deviceView.phoneNumber}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Phone Number</td>
<td style="padding:10px 15px;">{{deviceView.phoneNumber}}</td>
</tr>
{{/if}}
{{#if deviceView.lastUpdatedTime}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Last Update</td>
<td style="padding:10px 15px;">{{deviceView.lastUpdatedTime}}</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
{{/zone}}
{{#zone "device-opetations"}}
{{#if deviceView.isNotRemoved}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Operations
</div>
<div class="add-margin-top-4x">
{{unit "cdmf.unit.device.operation-bar" device=deviceView backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</div>
{{/if}} {{/if}}
{{/zone}} {{#if device.name}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Name</td>
<td style="padding:10px 15px;">{{device.name}}</td>
</tr>
{{/if}}
{{#if device.vendor}}
{{#if device.model}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Model</td>
<td style="padding:10px 15px;">{{device.vendor}}
{{device.model}}</td>
</tr>
{{/if}}
{{/if}}
{{#if device.status}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td>
<td style="padding:10px 15px;">
{{#equal device.status "ACTIVE"}}<span><i
class="fw fw-ok icon-success"></i>Active</span>{{/equal}}
{{#equal device.status "INACTIVE"}}<span><i
class="fw fw-warning icon-warning"></i>Inactive</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i
class="fw fw-remove icon-danger"></i>Blocked</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i
class="fw fw-delete icon-danger"></i>Removed</span>{{/equal}}
</td>
</tr>
{{/if}}
{{#if device.owner}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Owner</td>
<td style="padding:10px 15px;">{{device.owner}}</td>
</tr>
{{/if}}
{{#if device.ownership}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Ownership</td>
<td style="padding:10px 15px;">{{device.ownership}}</td>
</tr>
{{/if}}
{{#if device.imei}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">IMEI</td>
<td style="padding:10px 15px;">{{device.imei}}</td>
</tr>
{{/if}}
{{#if device.udid}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">UDID</td>
<td style="padding:10px 15px;">{{device.udid}}</td>
</tr>
{{/if}}
{{#if device.osBuildDate}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build
Date
</td>
<td style="padding:10px 15px;">{{device.osBuildDate}}</td>
</tr>
{{/if}}
{{#if device.phoneNumber}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Phone Number</td>
<td style="padding:10px 15px;">{{device.phoneNumber}}</td>
</tr>
{{/if}}
{{#if device.lastUpdatedTime}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Last Update</td>
<td style="padding:10px 15px;">{{device.lastUpdatedTime}}</td>
</tr>
{{/if}}
</tbody>
</table>
</div> </div>
{{/zone}}
{{#zone "device-detail-properties"}}
<div class="media tab-responsive"> {{#zone "device-opetations"}}
<div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs"> {{#if device.isNotRemoved}}
<ul class="list-group nav nav-pills nav-stacked" role="tablist"> <div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
{{#if deviceView.isNotWindows}} Operations
<li role="presentation" class="list-group-item active"> </div>
<a href="#device_details_tab" role="tab" data-toggle="tab" <div class="add-margin-top-4x">
aria-controls="device_details_tab"> {{unit "cdmf.unit.device.type.android.operation-bar" device=device
<i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span> backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</a>
</li>
{{/if}}
{{#if deviceView.isNotWindows}}
<li role="presentation" class="list-group-item">
{{else}}
<li role="presentation" class="list-group-item active">
{{/if}}
<li role="presentation" class="list-group-item">
<a href="#policy_compliance_tab" role="tab" data-toggle="tab"
aria-controls="policy_compliance_tab">
<i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span>
</a>
</li>
{{#if deviceView.isNotWindows}}
<li role="presentation" class="list-group-item">
<a href="#device_location_tab" role="tab" data-toggle="tab"
data-lat="{{deviceView.location.latitude}}"
data-long="{{deviceView.location.longitude}}"
aria-controls="device_location_tab">
<i class="icon fw fw-map-location"></i><span
class="hidden-sm">Device Location</span>
</a>
</li>
<li role="presentation" class="list-group-item">
<a href="#installed_applications_tab" role="tab" data-toggle="tab"
aria-controls="installed_applications_tab">
<i class="icon fw fw-application"></i><span class="hidden-sm">Installed Applications</span>
</a>
</li>
{{/if}}
{{#if deviceView.isNotRemoved}}
<li role="presentation" class="list-group-item">
<a href="#event_log_tab" role="tab" data-toggle="tab" aria-controls="event_log_tab">
<i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span>
</a>
</li>
{{/if}}
</ul>
</div> </div>
<div class="media-body add-padding-left-5x remove-padding-xs"> {{/if}}
<div class="panel-group tab-content remove-padding" id="tabs" role="tablist" {{/zone}}
data-status="{{deviceView.isNotRemoved}}" aria-multiselectable="true">
<div class="arrow-left hidden-xs"></div> {{#zone "device-details-tab-injected"}}
<li role="presentation" class="list-group-item">
<a href="#policy_compliance_tab" role="tab" data-toggle="tab"
aria-controls="policy_compliance_tab">
<i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span>
</a>
</li>
<li role="presentation" class="list-group-item">
<a href="#device_location_tab" role="tab" data-toggle="tab"
data-lat="{{device.location.latitude}}"
data-long="{{device.location.longitude}}"
aria-controls="device_location_tab">
<i class="icon fw fw-map-location"></i><span
class="hidden-sm">Device Location</span>
</a>
</li>
<li role="presentation" class="list-group-item">
<a href="#installed_applications_tab" role="tab" data-toggle="tab"
aria-controls="installed_applications_tab">
<i class="icon fw fw-application"></i><span class="hidden-sm">Installed Applications</span>
</a>
</li>
{{/zone}}
{{#if deviceView.isNotWindows}} {{#zone "device-details-tab-contents"}}
<div class="panel panel-default" role="tabpanel" id="device_details_tab"> <div class="panel panel-default" role="tabpanel" id="device_details_tab">
<div class="panel-heading visible-xs collapsed" id="device_details"> <div class="panel-heading visible-xs collapsed" id="device_details">
<h4 class="panel-title"> <h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs" <a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="fw fw-mobile fw-2x"></i> <i class="fw fw-mobile fw-2x"></i>
Device Details Device Details
<i class="caret-updown fw fw-down"></i> <i class="caret-updown fw fw-down"></i>
</a> </a>
</h4> </h4>
</div>
<div class="panel-heading display-none-xs">Device Details</div>
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="device_details">
<div class="panel-body ">
<div class="device-detail-body">
<!-- device summary -->
{{#if device.deviceInfoAvailable}}
{{#if device.BatteryLevel}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">BATTERY</div>
<div>
<div class="tile-icon"><i
class="fw fw-battery"></i></div>
<div class="tile-stats">
{{device.BatteryLevel
.value}} %
</div>
</div>
</div>
</div>
</div>
{{/if}}
<!--{{#if device.cpuUsage}}-->
<!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">-->
<!--<div class="col-md-12">-->
<!--<div class="wr-stats-board-tile">-->
<!--<div class="tile-name">CPU Usage</div>-->
<!--<div>-->
<!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>-->
<!--<div class="tile-stats">-->
<!--{{device.cpuUsage.value}} %-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--{{/if}}-->
{{#if device.ramUsage}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">RAM Usage</div>
<div>
<div class="tile-icon"><i
class="fw fw-hardware"></i></div>
<div class="tile-stats">
{{device.ramUsage
.value}} %
</div>
</div>
</div>
</div>
</div> </div>
<div class="panel-heading display-none-xs">Device Details</div> {{/if}}
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" {{#if device.internalMemory}}
aria-labelledby="device_details"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="panel-body "> <div class="col-md-12">
<div class="device-detail-body"> <div class="wr-stats-board-tile">
<!-- device summary --> <div class="tile-name">Local Storage</div>
{{#equal deviceView.type "windows"}} <div>
<div class="message message-info"> <div class="tile-icon"><i
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not class="fw fw-hdd"></i>
available yet</h4>
</div> </div>
{{/equal}} <div class="tile-stats">
{{#if deviceView.deviceInfoAvailable}} {{device.internalMemory
{{#if deviceView.BatteryLevel}} .usage}} %
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">BATTERY</div>
<div>
<div class="tile-icon"><i
class="fw fw-battery"></i></div>
<div class="tile-stats">
{{deviceView.BatteryLevel.value}} %
</div>
</div>
</div>
</div>
</div>
{{/if}}
<!--{{#if deviceView.cpuUsage}}-->
<!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">-->
<!--<div class="col-md-12">-->
<!--<div class="wr-stats-board-tile">-->
<!--<div class="tile-name">CPU Usage</div>-->
<!--<div>-->
<!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>-->
<!--<div class="tile-stats">-->
<!--{{deviceView.cpuUsage.value}} %-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--{{/if}}-->
{{#if deviceView.ramUsage}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">RAM Usage</div>
<div>
<div class="tile-icon"><i
class="fw fw-hardware"></i></div>
<div class="tile-stats">
{{deviceView.ramUsage.value}} %
</div>
</div>
</div>
</div>
</div>
{{/if}}
{{#if deviceView.internalMemory}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<div class="wr-stats-board-tile">
<div class="tile-name">Local Storage</div>
<div>
<div class="tile-icon"><i
class="fw fw-hdd"></i>
</div>
<div class="tile-stats">
{{deviceView.internalMemory.usage}} %
<span class="tile-stats-free"> <span class="tile-stats-free">
TOTAL OF {{deviceView.internalMemory.total}} GB TOTAL OF {{device.internalMemory
.total}} GB
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} {{/if}}
{{#if deviceView.externalMemory}} {{#if device.externalMemory}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12"> <div class="col-md-12">
<div class="wr-stats-board-tile"> <div class="wr-stats-board-tile">
<div class="tile-name">External Storage</div> <div class="tile-name">External Storage</div>
<div> <div>
<div class="tile-icon"><i <div class="tile-icon"><i
class="fw fw-usb-drive"></i></div> class="fw fw-usb-drive"></i></div>
<div class="tile-stats"> <div class="tile-stats">
{{deviceView.externalMemory.usage}} % {{device.externalMemory
.usage}} %
<span class="tile-stats-free"> <span class="tile-stats-free">
TOTAL OF {{deviceView.externalMemory.total}} GB TOTAL OF {{device.externalMemory
.total}} GB
</span> </span>
</div>
</div>
</div>
</div>
</div>
{{/if}}
{{else}}
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
Battery, RAM and Storage related information are not
available yet.
</h4>
</div> </div>
{{/if}} </div>
</div> </div>
</div> </div>
</div> </div>
{{/if}}
{{else}}
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
Battery, RAM and Storage related information are not
available yet.
</h4>
</div> </div>
{{/if}} {{/if}}
</div>
</div>
</div>
</div>
{{/zone}}
<div class="panel panel-default visible-xs-block" role="tabpanel" {{#zone "device-view-tab-injected-conents"}}
id="policy_compliance_tab"> <div class="panel panel-default visible-xs-block" role="tabpanel"
<div class="panel-heading visible-xs collapsed" id="policy_compliance"> id="policy_compliance_tab">
<h4 class="panel-title"> <div class="panel-heading visible-xs collapsed" id="policy_compliance">
<a role="button" <h4 class="panel-title">
data-toggle="collapse" data-parent="#tabs" href="#collapseTwo" <a role="button"
aria-expanded="true" aria-controls="collapseTwo"> data-toggle="collapse" data-parent="#tabs" href="#collapseTwo"
<i class="fw fw-policy fw-2x"></i> aria-expanded="true" aria-controls="collapseTwo">
Policy Compliance <i class="fw fw-policy fw-2x"></i>
<i class="caret-updown fw fw-down"></i> Policy Compliance
</a> <i class="caret-updown fw fw-down"></i>
</h4> </a>
</div> </h4>
<div class="panel-heading display-none-xs"> </div>
Policy Compliance <div class="panel-heading display-none-xs">
Policy Compliance
<span> <span>
<a href="javascript:void(0);" id="refresh-policy"> <a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</span> </span>
</div> </div>
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="policy_compliance"> aria-labelledby="policy_compliance">
<div class="panel-body "> <div class="panel-body ">
<span class="visible-xs add-padding-2x text-right"> <span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-policy"> <a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</span> </span>
<div id="policy-spinner" <div id="policy-spinner"
class="wr-advance-operations-init add-padding-bottom-2x add-padding-bottom-4x hidden"> class="wr-advance-operations-init add-padding-bottom-2x add-padding-bottom-4x hidden">
<i class="fw fw-settings fw-spin fw-2x"></i>Loading Policy <i class="fw fw-settings fw-spin fw-2x"></i>Loading Policy
Compliance... Compliance...
</div> </div>
<div id="policy-list-container"> <div id="policy-list-container">
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="panel panel-default visible-xs-block" role="tabpanel"
id="device_location_tab">
<div class="panel-heading visible-xs collapsed" id="device_location">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
<i class="fw fw-map-location fw-2x"></i>
Device Location
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">Device Location</div>
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="device_location">
<div class="panel-body">
{{#if device.location}}
<div id="device-location"
data-lat="{{device.location.latitude}}"
data-long="{{device.location.longitude}}">
</div> </div>
<div class="panel panel-default visible-xs-block" role="tabpanel" {{else}}
id="device_location_tab"> <div id="map-error" class="message message-warning">
<div class="panel-heading visible-xs collapsed" id="device_location"> <h4 class="remove-margin">
<h4 class="panel-title"> <i class="icon fw fw-warning"></i>
<a role="button" data-toggle="collapse" data-parent="#tabs" Device location information is not available.
href="#collapseThree" aria-expanded="true" aria-controls="collapseThree"> </h4>
<i class="fw fw-map-location fw-2x"></i>
Device Location
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">Device Location</div>
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="device_location">
<div class="panel-body">
{{#if deviceView.location}}
<div id="device-location"
data-lat="{{deviceView.location.latitude}}"
data-long="{{deviceView.location.longitude}}">
</div>
{{else}}
<div id="map-error" class="message message-warning">
<h4 class="remove-margin">
<i class="icon fw fw-warning"></i>
Device location information is not available.
</h4>
</div>
<p class="add-padding-5x"></p>
<p class="add-padding-5x"></p>
<p class="add-padding-5x"></p>
{{/if}}
</div>
</div>
</div> </div>
<div class="panel panel-default visible-xs-block" role="tabpanel" <p class="add-padding-5x"></p>
id="installed_applications_tab"> <p class="add-padding-5x"></p>
<div class="panel-heading visible-xs collapsed" id="installed_applications"> <p class="add-padding-5x"></p>
<h4 class="panel-title"> {{/if}}
<a role="button" data-toggle="collapse" data-parent="#tabs" </div>
href="#collapseFour" aria-expanded="true" aria-controls="collapseFour"> </div>
<i class="fw fw-application fw-2x"></i> </div>
Installed Applications
<i class="caret-updown fw fw-down"></i> <div class="panel panel-default visible-xs-block" role="tabpanel"
</a> id="installed_applications_tab">
</h4> <div class="panel-heading visible-xs collapsed" id="installed_applications">
</div> <h4 class="panel-title">
<div class="panel-heading display-none-xs"> <a role="button" data-toggle="collapse" data-parent="#tabs"
Installed Applications href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
<i class="fw fw-application fw-2x"></i>
Installed Applications
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">
Installed Applications
<span> <span>
<a href="javascript:void(0);" id="refresh-apps"> <a href="javascript:void(0);" id="refresh-apps">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</span> </span>
</div> </div>
<div id="collapseFour" class="panel-collapse collapse in" role="tabpanel" <div id="collapseFour" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="installed_applications"> aria-labelledby="installed_applications">
<div class="panel-body"> <div class="panel-body">
<span class="visible-xs add-padding-2x text-right"> <span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-apps"> <a href="javascript:void(0);" id="refresh-apps">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</span> </span>
<div id="apps-spinner" class="wr-advance-operations-init hidden"> <div id="apps-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications <i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications
List... List...
</div> </div>
<div id="applications-list-container"> <div id="applications-list-container">
<div class="message message-info"> <div class="message message-info">
<h4> <h4>
<i class="icon fw fw-info"></i> <i class="icon fw fw-info"></i>
No applications found. No applications found.
</h4> </h4>
<p>Please try refreshing in a while.</p> <p>Please try refreshing in a while.</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab">
<div class="panel-heading visible-xs collapsed" id="event_log">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
<i class="fw fw-text fw-2x"></i>
Operations Log
<i class="caret-updown fw fw-down"></i>
</a>
</h4>
</div>
<div class="panel-heading display-none-xs">
Operations Log
<span>
<a href="javascript:void(0);" id="refresh-operations">
<i class="fw fw-refresh"></i>
</a>
</span>
</div>
<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="event_log">
<div class="panel-body">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-operations">
<i class="fw fw-refresh"></i>
</a>
</span>
<div id="operations-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log...
</div>
<div id="operations-log-container">
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
There are no operations, performed yet on this device.
</h4>
</div>
</div>
<table class="table table-striped table-hover table-bordered display data-table"
id="operations-log-table">
<thead>
<tr class="sort-row">
<th>Operation Code</th>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
{{/zone}}
{{/zone}}
</div>
</div> </div>
{{else}} {{else}}
<h1 class="page-sub-title"> <h1 class="page-sub-title">
@ -500,19 +421,13 @@
{{#if isAuthorized}} {{#if isAuthorized}}
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs" <script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
data-device-id="{{deviceView.deviceIdentifier}}" data-device-type="{{deviceView data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
.type}}"
type="text/x-handlebars-template"></script> type="text/x-handlebars-template"></script>
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs" <script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
data-device-id="{{deviceView.deviceIdentifier}}" data-device-type="{{deviceView data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
.type}}"
type="text/x-handlebars-template"></script> type="text/x-handlebars-template"></script>
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
data-device-id="{{deviceView.deviceIdentifier}}" data-device-type="{{deviceView
.type}}"
type="text/x-handlebars-template"></script>
{{js "js/device-detail.js"}} {{js "js/device-detail.js"}}
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
{{js "js/load-map.js"}} {{js "js/load-map.js"}}

@ -36,9 +36,6 @@ function onRequest(context) {
if (filteredDeviceData["type"]) { if (filteredDeviceData["type"]) {
viewModel["type"] = filteredDeviceData["type"]; viewModel["type"] = filteredDeviceData["type"];
viewModel.isNotWindows = true; viewModel.isNotWindows = true;
if (viewModel["deviceType"] == "windows") {
viewModel.isNotWindows = false;
}
} }
if (filteredDeviceData["deviceIdentifier"]) { if (filteredDeviceData["deviceIdentifier"]) {
viewModel["deviceIdentifier"] = filteredDeviceData["deviceIdentifier"]; viewModel["deviceIdentifier"] = filteredDeviceData["deviceIdentifier"];
@ -197,7 +194,7 @@ function onRequest(context) {
viewModel["deviceInfoAvailable"] = false; viewModel["deviceInfoAvailable"] = false;
} }
deviceViewData["deviceView"] = viewModel; deviceViewData["device"] = viewModel;
} else if (response["status"] == "unauthorized") { } else if (response["status"] == "unauthorized") {
deviceViewData["deviceFound"] = true; deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = false; deviceViewData["isAuthorized"] = false;
@ -207,5 +204,11 @@ function onRequest(context) {
} else { } else {
deviceViewData["deviceFound"] = false; deviceViewData["deviceFound"] = false;
} }
var autoCompleteParams = [
{"name" : "deviceId", "value" : deviceId}
];
deviceViewData["autoCompleteParams"] = autoCompleteParams;
return deviceViewData; return deviceViewData;
} }

@ -111,9 +111,6 @@ var InitiateViewOption = null;
$(document).ready(function() { $(document).ready(function() {
$(".device-detail-body").removeClass("hidden"); $(".device-detail-body").removeClass("hidden");
$("#loading-content").remove(); $("#loading-content").remove();
console.log("##### something went wrong here!" + deviceType)
loadOperationBar(deviceType);
loadOperationsLog(false);
loadApplicationsList(); loadApplicationsList();
loadPolicyCompliance(); loadPolicyCompliance();
@ -126,93 +123,8 @@ var InitiateViewOption = null;
$("#apps-spinner").removeClass("hidden"); $("#apps-spinner").removeClass("hidden");
loadApplicationsList(); loadApplicationsList();
}); });
$("#refresh-operations").click(function () {
$("#operations-spinner").removeClass("hidden");
loadOperationsLog(true);
});
}); });
function loadOperationsLog(update) {
var operationsLogTable = "#operations-log-table";
if (update) {
operationTable = $(operationsLogTable).DataTable();
operationTable.ajax.reload(false);
return;
}
operationTable = $(operationsLogTable).datatables_extended({
serverSide: true,
processing: false,
searching: false,
ordering: false,
pageLength : 10,
order: [],
ajax: {
url: "/emm/api/operation/paginate",
data: {deviceId : deviceIdentifier, deviceType: deviceType},
dataSrc: function (json) {
$("#operations-spinner").addClass("hidden");
$("#operations-log-container").empty();
return json.data;
}
},
columnDefs: [
{targets: 0, data: "code" },
{targets: 1, data: "status", render:
function (status) {
var html;
switch (status) {
case "COMPLETED" :
html = "<span><i class='fw fw-ok icon-success'></i> Completed</span>";
break;
case "PENDING" :
html = "<span><i class='fw fw-warning icon-warning'></i> Pending</span>";
break;
case "ERROR" :
html = "<span><i class='fw fw-error icon-danger'></i> Error</span>";
break;
case "IN_PROGRESS" :
html = "<span><i class='fw fw-ok icon-warning'></i> In Progress</span>";
break;
case "REPEATED" :
html = "<span><i class='fw fw-ok icon-warning'></i> Repeated</span>";
break;
}
return html;
}
},
{targets: 2, data: "createdTimeStamp", render:
function (date) {
var value = String(date);
return value.slice(0, 16);
}
}
],
"createdRow": function(row, data) {
$(row).attr("data-type", "selectable");
$(row).attr("data-id", data["id"]);
$.each($("td", row),
function(colIndex) {
switch(colIndex) {
case 1:
$(this).attr("data-grid-label", "Code");
$(this).attr("data-display", data["code"]);
break;
case 2:
$(this).attr("data-grid-label", "Status");
$(this).attr("data-display", data["status"]);
break;
case 3:
$(this).attr("data-grid-label", "Created Timestamp");
$(this).attr("data-display", data["createdTimeStamp"]);
break;
}
}
);
}
});
}
function loadApplicationsList() { function loadApplicationsList() {
var applicationsList = $("#applications-list"); var applicationsList = $("#applications-list");
var applicationListingTemplate = applicationsList.attr("src"); var applicationListingTemplate = applicationsList.attr("src");

@ -1,24 +0,0 @@
<table class="table table-striped table-hover table-bordered display data-table" id="operations-log-table">
<thead>
<tr class="sort-row">
<th>Operation Code</th>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
{{#each operations}}
<tr data-type="selectable" data-id="{{id}}">
<td data-display="{{code}}" data-grid-label="Code">{{code}}</td>
<td data-display="{{status}}" data-grid-label="Status">
{{#equal status "COMPLETED"}}<span><i class="fw fw-ok icon-success"></i> Completed</span>{{/equal}}
{{#equal status "PENDING"}}<span><i class="fw fw-warning icon-warning"></i> Pending</span>{{/equal}}
{{#equal status "ERROR"}}<span><i class="fw fw-error icon-danger"></i> Error</span>{{/equal}}
{{#equal status "IN_PROGRESS"}}<span><i class="fw fw-ok icon-warning"></i> In Progress</span>{{/equal}}
</td>
<td data-display="{{createdTimeStamp}}" data-grid-label="Created Timestamp">{{createdTimeStamp}}</td>
</tr>
{{/each}}
<br class="c-both" />
</tbody>
</table>

@ -45,7 +45,8 @@
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
<span class="list-group-item-actions"> <span class="list-group-item-actions">
<a href="/emm/policies/view?id={{policy.id}}" class="cu-btn-inner policy-view-link" data-id="{{id}}"> <a href="/devicemgt/policies/view?id={{policy.id}}" class="cu-btn-inner
policy-view-link" data-id="{{id}}">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i> <i class="fw fw-view fw-stack-1x"></i>

@ -0,0 +1,32 @@
{{!
Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
WSO2 Inc. licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file except
in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
}}
{{unit "cdmf.unit.device.type.android.date-range-picker"}}
{{#zone "content"}}
<div id="operations-mod" data-permissions="{{permissions}}" data-device-type="{{deviceType}}" data-ownership="{{ownership}}">
{{unit "cdmf.unit.device.type.android.operation-mod"}}
</div>
{{/zone}}
{{#zone "bottomJs"}}
<!--suppress HtmlUnknownTarget -->
<script id="operations-bar" src="{{@unit.publicUri}}/templates/operations.hbs"
type="text/x-handlebars-template"></script>
{{js "js/operation-bar.js"}}
{{/zone}}

@ -0,0 +1,106 @@
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function onRequest(context) {
var log = new Log("cdmf.unit.device.type.android.operation-bar");
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var viewModel = {};
var permissions = {};
// adding android operations related permission checks
permissions["android"] = [];
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/ring")) {
permissions["android"].push("DEVICE_RING");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/lock")) {
permissions["android"].push("DEVICE_LOCK");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/unlock")) {
permissions["android"].push("DEVICE_UNLOCK");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/location")) {
permissions["android"].push("DEVICE_LOCATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/clear-password")) {
permissions["android"].push("CLEAR_PASSWORD");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/reboot")) {
permissions["android"].push("DEVICE_REBOOT");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/upgrade-firmware")) {
permissions["android"].push("UPGRADE_FIRMWARE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/mute")) {
permissions["android"].push("DEVICE_MUTE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/send-notification")) {
permissions["android"].push("NOTIFICATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/change-lock-code")) {
permissions["android"].push("CHANGE_LOCK_CODE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/enterprise-wipe")) {
permissions["android"].push("ENTERPRISE_WIPE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/wipe")) {
permissions["android"].push("WIPE_DATA");
}
// adding ios operations related permission checks
permissions["ios"] = [];
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/lock")) {
permissions["ios"].push("DEVICE_LOCK");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/location")) {
permissions["ios"].push("LOCATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/enterprise-wipe")) {
permissions["ios"].push("ENTERPRISE_WIPE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/notification")) {
permissions["ios"].push("NOTIFICATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/ring")) {
permissions["ios"].push("RING");
}
// adding windows operations related permission checks
permissions["windows"] = [];
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock")) {
permissions["windows"].push("DEVICE_LOCK");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/disenroll/windows")) {
permissions["windows"].push("DISENROLL");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/wipe")) {
permissions["windows"].push("WIPE_DATA");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/ring")) {
permissions["windows"].push("DEVICE_RING");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock-reset")) {
permissions["windows"].push("LOCK_RESET");
}
viewModel["permissions"] = stringify(permissions);
viewModel["deviceType"] = context.unit.params.deviceType;
viewModel["ownership"] = context.unit.params.ownership;
return viewModel;
}

@ -0,0 +1,248 @@
/*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Setting-up global variables.
*/
var operations = '.wr-operations',
modalPopup = '.modal',
modalPopupContent = modalPopup + ' .modal-content',
navHeight = $('#nav').height(),
headerHeight = $('header').height(),
offset = (headerHeight + navHeight),
deviceSelection = '.device-select',
platformTypeConstants = {
"ANDROID": "android",
"IOS": "ios",
"WINDOWS": "windows"
},
ownershipTypeConstants = {
"BYOD": "BYOD",
"COPE": "COPE"
},
operationBarModeConstants = {
"BULK": "BULK_OPERATION_MODE",
"SINGLE": "SINGLE_OPERATION_MODE"
};
/*
* Function to get selected devices ID's
*/
function getSelectedDeviceIds() {
var deviceIdentifierList = [];
$(deviceSelection).each(function (index) {
var device = $(this);
var deviceId = device.data('deviceid');
var deviceType = device.data('type');
deviceIdentifierList.push({
"id": deviceId,
"type": deviceType
});
});
if (deviceIdentifierList.length == 0) {
var thisTable = $(".DTTT_selected").closest('.dataTables_wrapper').find('.dataTable').dataTable();
thisTable.api().rows().every(function () {
if ($(this.node()).hasClass('DTTT_selected')) {
var deviceId = $(thisTable.api().row(this).node()).data('deviceid');
var deviceType = $(thisTable.api().row(this).node()).data('devicetype');
deviceIdentifierList.push({
"id": deviceId,
"type": deviceType
});
}
});
}
return deviceIdentifierList;
}
/*
* On operation click function.
* @param selection: Selected operation
*/
function operationSelect(selection) {
var deviceIdList = getSelectedDeviceIds();
if (deviceIdList == 0) {
$(modalPopupContent).html($("#errorOperations").html());
} else {
$(modalPopupContent).addClass("operation-data");
$(modalPopupContent).html($(operations + " .operation[data-operation-code=" + selection + "]").html());
$(modalPopupContent).data("operation-code", selection);
}
showPopup();
}
function getDevicesByTypes(deviceList) {
var deviceTypes = {};
$.each(deviceList, function (index, item) {
if (!deviceTypes[item.type]) {
deviceTypes[item.type] = [];
}
if (item.type == platformTypeConstants.ANDROID ||
item.type == platformTypeConstants.IOS || item.type == platformTypeConstants.WINDOWS) {
deviceTypes[item.type].push(item.id);
}
});
return deviceTypes;
}
//function unloadOperationBar() {
// $("#showOperationsBtn").addClass("hidden");
// $(".wr-operations").html("");
//}
function loadOperationBar(deviceType, ownership, mode) {
var operationBar = $("#operations-bar");
var operationBarSrc = operationBar.attr("src");
$.template("operations-bar", operationBarSrc, function (template) {
var serviceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/*/features";
invokerUtil.get(
serviceURL,
// success callback
function (data) {
var permittedOperations = [];
var i;
var permissionList = $("#operations-mod").data("permissions");
var totalFeatures = JSON.parse(data);
for (i = 0; i < permissionList[deviceType].length; i++) {
var j;
for (j = 0; j < totalFeatures.length; j++) {
if (permissionList[deviceType][i] == totalFeatures[j]["code"]) {
if (deviceType == platformTypeConstants.ANDROID) {
if (totalFeatures[j]["code"] == "DEVICE_UNLOCK") {
if (ownership == ownershipTypeConstants.COPE) {
permittedOperations.push(totalFeatures[j]);
}
} else if (totalFeatures[j]["code"] == "WIPE_DATA") {
if (mode == operationBarModeConstants.BULK) {
if (ownership == ownershipTypeConstants.COPE) {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
}
}
}
var viewModel = {};
permittedOperations = permittedOperations.filter(function (current) {
var iconName;
switch (deviceType) {
case platformTypeConstants.ANDROID:
iconName = operationModule.getAndroidIconForFeature(current.code);
break;
case platformTypeConstants.WINDOWS:
iconName = operationModule.getWindowsIconForFeature(current.code);
break;
case platformTypeConstants.IOS:
iconName = operationModule.getIOSIconForFeature(current.code);
break;
}
/* adding ownership in addition to device-type
as it's vital in cases where UI for the same feature should change
according to ownership
*/
if (ownership) {
current.ownership = ownership;
}
if (iconName) {
current.icon = iconName;
}
return current;
});
viewModel.features = permittedOperations;
var content = template(viewModel);
$(".wr-operations").html(content);
},
// error callback
function (message) {
$(".wr-operations").html(message);
});
});
}
function runOperation(operationName) {
var deviceIdList = getSelectedDeviceIds();
var list = getDevicesByTypes(deviceIdList);
var successCallback = function (data) {
if (operationName == "NOTIFICATION") {
$(modalPopupContent).html($("#messageSuccess").html());
} else {
$(modalPopupContent).html($("#operationSuccess").html());
}
showPopup();
};
var errorCallback = function (data) {
$(modalPopupContent).html($("#errorOperationUnexpected").html());
showPopup();
};
var payload, serviceEndPoint;
if (list[platformTypeConstants.IOS]) {
payload =
operationModule.generatePayload(platformTypeConstants.IOS, operationName, list[platformTypeConstants.IOS]);
serviceEndPoint = operationModule.getIOSServiceEndpoint(operationName);
} else if (list[platformTypeConstants.ANDROID]) {
payload = operationModule
.generatePayload(platformTypeConstants.ANDROID, operationName, list[platformTypeConstants.ANDROID]);
serviceEndPoint = operationModule.getAndroidServiceEndpoint(operationName);
} else if (list[platformTypeConstants.WINDOWS]) {
payload = operationModule.generatePayload(platformTypeConstants.WINDOWS, operationName,
list[platformTypeConstants.WINDOWS]);
serviceEndPoint = operationModule.getWindowsServiceEndpoint(operationName);
}
if (operationName == "NOTIFICATION") {
var errorMsgWrapper = "#notification-error-msg";
var errorMsg = "#notification-error-msg span";
var messageTitle = $("#messageTitle").val();
var messageText = $("#messageText").val();
if (!(messageTitle && messageText)) {
$(errorMsg).text("Enter a message. It cannot be empty.");
$(errorMsgWrapper).removeClass("hidden");
} else {
invokerUtil.post(serviceEndPoint, payload, successCallback, errorCallback);
$(modalPopupContent).removeData();
hidePopup();
}
} else {
invokerUtil.post(serviceEndPoint, payload, successCallback, errorCallback);
$(modalPopupContent).removeData();
hidePopup();
}
}
/*
* DOM ready functions.
*/
$(document).ready(function () {
$(operations).show();
});

@ -15,18 +15,113 @@
specific language governing permissions and limitations specific language governing permissions and limitations
under the License. under the License.
}} }}
{{#if control_operations}}
<div class="wr-operations" style="height: 87px; display: block;">
<style>
::-webkit-input-placeholder {
color: #B8B8B8;
}
{{unit "cdmf.unit.device.type.android.date-range-picker"}} ::-moz-placeholder {
color: #B8B8B8;
}
{{#zone "content"}} :-ms-input-placeholder {
<div id="operations-mod" data-permissions="{{permissions}}" data-device-type="{{deviceType}}" data-ownership="{{ownership}}"> color: #B8B8B8;
{{unit "cdmf.unit.device.type.android.operation-mod"}} }
input:-moz-placeholder {
color: #B8B8B8;
}
</style>
{{#each control_operations}}
<a href="javascript:operationSelect('{{operation}}')">
{{#if iconFont}}
<i class="fw {{iconFont}}"></i>
{{else}}
{{#if icon}}
<img src="{{@app.context}}/{{icon}}" style="width: 48px;"/>
{{else}}
<i class="fw fw-service"></i>
{{/if}}
{{/if}}
<span>{{name}}</span>
</a>
<div class="operation" data-operation-code="{{operation}}">
<div class="content">
<div class="row">
<div class="col-lg-5 col-md-6 col-centered">
<h3>
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-service fw-stack-1x"></i>
</span>
{{name}}
<br>
</h3>
<h4>
{{description}}
<br>
</h4>
<form action="{{params.0.uri}}" method="{{params.0.method}}"
style="padding-bottom: 20px;"
data-payload="{{payload}}" id="form-{{operation}}"
data-device-id="{{../device.deviceIdentifier}}">
{{#each params.0.pathParams}}
<input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="path" value="{{value}}" />
<br />
{{/each}}
{{#each params.0.formParams}}
<input type="{{type}}" id="{{name}}" name="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="form" value="{{value}}" />
<br />
{{/each}}
{{#each params.0.queryParams}}
<input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="query" value="{{value}}" />
<br />
{{/each}}
<button id="btnSend" type="button" onclick="submitForm('form-{{operation}}')" class="btn btn-default">&nbsp;&nbsp;&nbsp;&nbsp;Send
to Device&nbsp;&nbsp;&nbsp;&nbsp;</button>
<label id="lblSending" class="wr-input-label hidden"><i
class="fw fw-lifecycle fw-spin fw-2x"></i> Sending..</label>
<label id="lblSent" class="wr-input-label hidden"><i
class="fw fw-check fw-2x"></i> Sent</label>
</form>
</div>
</div>
</div>
</div>
{{/each}}
</div> </div>
{{/zone}} {{else}}
<div align="center">
<h4 style="color: #D8000C"><i class="icon fw fw-error" style="color: #D8000C"></i>
Operations Loading Failed!</h4>
</div>
{{/if}}
<div id="operation-response-template" style="display: none">
<div class="content">
<div class="row">
<div class="col-lg-5 col-md-6 col-centered">
<h3>
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
</span>
<br>
</h3>
<h4>
<span id="title"></span>
<br>
</h4>
<span id="description"></span>
</div>
</div>
</div>
</div>
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
<!--suppress HtmlUnknownTarget -->
<script id="operations-bar" src="{{@unit.publicUri}}/templates/operations.hbs"
type="text/x-handlebars-template"></script>
{{js "js/operation-bar.js"}} {{js "js/operation-bar.js"}}
{{/zone}} {{/zone}}

@ -17,90 +17,51 @@
*/ */
function onRequest(context) { function onRequest(context) {
var log = new Log("cdmf.unit.device.type.android.operation-bar"); var log = new Log("operation.js");
var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var operationModule = require("/app/modules/business-controllers/operation.js")["operationModule"];
var viewModel = {}; var device = context.unit.params.device;
var permissions = {}; var autoCompleteParams = context.unit.params.autoCompleteParams;
var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads;
var controlOperations = operationModule.getControlOperations(device.type);
var queryParams = [];
var formParams = [];
var pathParams = [];
for (var i = 0; i < controlOperations.length; i++) {
var currentParamList = controlOperations[i]["params"];
for (var j = 0; j < currentParamList.length; j++) {
var currentParam = currentParamList[j];
currentParamList[j]["formParams"] = processParams(currentParam["formParams"], autoCompleteParams);
currentParamList[j]["queryParams"] = processParams(currentParam["queryParams"], autoCompleteParams);
currentParamList[j]["pathParams"] = processParams(currentParam["pathParams"], autoCompleteParams);
}
controlOperations[i]["params"] = currentParamList;
if (encodedFeaturePayloads) {
controlOperations[i]["payload"] = getPayload(encodedFeaturePayloads, controlOperations[i]["operation"]);
}
}
return {"control_operations": controlOperations, "device": device};
}
// adding android operations related permission checks function processParams(paramsList, autoCompleteParams) {
permissions["android"] = []; var log = new Log();
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/ring")) { log.info("-- Params : "+paramsList.length);
permissions["android"].push("DEVICE_RING"); log.info("-- Auto Params : "+autoCompleteParams);
} for (var i = 0; i < paramsList.length; i++) {
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/lock")) { var paramName = paramsList[i];
permissions["android"].push("DEVICE_LOCK"); var paramValue = "";
} var paramType = "text";
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/unlock")) { for (var k = 0; k < autoCompleteParams.length; k++) {
permissions["android"].push("DEVICE_UNLOCK"); if (paramName == autoCompleteParams[k].name) {
} paramValue = autoCompleteParams[k].value;
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/location")) { paramType = "hidden";
permissions["android"].push("DEVICE_LOCATION"); }
} }
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/clear-password")) { paramsList[i] = {"name": paramName, "value": paramValue, "type": paramType};
permissions["android"].push("CLEAR_PASSWORD"); }
} return paramsList;
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/reboot")) { }
permissions["android"].push("DEVICE_REBOOT");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/upgrade-firmware")) {
permissions["android"].push("UPGRADE_FIRMWARE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/mute")) {
permissions["android"].push("DEVICE_MUTE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/send-notification")) {
permissions["android"].push("NOTIFICATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/change-lock-code")) {
permissions["android"].push("CHANGE_LOCK_CODE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/enterprise-wipe")) {
permissions["android"].push("ENTERPRISE_WIPE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/android/wipe")) {
permissions["android"].push("WIPE_DATA");
}
// adding ios operations related permission checks
permissions["ios"] = [];
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/lock")) {
permissions["ios"].push("DEVICE_LOCK");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/location")) {
permissions["ios"].push("LOCATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/enterprise-wipe")) {
permissions["ios"].push("ENTERPRISE_WIPE");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/notification")) {
permissions["ios"].push("NOTIFICATION");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/ring")) {
permissions["ios"].push("RING");
}
// adding windows operations related permission checks
permissions["windows"] = [];
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock")) {
permissions["windows"].push("DEVICE_LOCK");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/disenroll/windows")) {
permissions["windows"].push("DISENROLL");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/wipe")) {
permissions["windows"].push("WIPE_DATA");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/ring")) {
permissions["windows"].push("DEVICE_RING");
}
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock-reset")) {
permissions["windows"].push("LOCK_RESET");
}
viewModel["permissions"] = stringify(permissions);
viewModel["deviceType"] = context.unit.params.deviceType;
viewModel["ownership"] = context.unit.params.ownership;
return viewModel; function getPayload(featuresPayload, featureCode){
var featuresJSONPayloads = JSON.parse(featuresPayload);
return featuresJSONPayloads[featureCode];
} }

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,233 +16,131 @@
* under the License. * under the License.
*/ */
/*
* Setting-up global variables.
*/
var operations = '.wr-operations',
modalPopup = '.modal',
modalPopupContent = modalPopup + ' .modal-content',
navHeight = $('#nav').height(),
headerHeight = $('header').height(),
offset = (headerHeight + navHeight),
deviceSelection = '.device-select',
platformTypeConstants = {
"ANDROID": "android",
"IOS": "ios",
"WINDOWS": "windows"
},
ownershipTypeConstants = {
"BYOD": "BYOD",
"COPE": "COPE"
},
operationBarModeConstants = {
"BULK": "BULK_OPERATION_MODE",
"SINGLE": "SINGLE_OPERATION_MODE"
};
/*
* Function to get selected devices ID's
*/
function getSelectedDeviceIds() {
var deviceIdentifierList = [];
$(deviceSelection).each(function (index) {
var device = $(this);
var deviceId = device.data('deviceid');
var deviceType = device.data('type');
deviceIdentifierList.push({
"id": deviceId,
"type": deviceType
});
});
if (deviceIdentifierList.length == 0) {
var thisTable = $(".DTTT_selected").closest('.dataTables_wrapper').find('.dataTable').dataTable();
thisTable.api().rows().every(function () {
if ($(this.node()).hasClass('DTTT_selected')) {
var deviceId = $(thisTable.api().row(this).node()).data('deviceid');
var deviceType = $(thisTable.api().row(this).node()).data('devicetype');
deviceIdentifierList.push({
"id": deviceId,
"type": deviceType
});
}
});
}
return deviceIdentifierList;
}
/* /*
* On operation click function. * On operation click function.
* @param selection: Selected operation * @param selection: Selected operation
*/ */
function operationSelect(selection) { function operationSelect(selection) {
var deviceIdList = getSelectedDeviceIds(); $(modalPopupContent).addClass("operation-data");
if (deviceIdList == 0) { $(modalPopupContent).html($(" .operation[data-operation-code=" + selection + "]").html());
$(modalPopupContent).html($("#errorOperations").html()); $(modalPopupContent).data("operation-code", selection);
} else {
$(modalPopupContent).addClass("operation-data");
$(modalPopupContent).html($(operations + " .operation[data-operation-code=" + selection + "]").html());
$(modalPopupContent).data("operation-code", selection);
}
showPopup(); showPopup();
} }
function getDevicesByTypes(deviceList) { function submitForm(formId) {
var deviceTypes = {}; var form = $("#" + formId);
$.each(deviceList, function (index, item) { var uri = form.attr("action");
if (!deviceTypes[item.type]) { var deviceId = form.data("device-id");
deviceTypes[item.type] = []; var uriencodedQueryStr = "";
} var uriencodedFormStr = "";
if (item.type == platformTypeConstants.ANDROID || var payload = {};
item.type == platformTypeConstants.IOS || item.type == platformTypeConstants.WINDOWS) { form.find("input").each(function () {
deviceTypes[item.type].push(item.id); var input = $(this);
if (input.data("param-type") == "path") {
uri = uri.replace("{" + input.attr("id") + "}", input.val());
} else if (input.data("param-type") == "query") {
var prefix = (uriencodedQueryStr == "") ? "?" : "&";
uriencodedQueryStr += prefix + input.attr("id") + "=" + input.val();
} else if (input.data("param-type") == "form") {
var prefix = (uriencodedFormStr == "") ? "" : "&";
uriencodedFormStr += prefix + input.attr("id") + "=" + input.val();
//payload[input.attr("id")] = input.val();
} }
}); });
return deviceTypes; uri += uriencodedQueryStr;
} var httpMethod = form.attr("method").toUpperCase();
var contentType = form.attr("enctype");
//function unloadOperationBar() { console.log("URL "+uri);
// $("#showOperationsBtn").addClass("hidden"); console.log("Method "+httpMethod);
// $(".wr-operations").html(""); console.log("Content Type "+contentType);
//} var featurePayload = form.attr("data-payload");
if (featurePayload) {
function loadOperationBar(deviceType, ownership, mode) { contentType = "application/json";
var operationBar = $("#operations-bar"); payload = JSON.parse(atob(featurePayload));
var operationBarSrc = operationBar.attr("src");
} else if (contentType == undefined || contentType.isEmpty()) {
$.template("operations-bar", operationBarSrc, function (template) { contentType = "application/x-www-form-urlencoded";
var serviceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/*/features"; payload = uriencodedFormStr;
invokerUtil.get( }
serviceURL,
// success callback //setting responses callbacks
function (data) { var defaultStatusClasses = "fw fw-stack-1x";
var permittedOperations = []; var content = $("#operation-response-template").find(".content");
var i; var title = content.find("#title");
var permissionList = $("#operations-mod").data("permissions"); var statusIcon = content.find("#status-icon");
var totalFeatures = JSON.parse(data); var description = content.find("#description");
for (i = 0; i < permissionList[deviceType].length; i++) { description.html("");
var j; var successCallBack = function (response) {
for (j = 0; j < totalFeatures.length; j++) { var res = response;
if (permissionList[deviceType][i] == totalFeatures[j]["code"]) { try {
if (deviceType == platformTypeConstants.ANDROID) { res = JSON.parse(response).messageFromServer;
if (totalFeatures[j]["code"] == "DEVICE_UNLOCK") { } catch (err) {
if (ownership == ownershipTypeConstants.COPE) { //do nothing
permittedOperations.push(totalFeatures[j]);
}
} else if (totalFeatures[j]["code"] == "WIPE_DATA") {
if (mode == operationBarModeConstants.BULK) {
if (ownership == ownershipTypeConstants.COPE) {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
} else {
permittedOperations.push(totalFeatures[j]);
}
}
}
}
var viewModel = {};
permittedOperations = permittedOperations.filter(function (current) {
var iconName;
switch (deviceType) {
case platformTypeConstants.ANDROID:
iconName = operationModule.getAndroidIconForFeature(current.code);
break;
case platformTypeConstants.WINDOWS:
iconName = operationModule.getWindowsIconForFeature(current.code);
break;
case platformTypeConstants.IOS:
iconName = operationModule.getIOSIconForFeature(current.code);
break;
}
/* adding ownership in addition to device-type
as it's vital in cases where UI for the same feature should change
according to ownership
*/
if (ownership) {
current.ownership = ownership;
}
if (iconName) {
current.icon = iconName;
}
return current;
});
viewModel.features = permittedOperations;
var content = template(viewModel);
$(".wr-operations").html(content);
},
// error callback
function (message) {
$(".wr-operations").html(message);
});
});
}
function runOperation(operationName) {
var deviceIdList = getSelectedDeviceIds();
var list = getDevicesByTypes(deviceIdList);
var successCallback = function (data) {
if (operationName == "NOTIFICATION") {
$(modalPopupContent).html($("#messageSuccess").html());
} else {
$(modalPopupContent).html($("#operationSuccess").html());
} }
showPopup(); title.html("Operation Triggered!");
}; statusIcon.attr("class", defaultStatusClasses + " fw-check");
var errorCallback = function (data) { description.html(res);
$(modalPopupContent).html($("#errorOperationUnexpected").html()); console.log("success!");
showPopup(); $(modalPopupContent).html(content.html());
}; };
var errorCallBack = function (response) {
var payload, serviceEndPoint; console.log(response);
if (list[platformTypeConstants.IOS]) { title.html("An Error Occurred!");
payload = statusIcon.attr("class", defaultStatusClasses + " fw-error");
operationModule.generatePayload(platformTypeConstants.IOS, operationName, list[platformTypeConstants.IOS]); var reason = (response.responseText == "null")?response.statusText:response.responseText;
serviceEndPoint = operationModule.getIOSServiceEndpoint(operationName); try {
} else if (list[platformTypeConstants.ANDROID]) { reason = JSON.parse(reason).message;
payload = operationModule } catch (err) {
.generatePayload(platformTypeConstants.ANDROID, operationName, list[platformTypeConstants.ANDROID]); //do nothing
serviceEndPoint = operationModule.getAndroidServiceEndpoint(operationName);
} else if (list[platformTypeConstants.WINDOWS]) {
payload = operationModule.generatePayload(platformTypeConstants.WINDOWS, operationName,
list[platformTypeConstants.WINDOWS]);
serviceEndPoint = operationModule.getWindowsServiceEndpoint(operationName);
}
if (operationName == "NOTIFICATION") {
var errorMsgWrapper = "#notification-error-msg";
var errorMsg = "#notification-error-msg span";
var messageTitle = $("#messageTitle").val();
var messageText = $("#messageText").val();
if (!(messageTitle && messageText)) {
$(errorMsg).text("Enter a message. It cannot be empty.");
$(errorMsgWrapper).removeClass("hidden");
} else {
invokerUtil.post(serviceEndPoint, payload, successCallback, errorCallback);
$(modalPopupContent).removeData();
hidePopup();
} }
description.html(reason);
console.log("Error!");
$(modalPopupContent).html(content.html());
};
//executing http request
if (httpMethod == "GET") {
invokerUtil.get(uri, successCallBack, errorCallBack, contentType);
} else if (httpMethod == "POST") {
console.log("------ cType "+contentType);
var payloadTest = [deviceId];
invokerUtil.post(uri, payloadTest, successCallBack, errorCallBack, "application/json");
} else if (httpMethod == "PUT") {
invokerUtil.put(uri, payload, successCallBack, errorCallBack, contentType);
} else if (httpMethod == "DELETE") {
invokerUtil.delete(uri, successCallBack, errorCallBack, contentType);
} else { } else {
invokerUtil.post(serviceEndPoint, payload, successCallback, errorCallback); title.html("An Error Occurred!");
$(modalPopupContent).removeData(); statusIcon.attr("class", defaultStatusClasses + " fw-error");
hidePopup(); description.html("This operation requires http method: " + httpMethod + " which is not supported yet!");
$(modalPopupContent).html(content.html());
} }
} }
/* $(document).on('submit', 'form', function (e) {
* DOM ready functions. cosole.log("darn!!");
*/ e.preventDefault();
$(document).ready(function () { var postOperationRequest = $.ajax({
$(operations).show(); url: $(this).attr("action") + '&' + $(this).serialize(),
}); method: "post"
});
var btnSubmit = $('#btnSend', this);
btnSubmit.addClass('hidden');
var lblSending = $('#lblSending', this);
lblSending.removeClass('hidden');
var lblSent = $('#lblSent', this);
postOperationRequest.done(function (data) {
lblSending.addClass('hidden');
lblSent.removeClass('hidden');
setTimeout(function () {
hidePopup();
}, 3000);
});
postOperationRequest.fail(function (jqXHR, textStatus) {
lblSending.addClass('hidden');
lblSent.addClass('hidden');
});
});

@ -3,6 +3,43 @@
"label": "Android", "label": "Android",
"category": "mobile", "category": "mobile",
"analyticsEnabled": "false", "analyticsEnabled": "false",
"groupingEnabled": "false" "groupingEnabled": "false",
"features": {
"DEVICE_RING": {
"icon" : "fw-dial-up"
},
"DEVICE_LOCK": {
"icon" : "fw-lock"
},
"DEVICE_LOCATION": {
"icon" : "fw-map-location"
},
"CLEAR_PASSWORD": {
"icon" : "fw-clear"
},
"DEVICE_REBOOT": {
"icon" : "fw-refresh"
},
"UPGRADE_FIRMWARE": {
"icon" : "fw-hardware"
},
"DEVICE_MUTE": {
"icon" : "fw-mute"
},
"NOTIFICATION": {
"icon" : "fw-message"
},
"CHANGE_LOCK_CODE": {
"icon" : "fw-security"
},
"ENTERPRISE_WIPE": {
"icon" : "fw-block"
},
"WIPE_DATA": {
"icon" : "fw-delete"
}
}
} }
} }

@ -58,347 +58,274 @@
</DataSource> </DataSource>
<Features> <Features>
<Feature code="DEVICE_RING">
<Name>Ring</Name>
<Description>Ring the device</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/ring" method="POST">
</Operation>
</Feature>
<Feature code="DEVICE_LOCK"> <Feature code="DEVICE_LOCK">
<Name>Device Lock</Name> <Name>Device Lock</Name>
<Description>Lock the device</Description> <Description>Lock the device</Description>
<Operation context="android/lock_devices" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/lock-devices" method="POST" conent-type="application/json">
<FormParameters>
<Parameter id="message" optional="true" type="text">Message to be sent to the device</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_LOCATION"> <Feature code="DEVICE_LOCATION">
<Name>Location</Name> <Name>Location</Name>
<Description>Request coordinates of device location</Description> <Description>Request coordinates of device location</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/location" method="POST" conent-type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="WIFI"> <Feature code="CLEAR_PASSWORD">
<Name>Wifi</Name> <Name>Clear Password</Name>
<Description>Setting up wifi configuration</Description> <Description>Clear current password</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/clear-password" method="POST" conent-type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="CAMERA"> <Feature code="DEVICE_REBOOT">
<Name>Camera</Name> <Name>Reboot</Name>
<Description>Enable or disable camera</Description> <Description>Reboot the device</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/reboot" method="POST" conent-type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="EMAIL"> <Feature code="UPGRADE_FIRMWARE">
<Name>Email</Name> <Name>Upgrade Firmware</Name>
<Description>Configure email settings</Description> <Description>Upgrade Firmware</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/upgrade-firmware" method="POST" conent-type="application/json">
<FormParameters>
<Parameter id="immediate" optional="true" type="check" helper-text="Once enabled, device firmware upgrade process will start instantly.">Instant Upgrade</Parameter>
<Parameter id="schedule" optional="false" type="text">Enter the date and time to schedule firmware upgrade.</Parameter>
<Parameter id="server" optional="true" type="text">Enter firmware upgrade server URL (ie. http://abc.com or http://abc.com/ota) (Optional).</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_MUTE"> <Feature code="DEVICE_MUTE">
<Name>Mute</Name> <Name>Mute</Name>
<Description>Enable mute in the device</Description> <Description>Enable mute in the device</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/mute" method="POST" conent-type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_INFO"> <Feature code="NOTIFICATION">
<Name>Device info</Name> <Name>Message</Name>
<Description>Request device information</Description> <Description>Send message</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/send-notification" method="POST" conent-type="application/json">
<FormParameters>
<Parameter id="messageText" optional="false" type="text">Title Here...</Parameter>
<Parameter id="messageTitle" optional="false" type="text-area">Message Here...</Parameter>
</FormParameters>
</Operation>
</Feature>
<Feature code="CHANGE_LOCK_CODE">
<Name>Change Lock-code</Name>
<Description>Change current lock code</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/change-lock-code" method="POST" conent-type="application/json">
<FormParameters>
<Parameter id="lockCode" optional="false" type="text">Lock Code</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="ENTERPRISE_WIPE"> <Feature code="ENTERPRISE_WIPE">
<Name>Enterprise Wipe</Name> <Name>Enterprise Wipe</Name>
<Description>Remove enterprise applications</Description> <Description>Remove enterprise applications</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/enterprise-wipe" method="POST" conent-type="application/json">
</Operation>
</Feature>
<Feature code="CLEAR_PASSWORD">
<Name>Clear Password</Name>
<Description>Clear current password</Description>
<Operation context="" method="POST">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="WIPE_DATA"> <Feature code="WIPE_DATA">
<Name>Wipe Data</Name> <Name>Wipe Data</Name>
<Description>Factory reset the device</Description> <Description>Factory reset the device</Description>
<Operation context="" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/wipe" method="POST" conent-type="application/json">
<FormParameters>
<!-- Needs to be converted to a unit -->
<Parameter id="pin" optional="false" type="text">Enter PIN code* of the device.</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="WIFI">
<Name>Wifi</Name>
<Description>Setting up wifi configuration</Description>
</Feature>
<Feature code="CAMERA">
<Name>Camera</Name>
<Description>Enable or disable camera</Description>
</Feature>
<Feature code="EMAIL">
<Name>Email</Name>
<Description>Configure email settings</Description>
</Feature>
<Feature code="DEVICE_INFO">
<Name>Device info</Name>
<Description>Request device information</Description>
</Feature>
<Feature code="APPLICATION_LIST"> <Feature code="APPLICATION_LIST">
<Name>Application List</Name> <Name>Application List</Name>
<Description>Request list of current installed applications</Description> <Description>Request list of current installed applications</Description>
<Operation context="" method="POST">
</Operation>
</Feature>
<Feature code="CHANGE_LOCK_CODE">
<Name>Change Lock-code</Name>
<Description>Change current lock code</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="INSTALL_APPLICATION"> <Feature code="INSTALL_APPLICATION">
<Name>Install App</Name> <Name>Install App</Name>
<Description>Install App</Description> <Description>Install App</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="UNINSTALL_APPLICATION"> <Feature code="UNINSTALL_APPLICATION">
<Name>Uninstall App</Name> <Name>Uninstall App</Name>
<Description>Uninstall App</Description> <Description>Uninstall App</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="BLACKLIST_APPLICATIONS"> <Feature code="BLACKLIST_APPLICATIONS">
<Name>Blacklist app</Name> <Name>Blacklist app</Name>
<Description>Blacklist applications</Description> <Description>Blacklist applications</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="ENCRYPT_STORAGE"> <Feature code="ENCRYPT_STORAGE">
<Name>Encrypt Storage</Name> <Name>Encrypt Storage</Name>
<Description>Encrypt storage</Description> <Description>Encrypt storage</Description>
<Operation context="" method="POST">
</Operation>
</Feature>
<Feature code="DEVICE_RING">
<Name>Ring</Name>
<Description>Ring the device</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="PASSCODE_POLICY"> <Feature code="PASSCODE_POLICY">
<Name>Password Policy</Name> <Name>Password Policy</Name>
<Description>Set passcode policy</Description> <Description>Set passcode policy</Description>
<Operation context="" method="POST">
</Operation>
</Feature>
<Feature code="NOTIFICATION">
<Name>Message</Name>
<Description>Send message</Description>
<Operation context="" method="POST">
</Operation>
</Feature>
<Feature code="DEVICE_REBOOT">
<Name>Reboot</Name>
<Description>Reboot the device</Description>
<Operation context="" method="POST">
</Operation>
</Feature>
<Feature code="UPGRADE_FIRMWARE">
<Name>Upgrade Firmware</Name>
<Description>Upgrade Firmware</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="VPN"> <Feature code="VPN">
<Name>Configure VPN</Name> <Name>Configure VPN</Name>
<Description>Configure VPN settings</Description> <Description>Configure VPN settings</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_ADJUST_VOLUME"> <Feature code="DISALLOW_ADJUST_VOLUME">
<Name>Disallow user to change volume</Name> <Name>Disallow user to change volume</Name>
<Description>Allow or disallow user to change volume"</Description> <Description>Allow or disallow user to change volume"</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_BLUETOOTH"> <Feature code="DISALLOW_CONFIG_BLUETOOTH">
<Name>Disallow bluetooth configuration</Name> <Name>Disallow bluetooth configuration</Name>
<Description>Allow or disallow bluetooth configuration</Description> <Description>Allow or disallow bluetooth configuration</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_CELL_BROADCASTS"> <Feature code="DISALLOW_CONFIG_CELL_BROADCASTS">
<Name>Disallow user to change cell broadcast configurations</Name> <Name>Disallow user to change cell broadcast configurations</Name>
<Description>Allow or disallow user to change cell broadcast configurations</Description> <Description>Allow or disallow user to change cell broadcast configurations</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_CREDENTIALS"> <Feature code="DISALLOW_CONFIG_CREDENTIALS">
<Name>Disallow user to change user credentials</Name> <Name>Disallow user to change user credentials</Name>
<Description>Allow or disallow user to change user credentials</Description> <Description>Allow or disallow user to change user credentials</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_MOBILE_NETWORKS"> <Feature code="DISALLOW_CONFIG_MOBILE_NETWORKS">
<Name>Disallow user to change mobile networks configurations</Name> <Name>Disallow user to change mobile networks configurations</Name>
<Description>Allow or disallow user to change mobile networks configurations</Description> <Description>Allow or disallow user to change mobile networks configurations</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_TETHERING"> <Feature code="DISALLOW_CONFIG_TETHERING">
<Name>Disallow user to change tethering configurations</Name> <Name>Disallow user to change tethering configurations</Name>
<Description>Allow or disallow user to change tethering configurations</Description> <Description>Allow or disallow user to change tethering configurations</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_VPN"> <Feature code="DISALLOW_CONFIG_VPN">
<Name>Disallow user to change VPN configurations</Name> <Name>Disallow user to change VPN configurations</Name>
<Description>Allow or disallow user to change VPN configurations</Description> <Description>Allow or disallow user to change VPN configurations</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CONFIG_WIFI"> <Feature code="DISALLOW_CONFIG_WIFI">
<Name>Disallow user to change WIFI configurations</Name> <Name>Disallow user to change WIFI configurations</Name>
<Description>Allow or disallow user to change WIFI configurations</Description> <Description>Allow or disallow user to change WIFI configurations</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_APPS_CONTROL"> <Feature code="DISALLOW_APPS_CONTROL">
<Name>Disallow user to change app control</Name> <Name>Disallow user to change app control</Name>
<Description>Allow or disallow user to change app control</Description> <Description>Allow or disallow user to change app control</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CREATE_WINDOWS"> <Feature code="DISALLOW_CREATE_WINDOWS">
<Name>Disallow window creation</Name> <Name>Disallow window creation</Name>
<Description>Allow or disallow window creation</Description> <Description>Allow or disallow window creation</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_APPS_CONTROL"> <Feature code="DISALLOW_APPS_CONTROL">
<Name>Disallow user to change app control configurations</Name> <Name>Disallow user to change app control configurations</Name>
<Description>Allow or disallow user to change app control configurations</Description> <Description>Allow or disallow user to change app control configurations</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_CROSS_PROFILE_COPY_PASTE"> <Feature code="DISALLOW_CROSS_PROFILE_COPY_PASTE">
<Name>Disallow cross profile copy paste</Name> <Name>Disallow cross profile copy paste</Name>
<Description>Allow or disallow cross profile copy paste</Description> <Description>Allow or disallow cross profile copy paste</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_DEBUGGING_FEATURES"> <Feature code="DISALLOW_DEBUGGING_FEATURES">
<Name>Disallow debugging features</Name> <Name>Disallow debugging features</Name>
<Description>Allow or disallow debugging features</Description> <Description>Allow or disallow debugging features</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_FACTORY_RESET"> <Feature code="DISALLOW_FACTORY_RESET">
<Name>Disallow factory reset</Name> <Name>Disallow factory reset</Name>
<Description>Allow or disallow factory reset</Description> <Description>Allow or disallow factory reset</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_ADD_USER"> <Feature code="DISALLOW_ADD_USER">
<Name>Disallow add user</Name> <Name>Disallow add user</Name>
<Description>Allow or disallow add user</Description> <Description>Allow or disallow add user</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_INSTALL_APPS"> <Feature code="DISALLOW_INSTALL_APPS">
<Name>Disallow install apps</Name> <Name>Disallow install apps</Name>
<Description>Allow or disallow install apps</Description> <Description>Allow or disallow install apps</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_INSTALL_UNKNOWN_SOURCES"> <Feature code="DISALLOW_INSTALL_UNKNOWN_SOURCES">
<Name>Disallow install unknown sources</Name> <Name>Disallow install unknown sources</Name>
<Description>Allow or disallow install unknown sources</Description> <Description>Allow or disallow install unknown sources</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_MODIFY_ACCOUNTS"> <Feature code="DISALLOW_MODIFY_ACCOUNTS">
<Name>Disallow modify account</Name> <Name>Disallow modify account</Name>
<Description>Allow or disallow modify account</Description> <Description>Allow or disallow modify account</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_MOUNT_PHYSICAL_MEDIA"> <Feature code="DISALLOW_MOUNT_PHYSICAL_MEDIA">
<Name>Disallow mount physical media</Name> <Name>Disallow mount physical media</Name>
<Description>Allow or disallow mount physical media</Description> <Description>Allow or disallow mount physical media</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_NETWORK_RESET"> <Feature code="DISALLOW_NETWORK_RESET">
<Name>Disallow network reset</Name> <Name>Disallow network reset</Name>
<Description>Allow or disallow network reset</Description> <Description>Allow or disallow network reset</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_OUTGOING_BEAM"> <Feature code="DISALLOW_OUTGOING_BEAM">
<Name>Disallow outgoing beam</Name> <Name>Disallow outgoing beam</Name>
<Description>Allow or disallow outgoing beam</Description> <Description>Allow or disallow outgoing beam</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_OUTGOING_CALLS"> <Feature code="DISALLOW_OUTGOING_CALLS">
<Name>Disallow outgoing calls</Name> <Name>Disallow outgoing calls</Name>
<Description>Allow or disallow outgoing calls</Description> <Description>Allow or disallow outgoing calls</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_REMOVE_USER"> <Feature code="DISALLOW_REMOVE_USER">
<Name>Disallow remove users</Name> <Name>Disallow remove users</Name>
<Description>Allow or disallow remove users</Description> <Description>Allow or disallow remove users</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_SAFE_BOOT"> <Feature code="DISALLOW_SAFE_BOOT">
<Name>Disallow safe boot</Name> <Name>Disallow safe boot</Name>
<Description>Allow or disallow safe boot</Description> <Description>Allow or disallow safe boot</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_SHARE_LOCATION"> <Feature code="DISALLOW_SHARE_LOCATION">
<Name>Disallow share location</Name> <Name>Disallow share location</Name>
<Description>Allow or disallow share location</Description> <Description>Allow or disallow share location</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_SMS"> <Feature code="DISALLOW_SMS">
<Name>Disallow sms</Name> <Name>Disallow sms</Name>
<Description>Allow or disallow sms</Description> <Description>Allow or disallow sms</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_UNINSTALL_APPS"> <Feature code="DISALLOW_UNINSTALL_APPS">
<Name>Disallow uninstall app</Name> <Name>Disallow uninstall app</Name>
<Description>Allow or disallow uninstall app</Description> <Description>Allow or disallow uninstall app</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_UNMUTE_MICROPHONE"> <Feature code="DISALLOW_UNMUTE_MICROPHONE">
<Name>Disallow unmute mic</Name> <Name>Disallow unmute mic</Name>
<Description>Allow or disallow unmute mic</Description> <Description>Allow or disallow unmute mic</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DISALLOW_USB_FILE_TRANSFER"> <Feature code="DISALLOW_USB_FILE_TRANSFER">
<Name>Disallow usb file transfer</Name> <Name>Disallow usb file transfer</Name>
<Description>Allow or disallow usb file transfer</Description> <Description>Allow or disallow usb file transfer</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="ALLOW_PARENT_PROFILE_APP_LINKING"> <Feature code="ALLOW_PARENT_PROFILE_APP_LINKING">
<Name>Disallow parent profile app linking</Name> <Name>Disallow parent profile app linking</Name>
<Description>Allow or disallow parent profile app linking</Description> <Description>Allow or disallow parent profile app linking</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="ENSURE_VERIFY_APPS"> <Feature code="ENSURE_VERIFY_APPS">
<Name>Disallow ensure verify apps</Name> <Name>Disallow ensure verify apps</Name>
<Description>Allow or disallow ensure verify apps</Description> <Description>Allow or disallow ensure verify apps</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="AUTO_TIME"> <Feature code="AUTO_TIME">
<Name>Disallow auto timing</Name> <Name>Disallow auto timing</Name>
<Description>Allow or disallow auto timing</Description> <Description>Allow or disallow auto timing</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="REMOVE_DEVICE_OWNER"> <Feature code="REMOVE_DEVICE_OWNER">
<Name>Remove device owner</Name> <Name>Remove device owner</Name>
<Description>Remove device owner</Description> <Description>Remove device owner</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="LOGCAT"> <Feature code="LOGCAT">
<Name>Fetch device logcat</Name> <Name>Fetch device logcat</Name>
<Description>Fetch device logcat</Description> <Description>Fetch device logcat</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
<Feature code="DEVICE_UNLOCK"> <Feature code="DEVICE_UNLOCK">
<Name>Unlock the device</Name> <Name>Unlock the device</Name>
<Description>Unlock the device</Description> <Description>Unlock the device</Description>
<Operation context="" method="POST">
</Operation>
</Feature> </Feature>
</Features> </Features>

Loading…
Cancel
Save