Commit 590b732
authored
Remove event table, related views and code (#467)
This PR removes the `event` table (Model) and all associated code that
is no longer needed.
## Changes
- Migrated `Event::mapSeverity()` into
`IncidentHistoryRenderer::mapSeverity()`, rewritten as a `match`
expression
- Cleaned up references to the `event` relation in `Incident`,
`IncidentHistory`, and `Objects` models, and in `ObjectHeader`
- Removed event-related entries from `Links.php`, `configuration.php` ,
and `common.less`
- `Daemon`: The `event_id` passed to the Event by `Daemon` was not used
anywhere (no usage in notifications-worker.js), removed.
- `Daemon`: The message is now fetched from `notification_history`, as
it is the same as previous `event->message` in this case.
```sql
## Use this query to test:
SELECT NOT EXISTS (
SELECT 1 FROM incident_history ih
INNER JOIN event e ON e.id = ih.event_id
WHERE ih.type = 'notified' AND ih.message != e.message
) AS messages_are_equal;
```
## The following classes have been deleted:
- `EventController` and `EventsController` — the list views and event
detail are gone entirely
- `LoadMoreObjectList` widget, which was only used in `EventsController`
- `Event` ORM model
- `EventDetail` and `EventRenderer`
resolves #45117 files changed
Lines changed: 23 additions & 886 deletions
File tree
- application/controllers
- library/Notifications
- Common
- Daemon
- Model
- View
- Widget
- Detail
- ItemList
- public/css
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 43 | | |
54 | 44 | | |
55 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 20 | | |
31 | 21 | | |
32 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | 290 | | |
292 | 291 | | |
293 | | - | |
| 292 | + | |
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
| |||
0 commit comments