forked from community/device-mgt-plugins
Merge branch 'master' of https://github.com/dulichan/product-mdm
commit
38b839a4a9
Binary file not shown.
@ -0,0 +1,40 @@
|
||||
<%
|
||||
/*
|
||||
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
var verb = request.getMethod();
|
||||
var uri = request.getRequestURI();
|
||||
var callPath=uri.replace("/cdm/api/","");
|
||||
var log = new Log();
|
||||
var deviceModule = require("/modules/device.js");
|
||||
|
||||
if (uri != null) {
|
||||
var uriMatcher = new URIMatcher(callPath);
|
||||
//log.info(callPath);
|
||||
log.info(uriMatcher.match("operation/{type}/{deviceid}/{operation}"));
|
||||
if (uriMatcher.match("operation/{type}/{deviceid}/{operation}")) {
|
||||
|
||||
var deviceId = uriMatcher.elements().deviceid;
|
||||
var type = uriMatcher.elements().type;
|
||||
var operation = uriMatcher.elements().operation;
|
||||
var result = deviceModule.performOperation(deviceId, operation,[],type);
|
||||
<!--log.info(result);-->
|
||||
<!--print(result);-->
|
||||
}
|
||||
}
|
||||
%>
|
@ -1,3 +1,21 @@
|
||||
<%
|
||||
// footer includes
|
||||
%>
|
||||
%>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="confirmModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">Operation Confirmation</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Do you wish to perform this operation?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" onclick="performOperation()">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue