Related to entgra/product-iots#37merge-requests/44/head
parent
88047e03fa
commit
cceb48726c
@ -0,0 +1,184 @@
|
||||
{{!
|
||||
Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||
|
||||
Entgra (Pvt) Ltd. 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.
|
||||
}}
|
||||
{{#if controlOperations}}
|
||||
<div class="wr-operations" style="height: 87px; display: block;"
|
||||
xmlns="http://www.w3.org/1999/html">
|
||||
<style>
|
||||
::-webkit-input-placeholder {
|
||||
color: #B8B8B8;
|
||||
}
|
||||
|
||||
::-moz-placeholder {
|
||||
color: #B8B8B8;
|
||||
}
|
||||
|
||||
:-ms-input-placeholder {
|
||||
color: #B8B8B8;
|
||||
}
|
||||
|
||||
input:-moz-placeholder {
|
||||
color: #B8B8B8;
|
||||
}
|
||||
</style>
|
||||
{{#each controlOperations}}
|
||||
<a {{#unless isDisabled}} href="javascript:operationSelect('{{operation}}')" {{else}} href="javascript:void(0)" class="op-disabled" title="{{disabledText}}" data-toggle="tooltip" {{/unless}}>
|
||||
{{#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-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw {{iconFont}} fw-stack-1x"></i>
|
||||
</span>
|
||||
{{name}}
|
||||
<br>
|
||||
</h3>
|
||||
<h4>
|
||||
{{description}}
|
||||
<br>
|
||||
</h4>
|
||||
|
||||
<div id="operation-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div id="operation-warn-msg" class="info alert-info hidden" role="alert">
|
||||
<i class="icon fw fw-info"></i><span></span>
|
||||
</div>
|
||||
|
||||
<div id="operation-form">
|
||||
<form id="form-{{operation}}" action="{{params.0.uri}}" method="{{params.0.method}}"
|
||||
style="padding-bottom: 20px;"
|
||||
data-payload="{{payload}}"
|
||||
data-device-id="{{../devices}}"
|
||||
data-content-type="{{params.0.contentType}}"
|
||||
data-operation-code="{{operation}}">
|
||||
{{#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}}
|
||||
{{#each uiParams}}
|
||||
{{#equal this.type "select"}}
|
||||
<div class="form-group">
|
||||
<select class="form-control" id="{{this.id}}">
|
||||
{{#each this.value}}
|
||||
<option>{{this}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
{{/equal}}
|
||||
{{#equal this.type "radio"}}
|
||||
<input type="radio" id="{{this.id}}"
|
||||
name="{{this.name}}"
|
||||
value="{{this.value}}"
|
||||
class="radio"
|
||||
checked="checked"
|
||||
data-param-type="form"/>
|
||||
{{this.value}}
|
||||
{{/equal}}
|
||||
{{#equal this.type "checkbox"}}
|
||||
<input type="{{this.type}}" id="{{this.id}}"
|
||||
class="checkbox"
|
||||
placeholder="{{this.label}}"
|
||||
data-param-type="form"/>
|
||||
{{this.label}}
|
||||
<br/>
|
||||
{{/equal}}
|
||||
{{#equal this.type "password"}}
|
||||
<input type="{{this.type}}" id="{{this.id}}"
|
||||
placeholder="{{this.label}}" class="form-control"
|
||||
data-param-type="form" value=""/>
|
||||
<br/>
|
||||
{{/equal}}
|
||||
{{#equal this.type "text"}}
|
||||
<input type="{{this.type}}" id="{{this.id}}"
|
||||
placeholder="{{this.label}}" class="form-control"
|
||||
data-param-type="form" value=""/>
|
||||
<br/>
|
||||
{{/equal}}
|
||||
{{#equal this.type "info"}}
|
||||
<div class="form-group" id="{{this.id}}">
|
||||
<span class="help-block">
|
||||
{{this.value}}
|
||||
</span>
|
||||
</div>
|
||||
{{/equal}}
|
||||
{{/each}}
|
||||
<button type="button" onclick="submitForm('form-{{operation}}')"
|
||||
class="btn btn-default btnSend">Send
|
||||
to Device</button>
|
||||
<label class="wr-input-label hidden"><i
|
||||
class="fw fw-lifecycle fw-spin fw-2x lblSending"></i> Sending..</label>
|
||||
<label class="wr-input-label hidden"><i
|
||||
class="fw fw-check fw-2x lblSent"></i> Sent</label>
|
||||
<i class="fw fw-wso2-logo fw-pulse fw-2x hidden lbl-execution"> Executing Operation </i>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</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 center-block">
|
||||
<i class="fw fw-circle-outline 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>
|
@ -1,336 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 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.
|
||||
*/
|
||||
|
||||
package org.wso2.carbon.device.mgt.mobile.android.impl.dao.impl;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.wso2.carbon.device.mgt.mobile.android.impl.dao.MobileDeviceManagementDAOException;
|
||||
import org.wso2.carbon.device.mgt.mobile.android.impl.dao.MobileFeatureDAO;
|
||||
import org.wso2.carbon.device.mgt.mobile.android.impl.dao.util.MobileDeviceManagementDAOUtil;
|
||||
import org.wso2.carbon.device.mgt.mobile.android.impl.dto.MobileFeature;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Implementation of MobileFeatureDAO.
|
||||
*/
|
||||
public class MobileFeatureDAOImpl implements MobileFeatureDAO {
|
||||
|
||||
private DataSource dataSource;
|
||||
private static final Log log = LogFactory.getLog(MobileFeatureDAOImpl.class);
|
||||
|
||||
public MobileFeatureDAOImpl(DataSource dataSource) {
|
||||
this.dataSource = dataSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addFeature(MobileFeature mobileFeature)
|
||||
throws MobileDeviceManagementDAOException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String createDBQuery =
|
||||
"INSERT INTO AD_FEATURE(CODE, NAME, DESCRIPTION, DEVICE_TYPE) VALUES (?, ?, ?, ?)";
|
||||
|
||||
stmt = conn.prepareStatement(createDBQuery);
|
||||
stmt.setString(1, mobileFeature.getCode());
|
||||
stmt.setString(2, mobileFeature.getName());
|
||||
stmt.setString(3, mobileFeature.getDescription());
|
||||
stmt.setString(4, mobileFeature.getDeviceType());
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Added a new MobileFeature " + mobileFeature.getCode() + " to the MDM database.");
|
||||
}
|
||||
status = true;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while adding feature code - '" +
|
||||
mobileFeature.getCode() + "' to feature table";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addFeatures(List<MobileFeature> mobileFeatures) throws MobileDeviceManagementDAOException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFeature(MobileFeature mobileFeature)
|
||||
throws MobileDeviceManagementDAOException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String updateDBQuery =
|
||||
"UPDATE AD_FEATURE SET CODE = ?, NAME = ?, DESCRIPTION = ?, DEVICE_TYPE = ?" +
|
||||
" WHERE ID = ?";
|
||||
stmt = conn.prepareStatement(updateDBQuery);
|
||||
stmt.setString(1, mobileFeature.getCode());
|
||||
stmt.setString(2, mobileFeature.getName());
|
||||
stmt.setString(3, mobileFeature.getDescription());
|
||||
stmt.setString(4, mobileFeature.getDeviceType());
|
||||
stmt.setInt(5, mobileFeature.getId());
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
status = true;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Updated MobileFeature " + mobileFeature.getCode());
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while updating the feature with feature code - '" +
|
||||
mobileFeature.getId() + "'";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteFeatureByCode(String mblFeatureCode)
|
||||
throws MobileDeviceManagementDAOException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String deleteDBQuery =
|
||||
"DELETE FROM AD_FEATURE WHERE CODE = ?";
|
||||
stmt = conn.prepareStatement(deleteDBQuery);
|
||||
stmt.setString(1, mblFeatureCode);
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
status = true;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Deleted MobileFeature code " + mblFeatureCode + " from the MDM database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while deleting feature with code - " + mblFeatureCode;
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteFeatureById(int mblFeatureId)
|
||||
throws MobileDeviceManagementDAOException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String deleteDBQuery =
|
||||
"DELETE FROM AD_FEATURE WHERE ID = ?";
|
||||
stmt = conn.prepareStatement(deleteDBQuery);
|
||||
stmt.setInt(1, mblFeatureId);
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
status = true;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Deleted MobileFeature id " + mblFeatureId + " from the MDM database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while deleting feature with id - " + mblFeatureId;
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobileFeature getFeatureByCode(String mblFeatureCode)
|
||||
throws MobileDeviceManagementDAOException {
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
MobileFeature mobileFeature = null;
|
||||
ResultSet resultSet = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String selectDBQuery =
|
||||
"SELECT ID, CODE, NAME, DESCRIPTION, DEVICE_TYPE FROM AD_FEATURE " +
|
||||
"WHERE CODE = ?";
|
||||
stmt = conn.prepareStatement(selectDBQuery);
|
||||
stmt.setString(1, mblFeatureCode);
|
||||
resultSet = stmt.executeQuery();
|
||||
if (resultSet.next()) {
|
||||
mobileFeature = new MobileFeature();
|
||||
mobileFeature.setId(resultSet.getInt(1));
|
||||
mobileFeature.setCode(resultSet.getString(2));
|
||||
mobileFeature.setName(resultSet.getString(3));
|
||||
mobileFeature.setDescription(resultSet.getString(4));
|
||||
mobileFeature.setDeviceType(resultSet.getString(5));
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Fetched MobileFeature " + mblFeatureCode + " from the MDM database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while fetching feature code - '" + mblFeatureCode + "'";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, resultSet);
|
||||
}
|
||||
return mobileFeature;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobileFeature getFeatureById(int mblFeatureId)
|
||||
throws MobileDeviceManagementDAOException {
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
MobileFeature mobileFeature = null;
|
||||
ResultSet resultSet = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String selectDBQuery =
|
||||
"SELECT ID, CODE, NAME, DESCRIPTION, DEVICE_TYPE FROM AD_FEATURE" +
|
||||
" WHERE ID = ?";
|
||||
stmt = conn.prepareStatement(selectDBQuery);
|
||||
stmt.setInt(1, mblFeatureId);
|
||||
resultSet = stmt.executeQuery();
|
||||
if (resultSet.next()) {
|
||||
mobileFeature = new MobileFeature();
|
||||
mobileFeature.setId(resultSet.getInt(1));
|
||||
mobileFeature.setCode(resultSet.getString(2));
|
||||
mobileFeature.setName(resultSet.getString(3));
|
||||
mobileFeature.setDescription(resultSet.getString(4));
|
||||
mobileFeature.setDeviceType(resultSet.getString(5));
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Fetched MobileFeatureId" + mblFeatureId + " from the MDM database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while fetching feature id - '" + mblFeatureId + "'";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, resultSet);
|
||||
}
|
||||
return mobileFeature;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MobileFeature> getAllFeatures() throws MobileDeviceManagementDAOException {
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
MobileFeature mobileFeature;
|
||||
List<MobileFeature> mobileFeatures = new ArrayList<MobileFeature>();
|
||||
ResultSet resultSet = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String selectDBQuery =
|
||||
"SELECT ID, CODE, NAME, DESCRIPTION, DEVICE_TYPE FROM AD_FEATURE";
|
||||
stmt = conn.prepareStatement(selectDBQuery);
|
||||
resultSet = stmt.executeQuery();
|
||||
while (resultSet.next()) {
|
||||
mobileFeature = new MobileFeature();
|
||||
mobileFeature.setId(resultSet.getInt(1));
|
||||
mobileFeature.setCode(resultSet.getString(2));
|
||||
mobileFeature.setName(resultSet.getString(3));
|
||||
mobileFeature.setDescription(resultSet.getString(4));
|
||||
mobileFeature.setDeviceType(resultSet.getString(5));
|
||||
mobileFeatures.add(mobileFeature);
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Fetched all MobileFeatures from the MDM database.");
|
||||
}
|
||||
return mobileFeatures;
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while fetching all features.'";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, resultSet);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MobileFeature> getFeatureByDeviceType(String deviceType) throws MobileDeviceManagementDAOException {
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
MobileFeature mobileFeature;
|
||||
List<MobileFeature> mobileFeatures = new ArrayList<>();
|
||||
ResultSet resultSet = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String selectDBQuery =
|
||||
"SELECT ID, CODE, NAME, DESCRIPTION, DEVICE_TYPE FROM AD_FEATURE" +
|
||||
" WHERE DEVICE_TYPE = ?";
|
||||
stmt = conn.prepareStatement(selectDBQuery);
|
||||
stmt.setString(1, deviceType);
|
||||
resultSet = stmt.executeQuery();
|
||||
while (resultSet.next()) {
|
||||
mobileFeature = new MobileFeature();
|
||||
mobileFeature.setId(resultSet.getInt(1));
|
||||
mobileFeature.setCode(resultSet.getString(2));
|
||||
mobileFeature.setName(resultSet.getString(3));
|
||||
mobileFeature.setDescription(resultSet.getString(4));
|
||||
mobileFeature.setDeviceType(resultSet.getString(5));
|
||||
mobileFeatures.add(mobileFeature);
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Fetched all MobileFeatures of type " + deviceType + " from the MDM" +
|
||||
" database.");
|
||||
}
|
||||
return mobileFeatures;
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while fetching all features.'";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
} finally {
|
||||
MobileDeviceManagementDAOUtil.cleanupResources(conn, stmt, resultSet);
|
||||
}
|
||||
}
|
||||
|
||||
private Connection getConnection() throws MobileDeviceManagementDAOException {
|
||||
try {
|
||||
return dataSource.getConnection();
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while obtaining a connection from the mobile specific " +
|
||||
"datasource.";
|
||||
log.error(msg, e);
|
||||
throw new MobileDeviceManagementDAOException(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
* 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("operation.js");
|
||||
var operationModule = require("/app/modules/business-controllers/operation.js")["operationModule"];
|
||||
var device = context.unit.params.device;
|
||||
var autoCompleteParams = context.unit.params.autoCompleteParams;
|
||||
var encodedFeaturePayloads=context.unit.params.encodedFeaturePayloads;
|
||||
var controlOperations = operationModule.getControlOperations(device);
|
||||
var queryParams = [];
|
||||
var formParams = [];
|
||||
var pathParams = [];
|
||||
for (var i = 0; i < controlOperations.length; i++) {
|
||||
var currentParamList = controlOperations[i]["params"];
|
||||
var uiParamList = controlOperations[i]["uiParams"];
|
||||
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]["uiParams"] = uiParamList;
|
||||
if (encodedFeaturePayloads) {
|
||||
controlOperations[i]["payload"] = getPayload(encodedFeaturePayloads, controlOperations[i]["operation"]);
|
||||
}
|
||||
}
|
||||
return {"control_operations": controlOperations, "device": device};
|
||||
}
|
||||
|
||||
function processParams(paramsList, autoCompleteParams) {
|
||||
for (var i = 0; i < paramsList.length; i++) {
|
||||
var paramName = paramsList[i];
|
||||
var paramValue = "";
|
||||
var paramType = "text";
|
||||
for (var k = 0; k < autoCompleteParams.length; k++) {
|
||||
if (paramName == autoCompleteParams[k].name) {
|
||||
paramValue = autoCompleteParams[k].value;
|
||||
paramType = "hidden";
|
||||
}
|
||||
}
|
||||
paramsList[i] = {"name": paramName, "value": paramValue, "type": paramType};
|
||||
}
|
||||
return paramsList;
|
||||
}
|
||||
|
||||
function getPayload(featuresPayload, featureCode){
|
||||
var featuresJSONPayloads = JSON.parse(featuresPayload);
|
||||
return featuresJSONPayloads[featureCode];
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0"
|
||||
}
|
@ -1,227 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* On operation click function.
|
||||
* @param selection: Selected operation
|
||||
*/
|
||||
function operationSelect(selection) {
|
||||
$(modalPopupContent).addClass("operation-data");
|
||||
$(modalPopupContent).html($(" .operation[data-operation-code=" + selection + "]").html());
|
||||
$(modalPopupContent).data("operation-code", selection);
|
||||
showPopup();
|
||||
}
|
||||
|
||||
function submitForm(formId) {
|
||||
var form = $("#" + formId);
|
||||
var uri = form.attr("action");
|
||||
var deviceId = form.data("device-id");
|
||||
var contentType = form.data("content-type");
|
||||
var operationCode = form.data("operation-code");
|
||||
var uriencodedQueryStr = "";
|
||||
var uriencodedFormStr = "";
|
||||
var payload = {};
|
||||
form.find("input").each(function () {
|
||||
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();
|
||||
if(input.attr("type") == "text"){
|
||||
payload[input.attr("id")] = input.val();
|
||||
} else if(input.attr("type") == "checkbox"){
|
||||
payload[input.attr("id")] = input.is(":checked");
|
||||
}
|
||||
}
|
||||
});
|
||||
uri += uriencodedQueryStr;
|
||||
var httpMethod = form.attr("method").toUpperCase();
|
||||
//var contentType = form.attr("enctype");
|
||||
|
||||
if (contentType == undefined || contentType == "") {
|
||||
contentType = "application/x-www-form-urlencoded";
|
||||
payload = uriencodedFormStr;
|
||||
}
|
||||
|
||||
//setting responses callbacks
|
||||
var defaultStatusClasses = "fw fw-stack-1x";
|
||||
var content = $("#operation-response-template").find(".content");
|
||||
var title = content.find("#title");
|
||||
var statusIcon = content.find("#status-icon");
|
||||
var description = content.find("#description");
|
||||
description.html("");
|
||||
var successCallBack = function (response) {
|
||||
var res = response;
|
||||
try {
|
||||
res = JSON.parse(response).messageFromServer;
|
||||
} catch (err) {
|
||||
//do nothing
|
||||
}
|
||||
title.html("Operation Triggered!");
|
||||
statusIcon.attr("class", defaultStatusClasses + " fw-check");
|
||||
description.html(res);
|
||||
console.log("success!");
|
||||
$(modalPopupContent).html(content.html());
|
||||
};
|
||||
var errorCallBack = function (response) {
|
||||
console.log(response);
|
||||
title.html("An Error Occurred!");
|
||||
statusIcon.attr("class", defaultStatusClasses + " fw-error");
|
||||
var reason = (response.responseText == "null")?response.statusText:response.responseText;
|
||||
try {
|
||||
reason = JSON.parse(reason).message;
|
||||
} catch (err) {
|
||||
//do nothing
|
||||
}
|
||||
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") {
|
||||
var deviceList = [deviceId];
|
||||
payload = generatePayload(operationCode, payload, deviceList);
|
||||
invokerUtil.post(uri, payload, successCallBack, errorCallBack, contentType);
|
||||
} else if (httpMethod == "PUT") {
|
||||
invokerUtil.put(uri, payload, successCallBack, errorCallBack, contentType);
|
||||
} else if (httpMethod == "DELETE") {
|
||||
invokerUtil.delete(uri, successCallBack, errorCallBack, contentType);
|
||||
} else {
|
||||
title.html("An Error Occurred!");
|
||||
statusIcon.attr("class", defaultStatusClasses + " fw-error");
|
||||
description.html("This operation requires http method: " + httpMethod + " which is not supported yet!");
|
||||
$(modalPopupContent).html(content.html());
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('submit', 'form', function (e) {
|
||||
cosole.log("darn!!");
|
||||
e.preventDefault();
|
||||
var postOperationRequest = $.ajax({
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
||||
// Constants to define operation types available
|
||||
var operationTypeConstants = {
|
||||
"PROFILE": "profile",
|
||||
"CONFIG": "config",
|
||||
"COMMAND": "command"
|
||||
};
|
||||
|
||||
|
||||
var generatePayload = function (operationCode, operationData, deviceList) {
|
||||
var payload;
|
||||
var operationType;
|
||||
switch (operationCode) {
|
||||
case windowsOperationConstants["CAMERA_OPERATION_CODE"]:
|
||||
operationType = operationTypeConstants["PROFILE"];
|
||||
payload = {
|
||||
"operation": {
|
||||
"enabled": operationData["cameraEnabled"]
|
||||
}
|
||||
};
|
||||
break;
|
||||
case windowsOperationConstants["CHANGE_LOCK_CODE_OPERATION_CODE"]:
|
||||
operationType = operationTypeConstants["PROFILE"];
|
||||
payload = {
|
||||
"operation": {
|
||||
"lockCode": operationData["lockCode"]
|
||||
}
|
||||
};
|
||||
break;
|
||||
case windowsOperationConstants["ENCRYPT_STORAGE_OPERATION_CODE"]:
|
||||
operationType = operationTypeConstants["PROFILE"];
|
||||
payload = {
|
||||
"operation": {
|
||||
"encrypted": operationData["encryptStorageEnabled"]
|
||||
}
|
||||
};
|
||||
break;
|
||||
case windowsOperationConstants["NOTIFICATION_OPERATION_CODE"]:
|
||||
operationType = operationTypeConstants["PROFILE"];
|
||||
payload = {
|
||||
"operation": {
|
||||
"message": operationData["message"]
|
||||
}
|
||||
};
|
||||
break;
|
||||
case windowsOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]:
|
||||
operationType = operationTypeConstants["PROFILE"];
|
||||
payload = {
|
||||
"operation": {
|
||||
"allowSimple": operationData["passcodePolicyAllowSimple"],
|
||||
"requireAlphanumeric": operationData["passcodePolicyRequireAlphanumeric"],
|
||||
"minLength": operationData["passcodePolicyMinLength"],
|
||||
"minComplexChars": operationData["passcodePolicyMinComplexChars"],
|
||||
"maxPINAgeInDays": operationData["passcodePolicyMaxPasscodeAgeInDays"],
|
||||
"pinHistory": operationData["passcodePolicyPasscodeHistory"],
|
||||
"maxFailedAttempts": operationData["passcodePolicyMaxFailedAttempts"]
|
||||
}
|
||||
};
|
||||
break;
|
||||
default:
|
||||
// If the operation is neither of above, it is a command operation
|
||||
operationType = operationTypeConstants["COMMAND"];
|
||||
// Operation payload of a command operation is simply an array of device IDs
|
||||
payload = deviceList;
|
||||
}
|
||||
|
||||
if (operationType == operationTypeConstants["PROFILE"] && deviceList) {
|
||||
payload["deviceIDs"] = deviceList;
|
||||
}
|
||||
|
||||
return payload;
|
||||
};
|
||||
|
||||
|
||||
// Constants to define Windows Operation Constants
|
||||
var windowsOperationConstants = {
|
||||
"PASSCODE_POLICY_OPERATION_CODE": "PASSCODE_POLICY",
|
||||
"CAMERA_OPERATION_CODE": "CAMERA",
|
||||
"ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE",
|
||||
"NOTIFICATION_OPERATION_CODE": "NOTIFICATION",
|
||||
"CHANGE_LOCK_CODE_OPERATION_CODE": "CHANGE_LOCK_CODE"
|
||||
};
|
@ -1,286 +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-padlock 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">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#enableEncryptionTab"
|
||||
aria-expanded="true" aria-controls="enableEncryptionTab">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Encryption Enable/Disable
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="enableEncryptionTab" class="panel-collapse panel-body collapse in" 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">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#passCodePolicy" aria-expanded="false"
|
||||
aria-controls="passCodePolicy" class="collapsed">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Passcode Policy
|
||||
</a>
|
||||
</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 panel-body" data-operation="wifi">
|
||||
<div class="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>
|
||||
|
||||
<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>
|
||||
<!-- /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">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#installApp" aria-expanded="true"
|
||||
aria-controls="installApp">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Install App
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="installApp" class="panel-collapse panel-body collapse in" 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">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#installWebClip" aria-expanded="true"
|
||||
aria-controls="installWebClip" class="collapsed">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Install Web Clip
|
||||
</a>
|
||||
</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">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#uninstallApp" aria-expanded="true"
|
||||
aria-controls="uninstallApp" class="collapsed">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Uninstall App
|
||||
</a>
|
||||
</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">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#cameraDisable" aria-expanded="true"
|
||||
aria-controls="cameraDisable">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Camera Enable/Disable
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="cameraDisable" class="panel-collapse panel-body collapse in" 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-circle-outline 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-circle-outline 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-circle-outline 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>
|
10
components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.new.operation-bar/operation-bar.hbs → components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.operation-bar/public/templates/operation-bar.hbs
10
components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.new.operation-bar/operation-bar.hbs → components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.operation-bar/public/templates/operation-bar.hbs
@ -1,249 +0,0 @@
|
||||
<div id="errorOperations" class="operation">
|
||||
<div class="modal-header">
|
||||
<h3 class="pull-left modal-title">
|
||||
<span class="fw-stack add-margin-right-2x">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-error fw-stack-1x"></i>
|
||||
</span>
|
||||
Operation cannot be performed !
|
||||
</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||
</div>
|
||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||
<h4>
|
||||
Please select a device or a list of devices to perform an operation.
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="buttons">
|
||||
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="errorOperationUnexpected" class="operation">
|
||||
<div class="modal-header">
|
||||
<h3 class="pull-left modal-title">
|
||||
<span class="fw-stack add-margin-right-2x">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-error fw-stack-1x"></i>
|
||||
</span>
|
||||
Operation cannot be performed !
|
||||
</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||
</div>
|
||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||
<h4>
|
||||
Unexpected error occurred. Please Try again later.
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="buttons">
|
||||
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="operationSuccess" class="operation">
|
||||
<div class="modal-header">
|
||||
<h3 class="pull-left modal-title">
|
||||
<span class="fw-stack add-margin-right-2x">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-check fw-stack-1x"></i>
|
||||
</span>
|
||||
Operation queued successfully !
|
||||
</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||
</div>
|
||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||
<h4>
|
||||
Operation has been queued successfully to be sent to the device.
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="buttons">
|
||||
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="messageSuccess" class="operation">
|
||||
<div class="modal-header">
|
||||
<h3 class="pull-left modal-title">
|
||||
<span class="fw-stack add-margin-right-2x">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw fw-check fw-stack-1x"></i>
|
||||
</span>
|
||||
Message sent successfully !
|
||||
</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||
</div>
|
||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||
<h4>Message has been queued to be sent to the device.</h4>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="buttons">
|
||||
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#each features}}
|
||||
<a href="javascript:operationSelect('{{code}}')" title="{{description}}">
|
||||
<i class="fw {{icon}}"></i>
|
||||
<span>{{name}}</span>
|
||||
</a>
|
||||
<div class="operation" data-operation-code="{{code}}">
|
||||
|
||||
<div class="modal-content clearfix">
|
||||
<div class="modal-header">
|
||||
<h3 class="pull-left modal-title">
|
||||
<span class="fw-stack add-margin-right-2x">
|
||||
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||
<i class="fw {{icon}} fw-stack-1x"></i>
|
||||
</span>
|
||||
{{name}}
|
||||
<br>
|
||||
</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||
</div>
|
||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||
<h4>
|
||||
{{#equal code "WIPE_DATA"}}
|
||||
{{#equal deviceType "android"}}
|
||||
{{#equal ownership "BYOD"}}
|
||||
Enter PIN code* of the device
|
||||
<br><br>
|
||||
<div>
|
||||
<input id="pin" type="password"
|
||||
class="form-control modal-input operationDataKeys"
|
||||
placeholder="[ Required for a BYOD device ]" data-key="pin" />
|
||||
</div>
|
||||
{{/equal}}
|
||||
{{/equal}}
|
||||
{{/equal}}
|
||||
{{#equal code "NOTIFICATION"}}
|
||||
Type your message below.
|
||||
<br><br>
|
||||
<div id="notification-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-control modal-input operationDataKeys"
|
||||
id="messageTitle" data-key="messageTitle" placeholder="Title here..." />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control modal-input operationDataKeys"
|
||||
id="messageText" data-key="messageText" placeholder="Message here..."></textarea>
|
||||
</div>
|
||||
<br>
|
||||
{{/equal}}
|
||||
{{#equal code "CHANGE_LOCK_CODE"}}
|
||||
Type new lock-code below.
|
||||
<br><br>
|
||||
<input type="password" class="form-control modal-input operationDataKeys" id="lockcode"
|
||||
data-key="lockCode" placeholder="Enter Lockcode"/>
|
||||
<br>
|
||||
{{/equal}}
|
||||
{{#equal code "DEVICE_LOCK"}}
|
||||
{{#equal deviceType "android"}}
|
||||
{{#equal ownership "COPE"}}
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="hard-lock" type="checkbox" class="form-control operationDataKeys"
|
||||
data-key="hard-lock"/>
|
||||
<span class="helper" title="Once it enables, device will be blocked permanently.">
|
||||
Enable Permanent Lock
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<br><br>
|
||||
{{/equal}}
|
||||
Type your message to be shown in the lock screen
|
||||
<br><br>
|
||||
<div>
|
||||
<textarea id="lock-message" class="form-control modal-input operationDataKeys"
|
||||
data-key="lock-message" placeholder="[ Message content is optional ]"></textarea>
|
||||
</div>
|
||||
{{/equal}}
|
||||
{{/equal}}
|
||||
{{#equal code "UPGRADE_FIRMWARE"}}
|
||||
{{#equal deviceType "android"}}
|
||||
Enter firmware upgrade scheduling information.
|
||||
<br><br>
|
||||
<label class="wr-input-control checkbox">
|
||||
<input id="instant-upgrade" type="checkbox" class="form-control operationDataKeys"
|
||||
data-key="instant-upgrade"/>
|
||||
<span class="helper"
|
||||
title="Once enabled, device firmware upgrade process will start instantly.">
|
||||
Instant Upgrade
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<br><br>
|
||||
<div class='input-group date' id='dateTimePicker'>
|
||||
Enter the date and time to schedule firmware upgrade.
|
||||
<br><br>
|
||||
<div id="firmware-error-msg" class="alert alert-danger hidden" role="alert">
|
||||
<i class="icon fw fw-error"></i><span></span>
|
||||
</div>
|
||||
<input type='text' class="form-control modal-input operationDataKeys"
|
||||
style="z-index : 900;" name="daterange" id="schedule" data-key="schedule"/>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class='wr-input-control' id='firmwareServerInfo'>
|
||||
Enter firmware upgrade server URL (ie. http://abc.com or http://abc.com/ota)
|
||||
(Optional).
|
||||
<br><br>
|
||||
<input type='text' class="form-control modal-input operationDataKeys" id="server"
|
||||
data-key="server"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.modalpopup-bg').css('z-index', '1000');
|
||||
$('.modalpopup-container').css('z-index', '1200');
|
||||
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
timePicker: true,
|
||||
showDropdowns: true,
|
||||
timePickerIncrement: 1,
|
||||
locale: {
|
||||
format: 'MM-DD-YYYY hh:mm a'
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#instant-upgrade').change(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$('#dateTimePicker').addClass("hidden");
|
||||
$("#schedule").val('');
|
||||
|
||||
} else {
|
||||
$('#dateTimePicker').removeClass("hidden");
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
timePicker: true,
|
||||
showDropdowns: true,
|
||||
timePickerIncrement: 1,
|
||||
locale: {
|
||||
format: 'MM-DD-YYYY hh:mm a'
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<br>
|
||||
{{/equal}}
|
||||
{{/equal}}
|
||||
<br><br>
|
||||
Do you want to perform this operation on selected device(s) ?
|
||||
<br>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="buttons">
|
||||
<a href="javascript:runOperation('{{code}}')" class="btn-operations">Yes</a>
|
||||
<a href="javascript:hidePopup()" class="btn-operations btn-default">No</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{/each}}
|
||||
<br class="c-both"/>
|
Loading…
Reference in new issue