/pack-rat/003_pack_rat/pack-rat/index.html/index.html |
@@ -20,6 +20,8 @@ |
|
<!-- jsTree style --> |
<link href="/pack-rat/bower_components/jstree/dist/themes/default/style.min.css" rel="stylesheet" type="text/css"> |
<!-- Bootstrap table --> |
<link href="/pack-rat/bower_components/bootstrap-table/dist/bootstrap-table.min.css" rel="stylesheet" type="text/css"> |
</script> |
</head> |
|
@@ -37,16 +39,21 @@ |
</div> |
|
<div id="content" class="modal-body"> |
<div class="progress"> |
<div id="progressbar" class="progress-bar" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: 2%;"> |
0% |
</div> |
</div> |
|
<div class="modal-footer"> |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
</div> |
<table id="info" data-height="460"> |
<thead> |
<tr> |
<th data-field="AssetUUID">Asset UUID</th> |
<th data-field="CreationDate">Creation Date</th> |
<th data-field="Description">Description</th> |
<th data-field="Permissions">Permissions</th> |
<th data-field="UUID">Inventory UUID</th> |
</tr> |
</thead> |
</table> |
</div> |
<div class="modal-footer"> |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
</div> |
</div> |
</div> |
</div> |
@@ -71,6 +78,7 @@ |
<script src="/bower_components/was/dist/was.min.js" type="text/javascript"></script> |
<!-- Bootstrap Javascript --> |
<script type="text/javascript" src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
<script type="text/javascript" src="/pack-rat/bower_components/bootstrap-table/dist/bootstrap-table.min.js"></script> |
<!-- Bootstrap Form Validator --> |
<script src="/pack-rat/bower_components/bootstrap-validator/dist/validator.min.js" type="text/javascript"></script> |
<!-- XML <-> JSON --> |
@@ -98,32 +106,26 @@ |
infoItem: { |
label: "Get Info", |
action: function(obj) { |
$('#popup').dialog({ |
width: 800, |
height: 600, |
modal: true, |
resizable: false, |
dialogClass: 'no-close texture-dialog' |
}).on('dialogclose', function(event) { |
$('#content').html(''); |
}); |
$.ajax({ |
//async: false, |
type: 'POST', |
url: '/', |
dataType: 'json', |
data: { |
command: 'getinventorydata', |
item: node.id.split(/[\/]+/).pop(), |
data: [ |
item: node.id, |
data: wasArrayToCSV([ |
'AssetUUID', |
'CreationDate', |
'Description', |
'Permissions', |
'UUID' // part of InventoryBase |
] |
]) |
} |
}).done(function(data) { |
$('#content').html(ConvertJsonToTable(data, null, null, null)); |
$('#info').bootstrapTable({ |
data: [ wasKeyValueObjectify(wasCSVToArray(response.data)) ] |
}); |
$('#popup').modal('show'); |
}); |
} |
} |