Skip to content

Commit

Permalink
Fix classification markings are shown even when classification disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-sgaron committed May 11, 2020
1 parent 3912945 commit 240de92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assemblyline_ui/static/ng-template/file_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ <h5 ng-show="current_file.name" class="text-muted">{{current_file.name | split}}
<li class="small" ng-repeat="a in current_file.alternates[res.response.service_name]" ng-class="{disabled: a.created==res.created}"><a ng-click="select_alternate(a.response.service_name, a.created);$event.stopPropagation();">{{a.response.service_name}} :: {{a.response.service_version}} :: [{{a.result.score}}] @ {{a.created | date:"yyyy-MM-dd HH:mm:ss"}}</a></li>
</ul>
</div>
<strong><span ng-if="res.classification" class="{{res.classification | class_text_color }}" >({{res.classification | class_sm}})&nbsp;</span>{{res.response.service_name}}</strong>&nbsp;[<span class="{{res.result.score | score_color}}"><strong>{{res.result.score}}</strong></span>]&nbsp;<span class="text-muted">:: {{res.response.service_version}}<span ng-show="res.response.service_context"> ({{res.response.service_context}})</span></span>
<strong><span ng-if="user.c12n_enforcing" class="{{res.classification | class_text_color }}" >({{res.classification | class_sm}})&nbsp;</span>{{res.response.service_name}}</strong>&nbsp;[<span class="{{res.result.score | score_color}}"><strong>{{res.result.score}}</strong></span>]&nbsp;<span class="text-muted">:: {{res.response.service_version}}<span ng-show="res.response.service_context"> ({{res.response.service_context}})</span></span>
</div>
<div id="{{res.response.service_name}}_content" class="content collapse" ng-class="{'in': res.result.score >= settings.expand_min_score || res.response.service_name == switch_service }">
<div ng-if="res.result.sections.length == 0" >
Expand Down Expand Up @@ -286,7 +286,7 @@ <h5 ng-show="current_file.name" class="text-muted">{{current_file.name | split}}
<li class="small" ng-repeat="a in current_file.alternates[res.response.service_name]" ng-class="{disabled: a.created==res.created}"><a ng-click="select_alternate(a.response.service_name, a.created);$event.stopPropagation();">{{a.response.service_name}} :: {{a.response.service_version}} <span ng-show="a.response.service_context"> ({{a.response.service_context}}) </span>:: [{{a.result.score}}] @ {{a.created | date:"yyyy-MM-dd HH:mm:ss"}}</a></li>
</ul>
</div>
<strong><span ng-if="res.classification" class="{{res.classification | class_text_color }}" >({{res.classification | class_sm}})&nbsp;</span>{{res.response.service_name}}</strong>&nbsp;[<span class="{{res.result.score | score_color}}"><strong>{{res.result.score}}</strong></span>]&nbsp;<span class="text-muted">:: {{res.response.service_version}}<span ng-show="res.response.service_context"> ({{res.response.service_context}})</span></span>
<strong><span ng-if="user.c12n_enforcing" class="{{res.classification | class_text_color }}" >({{res.classification | class_sm}})&nbsp;</span>{{res.response.service_name}}</strong>&nbsp;[<span class="{{res.result.score | score_color}}"><strong>{{res.result.score}}</strong></span>]&nbsp;<span class="text-muted">:: {{res.response.service_version}}<span ng-show="res.response.service_context"> ({{res.response.service_context}})</span></span>
</div>
<div id="{{res.response.service_name}}_content" class="content collapse" ng-class="{'in': res.result.score >= settings.expand_min_score || res.response.service_name == switch_service }">
<div ng-if="res.result.sections.length == 0" >
Expand Down
2 changes: 1 addition & 1 deletion assemblyline_ui/static/ng-template/result_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section ng-repeat="sec in sections" class="section" ng-class="{'highlight': hasHighlightedTags(tagTypeList(sectionTags(sec)))}">
<div class="{{sec.heuristic.score | section_color}}"></div>
<div class="indent_{{sec.depth}}" style="width: 100%">
<div class="result_title" data-toggle="collapse" data-target="#{{''+parent+$index}}" ng-class="{'highlight': hasHighlightedTags(tagTypeList(sectionTags(sec)))}"><span class="text-info"><strong><span class="{{sec.classification | class_text_color }}" ng-if="sec.classification">({{sec.classification | class_sm}})</span>&nbsp;<span class="{{sec.heuristic.score | score_color}}">{{sec.heuristic.score}}</span></strong></span><span class="text-muted">::&nbsp;</span><span replace-tags data="sec.title_text" tags="tagTypeList(sec.tags)"></span></div>
<div class="result_title" data-toggle="collapse" data-target="#{{''+parent+$index}}" ng-class="{'highlight': hasHighlightedTags(tagTypeList(sectionTags(sec)))}"><span class="text-info"><strong><span class="{{sec.classification | class_text_color }}" ng-if="user.c12n_enforcing">({{sec.classification | class_sm}})</span>&nbsp;<span ng-if="sec.heuristic.score" class="{{sec.heuristic.score | score_color}}">{{sec.heuristic.score}}<span class="text-muted">&nbsp;::&nbsp;</span></span></strong></span><span replace-tags data="sec.title_text" tags="tagTypeList(sec.tags)"></span></div>
<div id="{{parent+$index}}" class="collapse in">
<div ng-if="sec.body_format=='TEXT'&&sec.body!=null" class="result_body"><div replace-tags data="sec.body" tags="tagTypeList(sec.tags)"></div></div>
<pre ng-if="sec.body_format=='MEMORY_DUMP'&&sec.body!=null" class="result_body">{{sec.body}}</pre>
Expand Down
2 changes: 1 addition & 1 deletion assemblyline_ui/static/ng-template/result_section_rec.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section ng-repeat="sec_info in sections" class="section section_rec_{{section_list[sec_info.id].depth}}" ng-class="{'highlight': hasHighlightedTags(tagTypeList(sectionTags(section_list[sec_info.id])))}">
<div class="{{section_list[sec_info.id].heuristic.score | section_color}}"></div>
<div ng-class="{indent: section_list[sec_info.id].depth != 0}" style="width: 100%">
<div class="result_title" data-toggle="collapse" data-target="#{{parent}}_s{{sec_info.id}}" ng-class="{'highlight': hasHighlightedTags(tagTypeList(sectionTags(section_list[sec_info.id])))}"><span class="text-info"><strong><span class="{{section_list[sec_info.id].classification | class_text_color }}" ng-if="section_list[sec_info.id].classification">({{section_list[sec_info.id].classification | class_sm}})</span>&nbsp;<span class="{{section_list[sec_info.id].heuristic.score | score_color}}">{{section_list[sec_info.id].heuristic.score}}</span></strong></span><span class="text-muted">::&nbsp;</span><span replace-tags data="section_list[sec_info.id].title_text" tags="tagTypeList(section_list[sec_info.id].tags)"></span></div>
<div class="result_title" data-toggle="collapse" data-target="#{{parent}}_s{{sec_info.id}}" ng-class="{'highlight': hasHighlightedTags(tagTypeList(sectionTags(section_list[sec_info.id])))}"><span class="text-info"><strong><span class="{{section_list[sec_info.id].classification | class_text_color }}" ng-if="user.c12n_enforcing">({{section_list[sec_info.id].classification | class_sm}})</span>&nbsp;<span ng-if="section_list[sec_info.id].heuristic.score" class="{{section_list[sec_info.id].heuristic.score | score_color}}">{{section_list[sec_info.id].heuristic.score}}<span class="text-muted">&nbsp;::&nbsp;</span></span></strong></span><span replace-tags data="section_list[sec_info.id].title_text" tags="tagTypeList(section_list[sec_info.id].tags)"></span></div>
<div id="{{parent}}_s{{sec_info.id}}" class="collapse in">
<div ng-if="section_list[sec_info.id].body_format=='TEXT'&&section_list[sec_info.id].body!=null" class="result_body"><div replace-tags data="section_list[sec_info.id].body" tags="tagTypeList(section_list[sec_info.id].tags)"></div></div>
<pre ng-if="section_list[sec_info.id].body_format=='MEMORY_DUMP'&&section_list[sec_info.id].body!=null" class="result_body">{{section_list[sec_info.id].body}}</pre>
Expand Down

0 comments on commit 240de92

Please sign in to comment.