Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ezralazuardy committed May 8, 2024
1 parent e765b71 commit 1a3f13d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/Enums/LogInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function badge(Log $log): string
return match ($this) {
self::ENGINE => '<span class="whitespace-nowrap rounded-full px-2.5 py-0.5 text-xs bg-gray-100 text-gray-600">engine</span>',
self::DEVICE => '<span class="whitespace-nowrap rounded-full px-2.5 py-0.5 text-xs bg-orange-100 text-orange-600">'.$log->instance.'</span>',
default => '<span class="whitespace-nowrap rounded-full bg-gray-100 px-2.5 py-0.5 text-xs text-gray-600">unknown</span>',
default => '<span class="whitespace-nowrap rounded-full bg-gray-100 px-2.5 py-0.5 text-xs text-gray-600">'.$log->instance.'</span>',
};
}
}
3 changes: 2 additions & 1 deletion app/Livewire/Log/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public function filter(LogRepository $logRepository)
($this->filters['category']['ospf'] ? $log->isOspfCategory() : false)
) && (
($this->filters['instance']['engine'] ? $log->isEngineInstance() : false) ||
($this->filters['instance']['device'] ? $log->isDeviceInstance() : false)
($this->filters['instance']['device'] ? $log->isDeviceInstance() : false) ||
($this->filters['instance']['device'] ? ! $log->isEngineInstance() && ! $log->isDeviceInstance() : false)
) && (
($this->filters['severity']['info'] ? $log->isInfoSeverity() : false) ||
($this->filters['severity']['warning'] ? $log->isWarningSeverity() : false) ||
Expand Down
53 changes: 28 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/views/livewire/log/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<x-slot name="filters">
<livewire:components.table-filter-checkbox label="Engine" wire:model="filters.instance.engine" />
<livewire:components.table-filter-checkbox label="Device" wire:model="filters.instance.device" />
<livewire:components.table-filter-checkbox label="Unknown" wire:model="filters.instance.unknown" />
<livewire:components.table-filter-checkbox label="Other" wire:model="filters.instance.unknown" />
</x-slot>
</x-table-filter-section>
</x-slot>
Expand Down

0 comments on commit 1a3f13d

Please sign in to comment.