This commit is contained in:
Garrett 2020-12-21 05:40:27 +00:00
parent 065fbdd430
commit 7b50c60b78
20 changed files with 1336 additions and 1318 deletions

View File

@ -7,45 +7,12 @@ $qls->Security->check_auth_page('administrator.php');
<?php require 'includes/header_start.php'; ?>
<!-- Jquery filer css -->
<link href="assets/plugins/jquery.filer/css/jquery.filer.css" rel="stylesheet" />
<link href="assets/plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css" rel="stylesheet" />
<!-- Jquery filer css -->
<link href="assets/plugins/jquery.filer/css/jquery.filer.css" rel="stylesheet" />
<link href="assets/plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css" rel="stylesheet" />
<?php require 'includes/header_end.php'; ?>
<div id="importModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="importModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="importModalLabel">Import</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgImport"></div>
</div>
</div>
</div>
</div>
<div class="p-20">
<div class="form-group clearfix">
<div class="col-sm-12 padding-left-0 padding-right-0">
<input type="file" name="files[]" id="fileDataImport" multiple="multiple">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<!-- Page-Title -->
<div class="row">

View File

@ -7,54 +7,11 @@ $qls->Security->check_auth_page('administrator.php');
<?php require 'includes/header_start.php'; ?>
<!-- X-editable css -->
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<!-- X-editable css -->
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<?php require 'includes/header_end.php'; ?>
<div id="removeUserModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="removeUserModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="removeUserModalLabel">Remove User</h4>
</div>
<div class="modal-body">
Delete: username?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary waves-effect waves-light">Ok</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="cancelEntitlementModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="cancelEntitlementModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="cancelEntitlementModalLabel">Cancel Entitlement</h4>
</div>
<div class="modal-body">
Confirm cancelation.
</div>
<div class="modal-footer">
<button id="confirmEntitlementCancellation" type="button" class="btn btn-secondary btn-danger waves-effect" data-toggle="modal" data-target="#cancelEntitlementModal">Confirm</button>
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<!-- Page-Title -->
<div class="row">

View File

