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

Vue migration build #3102

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
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 @@ -36,21 +36,19 @@ limitations under the License.
<template v-slot:selection="data">
<ts-analyzer-timeline-chip
class="mr-1"
:timeline="data.item"
:timeline="data.item.raw"
:close="true"
@click:close="remove(data.item)"
></ts-analyzer-timeline-chip>
</template>
<template v-slot:item="data">

<div>
<ts-analyzer-timeline-chip
:timeline="data.item"
:close="selectedTimelines.includes(data.item.id)"
@click:close="remove(data.item)"
:timeline="data.item.raw"
:close="selectedTimelines.includes(data.item.raw.id)"
@click:close="remove(data.item.raw)"
></ts-analyzer-timeline-chip>
</div>

</template>
</v-autocomplete>
</div>
Expand Down
4 changes: 2 additions & 2 deletions timesketch/frontend-ng/src/components/Explore/EventList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ limitations under the License.

<v-spacer></v-spacer>

<v-data-footer
<v-data-table-footer
v-if="totalHits > 11 && !disablePagination"
:pagination="pagination"
:options="options"
Expand All @@ -264,7 +264,7 @@ limitations under the License.
items-per-page-text="Rows per page:"
style="border: 0"
class="mr-n3"
></v-data-footer>
></v-data-table-footer>
</v-toolbar>

<v-card v-if="showHistogram" variant="outlined" class="my-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ const gradients = [
]

export default {
props: ['timeline', 'eventsCount', 'isSelected', 'isEmptyState'],
props: ['timeline', 'isSelected'],
data() {
return {
autoRefresh: false,
Expand All @@ -320,7 +320,6 @@ export default {
dialogStatus: false,
dialogRename: false,
datasources: [],
timelineStatus: null,
eventsPerSecond: [],
newTimelineName: [...this.timeline.name],
sparkline: {
Expand Down Expand Up @@ -393,6 +392,14 @@ export default {
}
return this.timeline.color
},
timelineStatus() {

const statusArr = this.timeline.status
if (statusArr && statusArr[0]) {
return statusArr[0].status
}
return undefined
}
},
methods: {
openDialog() {
Expand Down Expand Up @@ -502,8 +509,6 @@ export default {
},
},
created() {
// TODO: Move to computed
this.timelineStatus = this.timeline.status[0].status

this.datasources = this.timeline.datasources
const timelineStat = this.meta.stats_per_timeline[this.timeline.id]
Expand Down
10 changes: 6 additions & 4 deletions timesketch/frontend-ng/src/components/Explore/TimelinePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ export default {
EventBus.$on('isDarkTheme', this.toggleTheme)
},
watch: {
'currentQueryFilter.indices'(val) {
this.syncSelectedTimelines()
},
deep: true,
'currentQueryFilter.indices': {
handler(val) {
this.syncSelectedTimelines()
},
deep: true,
}
},
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion timesketch/frontend-ng/src/views/Explore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ limitations under the License.
<v-slider
v-model="zoomLevel"
thumb-label
ticks
show-ticks
append-icon="mdi-magnify-plus-outline"
prepend-icon="mdi-magnify-minus-outline"
min="0.1"
Expand Down
Loading