Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	modules/distribution/src/repository/jaggeryapps/iotserver/api/user-api.jag
application-manager-new
charithag 9 years ago
commit 09a6f99c89

@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
var uri = request.getRequestURI();
var uriMatcher = new URIMatcher(String(uri));

@ -42,7 +42,6 @@ if (uriMatcher.match("/{context}/api/user/login/")) {
if (log.isDebugEnabled()) {
log.debug("User Logged In : " + user);
}
var hasDevcies = (deviceManagementService.getDevicesOfUser(username).size() >= 1);
if(hasDevcies){
@ -79,7 +78,7 @@ if (uriMatcher.match("/{context}/api/user/login/")) {
} else {
userRoles = String(addUserFormData.userRoles).split(",");
}
userRoles="deviceRole, deviceUser";
try {
result = userModule.registerUser(username, firstname, lastname, emailAddress, password,
userRoles);

@ -82,7 +82,9 @@ var route;
};
var renderStatic = function (unit, path) {
log.debug('[' + requestId + '] for unit "' + unit + '" a request received for a static file "' + path + '"');
if (log.isDebugEnabled()) {
log.debug('[' + requestId + '] for unit "' + unit + '" a request received for a static file "' + path + '"');
}
var staticFile = fuse.getFile(unit, 'public' + path);
if (staticFile.isExists() && !staticFile.isDirectory()) {
response.addHeader('Content-type', getMime(path));
@ -145,20 +147,24 @@ var route;
var layout = fuseState.layout;
if (layout !== null) {
log.debug(
'[' + requestId + '] request for "' + path + '" will be rendered using layout "' +
layout + '" (defined in "' + mainUnit + '") and zones ' +
stringify(zones)
);
if (log.isDebugEnabled()) {
log.debug(
'[' + requestId + '] request for "' + path + '" will be rendered using layout "' +
layout + '" (defined in "' + mainUnit + '") and zones ' +
stringify(zones)
);
}
var output = handlebars.Handlebars.compileFile(fuse.getLayoutPath(layout))({});
response.addHeader('Content-type', 'text/html');
print(output);
return true;
} else {
log.debug(
'[' + requestId + '] request for "' + path + '" will can\'t be rendered, since no layout is defined' +
'in any of the units ' + stringify(zones));
if (log.isDebugEnabled()) {
log.debug(
'[' + requestId + '] request for "' + path + '" will can\'t be rendered, since no layout is defined' +
'in any of the units ' + stringify(zones));
}
return false;
}
};
@ -174,7 +180,9 @@ var route;
*/
function renderLess(unit, path) {
//TODO: fix - incorrect less files makes it respond the old less even if it is nocahce.
log.debug('[' + requestId + '] for unit "' + unit + '" a request received for a less file "' + path + '"');
if (log.isDebugEnabled()) {
log.debug('[' + requestId + '] for unit "' + unit + '" a request received for a less file "' + path + '"');
}
var cacheKey = '/tmp/cached_' + unit + path.replace(/[^\w\.-]/g, '_');
fuseState.currentUnit = unit;
var cachedCss = new File(cacheKey);
@ -188,7 +196,9 @@ var route;
if (lessFile.isExists()) {
var x = require('less-rhino-1.7.5.js');
x.compile([lessFile.getPath(), cacheKey]);
log.debug('[' + requestId + '] for unit "' + unit + '" request for "' + path + '" is cached as "' + cacheKey + '"');
if (log.isDebugEnabled()) {
log.debug('[' + requestId + '] for unit "' + unit + '" request for "' + path + '" is cached as "' + cacheKey + '"');
}
}
}

@ -11,8 +11,7 @@ var fuseState = {
zones: {},
appName: '',
currentZone: [], //TODO: rename to zone Stack
currentUnit: null,
viewModelCache:{}
currentUnit: null
};
var requestId = function makeId() {

@ -218,7 +218,9 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
}
var path = definitionFile.getPath();
log.debug('[' + requestId + '] reading file "' + path + '"');
if (log.isDebugEnabled()) {
log.debug('[' + requestId + '] reading file "' + path + '"');
}
unitModel.definition = require(path);
// add the information derived by parsing hbs file to the same model
@ -348,10 +350,12 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
}
while (len--) {
if (toDelete[units[len]]) {
log.debug(
'[' + requestId + '] unit "' + units[len] +
'" is overridden by "' + toDelete[units[len]] + '"'
);
if (log.isDebugEnabled()) {
log.debug(
'[' + requestId + '] unit "' + units[len] +
'" is overridden by "' + toDelete[units[len]] + '"'
);
}
units.splice(len, 1);
}
}
@ -407,10 +411,12 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
var selfFile = new File(getUnitPath(unitName) + slashPath + selfFileName);
if (selfFile.isExists()) {
log.debug(
'[' + requestId + '] for unit "' + unitName + '" file resolved : "'
+ slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
);
if (log.isDebugEnabled()) {
log.debug(
'[' + requestId + '] for unit "' + unitName + '" file resolved : "'
+ slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
);
}
return selfFile;
}
@ -427,17 +433,21 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
}
var file = new File(getUnitPath(ancestorName) + slashPath + fileName);
if (file.isExists()) {
log.debug(
'[' + requestId + '] for unit "' + unitName + '" file resolved : "'
+ slashPath + selfFileName + '" -> "' + file.getPath() + '"'
);
if (log.isDebugEnabled()) {
log.debug(
'[' + requestId + '] for unit "' + unitName + '" file resolved : "'
+ slashPath + selfFileName + '" -> "' + file.getPath() + '"'
);
}
return file;
}
}
log.debug(
'[' + requestId + '] for unit "' + unitName + '" (non-excising) file resolved : "'
+ slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
);
if (log.isDebugEnabled()) {
log.debug(
'[' + requestId + '] for unit "' + unitName + '" (non-excising) file resolved : "'
+ slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
);
}
return selfFile;
};