@ -82,7 +82,7 @@ $( document ).ready(function() {
$('#objectTreeModal').modal('show');
});
$('#buttonObjectTreeModalAdd').click(function(){
$('#buttonObjectTreeModalSave').click(function(){
var node = $('#objTree').jstree('get_selected', false);
var nodeID = node[0];

View File

@ -38,6 +38,7 @@ function drawConnection(elementArray){
context.strokeStyle = 'LightSkyBlue';
context.lineWidth = 3;
context.beginPath();
console.log('Debug (elementArray): '+JSON.stringify(elementArray));
$.each(elementArray, function(index, element){
var elemA = element[0];
@ -235,27 +236,25 @@ function crawlPath(selectedPort){
}
while($(selectedPort).length) {
// Crawl connection peer
var selectedPortID = $(selectedPort).attr('id');
var selectedPartition = $(selectedPort).closest('.partition');
var connectedPortID = $(selectedPort).data('connectedGlobalId');
var connectedPort = $('#'+connectedPortID);
console.log('here1');
portArray.push(selectedPort);
// Crawl connection peer
var connectedPortIDString = $(selectedPort).data('connectedGlobalId');
var connectedPortIDArray = JSON.parse(atob(connectedPortIDString));
console.log('Debug (connectedPortIDString): '+atob(connectedPortIDString));
if(connectedPortIDArray.length) {
var peerPortFound = false;
$.each(connectedPortIDArray, function(index, connectedPortID){
console.log('Debug (connectedPortID): '+connectedPortID);
var connectedPort = $('#'+connectedPortID);
if($(connectedPort).length) {
portArray.push(connectedPort)
connectionArray.push([selectedPort, connectedPort]);
} else {
if(connectedPortID != 'none') {
connectionArray.push([selectedPort, connectedPortID]);
}
break;
}
var connectedPartition = $(connectedPort).closest('.partition');
var connectedPartitionPeerID = $(connectedPartition).data('peerGlobalId');
@ -272,12 +271,27 @@ function crawlPath(selectedPort){
var connectedPortIDArray = connectedPortID.split('-');
var peerPort = connectedPortIDArray[5];
var selectedPort = $('#port-4-'+peerID+'-'+peerFace+'-'+peerDepth+'-'+peerPort);
selectedPort = $('#port-4-'+peerID+'-'+peerFace+'-'+peerDepth+'-'+peerPort);
peerPortFound = true;
} else {
if(connectedPartitionPeerID != 'none') {
trunkArray.push([connectedPartition, connectedPartitionPeerID]);
}
break;
//selectedPort = false;
//return false;
}
} else {
connectionArray.push([selectedPort, connectedPortID]);
//selectedPort = false;
//return false;
}
});
if(peerPortFound == false) {
selectedPort = false;
}
} else {
selectedPort = false;
}
}
}

View File

@ -706,6 +706,14 @@ function postProcessCable(){
$( document ).ready(function() {
$('#checkboxBreakoutCable').on('change', function(){
if($(this).is(':checked')) {
$('#objTree').jstree(true).settings.core.multiple = true;
} else {
$('#objTree').jstree(true).settings.core.multiple = false;
}
});
$('#printFullPath').on('click', function(event){
event.preventDefault();
$('#containerFullPath').printThis({
@ -943,7 +951,11 @@ $( document ).ready(function() {
$('#buttonObjectTreeModalSave').on('click', function(){
var selectedNode = $('#objTree').jstree('get_selected', true);
var value = selectedNode[0].data.globalID;
var value = [];
$.each(selectedNode, function(index, node){
value.push(node.data.globalID);
});
//var value = selectedNode[0].data.globalID;
var objID = $(document).data('clickedObjID');
var objFace = $(document).data('clickedObjFace');
var objDepth = $(document).data('clickedObjPartitionDepth');
@ -959,38 +971,6 @@ $( document ).ready(function() {
};
postProcessCable.call(data);
/* data = JSON.stringify(data);
$.post('backend/process_cable.php', {data:data}, function(response){
var responseJSON = JSON.parse(response);
if (responseJSON.active == 'inactive'){
window.location.replace("/");
} else if ($(responseJSON.error).size() > 0){
displayErrorElement(responseJSON.error, $('#alertMsgObjTree'));
} else {
var optionText = $('#selectPort').find(':selected').text();
$('#port-4-'+objID+'-'+objFace+'-'+objDepth+'-'+objPort).addClass('populated').data('connectedGlobalId', 'port-'+responseJSON.success.peerPortID);
if($('#port-'+responseJSON.success.peerPortID).length) {
$('#port-'+responseJSON.success.peerPortID).addClass('populated').data('connectedGlobalId', '#port-4-'+objID+'-'+objFace+'-'+objDepth+'-'+objPort);
}
if($('#port-'+responseJSON.success.oldPeerPortID).length) {
$('#port-'+responseJSON.success.oldPeerPortID).removeClass('populated').data('connectedGlobalId', 'none');
}
var interfaceSelectionElem = $('#selectPort').find(':selected');
portDesignation(interfaceSelectionElem, 'add', 'C');
$('#checkboxPopulated').prop("checked", true);
$('#checkboxPopulated').prop("disabled", true);
retrievePortPath(objID, objFace, objDepth, objPort);
refreshPathData();
redraw();
$('#objTree').jstree('deselect_all');
$('#objectTreeModal').modal('hide');
$(document).data('peerPortID', value);
}
}); */
});
$('#buttonObjectTreeModalClear').on('click', function(){
@ -1006,8 +986,7 @@ $( document ).ready(function() {
var objPort = $(document).data('clickedObjPortID');
var data = {
property: 'connectionExplore',
value: 'clear',
property: 'connectionExploreClear',
objID: objID,
objFace: objFace,
objDepth: objDepth,
@ -1023,8 +1002,10 @@ $( document ).ready(function() {
displayError(responseJSON.error);
} else {
$('#port-4-'+objID+'-'+objFace+'-'+objDepth+'-'+objPort).removeClass('populated').data('connectedGlobalId', 'none');
if($('#port-'+responseJSON.success.peerPortID).length) {
$('#port-'+responseJSON.success.peerPortID).removeClass('populated').data('connectedGlobalId', 'none');
if(responseJSON.success.oldPeerPortID) {
if($('#port-'+responseJSON.success.oldPeerPortID).length) {
$('#port-'+responseJSON.success.oldPeerPortID).removeClass('populated').data('connectedGlobalId', 'none');
}
}
var interfaceSelectionElem = $('#selectPort').find(':selected');

View File

@ -166,6 +166,50 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
}
break;
case 'connectionExploreClear':
$validate->returnData['success'] = array();
// Retrieve object data
$objID = $data['objID'];
$objFace = $data['objFace'];
$objDepth = $data['objDepth'];
$objPort = $data['objPort'];
$obj = (isset($qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort])) ? $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort] : false;
// Retrieve old peer port ID so it can have the "populated" class cleared
if($obj) {
$oldPeerPortID = '4-'.$obj['id'].'-'.$obj['face'].'-'.$obj['depth'].'-'.$obj['port'];
} else {
$oldPeerPortID = false;
}
// Clear inventory table entry
$objRowID = $obj['rowID'];
if($obj['localEndID'] or $obj['remoteEndID']) {
clearTableInventory($qls, $obj['localAttrPrefix'], $objRowID);
} else {
$qls->SQL->delete('app_inventory', array('id' => array('=', $objRowID)));
}
// Clear populated port entry
clearTablePopulated($qls, $objID, $objFace, $objDepth, $objPort);
// Log history
$localPort = $qls->App->generateObjectPortName($objID, $objFace, $objDepth, $objPort);
$remotePortData = $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort];
$remoteObjID = $remotePortData['id'];
$remoteObjFace = $remotePortData['face'];
$remoteObjDepth = $remotePortData['depth'];
$remoteObjPort = $remotePortData['port'];
$remotePort = $qls->App->generateObjectPortName($remoteObjID, $remoteObjFace, $remoteObjDepth, $remoteObjPort);
$actionString = 'Deleted connection: <strong>'.$localPort.'</strong> to <strong>'.$remotePort.'</strong>';
$qls->App->logAction(3, 3, $actionString);
$validate->returnData['success']['oldPeerPortID'] = $oldPeerPortID;
break;
case 'connectionExplore':
require_once '../includes/path_functions.php';
$validate->returnData['success'] = array();
@ -173,40 +217,22 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
$clear = $value == 'clear' ? true : false;
$peerPortID = '';
if($clear) {
$elementID = $elementFace = $elementDepth = $elementPort = 0;
} else {
$valueArray = explode('-', $value);
$elementID = $valueArray[1];
$elementFace = $valueArray[2];
$elementDepth = $valueArray[3];
$elementPort = $valueArray[4];
}
foreach($value as $peerPortString) {
$peerPortArray = explode('-', $peerPortString);
$elementID = $peerPortArray[1];
$elementFace = $peerPortArray[2];
$elementDepth = $peerPortArray[3];
$elementPort = $peerPortArray[4];
$element = (isset($qls->App->inventoryArray[$elementID][$elementFace][$elementDepth][$elementPort])) ? $qls->App->inventoryArray[$elementID][$elementFace][$elementDepth][$elementPort] : false;
$objID = $data['objID'];
$objFace = $data['objFace'];
$objDepth = $data['objDepth'];
$objPort = $data['objPort'];
$obj = (isset($qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort])) ? $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort] : false;
if(loopDetected($qls, $objID, $objFace, $objDepth, $objPort, $elementID, $elementFace, $elementDepth, $elementPort)) {
$errMsg = 'Loop detected.';
array_push($validate->returnData['error'], $errMsg);
} else {
$query = $qls->SQL->select('*', 'app_inventory', '(a_object_id = '.$objID.' AND a_object_face = '.$objFace.' AND a_object_depth = '.$objDepth.' AND a_port_id = '.$objPort.') OR (b_object_id = '.$objID.' AND b_object_face = '.$objFace.' AND b_object_depth = '.$objDepth.' AND b_port_id = '.$objPort.')');
$objEntry = $qls->SQL->num_rows($query) ? $qls->SQL->fetch_assoc($query) : false;
if($clear) {
$elementEntry = false;
if($objEntry) {
$elementAttr = ($objEntry['a_object_id'] == $objID and $objEntry['a_object_face'] == $objFace and $objEntry['a_object_depth'] == $objDepth and $objEntry['a_port_id'] == $objPort) ? 'b' : 'a';
$peerPortID = '4-'.$objEntry[$elementAttr.'_object_id'].'-'.$objEntry[$elementAttr.'_object_face'].'-'.$objEntry[$elementAttr.'_object_depth'].'-'.$objEntry[$elementAttr.'_port_id'];
} else {
$peerPortID = '4-0-0-0-0';
}
} else {
$query = $qls->SQL->select('*', 'app_inventory', '(a_object_id = '.$elementID.' AND a_object_face = '.$elementFace.' AND a_object_depth = '.$elementDepth.' AND a_port_id = '.$elementPort.') OR (b_object_id = '.$elementID.' AND b_object_face = '.$elementFace.' AND b_object_depth = '.$elementDepth.' AND b_port_id = '.$elementPort.')');
$elementEntry = $qls->SQL->num_rows($query) ? $qls->SQL->fetch_assoc($query) : false;
$peerPortID = '4-'.$elementID.'-'.$elementFace.'-'.$elementDepth.'-'.$elementPort;
// Clear trunk if this is a trunked floorplan object
@ -226,66 +252,67 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
}
}
}
}
// Retrieve old peer port ID so it can have the "populated" class cleared
if(isset($qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort])) {
$inventoryEntry = $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort];
$oldPeerPortID = '4-'.$inventoryEntry['id'].'-'.$inventoryEntry['face'].'-'.$inventoryEntry['depth'].'-'.$inventoryEntry['port'];
if($obj) {
$oldPeerPortID = '4-'.$obj['id'].'-'.$obj['face'].'-'.$obj['depth'].'-'.$obj['port'];
} else {
$oldPeerPortID = false;
}
// Find which ports are already connected
if($objEntry and $elementEntry) {
$objAttr = ($objEntry['a_object_id'] == $objID and $objEntry['a_object_face'] == $objFace and $objEntry['a_object_depth'] == $objDepth and $objEntry['a_port_id'] == $objPort) ? 'a' : 'b';
$elementAttr = ($elementEntry['a_object_id'] == $elementID) ? 'a' : 'b';
// Clear existing connections
if($obj and $element) {
$objRowID = $obj['rowID'];
$elementRowID = $element['rowID'];
// Are the ports connected to each other?
if($objEntry['id'] == $elementEntry['id']) {
$entryID = $objEntry['id'];
if($objEntry['a_id'] or $objEntry['b_id']) {
clearTableInventory($qls, 'a', $entryID);
clearTableInventory($qls, 'b', $entryID);
if($obj['rowID'] == $element['rowID']) {
if($obj['localEndID'] or $obj['remoteEndID']) {
clearTableInventory($qls, 'a', $objRowID);
clearTableInventory($qls, 'b', $objRowID);
} else {
$qls->SQL->delete('app_inventory', array('id' => array('=', $entryID)));
$qls->SQL->delete('app_inventory', array('id' => array('=', $objRowID)));
}
} else {
if($objEntry['a_id'] or $objEntry['b_id']) {
clearTableInventory($qls, $objAttr, $objEntry['id']);
if($obj['localEndID'] or $obj['remoteEndID']) {
clearTableInventory($qls, $obj['localAttrPrefix'], $objRowID);
} else {
$qls->SQL->delete('app_inventory', array('id' => array('=', $objEntry['id'])));
$qls->SQL->delete('app_inventory', array('id' => array('=', $objRowID)));
}
if($elementEntry['a_id'] or $elementEntry['b_id']) {
clearTableInventory($qls, $elementAttr, $elementEntry['id']);
if($element['localEndID'] or $element['remoteEndID']) {
clearTableInventory($qls, $element['localAttrPrefix'], $elementRowID);
} else {
$qls->SQL->delete('app_inventory', array('id' => array('=', $elementEntry['id'])));
$qls->SQL->delete('app_inventory', array('id' => array('=', $elementRowID)));
}
}
} else if($objEntry) {
$objAttr = ($objEntry['a_object_id'] == $objID and $objEntry['a_object_face'] == $objFace and $objEntry['a_object_depth'] == $objDepth and $objEntry['a_port_id'] == $objPort) ? 'a' : 'b';
} else if($obj) {
if($objEntry['a_id'] or $objEntry['b_id']) {
clearTableInventory($qls, $objAttr, $objEntry['id']);
$objRowID = $obj['rowID'];
if($obj['localEndID'] or $obj['remoteEndID']) {
clearTableInventory($qls, $obj['localAttrPrefix'], $objRowID);
} else {
$qls->SQL->delete('app_inventory', array('id' => array('=', $objEntry['id'])));
$qls->SQL->delete('app_inventory', array('id' => array('=', $objRowID)));
}
} else if($elementEntry) {
$elementAttr = ($elementEntry['a_object_id'] == $elementID and $elementEntry['a_object_face'] == $elementFace and $elementEntry['a_object_depth'] == $elementDepth and $elementEntry['a_port_id'] == $elementPort) ? 'a' : 'b';
} else if($element) {
if($elementEntry['a_id'] or $elementEntry['b_id']) {
clearTableInventory($qls, $elementAttr, $elementEntry['id']);
$elementRowID = $element['rowID'];
if($element['localEndID'] or $element['remoteEndID']) {
clearTableInventory($qls, $element['localAttrPrefix'], $elementRowID);
} else {
$qls->SQL->delete('app_inventory', array('id' => array('=', $elementEntry['id'])));
$qls->SQL->delete('app_inventory', array('id' => array('=', $elementRowID)));
}
}
// Clear populated port entry
clearTablePopulated($qls, $objID, $objFace, $objDepth, $objPort);
clearTablePopulated($qls, $elementID, $elementFace, $elementDepth, $elementPort);
if(!$clear) {
// Insert new connection
insertTableInventory($qls, $objID, $objFace, $objDepth, $objPort, $elementID, $elementFace, $elementDepth, $elementPort);
// Log history
@ -294,29 +321,11 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
$actionString = 'Added connection: <strong>'.$localPort.'</strong> to <strong>'.$remotePort.'</strong>';
$qls->App->logAction(3, 1, $actionString);
} else {
// Log history
$localPort = $qls->App->generateObjectPortName($objID, $objFace, $objDepth, $objPort);
$remotePortData = $qls->App->inventoryArray[$objID][$objFace][$objDepth][$objPort];
$remoteObjID = $remotePortData['id'];
$remoteObjFace = $remotePortData['face'];
$remoteObjDepth = $remotePortData['depth'];
$remoteObjPort = $remotePortData['port'];
$remotePort = $qls->App->generateObjectPortName($remoteObjID, $remoteObjFace, $remoteObjDepth, $remoteObjPort);
$actionString = 'Deleted connection: <strong>'.$localPort.'</strong> to <strong>'.$remotePort.'</strong>';
$qls->App->logAction(3, 3, $actionString);
}
//include_once $_SERVER['DOCUMENT_ROOT'].'/includes/content-path.php';
//$validate->returnData['success']['pathFull'] = $qls->App->buildPathFull($path, false);
$validate->returnData['success']['peerPortID'] = $peerPortID;
$validate->returnData['success']['oldPeerPortID'] = $oldPeerPortID;
}
break;
}
}
@ -324,7 +333,7 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){
}
function validate($data, &$validate, &$qls){
$propertiesArray = array('connectorType', 'cableLength', 'cableMediaType', 'cableEditable', 'connectionScan', 'connectionExplore');
$propertiesArray = array('connectorType', 'cableLength', 'cableMediaType', 'cableEditable', 'connectionScan', 'connectionExplore', 'connectionExploreClear');
//Validate property
if($validate->validateInArray($data['property'], $propertiesArray, 'property type')) {
@ -377,19 +386,38 @@ function validate($data, &$validate, &$qls){
}
}
} else if ($data['property'] == 'connectionExploreClear') {
} else if ($data['property'] == 'connectionExplore') {
$remotePortArray = explode('-', $data['value']);
$remoteID = $remotePortArray[1];
$remoteFace = $remotePortArray[2];
$remoteDepth = $remotePortArray[3];
$remotePort = $remotePortArray[4];
$remotePortDataArray = $data['value'];
$remotePortArray = array();
if(is_array($remotePortDataArray)) {
foreach($remotePortDataArray as $remotePortDataString) {
$remotePortData = explode('-', $remotePortDataString);
$workingArray = array(
'remoteID' => $remotePortData[1],
'remoteFace' => $remotePortData[2],
'remoteDepth' => $remotePortData[3],
'remotePort' => $remotePortData[4]
);
array_push($remotePortArray, $workingArray);
}
}
$localID = $data['objID'];
$localFace = $data['objFace'];
$localDepth = $data['objDepth'];
$localPort = $data['objPort'];
foreach($remotePortArray as $remotePortData) {
$remoteID = $remotePortData['remoteID'];
$remoteFace = $remotePortData['remoteFace'];
$remoteDepth = $remotePortData['remoteDepth'];
$remotePort = $remotePortData['remotePort'];
// Validate port is not connected to itself
if($remoteID == $localID and $remoteFace == $localFace and $remoteDepth == $localDepth and $remotePort == $localPort) {
$errMsg = 'Cannot connect port to itself.';
array_push($validate->returnData['error'], $errMsg);
@ -402,6 +430,20 @@ function validate($data, &$validate, &$qls){
);
$validate->validateTrunkedEndpoint($connectionPeerArray);
// Validate no loops will result
if($qls->App->loopDetected($localID, $localFace, $localDepth, $localPort, $remoteID, $remoteFace, $remoteDepth, $remotePort)) {
$errMsg = 'Loop detected.';
array_push($validate->returnData['error'], $errMsg);
}
// Does this action need to be confirmed?
if(!isset($data['confirmed'])) {
if (isset($qls->App->inventoryArray[$remoteID][$remoteFace][$remoteDepth][$remotePort])) {
$validate->returnData['data']['confirmMsg'] = 'Overwrite existing connection?';
$validate->returnData['confirm'] = true;
}
}
// Validate entitlement
$query = $qls->SQL->select('id', 'app_inventory', array('a_object_id' => array('>', 0), 'AND', 'b_object_id' => array('>', 0)));
$conNum = $qls->SQL->num_rows($query) + 1;
@ -410,16 +452,9 @@ function validate($data, &$validate, &$qls){
$errMsg = 'Exceeded entitled connection count.';
array_push($validate->returnData['error'], $errMsg);
}
if(!isset($data['confirmed'])) {
if (isset($qls->App->inventoryArray[$remoteID][$remoteFace][$remoteDepth][$remotePort])) {
$validate->returnData['data']['confirmMsg'] = 'Overwrite existing connection?';
$validate->returnData['confirm'] = true;
}
}
}
}
return;
}

View File

@ -14,7 +14,7 @@ $qls->Security->check_auth_page('operator.php');
<link href="assets/plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<?php require 'includes/header_end.php'; ?>
<?php require_once './includes/modals.php'; ?>
<!-- Page-Title -->
<div class="row">

View File

@ -1,47 +0,0 @@
<?php
define('QUADODO_IN_SYSTEM', true);
require_once './includes/header.php';
require_once './includes/redirectToLogin.php';
$qls->Security->check_auth_page('administrator.php');
?>
<?php require 'includes/header_start.php'; ?>
<!-- DataTables -->
<link href="assets/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<!-- Responsive datatable examples -->
<link href="assets/plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<?php require 'includes/header_end.php'; ?>
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<h4 class="page-title">Cable Inventory</h4>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="card-box table-responsive">
<?php require_once './includes/content-demo_inventory.php';?>
</div>
</div>
</div> <!-- end row -->
<?php require 'includes/footer_start.php' ?>
<!-- Required datatable js -->
<script src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="assets/plugins/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Responsive examples -->
<script src="assets/plugins/datatables/dataTables.responsive.min.js"></script>
<script src="assets/plugins/datatables/responsive.bootstrap4.min.js"></script>
<script src="assets/plugins/barcode/jquery.barcode.min.js"></script>
<script src="assets/pages/jquery.cable_manager.js"></script>
<?php require 'includes/footer_end.php' ?>

View File

@ -7,50 +7,13 @@ $qls->Security->check_auth_page('user.php');
<?php require 'includes/header_start.php'; ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<link href="assets/css/style-cabinet.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-object.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-templates.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<link href="assets/css/style-cabinet.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-object.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-templates.css" rel="stylesheet" type="text/css"/>
<?php require 'includes/header_end.php'; ?>
<!-- object tree modal -->
<div id="objectTreeModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="objectTreeModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="objectTreeModalLabel"></h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgObjTree" class="m-t-15"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div id="objTree" class="navTree"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="buttonObjectTreeModalCancel" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button id="buttonObjectTreeModalAdd" type="button" class="btn btn-primary waves-effect waves-light">Add</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<!-- Make server data available to client via hidden inputs -->
<?php include_once('includes/content-build-serverData.php'); ?>

View File

@ -24,96 +24,7 @@ $qls->Security->check_auth_page('operator.php');
<link href="assets/plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css" rel="stylesheet" />
<?php require 'includes/header_end.php'; ?>
<?php require_once './includes/content-object_tree_modal.php'; ?>
<!-- image upload modal -->
<div id="modalImageUpload" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelImageUpload" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelImageUpload">Floorplan Image</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgImageUpload"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div class="p-20">
<div class="form-group clearfix">
<div id="containerFloorplanImage" class="col-sm-12 padding-left-0 padding-right-0">
<input type="file" name="files[]" id="fileFloorplanImage" multiple="multiple">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- combined template modal -->
<div id="modalCreateCombinedTemplate" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelCreateCombinedTemplate" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelImageUpload">Create Combined Template</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgCreateCombinedTemplate"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<!-- Name -->
<fieldset class="form-group">
<label>Name <i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Alphanumeric characters as well as hyphens (-), underscores (_), forward slashes (\/), and backslashes (\)."></i></label>
<input id="inputCreateCombinedTemplateName" class="form-control" type="text" name="name" placeholder="New_Template" value="New_Template">
</fieldset>
<!-- Category -->
<fieldset class="form-group">
<label>Category <i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Select a template category."></i></label>
<select id="inputCreateCombinedTemplateCategory" name="category" class="form-control">
<?php $qls->App->generateCategoryOptions(); ?>
</select>
</fieldset>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button id="buttonCreateCombinedTemplateModalSave" type="button" class="btn btn-primary waves-effect waves-light">Save</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<!-- Make server data available to client via hidden inputs -->
<?php include_once('includes/content-build-serverData.php'); ?>

View File

@ -7,151 +7,23 @@ $qls->Security->check_auth_page('user.php');
<?php require 'includes/header_start.php'; ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<link href="assets/css/style-cabinet.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-object.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-templates.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<link href="assets/css/style-cabinet.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-object.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-templates.css" rel="stylesheet" type="text/css"/>
<!-- X-editable css -->
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<!-- X-editable css -->
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<!-- DataTables -->
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<!-- DataTables -->
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<!-- ION Slider -->
<link href="assets/plugins/ion-rangeslider/ion.rangeSlider.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/ion-rangeslider/ion.rangeSlider.skinModern.css" rel="stylesheet" type="text/css"/>
<!-- ION Slider -->
<link href="assets/plugins/ion-rangeslider/ion.rangeSlider.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/ion-rangeslider/ion.rangeSlider.skinModern.css" rel="stylesheet" type="text/css"/>
<?php require 'includes/header_end.php'; ?>
<?php require_once './includes/content-object_tree_modal.php'; ?>
<!-- sample modal content -->
<div id="modalPathFinder" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="myModalLabel">Find Path</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgModal"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div class="row">
<div class="col-sm-6">
<dl class="dl-horizontal row">
<dt class="col-sm-3">Local Port:</dt>
<dd id="pathFinderLocalPort" class="col-sm-9"></dd>
<dt class="col-sm-3">Remote Port:</dt>
<dd class="col-sm-9"><div id="pathFinderRemotePort"></div><div id="pathFinderTree" class="navTree m-b-30"></div></dd>
</dl>
</div>
<div class="col-sm-6">
<?php
echo '<input id="pathFinderMaxResults" type="hidden" value="'.PATH_FINDER_MAX_RESULTS.'">';
echo '<input id="pathFinderMaxResultsDefault" type="hidden" value="'.PATH_FINDER_MAX_RESULTS_DEFAULT.'">';
echo '<input id="pathFinderMaxDepth" type="hidden" value="'.PATH_FINDER_MAX_DEPTH.'">';
echo '<input id="pathFinderMaxDepthDefault" type="hidden" value="'.PATH_FINDER_MAX_DEPTH_DEFAULT.'">';
?>
<form class="form-horizontal">
<div class="form-group row">
<label for="rangeResults" class="col-sm-2 control-label"><b>Max Results</b><i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Maximum number of paths to return for each media type."></i></label>
<div class="col-sm-10">
<input type="text" id="rangeResults">
</div>
</div>
<div class="form-group row">
<label for="rangeDepth" class="col-sm-2 control-label"><b>Max Depth</b><i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Maximum number of cable jumpers for each path returned."></i></label>
<div class="col-sm-10">
<input type="text" id="rangeDepth">
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div title="Run">
<button id="buttonPathFinderRun" class="btn btn-sm waves-effect waves-light btn-primary" type="button" disabled>
<span class="btn-label"><i class="fa fa-cogs"></i></span>
Find Paths
</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card-box">
<div class="card">
<div class="card-header">Path
</div>
<div class="card-block">
<blockquote class="card-blockquote">
<div class="table-responsive">
<table id="cablePathTable" class="table table-striped table-bordered">
<thead>
<tr>
<th>MediaType</th>
<th>Local</th>
<th>Adj.</th>
<th>Path</th>
<th>Total</th>
<!--th></th-->
</tr>
</thead>
<tbody id="cablePathTableBody">
</tbody>
</table>
</div>
</blockquote>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card-box">
<div class="card">
<div class="card-header">Path
<span>
<div class="btn-group pull-right">
<button type="button" class="btn btn-sm btn-custom dropdown-toggle waves-effect waves-light" data-toggle="dropdown" aria-expanded="false">Actions <span class="m-l-5"><i class="fa fa-cog"></i></span></button>
<div class="dropdown-menu">
<a id="printPathFinder" class="dropdown-item" href="#" ><i class="ion-map"></i></span> Print</a>
</div>
</div>
</span>
</div>
<div class="card-block">
<blockquote class="card-blockquote">
<div id="containerCablePath"></div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<!-- Make server data available to client via hidden inputs -->
<?php include_once('includes/content-build-serverData.php'); ?>

View File

@ -289,7 +289,10 @@ var $qls;
while($row = $this->qls->SQL->fetch_assoc($query)) {
$this->inventoryAllArray[$row['id']] = $row;
if($row['a_object_id'] != 0) {
$this->inventoryArray[$row['a_object_id']][$row['a_object_face']][$row['a_object_depth']][$row['a_port_id']] = array(
if(!isset($this->inventoryArray[$row['a_object_id']][$row['a_object_face']][$row['a_object_depth']][$row['a_port_id']])) {
$this->inventoryArray[$row['a_object_id']][$row['a_object_face']][$row['a_object_depth']][$row['a_port_id']] = array();
}
array_push($this->inventoryArray[$row['a_object_id']][$row['a_object_face']][$row['a_object_depth']][$row['a_port_id']], array(
'rowID' => $row['id'],
'id' => $row['b_object_id'],
'face' => $row['b_object_face'],
@ -299,10 +302,13 @@ var $qls;
'localAttrPrefix' => 'a',
'remoteEndID' => $row['b_id'],
'remoteAttrPrefix' => 'b'
);
));
}
if($row['b_object_id'] != 0) {
$this->inventoryArray[$row['b_object_id']][$row['b_object_face']][$row['b_object_depth']][$row['b_port_id']] = array(
if(!isset($this->inventoryArray[$row['b_object_id']][$row['b_object_face']][$row['b_object_depth']][$row['b_port_id']])) {
$this->inventoryArray[$row['b_object_id']][$row['b_object_face']][$row['b_object_depth']][$row['b_port_id']] = array();
}
array_push($this->inventoryArray[$row['b_object_id']][$row['b_object_face']][$row['b_object_depth']][$row['b_port_id']], array(
'rowID' => $row['id'],
'id' => $row['a_object_id'],
'face' => $row['a_object_face'],
@ -312,7 +318,7 @@ var $qls;
'localAttrPrefix' => 'b',
'remoteEndID' => $row['a_id'],
'remoteAttrPrefix' => 'a'
);
));
}
if($row['a_id'] != 0) {
$this->inventoryByIDArray[$row['a_id']] = array(
@ -1846,7 +1852,8 @@ var $qls;
}
function clearInventoryTable($objID, $objFace, $objDepth, $objPort){
if($inventoryEntry = $this->inventoryArray[$objID][$objFace][$objDepth][$objPort]) {
if($inventory = $this->inventoryArray[$objID][$objFace][$objDepth][$objPort]) {
foreach($inventory as $inventoryEntryIndex => $inventoryEntry) {
$rowID = $inventoryEntry['rowID'];
if($inventoryEntry['localEndID'] === 0 and $inventoryEntry['remoteEndID'] === 0) {
// If this is an unmanaged connection, delete the entry
@ -1861,11 +1868,12 @@ var $qls;
$attrPrefix.'_port_id' => 0
);
$this->qls->SQL->update('app_inventory', $set, array('id' => array('=', $rowID)));
if(isset($this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']])) {
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']]['id'] = 0;
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']]['face'] = 0;
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']]['depth'] = 0;
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']]['port'] = 0;
if(isset($this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']][$inventoryEntryIndex])) {
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']][$inventoryEntryIndex]['id'] = 0;
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']][$inventoryEntryIndex]['face'] = 0;
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']][$inventoryEntryIndex]['depth'] = 0;
$this->inventoryArray[$inventoryEntry['id']][$inventoryEntry['face']][$inventoryEntry['depth']][$inventoryEntry['port']][$inventoryEntryIndex]['port'] = 0;
}
}
}
unset($this->inventoryArray[$objID][$objFace][$objDepth][$objPort]);
@ -2532,19 +2540,21 @@ var $qls;
}
// Attr - code39
$code39 = 0;
$connectionArray = array();
if(isset($this->inventoryArray[$objID][$objFace][$objDepth][$portIndex])) {
$connection = $this->inventoryArray[$objID][$objFace][$objDepth][$portIndex];
$connectionArray = array();
foreach($this->inventoryArray[$objID][$objFace][$objDepth][$portIndex] as $connection) {
$inventoryID = $connection['localEndID'];
$code39 = $this->inventoryByIDArray[$inventoryID]['localEndCode39'];
$attrAssocArray['data-code39'] = $code39;
// Connected Object GlobalID
$connectedGlobalID = 'port-4-'.$connection['id'].'-'.$connection['face'].'-'.$connection['depth'].'-'.$connection['port'];
$attrAssocArray['data-connected-global-id'] = $connectedGlobalID;
} else {
$attrAssocArray['data-code39'] = 0;
$attrAssocArray['data-connected-global-id'] = 'none';
array_push($connectionArray, $connectedGlobalID);
}
}
$attrAssocArray['data-code39'] = $code39;
$attrAssocArray['data-connected-global-id'] = base64_encode(json_encode($connectionArray));
// Attr - title
$attrAssocArray['title'] = $this->generatePortName($portNameFormat, $portIndex, $portTotal);
@ -3110,4 +3120,50 @@ var $qls;
return str_replace('&#8209;', '-', $string);
}
function loopDetected($aID, $aFace, $aDepth, $aPort, $bID, $bFace, $bDepth, $bPort){
// If cable is connected to an object
if($aID != 0) {
// If object is trunked
if(isset($this->peerArray[$aID][$aFace][$aDepth])) {
$peerRecord = $this->peerArray[$aID][$aFace][$aDepth];
// If object's peer is not an endpoint
if(!$peerRecord['peerEndpoint']) {
$objID = $peerRecord['peerID'];
$objFace = $peerRecord['peerFace'];
$objDepth = $peerRecord['peerDepth'];
// If peer has cable connected
if(isset($this->inventoryArray[$objID][$objFace][$objDepth][$aPort])) {
foreach($this->inventoryArray[$objID][$objFace][$objDepth][$aPort] as $peerCable) {
$peerID = $peerCable['id'];
$peerFace = $peerCable['face'];
$peerDepth = $peerCable['depth'];
$peerPort = $peerCable['port'];
$loopDetected = $this->loopDetected($peerID, $peerFace, $peerDepth, $peerPort, $objID, $objFace, $objDepth, $aPort);
if($loopDetected) {
return true;
}
}
return false;
} else if($objID == $bID and $objFace == $bFace and $objDepth == $bDepth and $aPort == $bPort) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
}

View File

@ -1,37 +0,0 @@
<!-- object tree modal -->
<div id="objectTreeModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="objectTreeModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="objectTreeModalLabel"></h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgObjTree" class="m-t-15"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div id="objTree" class="navTree"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="buttonObjectTreeModalCancel" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button id="buttonObjectTreeModalSave" type="button" class="btn btn-primary waves-effect waves-light">Save</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

View File

@ -32,114 +32,3 @@
</div>
</div>
</div>
<div id="aboutModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="aboutModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="aboutModalLabel">About</h4>
</div>
<div id="aboutModalBody" class="modal-body">
<span><strong>Version:</strong></span> <?php echo PCM_VERSION; ?><br><br>
<strong>Changelog:</strong><br><br>
<?php
$handle = @fopen($_SERVER['DOCUMENT_ROOT'].'/CHANGELOG', 'r');
if ($handle) {
while (($buffer = fgets($handle, 4096)) !== false) {
echo $buffer.'<br>';
}
if (!feof($handle)) {
echo "Error: unexpected fgets() fail\n";
}
fclose($handle);
}
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="confirmModal" style="z-index:2000;" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="messagesModalLabel">Confirm</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button id="btnConfirm" type="button" class="btn btn-danger waves-effect" data-dismiss="modal">Confirm</button>
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="notificationsModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="notificationsModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="notificationsModalLabel">Notifications</h4>
</div>
<div id="notificationsModalBody" class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="messagesModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="messagesModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="messagesModalLabel">Messages</h4>
</div>
<div class="modal-body">
<div id="messagesModalBodyTable"></div>
<div id="messagesModalBodyMessage" style="display:none;">
<button id="messageModalButtonBack" type="button" class="btn btn-sm btn-secondary waves-effect">Back</button>
&nbsp
<div class="btn-group">
<button type="button" class="btn btn-sm btn-secondary waves-effect">Prev</button>
<button type="button" class="btn btn-sm btn-secondary waves-effect">Next</button>
</div>
&nbsp
<button type="button" class="btn btn-sm btn-danger waves-effect waves-light">Delete</button>
<hr>
<div id="messagesModalBodyMessageContent"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

951
includes/modals.php Executable file
View File

@ -0,0 +1,951 @@
<?php
$page = basename($_SERVER['PHP_SELF']);
?>
<!-- Object Tree Modal -->
<div id="objectTreeModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="objectTreeModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="objectTreeModalLabel"></h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgObjTree" class="m-t-15"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<?php if($page == 'explore.php') { ?>
<div class="checkbox">
<input id="checkboxBreakoutCable" type="checkbox">
<label for="checkboxBreakoutCable">
Breakout Cable
</label>
</div>
<?php } ?>
<div class="card-box">
<div id="objTree" class="navTree"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="buttonObjectTreeModalCancel" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button id="buttonObjectTreeModalSave" type="button" class="btn btn-primary waves-effect waves-light">Save</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Path Finder Modal -->
<div id="modalPathFinder" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="myModalLabel">Find Path</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgModal"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div class="row">
<div class="col-sm-6">
<dl class="dl-horizontal row">
<dt class="col-sm-3">Local Port:</dt>
<dd id="pathFinderLocalPort" class="col-sm-9"></dd>
<dt class="col-sm-3">Remote Port:</dt>
<dd class="col-sm-9"><div id="pathFinderRemotePort"></div><div id="pathFinderTree" class="navTree m-b-30"></div></dd>
</dl>
</div>
<div class="col-sm-6">
<?php
echo '<input id="pathFinderMaxResults" type="hidden" value="'.PATH_FINDER_MAX_RESULTS.'">';
echo '<input id="pathFinderMaxResultsDefault" type="hidden" value="'.PATH_FINDER_MAX_RESULTS_DEFAULT.'">';
echo '<input id="pathFinderMaxDepth" type="hidden" value="'.PATH_FINDER_MAX_DEPTH.'">';
echo '<input id="pathFinderMaxDepthDefault" type="hidden" value="'.PATH_FINDER_MAX_DEPTH_DEFAULT.'">';
?>
<form class="form-horizontal">
<div class="form-group row">
<label for="rangeResults" class="col-sm-2 control-label"><b>Max Results</b><i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Maximum number of paths to return for each media type."></i></label>
<div class="col-sm-10">
<input type="text" id="rangeResults">
</div>
</div>
<div class="form-group row">
<label for="rangeDepth" class="col-sm-2 control-label"><b>Max Depth</b><i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Maximum number of cable jumpers for each path returned."></i></label>
<div class="col-sm-10">
<input type="text" id="rangeDepth">
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div title="Run">
<button id="buttonPathFinderRun" class="btn btn-sm waves-effect waves-light btn-primary" type="button" disabled>
<span class="btn-label"><i class="fa fa-cogs"></i></span>
Find Paths
</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card-box">
<div class="card">
<div class="card-header">Path
</div>
<div class="card-block">
<blockquote class="card-blockquote">
<div class="table-responsive">
<table id="cablePathTable" class="table table-striped table-bordered">
<thead>
<tr>
<th>MediaType</th>
<th>Local</th>
<th>Adj.</th>
<th>Path</th>
<th>Total</th>
<!--th></th-->
</tr>
</thead>
<tbody id="cablePathTableBody">
</tbody>
</table>
</div>
</blockquote>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card-box">
<div class="card">
<div class="card-header">Path
<span>
<div class="btn-group pull-right">
<button type="button" class="btn btn-sm btn-custom dropdown-toggle waves-effect waves-light" data-toggle="dropdown" aria-expanded="false">Actions <span class="m-l-5"><i class="fa fa-cog"></i></span></button>
<div class="dropdown-menu">
<a id="printPathFinder" class="dropdown-item" href="#" ><i class="ion-map"></i></span> Print</a>
</div>
</div>
</span>
</div>
<div class="card-block">
<blockquote class="card-blockquote">
<div id="containerCablePath"></div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Scan Modal -->
<div id="scanModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="myModalLabel">Scan Cable</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgScan"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<?php
if($qls->user_info['scanMethod']) {
$labelText = 'Manual Scan:';
$manualDisplay = 'style="display:none;"';
$barcodeDisplay = '';
} else {
$labelText = 'Barcode Scan:';
$manualDisplay = '';
$barcodeDisplay = 'style="display:none;"';
}
?>
<input id="scanMethod" type="hidden" value="<?php echo $qls->user_info['scanMethod']; ?>">
<div class="m-b-20">
<label><?php echo $labelText; ?></label>
<input id="manualCheckbox" type="checkbox" data-plugin="switchery" data-color="#f1b53d"/>
</div>
<div id="scannerContainer" <?php echo $barcodeDisplay; ?>>
<div id="flashContainer" style="display:none;" class="m-b-20">
<label>Flash:</label>
<input id="torchCheckbox" type="checkbox" data-plugin="switchery" data-color="#f1b53d"/>
</div>
<div id="scanner" style="position: relative; width: 100%; height: auto; overflow: hidden; text-align: center;" class="viewport"></div>
</div>
<div id="manualEntry" <?php echo $manualDisplay; ?>>
<form action="#">
<input id="manualEntryInput" type="text" class="form-control m-b-10" placeholder="Enter cable ID">
<button id="manualEntrySubmit" type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- image upload modal -->
<div id="modalImageUpload" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelImageUpload" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelImageUpload">Floorplan Image</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgImageUpload"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div class="p-20">
<div class="form-group clearfix">
<div id="containerFloorplanImage" class="col-sm-12 padding-left-0 padding-right-0">
<input type="file" name="files[]" id="fileFloorplanImage" multiple="multiple">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- combined template modal -->
<div id="modalCreateCombinedTemplate" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelCreateCombinedTemplate" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelImageUpload">Create Combined Template</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgCreateCombinedTemplate"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<!-- Name -->
<fieldset class="form-group">
<label>Name <i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Alphanumeric characters as well as hyphens (-), underscores (_), forward slashes (\/), and backslashes (\)."></i></label>
<input id="inputCreateCombinedTemplateName" class="form-control" type="text" name="name" placeholder="New_Template" value="New_Template">
</fieldset>
<!-- Category -->
<fieldset class="form-group">
<label>Category <i class="ion-help-circled" data-toggle="tooltip" data-placement="right" title="Select a template category."></i></label>
<select id="inputCreateCombinedTemplateCategory" name="category" class="form-control">
<?php $qls->App->generateCategoryOptions(); ?>
</select>
</fieldset>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button id="buttonCreateCombinedTemplateModalSave" type="button" class="btn btn-primary waves-effect waves-light">Save</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- port name modal -->
<div id="portNameModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="portNameModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title">Port ID</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgPortName" class="m-t-15"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<fieldset class="m-b-20">
<label>Port ID Fields:</label>
<div id="portNameFieldContainer" class="row"></div>
</fieldset>
<fieldset class="m-b-20">
<button id="buttonAddPortNameField" type="button" class="btn btn-success waves-effect waves-light">
<span class="btn-label"><i class="fa fa-plus"></i>
</span>Add Field
</button>
<button id="buttonDeletePortNameField" type="button" class="btn btn-danger waves-effect waves-light">
<span class="btn-label"><i class="fa fa-minus"></i>
</span>Remove Field
</button>
</fieldset>
<fieldset class="m-b-20">
<label>Field Properties:</label>
<table>
<tr>
<td class="objectDetailAlignRight">
<strong>Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailPortNameType">
<select id="selectPortNameFieldType" class="form-control">
<option value="static">Static</option>
<option value="incremental">Incremental</option>
<option value="series">Series</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Count:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailPortNameCount">
<input id="inputPortNameFieldCount" class="form-control" type="number" min="0">
</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Order:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailPortNameOrder">
<select id="selectPortNameFieldOrder" class="form-control">
<option value="1">1st</option>
<option value="2">2nd</option>
</select>
</span>
</td>
</tr>
</table>
</fieldset>
<fieldset class="m-b-20">
<label>Results:</label><br>
<div id="portNameDisplayConfig"></div>
</fieldset>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="buttonPortNameModalClose" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- template category modal -->
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modelLabelTemplateCategory" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modelLabelTemplateCategory">Manage Categories</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgCategory"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Create/Edit</h4>
<form id="manageCategories-Form">
<input id="inputCategoryID" type="hidden" name="id" value="0">
<input type="hidden" name="action" value="add">
<fieldset class="m-b-20">
<label>Name</label>
<input id="inputCategoryName" type="text" name="name" placeholder="Category Name" class="form-control">
</fieldset>
<fieldset class="m-b-20">
<label>Category Color</label>
<br><input id="color-picker" type='text' name='color'>
</fieldset>
<fieldset class="m-b-20">
<div class="checkbox">
<input id="inputCategoryDefault" type="checkbox" name="defaultOption">
<label for="inputCategoryDefault">
Default
</label>
</div>
</fieldset>
<fieldset>
<button id="manageCategories-Save" type="button" class="btn btn-success waves-effect waves-light">
<span class="btn-label"><i class="fa fa-check"></i></span>
Save
</button>
</fieldset>
</form>
</div>
</div>
<div class="col-sm-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Current</h4>
<form id="manageCategoriesCurrent-Form">
<input id="inputCategoryCurrentID" type="hidden" name="id" value="0">
<input type="hidden" name="action" value="delete">
<fieldset>
<div id="categoryList">
<?php echo $categoryList; ?>
</div>
</fieldset>
<fieldset class="m-t-20">
<button id="manageCategories-Delete" type="button" class="btn btn-danger waves-effect waves-light">
<span class="btn-label"><i class="fa fa-times"></i></span>
Delete
</button>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- template catalog modal -->
<div id="modalTemplateCatalog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelTemplateCatalog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelTemplateCatalog">Template Catalog</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgCatalog"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Available Templates</h4>
<div id="templateCatalogAvailableContainer">
<h6>Name Filter:</h6>
<select id="templateCatalogFilter" multiple data-role="tagsinput"></select>
<div id="containerTemplateCatalog"></div>
</div>
<p class="m-t-10">
<mark>Don't see what you're looking for?</mark><br>
Email <ins>support@patchcablemgr.com</ins> with a link or description<br>
of the item and we'll add it to the catalog.
</p>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Selected Template</h4>
<button id="buttonTemplateCatalogImport" type="button" class="btn btn-primary waves-effect waves-light m-b-10" disabled>
<span class="btn-label"><i class="fa fa-plus"></i>
</span>Import</button>
<div id="detailsContainer">
<table>
<tr>
<td class="objectDetailAlignRight">
<strong>Object Name:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogObjName" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Template Name:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogTemplateName" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Category:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogCategory" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight" valign="top">
<strong>Trunked To:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogTrunkedTo" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogObjType" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Function:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogObjFunction" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>RU Size:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogRUSize" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Mount Config:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogMountConfig" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Port Range:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogPortRange" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Port Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogPortType" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Media Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogMediaType" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Image:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogImage" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- image upload modal -->
<div id="modalImageUpload" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelImageUpload" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelImageUpload">Template Image</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgImageUpload"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div class="p-20">
<div class="form-group clearfix">
<div id="containerTemplateImage" class="col-sm-12 padding-left-0 padding-right-0">
<input type="file" name="files[]" id="fileTemplateImage" multiple="multiple">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- delete template modal -->
<div id="modalTemplateDeleteConfirm" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelTemplateDeleteConfirm" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelTemplateDeleteConfirm">Delete Template</h4>
</div>
<div class="modal-body">
Delete <strong id="deleteTemplateName"></strong>?
</div>
<div class="modal-footer">
<button id="confirmObjDelete" type="button" class="btn btn-secondary btn-danger waves-effect" data-toggle="modal" data-target="#modalTemplateDeleteConfirm">Confirm</button>
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- image upload modal -->
<div id="modalTemplateWhereUsed" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLableTemplateWhereUsed" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLableTemplateWhereUsed">Where Used</h4>
</div>
<div class="modal-body col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
<h4 id="whereUsedTemplateName"></h4>
<div id="whereUsedResults" class="col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="aboutModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="aboutModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="aboutModalLabel">About</h4>
</div>
<div id="aboutModalBody" class="modal-body">
<span><strong>Version:</strong></span> <?php echo PCM_VERSION; ?><br><br>
<strong>Changelog:</strong><br><br>
<?php
$handle = @fopen($_SERVER['DOCUMENT_ROOT'].'/CHANGELOG', 'r');
if ($handle) {
while (($buffer = fgets($handle, 4096)) !== false) {
echo $buffer.'<br>';
}
if (!feof($handle)) {
echo "Error: unexpected fgets() fail\n";
}
fclose($handle);
}
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="confirmModal" style="z-index:2000;" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="messagesModalLabel">Confirm</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button id="btnConfirm" type="button" class="btn btn-danger waves-effect" data-dismiss="modal">Confirm</button>
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="notificationsModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="notificationsModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="notificationsModalLabel">Notifications</h4>
</div>
<div id="notificationsModalBody" class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="messagesModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="messagesModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="messagesModalLabel">Messages</h4>
</div>
<div class="modal-body">
<div id="messagesModalBodyTable"></div>
<div id="messagesModalBodyMessage" style="display:none;">
<button id="messageModalButtonBack" type="button" class="btn btn-sm btn-secondary waves-effect">Back</button>
&nbsp
<div class="btn-group">
<button type="button" class="btn btn-sm btn-secondary waves-effect">Prev</button>
<button type="button" class="btn btn-sm btn-secondary waves-effect">Next</button>
</div>
&nbsp
<button type="button" class="btn btn-sm btn-danger waves-effect waves-light">Delete</button>
<hr>
<div id="messagesModalBodyMessageContent"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="removeUserModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="removeUserModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="removeUserModalLabel">Remove User</h4>
</div>
<div class="modal-body">
Delete: username?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary waves-effect waves-light">Ok</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="cancelEntitlementModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="cancelEntitlementModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="cancelEntitlementModalLabel">Cancel Entitlement</h4>
</div>
<div class="modal-body">
Confirm cancelation.
</div>
<div class="modal-footer">
<button id="confirmEntitlementCancellation" type="button" class="btn btn-secondary btn-danger waves-effect" data-toggle="modal" data-target="#cancelEntitlementModal">Confirm</button>
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="importModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="importModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="importModalLabel">Import</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgImport"></div>
</div>
</div>
</div>
</div>
<div class="p-20">
<div class="form-group clearfix">
<div class="col-sm-12 padding-left-0 padding-right-0">
<input type="file" name="files[]" id="fileDataImport" multiple="multiple">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

View File

@ -6,13 +6,15 @@ $qls->Security->check_auth_page('user.php');
?>
<?php require './includes/header_start.php'; ?>
<!-- DataTables -->
<link href="assets/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<!--Morris Chart CSS -->
<link rel="stylesheet" href="assets/plugins/morris/morris.css">
<?php require './includes/header_end.php'; ?>
<!-- DataTables -->
<link href="assets/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
<!--Morris Chart CSS -->
<link rel="stylesheet" href="assets/plugins/morris/morris.css">
<?php require './includes/header_end.php'; ?>
<?php require_once './includes/modals.php'; ?>
<!-- Page-Title -->
<div class="row">

View File

@ -7,7 +7,7 @@ $qls->Security->check_auth_page('user.php');
<?php require 'includes/header_start.php'; ?>
<?php require 'includes/header_end.php'; ?>
<?php require_once './includes/modals.php'; ?>
<!-- Page-Title -->
<div class="row">

View File

@ -6,84 +6,15 @@ $qls->Security->check_auth_page('operator.php');
?>
<?php require 'includes/header_start.php'; ?>
<!-- JSTree css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<!-- X-editable css -->
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<!-- JSTree css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<!-- X-editable css -->
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<?php require 'includes/header_end.php'; ?>
<?php require_once './includes/content-object_tree_modal.php'; ?>
<!-- scan modal -->
<div id="scanModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="myModalLabel">Scan Cable</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgScan"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<?php
if($qls->user_info['scanMethod']) {
$labelText = 'Manual Scan:';
$manualDisplay = 'style="display:none;"';
$barcodeDisplay = '';
} else {
$labelText = 'Barcode Scan:';
$manualDisplay = '';
$barcodeDisplay = 'style="display:none;"';
}
?>
<input id="scanMethod" type="hidden" value="<?php echo $qls->user_info['scanMethod']; ?>">
<div class="m-b-20">
<label><?php echo $labelText; ?></label>
<input id="manualCheckbox" type="checkbox" data-plugin="switchery" data-color="#f1b53d"/>
</div>
<div id="scannerContainer" <?php echo $barcodeDisplay; ?>>
<div id="flashContainer" style="display:none;" class="m-b-20">
<label>Flash:</label>
<input id="torchCheckbox" type="checkbox" data-plugin="switchery" data-color="#f1b53d"/>
</div>
<div id="scanner" style="position: relative; width: 100%; height: auto; overflow: hidden; text-align: center;" class="viewport"></div>
</div>
<div id="manualEntry" <?php echo $manualDisplay; ?>>
<form action="#">
<input id="manualEntryInput" type="text" class="form-control m-b-10" placeholder="Enter cable ID">
<button id="manualEntrySubmit" type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">

View File

@ -7,7 +7,7 @@ $qls->Security->check_auth_page('user.php');
<?php require 'includes/header_start.php'; ?>
<?php require 'includes/header_end.php'; ?>
<?php require_once './includes/modals.php'; ?>
<!-- Page-Title -->
<div class="row">

View File

@ -8,446 +8,19 @@ require_once './includes/content-templates.php';
<?php require 'includes/header_start.php'; ?>
<link href="assets/plugins/bootstrap-tagsinput/css/bootstrap-tagsinput.css" rel="stylesheet"/>
<link href="assets/css/style-templates.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-cabinet.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-object.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/spectrum/css/spectrum.css" rel="stylesheet">
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<link href="assets/plugins/bootstrap-tagsinput/css/bootstrap-tagsinput.css" rel="stylesheet"/>
<link href="assets/css/style-templates.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-cabinet.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-object.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/spectrum/css/spectrum.css" rel="stylesheet">
<link type="text/css" href="assets/plugins/x-editable/css/bootstrap-editable.css" rel="stylesheet">
<!-- Jquery filer css -->
<link href="assets/plugins/jquery.filer/css/jquery.filer.css" rel="stylesheet" />
<link href="assets/plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css" rel="stylesheet" />
<!-- Jquery filer css -->
<link href="assets/plugins/jquery.filer/css/jquery.filer.css" rel="stylesheet" />
<link href="assets/plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css" rel="stylesheet" />
<?php require 'includes/header_end.php'; ?>
<!-- port name modal -->
<div id="portNameModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="portNameModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title">Port ID</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgPortName" class="m-t-15"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<fieldset class="m-b-20">
<label>Port ID Fields:</label>
<div id="portNameFieldContainer" class="row"></div>
</fieldset>
<fieldset class="m-b-20">
<button id="buttonAddPortNameField" type="button" class="btn btn-success waves-effect waves-light">
<span class="btn-label"><i class="fa fa-plus"></i>
</span>Add Field
</button>
<button id="buttonDeletePortNameField" type="button" class="btn btn-danger waves-effect waves-light">
<span class="btn-label"><i class="fa fa-minus"></i>
</span>Remove Field
</button>
</fieldset>
<fieldset class="m-b-20">
<label>Field Properties:</label>
<table>
<tr>
<td class="objectDetailAlignRight">
<strong>Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailPortNameType">
<select id="selectPortNameFieldType" class="form-control">
<option value="static">Static</option>
<option value="incremental">Incremental</option>
<option value="series">Series</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Count:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailPortNameCount">
<input id="inputPortNameFieldCount" class="form-control" type="number" min="0">
</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Order:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailPortNameOrder">
<select id="selectPortNameFieldOrder" class="form-control">
<option value="1">1st</option>
<option value="2">2nd</option>
</select>
</span>
</td>
</tr>
</table>
</fieldset>
<fieldset class="m-b-20">
<label>Results:</label><br>
<div id="portNameDisplayConfig"></div>
</fieldset>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button id="buttonPortNameModalClose" type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- template category modal -->
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modelLabelTemplateCategory" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modelLabelTemplateCategory">Manage Categories</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgCategory"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Create/Edit</h4>
<form id="manageCategories-Form">
<input id="inputCategoryID" type="hidden" name="id" value="0">
<input type="hidden" name="action" value="add">
<fieldset class="m-b-20">
<label>Name</label>
<input id="inputCategoryName" type="text" name="name" placeholder="Category Name" class="form-control">
</fieldset>
<fieldset class="m-b-20">
<label>Category Color</label>
<br><input id="color-picker" type='text' name='color'>
</fieldset>
<fieldset class="m-b-20">
<div class="checkbox">
<input id="inputCategoryDefault" type="checkbox" name="defaultOption">
<label for="inputCategoryDefault">
Default
</label>
</div>
</fieldset>
<fieldset>
<button id="manageCategories-Save" type="button" class="btn btn-success waves-effect waves-light">
<span class="btn-label"><i class="fa fa-check"></i></span>
Save
</button>
</fieldset>
</form>
</div>
</div>
<div class="col-sm-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Current</h4>
<form id="manageCategoriesCurrent-Form">
<input id="inputCategoryCurrentID" type="hidden" name="id" value="0">
<input type="hidden" name="action" value="delete">
<fieldset>
<div id="categoryList">
<?php echo $categoryList; ?>
</div>
</fieldset>
<fieldset class="m-t-20">
<button id="manageCategories-Delete" type="button" class="btn btn-danger waves-effect waves-light">
<span class="btn-label"><i class="fa fa-times"></i></span>
Delete
</button>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- template catalog modal -->
<div id="modalTemplateCatalog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelTemplateCatalog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelTemplateCatalog">Template Catalog</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgCatalog"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Available Templates</h4>
<div id="templateCatalogAvailableContainer">
<h6>Name Filter:</h6>
<select id="templateCatalogFilter" multiple data-role="tagsinput"></select>
<div id="containerTemplateCatalog"></div>
</div>
<p class="m-t-10">
<mark>Don't see what you're looking for?</mark><br>
Email <ins>support@patchcablemgr.com</ins> with a link or description<br>
of the item and we'll add it to the catalog.
</p>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-30">Selected Template</h4>
<button id="buttonTemplateCatalogImport" type="button" class="btn btn-primary waves-effect waves-light m-b-10" disabled>
<span class="btn-label"><i class="fa fa-plus"></i>
</span>Import</button>
<div id="detailsContainer">
<table>
<tr>
<td class="objectDetailAlignRight">
<strong>Object Name:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogObjName" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Template Name:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogTemplateName" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Category:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogCategory" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight" valign="top">
<strong>Trunked To:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogTrunkedTo" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogObjType" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Function:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogObjFunction" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>RU Size:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogRUSize" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Mount Config:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogMountConfig" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Port Range:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogPortRange" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Port Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogPortType" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Media Type:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogMediaType" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
<tr>
<td class="objectDetailAlignRight">
<strong>Image:&nbsp&nbsp</strong>
</td>
<td>
<span id="detailTemplateCatalogImage" class="objTemplateCatalogDetail">-</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- image upload modal -->
<div id="modalImageUpload" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelImageUpload" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelImageUpload">Template Image</h4>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12 col-xl-12">
<div id="alertMsgImageUpload"></div>
</div>
</div>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<div class="p-20">
<div class="form-group clearfix">
<div id="containerTemplateImage" class="col-sm-12 padding-left-0 padding-right-0">
<input type="file" name="files[]" id="fileTemplateImage" multiple="multiple">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- delete template modal -->
<div id="modalTemplateDeleteConfirm" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLabelTemplateDeleteConfirm" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLabelTemplateDeleteConfirm">Delete Template</h4>
</div>
<div class="modal-body">
Delete <strong id="deleteTemplateName"></strong>?
</div>
<div class="modal-footer">
<button id="confirmObjDelete" type="button" class="btn btn-secondary btn-danger waves-effect" data-toggle="modal" data-target="#modalTemplateDeleteConfirm">Confirm</button>
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- image upload modal -->
<div id="modalTemplateWhereUsed" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalLableTemplateWhereUsed" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<div title="Close">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<i class="zmdi zmdi-close"></i>
</button>
</div>
<h4 class="modal-title" id="modalLableTemplateWhereUsed">Where Used</h4>
</div>
<div class="modal-body col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
<h4 id="whereUsedTemplateName"></h4>
<div id="whereUsedResults" class="col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php require_once './includes/modals.php'; ?>
<!-- Make server data available to client via hidden inputs -->
<?php include_once('includes/content-build-serverData.php'); ?>