Skip to content

Commit

Permalink
#349 Disable the "Share" button when MISP module is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Oct 20, 2017
1 parent b8fff06 commit dcd17c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ui/app/scripts/controllers/case/CaseMainCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@
};

$scope.shareCase = function() {
if($scope.appConfig.connectors.misp && $scope.appConfig.connectors.misp.servers.length === 0) {
NotificationSrv.log('There are no MISP servers defined', 'error');
return;
}

var modalInstance = $uibModal.open({
templateUrl: 'views/partials/misp/case.export.confirm.html',
controller: 'CaseExportDialogCtrl',
Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/partials/case/case.panelinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h3 class="box-title">
</span>

<!-- Right side -->
<span class="ml-xs pull-right">
<span class="ml-xs pull-right" ng-if="appConfig.connectors.misp.enabled">
<a href ng-click="shareCase()" class="text-primary noline" uib-tooltip="Share case">
<i class="text-primary fa fa-share"></i>
Share ({{existingExports}})
Expand Down

0 comments on commit dcd17c8

Please sign in to comment.