Skip to content

Commit

Permalink
#170 Rename the entity type field
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Apr 13, 2017
1 parent 33fc6e2 commit 801107d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions ui/app/scripts/services/EntitySrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
angular.module('theHiveServices').factory('EntitySrv', function($state) {
var buildState = function(entity) {
var state = {};
if (entity.type === 'case') {
if (entity._type === 'case') {
state.name = 'app.case.details';
state.params = {
caseId: entity.id
};
} else if (entity.type === 'case_artifact') {
} else if (entity._type === 'case_artifact') {
state.name = 'app.case.observables-item';
state.params = {
caseId: entity.case.id,
itemId: entity.id
};
} else if (entity.type === 'case_artifact_job') {
} else if (entity._type === 'case_artifact_job') {
state.name = 'app.case.observables-item';
state.params = {
caseId: entity.case_artifact.case.id,
itemId: entity.case_artifact.id
};
} else if (entity.type === 'case_task') {
} else if (entity._type === 'case_task') {
state.name = 'app.case.tasks-item';
state.params = {
caseId: entity.case.id,
Expand Down
14 changes: 7 additions & 7 deletions ui/app/views/directives/entity-link.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<span ng-if="value.type == 'case'">
<span ng-if="value._type == 'case'">
<a class="text-muted wrap"href ng-click="openLink(entityUrl(value))">
<i class="glyphicon glyphicon-folder-open"></i>
&nbsp;#{{value.caseId}} - {{value.title}}&nbsp;
</a>
</span>
<span ng-if="value.type == 'case_task'">
<span ng-if="value._type == 'case_task'">
<entity-link value="value.case" target="target"></entity-link>
<a class="text-muted wrap" href ng-click="openLink(entityUrl(value))">
<i class=" glyphicon glyphicon-tasks"></i>
&nbsp;{{value.title}}
</a>
</span>
<span ng-if="value.type == 'case_task_log'">
<span ng-if="value._type == 'case_task_log'">
<entity-link value="value.case_task" target="target"></entity-link>
<i class="text-muted wrap" class="glyphicon glyphicon-comment"></i>
</span>
<span ng-if="value.type == 'case_artifact'">
<span ng-if="value._type == 'case_artifact'">
<entity-link value="value.case" target="target"></entity-link>
<a class="text-muted wrap" href ng-click="openLink(entityUrl(value))">
<i class="glyphicon glyphicon-pushpin"></i>
&nbsp;{{value.data | ellipsis:100}}{{value.attachment.name}}
</a>
</span>
<span ng-if="value.type == 'case_artifact_job'">
<span ng-if="value._type == 'case_artifact_job'">
<entity-link value="value.case_artifact" target="target"></entity-link>
</span>

<span ng-if="value.type == 'case_artifact_job_log'">
<span ng-if="value._type == 'case_artifact_job_log'">
<entity-link value="value.case_artifact_job" target="target"></entity-link>
<i class="text-muted wrap" class=" glyphicon glyphicon-plus"></i>
</span>

<span ng-if="value.type == 'analyzer'">
<span ng-if="value._type == 'analyzer'">
<i class="text-muted wrap" class=" glyphicon glyphicon-cog"></i>
ANALYZER / TODO
</span>
2 changes: 1 addition & 1 deletion ui/app/views/partials/search/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h3 class="box-title">Search result ({{searchResults.total}} records(s) found)</
<div class="box-body">
<div class="row">
<psearch control="searchResults"></psearch>
<div class="col-md-12" ng-repeat="value in searchResults.values" ng-switch="value.type">
<div class="col-md-12" ng-repeat="value in searchResults.values" ng-switch="value._type">
<search-item type="case" value="value" ng-switch-when="case" icon="glyphicon glyphicon-folder-open"></search-item>
<search-item type="task" value="value" ng-switch-when="case_task" icon="glyphicon glyphicon-tasks"></search-item>
<search-item type="task-log" value="value" ng-switch-when="case_task_log" icon="glyphicon glyphicon-comment"></search-item>
Expand Down

0 comments on commit 801107d

Please sign in to comment.