Skip to content

Commit

Permalink
BUG: Adding observables to a sub-organization intel list was not work…
Browse files Browse the repository at this point in the history
…ing properly. Fix for reflexsoar/reflex-api#206
  • Loading branch information
n3tsurge committed Jun 22, 2022
1 parent 4f6c8ba commit 239bd6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/views/AlertsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
<input type="checkbox" aria-label="Select Card" v-if="!(event.status.closed || event.case)" v-bind:checked="selected.includes(event.uuid)" :value="event.uuid" @change="selectEvents($event)"/>
&nbsp;<a @click="toggleObservableFilter({'filter_type':'title','data_type':'title','value':event.title})" style="cursor: pointer;">{{event.title}}</a></h4>
{{event.description | truncate_description}}<br>
<CIcon name="cilCenterFocus"/>&nbsp;<li style="display: inline; margin-right: 2px;" v-for="obs in event.observables.slice(0,max_observables)" :key="obs.uuid"><CButton color="secondary" class="tag" v-c-tooltip="{'content': encodeURI(obs.value)}" size="sm" style="margin-top:5px; margin-bottom:5px;" @click.prevent.stop="showActionMenu($event, obs)"><b>{{obs.source_field ? obs.source_field.toLowerCase() : obs.data_type }}</b>: {{ obs.value.toLowerCase() | truncate }}</CButton></li><span v-if="event.observables.length > max_observables" style="cursor: pointer;" v-c-popover="{'header':'Additional Observables', 'content':extraObservables(event.observables.slice(max_observables))}"><small>&nbsp;+{{ event.observables.length - max_observables}}</small></span><br>
<CIcon name="cilCenterFocus"/>&nbsp;<li style="display: inline; margin-right: 2px;" v-for="obs in event.observables.slice(0,max_observables)" :key="obs.uuid"><CButton color="secondary" class="tag" v-c-tooltip="{'content': encodeURI(obs.value)}" size="sm" style="margin-top:5px; margin-bottom:5px;" @click.prevent.stop="showActionMenu($event, obs, event.organization)"><b>{{obs.source_field ? obs.source_field.toLowerCase() : obs.data_type }}</b>: {{ obs.value.toLowerCase() | truncate }}</CButton></li><span v-if="event.observables.length > max_observables" style="cursor: pointer;" v-c-popover="{'header':'Additional Observables', 'content':extraObservables(event.observables.slice(max_observables))}"><small>&nbsp;+{{ event.observables.length - max_observables}}</small></span><br>
<!--<CIcon name="cilCenterFocus" style="margin-top:5px"/>&nbsp;<li style="display: inline; margin-right: 2px;" v-for="obs in getEventObservables(event.uuid)" :key="obs.uuid"><CButton color="secondary" class="tag" v-c-tooltip.hover.click="`${obs.tags}`" size="sm" style="margin-top:5px; margin-bottom:0px;" @click="toggleObservableFilter({'filter_type':'observable', 'data_type': obs.data_type, 'value': obs.value})"><b>{{obs.data_type}}</b>: {{ obs.value.toLowerCase() }}</CButton></li>-->
</CCol>
<CCol col="3" class="text-right">
Expand Down Expand Up @@ -589,8 +589,9 @@ export default {
highlighter(code) {
return highlight(code, languages.rql);
},
showActionMenu(event, item) {
this.$refs.vueSimpleContextMenu.showMenu(event, item)
showActionMenu(event, item, organization) {
item.organization = organization
this.$refs.vueSimpleContextMenu.showMenu(event, item, organization)
},
actionMenuClicked(event) {
let action = event.option.name
Expand Down
2 changes: 1 addition & 1 deletion src/views/ListAdderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<CModal title="Add Item to List" :centered="true" size="lg" :show.sync="modalStatus">
<div>
<CForm @submit.prevent="addToList()" id="add_to_list" >
<p>Select a list to add <b>{{observable.data_type}}: {{observable.value}}</b> to.</p>{{lists_formatted}}
<p>Select a list to add <b>{{observable.data_type}}: {{observable.value}}</b> to:</p>
<CSelect v-bind:disabled="lists_formatted.length == 0" placeholder="Select one" :value.sync="selected_list" :options="lists_formatted" label="List" description="Be sure to pick the correct list."/>
</CForm>
</div>
Expand Down

0 comments on commit 239bd6a

Please sign in to comment.