Commit c0be42c
committed
Devices: Fix how device interacts with sqpoller table
Essentially, we want the device table to show all devices in the
inventory, even those that were never polled due to whatever reason that
connectivity could not be established. To do this, we pull the info
about devices from the poller table. However, we were pulling all
devices from the poller table which meant even those that were
successful and were already in the device table. This meant any filter
the user had applied such as specifying model, vendor, OS, etc. were
lost when we did the merge.
To avoid this issue, but stay true to the reason we were pulling data
from the poller table, we change the poller query to only return info
about devices that have failed. This fix however has the limitation that
it doesn't handle the case where a device has failed presently, but it
once was polled, and a user filter prevents a device from being selected,
by the device table. We'll tackle that case separately.
Signed-off-by: Dinesh Dutt <[email protected]>1 parent c782691 commit c0be42c
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | | - | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| |||
0 commit comments