Skip to content

Commit

Permalink
#966 Fix report directive to use .append instead of .html method to s…
Browse files Browse the repository at this point in the history
…et the report content
  • Loading branch information
nadouani committed May 13, 2019
1 parent cb724e3 commit 4c75532
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ angular.module('thehive', [
})
.config(function($compileProvider) {
'use strict';
$compileProvider.debugInfoEnabled(false);
$compileProvider.debugInfoEnabled(false);
})
.config(function($stateProvider, $urlRouterProvider) {
'use strict';
Expand Down
5 changes: 3 additions & 2 deletions ui/app/scripts/directives/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
// find report template
$templateRequest(reportUrl, true)
.then(function (tmpl) {
scope.element.html($compile(tmpl)(scope));
scope.element.append($compile(tmpl)(scope));
}, function (/*response*/) {
$templateRequest('./views/reports/' + scope.reportType + '.html', true)
.then(function (tmpl) {
scope.element.html($compile(tmpl)(scope));
scope.element.append($compile(tmpl)(scope));
});
});
}

return {
restrict: 'E',
scope: {
Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/directives/mini-report-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'malicious': 'label-danger'
}[taxonomy.level]"
ng-click="onItemClicked({observable: observable, analyzerId: taxonomy.id})">
{{taxonomy.namespace}}:{{taxonomy.predicate}}{{taxonomy.value ? '="'+taxonomy.value+'"': ''}}
{{taxonomy.namespace}}:{{taxonomy.predicate}}{{(taxonomy.value != undefined && taxonomy.value!= null) ? '="'+taxonomy.value+'"': ''}}
</span>
</div>

Expand Down

0 comments on commit 4c75532

Please sign in to comment.