@ -11,35 +11,29 @@ var getScope = function (unit,configs) {
var viewModel = {};
var cbResult;
if (jsFile.isExists()) {
if(fuseState.viewModelCache[jsFile.getPath()]){
cbResult = fuseState.viewModelCache[jsFile.getPath()];
}else{
script = require(jsFile.getPath());
//Eagerly make the viewModel the template configs
viewModel = templateConfigs;
//Check if the unit author has specified an onRequest
//callback
if(script.hasOwnProperty('onRequest')){
script.app = {
url: '/' + fuseState.appName,
publicURL: '/' + fuseState.appName + '/public/' + unit,
"class": unit + '-unit'
};
onRequestCb = script.onRequest;
cbResult = onRequestCb(templateConfigs);
log.debug("passing configs to unit "+unit+" configs: "+stringify(templateConfigs));
fuseState.viewModelCache[jsFile.getPath()] = cbResult;
script = require(jsFile.getPath());
//Eagerly make the viewModel the template configs
viewModel = templateConfigs;
//Check if the unit author has specified an onRequest
//callback
if(script.hasOwnProperty('onRequest')){
script.app = {
url: '/' + fuseState.appName,
publicURL: '/' + fuseState.appName + '/public/' + unit,
"class": unit + '-unit'
};
onRequestCb = script.onRequest;
cbResult = onRequestCb(templateConfigs);
log.debug("passing configs to unit "+unit+" configs: "+stringify(templateConfigs));
//If the execution does not yield an object we will print
//a warning as the unit author may have forgotten to return a data object
if(cbResult===undefined){
cbResult = {}; //Give an empty data object
log.warn('[' + requestId + '] unit "' + unit + '" has a onRequest method which does not return a value.This may lead to the '
+'unit not been rendered correctly.');
}
viewModel = cbResult;
}
//If the execution does not yield an object we will print
//a warning as the unit author may have forgotten to return a data object
if(cbResult===undefined){
cbResult = {}; //Give an empty data object
log.warn('[' + requestId + '] unit "' + unit + '" has a onRequest method which does not return a value.This may lead to the '
+'unit not been rendered correctly.');
}
viewModel = cbResult;
}
else{
//If there is no script then the view should get the configurations

@ -266,8 +266,6 @@ deviceModule = function () {
properties[constants.DEVICE_VENDOR] = constants.VENDOR_APPLE;
}
deviceObject[constants.DEVICE_PROPERTIES] = properties;
log.info("-------------------------");
log.info(device.getEnrolmentInfo().getDateOfEnrolment());
deviceObject[constants.DEVICE_ENROLLMENT] = device.getEnrolmentInfo().getDateOfEnrolment();
return deviceObject;
}

@ -20,7 +20,6 @@ var utility;
utility = function () {
var JavaClass = Packages.java.lang.Class;
var PrivilegedCarbonContext = Packages.org.wso2.carbon.context.PrivilegedCarbonContext;
var userManagement = Packages.org.wso2.carbon.device.mgt.iot.common.UserManagement();
var getOsgiService = function (className) {
return PrivilegedCarbonContext.getThreadLocalCarbonContext().getOSGiService(JavaClass.forName(className));
@ -33,7 +32,7 @@ utility = function () {
};
publicMethods.getUserManagementService = function () {
return userManagement;
return getOsgiService('org.wso2.carbon.device.mgt.user.core.UserManager');
};
publicMethods.getPolicyManagementService = function () {

@ -24,7 +24,46 @@ function formatDates(){
}
(function () {
var deviceId = $(".device-id");
var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type");
var payload = [deviceIdentifier];
if (deviceType == "ios") {
var serviceUrl = "/ios/operation/deviceinfo";
} else if (deviceType == "android") {
var serviceUrl = "/mdm-android-agent/operation/device-info";
}
invokerUtil.post(serviceUrl, payload,
function(message){
console.log(message);
}, function (message) {
console.log(message);
});
$(document).ready(function(){
loadOperationBar(deviceType);
loadMap();
formatDates();
});
function loadMap(){
var map;
function initialize() {
var mapOptions = {
zoom: 18
};
var lat = 6.9098591;
var long = 79.8523753;
map = new google.maps.Map(document.getElementById('device-location'),
mapOptions);
var pos = new google.maps.LatLng(lat,
long);
var marker = new google.maps.Marker({
position: pos,
map: map
});
map.setCenter(pos);
}
google.maps.event.addDomListener(window, 'load', initialize);
}
}());

@ -87,6 +87,7 @@ function savePolicy(){
}
$(document).ready(function(){
alert("hiiiii");
initStepper(".wizard-stepper");
$( "input[type='radio'].user-select-radio" ).change(function() {
$('.user-select').hide();

@ -1,251 +0,0 @@
<div class="row no-gutter">
<div class="wr-hidden-operations-nav col-lg-4">
<a href="javascript:void(0)" onclick="showAdvanceOperation('security', this)" class="selected">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-padlock fw-stack-2x"></i>
</span>
Security
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('restriction', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-settings fw-stack-2x"></i>
</span>
Restrictions
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('application', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-application fw-stack-2x"></i>
</span>
Applications
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-wifi fw-stack-2x"></i>
</span>
Wi-fi
</a>
</div>
<div class="wr-hidden-operations-content col-lg-8">
<!-- security -->
<div class="wr-hidden-operation" data-operation="security" style="display: block">
<div class="panel panel-default operation-data" data-operation="{{features.ENCRYPT_STORAGE.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Encryption Enable/Disable
<label class="wr-input-control switch" data-toggle="collapse" data-target="#enableEncryptionTab">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="enableEncryptionTab" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="enableEncryptionTab">
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="enableEncryption" data-key="enableEncryption" />
<span class="helper" title="Enable Encryption">Enable Encryption<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<!--<a href="javascript:runOperation('{{features.ENCRYPT_STORAGE.code}}')" class="btn-operations">Configure</a>-->
</div>
</div>
<div class="panel panel-default operation-data" data-operation="{{features.PASSCODE_POLICY.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Passcode Policy
<label class="wr-input-control switch" data-toggle="collapse" data-target="#passCodePolicy">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="passCodePolicy" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passCodePolicy">
<label class="wr-input-label col-sm-4" for="maxFailedAttempts">Maximum Failed Attempts</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="maxFailedAttempts" data-key="maxFailedAttempts" placeholder="Enter maximum Failed Attempts">
</div>
<label class="wr-input-label col-sm-4" for="minLength">Minimum Length</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="minLength" data-key="minLength" placeholder="Enter minimum Length">
</div>
<label class="wr-input-label col-sm-4" for="pinHistory">PIN History</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="pinHistory" data-key="pinHistory" placeholder="Enter PIN History">
</div>
<label class="wr-input-label col-sm-4" for="minComplexChars">Minimum complex characters</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="minComplexChars" data-key="minComplexChars" placeholder="Enter minimum complex characters">
</div>
<label class="wr-input-label col-sm-4" for="lockcode">Minimum PIN Age in days</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="maxPINAgeInDays" data-key="maxPINAgeInDays" placeholder="Enter minimum PIN age in days">
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="requireAlphanumeric" data-key="requireAlphanumeric" />
<span class="helper" title="Require Alphanumeric">Require Alphanumeric<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowSimple" data-key="allowSimple" />
<span class="helper" title="Allow simple PIN">Allow simple PIN<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<!--<a href="javascript:runOperation('{{features.PASSCODE_POLICY.code}}')" class="btn-operations">Configure</a>-->
</div>
</div>
</div>
<!-- /security -->
<!-- wi-fi -->
<div class="wr-hidden-operation" data-operation="wifi">
<div class="panel panel-default operation-data" data-operation="{{features.WIFI.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Configure Wifi
<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="wifi" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi">
<label class="wr-input-label" title="Identification of the wireless network to connect to">Service Set Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="ssid" data-key="ssid" placeholder="Enter SSID"/>
</div>
<label class="wr-input-label" title="Password for the wireless network">Password<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Password for the wireless network</span-->
<div class="wr-input-control">
<input type="password" class="form-control operationDataKeys" id="password" data-key="password" placeholder="Password"/>
</div>
<!--<a href="javascript:runOperation('{{features.WIFI.code}}')" class="btn-operations">Configure</a>-->
</div>
</div>
</div>
<!-- /wi-fi -->
<!-- application -->
<div class="wr-hidden-operation" data-operation="application">
<div class="panel panel-default operation-data" data-operation="{{features.INSTALL_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Install App
<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">
<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifer"/>
</div>
<div class="wr-input-control">
<label class="wr-input-control dropdown">
<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">
<option>Public</option>
<option>Enterprise</option>
</select>
</label>
</div>
<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>
</div>
<!--<a href="javascript:runOperation('{{features.INSTALL_APPLICATION.code}}')" class="btn-operations">Install</a>-->
</div>
</div>
<div class="panel panel-default operation-data" data-operation="{{features.WEBCLIP.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Install Web Clip
<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">
<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>
</div>
<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>
</div>
<!--<a href="javascript:runOperation('{{features.WEBCLIP.code}}')" class="btn-operations">Install</a>-->
</div>
</div>
<div class="panel panel-default operation-data" data-operation="{{features.UNINSTALL_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Uninstall App
<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">
<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifer"/>
</div>
<!--<a href="javascript:runOperation('{{features.UNINSTALL_APPLICATION.code}}')" class="btn-operations">Uninstall</a>-->
</div>
</div>
</div>
<!-- /application -->
<!-- Restriction -->
<div class="wr-hidden-operation" data-operation="restriction">
<div class="panel panel-default operation-data" data-operation="{{features.CAMERA.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Camera Enable/Disable
<label class="wr-input-control switch" data-toggle="collapse" data-target="#cameraDisable">
<span class="text">Enabled</span>
<input type="checkbox">
<span class="helper"></span>
</label>
</h2>
</div>
<div id="cameraDisable" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="cameraDisable">
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="enableCamera" data-key="enableCamera" checked />
<span class="helper" title="Remove App upon dis-enrollment">Enable Camera<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<!--<a href="javascript:runOperation('{{features.CAMERA.code}}')" class="btn-operations">Configure</a>-->
</div>
</div>
</div>
<!-- /Restriction -->
</div>
</div>

@ -1,366 +0,0 @@
<div class="row no-gutter">
<div class="wr-hidden-operations-nav col-lg-4">
<a href="javascript:void(0)" onclick="showAdvanceOperation('{{features.WIFI.code}}', this)" class="selected">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-wifi fw-stack-2x"></i>
</span>
Wi-fi
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('application', this)" >
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-padlock fw-stack-2x"></i>
</span>
Applications
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('{{features.RESTRICTION.code}}', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-settings fw-stack-2x"></i>
</span>
Restrictions
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('mail', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-message fw-stack-2x"></i>
</span>
Mail
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('{{features.AIR_PLAY.code}}', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-service-provider fw-stack-2x"></i>
</span>
Air Play
</a>
</div>
<div class="wr-hidden-operations-content col-lg-8">
<!-- application -->
<div class="wr-hidden-operation" data-operation="application" style="display: block">
<div class="panel panel-default operation-data" data-operation="{{features.INSTALL_STORE_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#installPublicAppiOS" aria-expanded="true" aria-controls="installPublicAppiOS">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
</span>
Install Public App
</a>
</h2>
</div>
<div id="installPublicAppiOS" class="panel-collapse panel-body collapse in" role="tabpanel" aria-labelledby="installPublicAppiOS">
<label class="wr-input-label" for="appIdentifier">App identifier</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="appIdentifier" data-key="appIdentifier" placeholder="Enter App Identifier">
</div>
<label class="wr-input-label col-sm-4" for="ituneID">iTunes store ID</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="ituneID" data-key="ituneID" placeholder="Enter iTunes store ID">
</div>
<label class="wr-input-label col-sm-4" for="bundleId">Bundle ID</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="bundleId" data-key="bundleId" placeholder="Enter Bundle ID">
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="appRemoval" data-key="appRemoval" checked />
<span class="helper" title="Remove App upon dis-enrollment">Remove App upon dis-enrollment<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="backupData" data-key="backupData" checked />
<span class="helper" title="Prevent backup of App data">Prevent backup of App data<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<a href="javascript:runOperation('{{features.INSTALL_STORE_APPLICATION.code}}')" class="btn-operations">Install</a>
</div>
</div>
<div class="panel panel-default operation-data" data-operation="{{features.INSTALL_ENTERPRISE_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#installEnterpriseAppiOS" aria-expanded="true" aria-controls="installPublicAppiOS" class="collapsed">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
</span>
Install Enterprise App
</a>
</h2>
</div>
<div id="installEnterpriseAppiOS" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installEnterpriseAppiOS">
<label class="wr-input-label" for="appIdentifier">App identifier</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="appIdentifier" data-key="appIdentifier" placeholder="Enter App Identifier">
</div>
<label class="wr-input-label col-sm-4" for="manifestURL">Manifest URL</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="manifestURL" data-key="manifestURL" placeholder="Enter manifest URL">
</div>
<label class="wr-input-label col-sm-4" for="bundleId">Bundle ID</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="bundleId" data-key="bundleId" placeholder="Enter Bundle ID">
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="appRemoval" data-key="appRemoval" checked />
<span class="helper" title="Remove App upon dis-enrollment">Remove App upon dis-enrollment<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="backupData" data-key="backupData" checked />
<span class="helper" title="Prevent backup of App data">Prevent backup of App data<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<a href="javascript:runOperation('{{features.INSTALL_ENTERPRISE_APPLICATION.code}}')" class="btn-operations">Install</a>
</div>
</div>
<div class="panel panel-default operation-data" data-operation="{{features.REMOVE_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#removeApplication" aria-expanded="true" aria-controls="removeApplication" class="collapsed">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
</span>
Uninstall App
</a>
</h2>
</div>
<div id="removeApplication" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="removeApplication">
<label class="wr-input-label col-sm-4" for="bundleId">Bundle ID</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="bundleId" data-key="bundleId" placeholder="Enter Bundle ID">
</div>
<a href="javascript:runOperation('{{features.REMOVE_APPLICATION.code}}')" class="btn-operations">Uninstall</a>
</div>
</div>
</div>
<!-- /application -->
<!-- wi-fi -->
<div class="wr-hidden-operation panel-body operation-data" data-operation="{{features.WIFI.code}}">
<label class="wr-input-label" title="Identification of the wireless network to connect to">Service Set Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="ssid" data-key="ssid" placeholder="Enter SSID" />
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="hiddenNetwork" data-key="hiddenNetwork" checked />
<span class="helper" title="Enable if target network is not open or broadcasting">Hidden Network<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="autoJoin" data-key="autoJoin" checked />
<span class="helper" title="Automatically join this wireless network">Auto Join<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Automatically join this wireless network</span-->
</div>
<label class="wr-input-label" title="Configures proxies to be used with this network">Proxy Setup<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Configures proxies to be used with this network</span-->
<div class="wr-input-control">
<select class="form-control">
<option>None</option>
</select>
</div>
<label class="wr-input-label" title="Wireless network encryption to use when connecting">Security Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Wireless network encryption to use when connecting</span-->
<div class="wr-input-control">
<select class="form-control operationDataKeys" id="encryptionType" data-key="encryptionType">
<option data-id="WPA">WPA/WPA2 Personal</option>
</select>
</div>
<label class="wr-input-label" title="Password for the wireless network">Password<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Password for the wireless network</span-->
<div class="wr-input-control">
<input type="password" value="" class="operationDataKeys" id="password" data-key="password" placeholder="input text"/>
</div>
<label class="wr-input-label" title="Configures network to appear as legacy or Passport">Network Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Configures network to appear as legacy or Passport</span-->
<div class="wr-input-control">
<select class="form-control">
<option>Standard</option>
</select>
</div>
<a href="javascript:runOperation('{{features.WIFI.code}}')" class="btn-operations">Configure</a>
</div>
<!-- /wi-fi -->
<!-- mail -->
<div class="wr-hidden-operation panel-body" data-operation="mail">
<label class="wr-input-label" title="The display name of the account">Account Description<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" value="" placeholder="input text"/>
</div>
<label class="wr-input-label" title="The protocol for accessing the email account">Account Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Configures proxies to be used with this network</span-->
<div class="wr-input-control">
<div class="cus-col-25">
<select class="form-control">
<option>IMAP</option>
</select>
</div>
<div class="cus-col-50">
<span>Path Prefix</span> <input type="text" value="" placeholder="input text" />
</div>
<br class="c-both" />
</div>
<label class="wr-input-label" title="The display name of the user">User Display Name<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" value="" placeholder="input text"/>
</div>
<label class="wr-input-label" title="The address of the account">Email Address<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" value="" placeholder="input text"/>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" checked />
<span class="helper" title="Messages can be moved from this account to another">Allow user to move messages from this account<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" checked />
<span class="helper" title="Include this account in recent address syncing">Allow Recent Address syncing<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" checked />
<span class="helper" title="Send outgoing mail from this account only from Mail app">Use Only in Mail<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Send outgoing mail from this account only from Mail app</span-->
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" checked />
<span class="helper" title="Support S/MIME for this account">Enable S/MIME<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Support S/MIME for this account</span-->
</div>
<label class="wr-input-label" title="The protocol for accessing the email account">Mail Server and Port<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>The protocol for accessing the email account</span-->
<div class="wr-input-control">
<div class="cus-col-70">
<input type="text" value="" placeholder="input text"/>
</div>
<div class="cus-col-25">
<span> : </span><input type="text" value="993" placeholder="input text" />
</div>
<br class="c-both" />
</div>
<label class="wr-input-label" title="The username used to connect to the server for incoming mail">Username<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>The Username used to connect to the server for incoming mail</span-->
<div class="wr-input-control">
<input type="text" value="" placeholder="input text"/>
</div>
<label class="wr-input-label" title="The autyentication method for the incoming mail server">Authentication Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Wireless network encryption to use when connecting</span-->
<div class="wr-input-control">
<select class="form-control">
<option>Password</option>
</select>
</div>
<label class="wr-input-label" title="The password for the incoming mail server">Password<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>The Username used to connect to the server for incoming mail</span-->
<div class="wr-input-control">
<input type="text" value="" placeholder="input text"/>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" checked />
<span class="helper" title="Retrieve incoming mail through secure socket layer">Use SSL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
<!--span>Enable if target network is not open or broadcasting</span-->
</div>
</div>
<!-- /mail -->
<!-- general -->
<div class="wr-hidden-operation panel-body operation-data" data-operation="{{features.RESTRICTION.code}}">
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowCamera" data-key="allowCamera" checked />
<span class="helper" title="Allow Camera">Allow Camera<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowCloudBackup" data-key="allowCloudBackup" checked/>
<span class="helper" title="Allow Cloud Backup">Allow Cloud Backup<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowScreenShot" data-key="allowScreenShot" checked/>
<span class="helper" title="Allow Screenshots">Allow Screenshots<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowSafari" data-key="allowSafari" checked />
<span class="helper" title="Allow Safari Browser">Allow Safari Browser<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowAirDrop" data-key="allowAirDrop" checked />
<span class="helper" title="Allow AirDrop">Allow AirDrop<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<a href="javascript:runOperation('{{features.RESTRICTION.code}}')" class="btn-operations">Configure</a>
</div>
<!-- /general -->
<!-- air play -->
<div class="wr-hidden-operation panel-body operation-data" data-operation="{{features.AIR_PLAY.code}}">
<label class="wr-input-label col-sm-4" for="airPlayLocation">Location</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="airPlayLocation" data-key="location" placeholder="Enter location" />
</div>
<label class="wr-input-label col-sm-4" for="airPlayDeviceName">Device Name</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="airPlayDeviceName" data-key="deviceName" placeholder="Enter Device Name" />
</div
<label class="wr-input-label col-sm-4" for="airPlayPassword">AirPlay password</label>
<div class="wr-input-control">
<input type="password" class="form-control operationDataKeys" id="airPlayPassword" data-key="password" placeholder="Password" />
</div>
<a href="javascript:runOperation('{{features.AIR_PLAY.code}}')" class="btn-operations">Configure</a>
</div>
<!-- /air play -->
</div>
</div>

@ -24,7 +24,46 @@ function formatDates(){
}
(function () {
var deviceId = $(".device-id");
var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type");
var payload = [deviceIdentifier];
if (deviceType == "ios") {
var serviceUrl = "/ios/operation/deviceinfo";
} else if (deviceType == "android") {
var serviceUrl = "/mdm-android-agent/operation/device-info";
}
invokerUtil.post(serviceUrl, payload,
function(message){
console.log(message);
}, function (message) {
console.log(message);
});
$(document).ready(function(){
loadOperationBar(deviceType);
loadMap();
formatDates();
});
function loadMap(){
var map;
function initialize() {
var mapOptions = {
zoom: 18
};
var lat = 6.9098591;
var long = 79.8523753;
map = new google.maps.Map(document.getElementById('device-location'),
mapOptions);
var pos = new google.maps.LatLng(lat,
long);
var marker = new google.maps.Marker({
position: pos,
map: map
});
map.setCenter(pos);
}
google.maps.event.addDomListener(window, 'load', initialize);
}
}());

@ -34,20 +34,20 @@
<script type="text/javascript">
$( document ).ready(function() {
$('[data-toggle="tooltip"]').tooltip();
$('[data-toggle="tooltip"]').tooltip();
$("[data-toggle=popover]").popover();
$(".ctrl-filter-type-switcher").popover({
html : true,
html : true,
content: function() {
return $('#content-filter-types').html();
}
});
});
$('#nav').affix({
offset: {
top: $('header').height()
}
});
});
});
function openCollapsedNav(){
@ -58,5 +58,5 @@
}
});
}
</script>
Loading…
Cancel
Save