feat: sites and authors integration into existing screens (& formated all frontend files kinda accidentally)
This commit is contained in:
1 parent
3d81d2c717
commit
6b8990c55e
239 files changed
+9194
-1354
No files matched your search
+19
-4
@@ -70,7 +70,12 @@ export interface ActivitySummary {
|
||||
active_people: { users: number; api_keys: number }
|
||||
failed: number
|
||||
security: number
|
||||
series: { total: number[]; active: number[]; failed: number[]; security: number[] }
|
||||
series: {
|
||||
total: number[]
|
||||
active: number[]
|
||||
failed: number[]
|
||||
security: number[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface ActivityFilters {
|
||||
@@ -240,7 +245,10 @@ export function outcomeFilterLabel(outcome: OutcomeFilter) {
|
||||
}
|
||||
|
||||
export function outcomeOptions() {
|
||||
return OUTCOME_FILTERS.map((value) => ({ value, label: outcomeFilterLabel(value) }))
|
||||
return OUTCOME_FILTERS.map((value) => ({
|
||||
value,
|
||||
label: outcomeFilterLabel(value),
|
||||
}))
|
||||
}
|
||||
|
||||
export function outcomeBadge(outcome: ActivityOutcome) {
|
||||
@@ -269,7 +277,11 @@ export function rangeLabel(range: RangeKey) {
|
||||
export function activeChips(filters: ActivityFilters): ActivityChip[] {
|
||||
const chips: ActivityChip[] = []
|
||||
if (filters.q) chips.push({ key: 'q', label: t('Search: {0}', [filters.q]) })
|
||||
if (filters.actor) chips.push({ key: 'actor', label: t('Person: {0}', [filters.actorLabel]) })
|
||||
if (filters.actor)
|
||||
chips.push({
|
||||
key: 'actor',
|
||||
label: t('Person: {0}', [filters.actorLabel]),
|
||||
})
|
||||
if (filters.category)
|
||||
chips.push({
|
||||
key: 'category',
|
||||
@@ -281,7 +293,10 @@ export function activeChips(filters: ActivityFilters): ActivityChip[] {
|
||||
label: t('Outcome: {0}', [outcomeFilterLabel(filters.outcome)]),
|
||||
})
|
||||
if (filters.security)
|
||||
chips.push({ key: 'security', label: t('Type: {0}', [t('Security events')]) })
|
||||
chips.push({
|
||||
key: 'security',
|
||||
label: t('Type: {0}', [t('Security events')]),
|
||||
})
|
||||
if (filters.range !== DEFAULT_RANGE) {
|
||||
const value =
|
||||
filters.range === 'custom'
|
||||
|
||||
Reference in new issue
Block a user