Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer Output UI update #2887

Merged
merged 7 commits into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,23 @@ limitations under the License.
color="lightgrey"
class="mr-1 mb-1"
small
@click="searchForTag(tag)"
@click="applyFilterChip(tag, 'tag', 'term', timeline.id)"
>
{{ tag }}
</v-chip>
</td>
<td style="border: none" v-if="key === 'Attributes'">
<v-chip
v-for="(attribute, index) in item"
:key="index"
color="lightgrey"
class="mr-1 mb-1"
small
@click="applySearch(`_exists_:${attribute}`, timeline.id)"
>
{{ attribute }}
</v-chip>
</td>
</tr>
</tbody>
</v-simple-table>
Expand Down Expand Up @@ -305,6 +317,9 @@ export default {
}
},
computed: {
sketch() {
return this.$store.state.sketch
},
meta() {
return this.$store.state.meta
},
Expand Down Expand Up @@ -380,6 +395,9 @@ export default {
if (this.verboseAnalyzerOutput.platform_meta_data.created_tags !== undefined) {
metaData['Tags'] = this.verboseAnalyzerOutput.platform_meta_data.created_tags
}
if (this.verboseAnalyzerOutput.platform_meta_data.created_attributes !== undefined) {
metaData['Attributes'] = this.verboseAnalyzerOutput.platform_meta_data.created_attributes
}
return metaData
}
return metaData
Expand Down Expand Up @@ -417,18 +435,40 @@ export default {
setSavedGraph(graphId) {
EventBus.$emit('setSavedGraph', graphId)
},
searchForTag(tag) {
applySearch(searchQuery='', timelineId="_all") {
let eventData = {}
eventData.doSearch = true
eventData.queryString = searchQuery
eventData.queryFilter = {
from: 0,
terminate_after: 40,
size: 40,
indices: [timelineId],
order: 'asc',
chips: [],
}
EventBus.$emit('setQueryAndFilter', eventData)
},
applyFilterChip(term, termField='', termType='label', timelineId="_all") {
let eventData = {}
eventData.doSearch = true
eventData.queryString = 'tag:' + '"' + tag + '"'
eventData.queryString = '*'
eventData.queryFilter = {
from: 0,
terminate_after: 40,
size: 40,
indices: '_all',
indices: [timelineId],
order: 'asc',
chips: [],
}
let chip = {
field: termField,
value: term,
type: termType,
operator: 'must',
active: true,
}
eventData.chip = chip
EventBus.$emit('setQueryAndFilter', eventData)
},
contextLinkRedirect(item) {
Expand Down