-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#195 Display report0Danalyzer report taxonomies
- Loading branch information
Showing
4 changed files
with
96 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
www/src/app/core/directives/taxonomie/taxonomie.directive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict'; | ||
|
||
import _ from 'lodash/core'; | ||
|
||
import tpl from './taxonomie.html'; | ||
|
||
export default function (app) { | ||
app.directive('taxonomie', taxonomie); | ||
|
||
function taxonomie() { | ||
'ngInject'; | ||
|
||
return { | ||
templateUrl: tpl, | ||
scope: { | ||
taxonomies: '=' | ||
}, | ||
replace: true, | ||
link: linkFn | ||
}; | ||
|
||
function linkFn(scope) { | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div> | ||
<div class="flexwrap mt-xxs" ng-if="taxonomies.length > 0"> | ||
<span class="label mb-xxxs mr-xxxs label-default" ng-repeat="taxonomy in taxonomies" ng-class="{'info': 'label-info', | ||
'safe': 'label-success', | ||
'suspicious': 'label-warning', | ||
'malicious': 'label-danger' | ||
}[taxonomy.level]"> | ||
{{taxonomy.namespace}}:{{taxonomy.predicate}}{{(taxonomy.value != undefined && taxonomy.value!= null) ? '="'+taxonomy.value+'"': ''}} | ||
</span> | ||
</div> | ||
|
||
<div ng-if="taxonomies.length === 0"> | ||
<em class="text-muted mr-xxxs">No summary available</em> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters