Min RK
370c649d61
update deprecated toBeCalledWith -> toHaveBeenCalledWith
2025-08-05 13:02:31 -07:00
Min RK
cd79f17d90
jsx: update and address eslint
...
add script to top-level package.json to run eslint in subdir
2025-03-26 12:02:04 +01:00
Min RK
f2cab7c5ef
vendor tiny subset of unmaintained recompose
...
the functions we use haven't changed in almost 10 years,
and are only a few lines
we should probably lose them eventually, but easier to vendor them first
2025-03-25 12:28:00 +01:00
Min RK
1b2417678b
avoid calling setPagination in dispatchPageUpdate
...
I think this can cause a race between the requested view and the loaded state
2025-03-24 20:05:58 +01:00
Min RK
325dd21845
try to fix admin pagination
...
- allow cancellation of outdated updates
- trigger offset changes with setOffset instead of on reply
- render pagination footer with `user_page.offset` instead of state.offset which only represents the _requested_ offset, not current view
2025-03-24 19:18:56 +01:00
oboki
ccc26d5f50
fix: initialize selected
with group_data.users
when GroupEdit
component mounts
2024-12-24 10:32:06 +09:00
Simon Li
2bcb24c56e
Replace react-router-dom@6 with react-router@7
2024-12-01 22:24:00 +00:00
Simon Li
e9002bfec9
Stop All: include named servers
2024-10-27 22:15:42 +00:00
Min RK
86e4f42035
simplify pagination buttons
...
- no custom css
- put click events on buttons instead of labels
- use standard disabled state instead of custom cursor, grey text
2024-09-13 13:10:48 +02:00
Min RK
6ccb809a2a
consistent use of fakeTimers
2024-09-13 13:10:48 +02:00
Min RK
43597febcb
update import for React.act
2024-09-13 13:10:48 +02:00
Min RK
e8b2bd82c8
userEvent is async now
2024-08-27 14:52:02 +02:00
Min RK
cedf237852
avoid offset race cycle in groups as well
2024-05-15 10:42:58 +02:00
Min RK
2af252c4c3
admin: don't use state change to update offset
...
set offset -> request page -> response sets offset is a recipe for races
instead, send request with new offset and only update offset state
made easier by consolidating page update requests into single loadPageData
2024-05-14 15:23:46 +02:00
Min RK
ab40f29056
remove unnecessary width on property tables
2024-04-17 14:56:02 +02:00
Min RK
6c4eba2682
avoid wrapping text on add-item button
2024-04-17 14:46:28 +02:00
Min RK
89fa76fae8
start using some css variables where we can
2024-04-17 14:32:54 +02:00
Min RK
6d7bde996b
set variant on server buttons
...
variant determines the color
2024-04-17 08:58:30 +02:00
Min RK
8820d5c028
update admin for bs5
...
- more consistent use of react-bootstrap
- reusable MainContainer, MainCol for consistent layout
2024-04-15 13:31:35 +02:00
Min RK
3fe1e9d510
update admin for bs5
...
- panel became card
- fix alignment of filter checkbox
- make all buttons consistently buttons
2024-04-09 13:48:41 +02:00
Min RK
2fe060861a
progress toward bootstrap 5
2024-04-04 16:18:01 +02:00
Min RK
b0235527ab
fix table hierarchy in property editor
...
don't nest trs in trs
2024-03-08 14:34:55 +01:00
Min RK
77e625d36d
update navigation for react-router v6
2024-03-08 14:29:16 +01:00
Min RK
d0665a9f21
update tests for sort, state filter
2024-03-08 12:01:38 +01:00
Min RK
f47d0a1524
space all the way around action buttons
...
4px margin matches 8px cell padding (margin is added on both sides)
and center when buttons collapse to single column
2024-03-08 10:20:35 +01:00
Min RK
e540963f20
admin: move active-servers filter to top
...
next to name filter, so it's not in the table headings
merges Running & Actions columns,
since it's really just Actions now (server actions & user actions)
2024-03-08 09:49:23 +01:00
Min RK
bc3bb47672
pagination: fix offset display when there are 0 results
2024-03-08 09:06:46 +01:00
Min RK
78a796cea6
server-side sorting of admin page
...
removes in-page sort, which removes sort by server name, sort by running
Running column switches from sort to filter, matching the `?state` query parameter in the API
needs some CSS on the column widths to avoid jumps when toggling active servers
2024-03-06 23:16:43 +01:00
Min RK
a09862cb1b
restore resetting offset when name filter changes
2024-03-06 10:30:36 +01:00
Min RK
f5bfe6a773
address some eslint
2024-03-06 10:21:02 +01:00
Min RK
a6e32deeb1
refactor mock dashboard in tests
...
reusable mock function with overrides for props (mostly API methods), rather than duplicate invocations
makes updating to v6 way easier
2024-03-06 10:12:46 +01:00
Min RK
38dc781271
update react-router-dom to v6
...
don't need v5-compat
2024-03-06 10:10:04 +01:00
Min RK
f4f30db334
sinon clock doesn't seem to help
...
jest has what we need already
2024-03-06 02:02:15 +01:00
Min RK
f13e69b172
get most jsx tests passing
2024-03-06 02:01:49 +01:00
Min RK
fd78a03280
move pagination state entirely to URL params
...
don't duplicate it state variables
2024-03-06 00:23:38 +01:00
Min RK
cabc05f7dd
admin: persist page view info in url parameters
...
- persist offset, limit, name_filter in URL parameters,
so they are stable across page reload
- add UI element to specify items per page
This allows specifying a URL, which will show a specific view of a page of users
2024-03-04 15:39:11 +01:00
Diogo Castro
38e1a0aed5
Tests
2023-06-21 22:55:39 +02:00
Diogo Castro
7a0b8d675a
Small css and layout improvements for better consistency
2023-06-18 16:16:37 +02:00
Diogo Castro
c2e7ce52ae
Admin server buttons depending on the status (pending, running or stopped)
...
Fixes #4466
2023-06-18 16:16:37 +02:00
pre-commit-ci[bot]
b0367c21f3
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-05-23 15:33:08 +00:00
Diogo Castro
9d68107722
Add test case for named servers
...
Adapt all tests
2023-05-23 17:30:23 +02:00
Diogo Castro
ad61c23873
Allow deletion of named servers
2023-05-23 17:30:23 +02:00
Simon Li
21cee1be31
Render tabel cells with multiple data items as RowListItem
2023-04-14 23:41:36 +01:00
Simon Li
b3f9635ecc
ReactObjectTableViewer can handle components
2023-04-14 23:29:53 +01:00
Simon Li
8c10fb285e
Convert ReactObjectTableViewer to tsx, remove horizontal option
2023-04-14 19:39:20 +01:00
Simon Li
8a3f5d8f2e
Copy f29827028f/src/ReactObjectTableViewer.tsx
2023-04-14 19:30:48 +01:00
Simon Li
7b496a5b4a
Server admin: lists are displayed as word-wrapped CSV
2023-04-14 18:02:05 +01:00
Simon Li
64e7705053
Server admin: lists are displayed as tables not csv joined
2023-04-14 15:22:51 +01:00
Min RK
46052387bc
admin panel: fix condition for start/stop buttons on user servers
...
`.ready` is the right switch for the links, not `.started` which can be defined even after they stop
2023-02-21 09:07:22 +01:00
vpopescu
fec0cb1260
Fixed removals caused by merge, documentation
2023-01-11 10:42:03 +01:00