Skip to content

Commit

Permalink
added copy to archive
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed Jun 9, 2016
1 parent c9c28a3 commit 7f7eb01
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ String.prototype.hashCode = function() {
return hash;
};

//console.log(mermaid);

var DEBUG = true;

if(!DEBUG){
Expand Down
4 changes: 4 additions & 0 deletions js/modules/core/services/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@
url+= "archive";
response = { handleStatus:[403,503]};
}
else if(type == 5) {
url+= "transarchive";
response = { handleStatus:[403,503]};
}
else url+="pcap";

$http.post(url, data, response).then(
Expand Down
25 changes: 25 additions & 0 deletions js/modules/pages/controllers/dialogCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,31 @@

});
};

$scope.exportArchive = function() {
search.makePcapTextData(data, 5).then(function(msg) {
if (msg) {
window.sweetAlert({
title: "Copied to Archive!",
text: "Your session has been copied to your archive",
html: true
});

} else {
window.sweetAlert({
title: "Oops!",
type: "error",
text: "Your session could not be copied to archive!<br>If this persists, contact your Administrator",
html: true
});
}
},
function(sdata) {
return;
}).finally(function() {

});
};

$scope.toggleTree = function(id) {
$scope.collapsed[id] = !$scope.collapsed[id];
Expand Down
7 changes: 7 additions & 0 deletions templates/dialogs/transaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,13 @@ <h4 class="modal-title" style="font-size:15px;margin-left:4px;margin-bottom:10px
<i class="fa fa-share-alt"></i><br>
Share Link
</button>

<!-- EXPORT to Archive -->
<button class="btn btn-normal btn-success" ng-click="exportArchive()" data-placement="top-right" style="margin-top:18px;;margin-left:8px;width:18%;"><i class="fa fa-file-archive-o"></i><br>
<i class="fa" ng-class="{'fa-cog fa-spin': isArchiveBusy, '': !isArchiveBusy}"></i>
<span>Archive</span>
</button>

<a ng-if="sharelink" href="{{sharelink}}" target="_blank" class="btn btn-normal btn-warning" data-placement="top-right" style="margin-top:18px;margin-left:8px;width:18%;background-color:#f39c12;color:#ffffff;">
<i class="fa fa-share-alt fa-spin"></i><br>
Link Ready
Expand Down

0 comments on commit 7f7eb01

Please sign in to comment.