#8291 closed enhancement (fixed)
Create an admin panel for managing repositories
Reported by: | Remy Blank | Owned by: | Remy Blank |
---|---|---|---|
Priority: | normal | Milestone: | 0.12-multirepos |
Component: | admin/web | Version: | none |
Severity: | normal | Keywords: | multirepos |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
#7822 introduced trac-admin
commands for managing repositories. The goal of this task is to add a repository management admin panel for performing the same operations, that is:
- Add a repository (
trac-admin repository add
) - Create an alias for a repository (
trac-admin repository alias
) - Remove a repository (
trac-admin repository remove
) - Change properties of a repository (
trac-admin repository rename
) - Resynchronize a repository or a single revision (
trac-admin repository resync
andtrac-admin repository sync
)
All operations involving cache synchronization are tricky, as they potentially take a very long time, so I may leave them out at first.
Attachments (1)
Change History (15)
comment:1 by , 16 years ago
follow-ups: 3 6 comment:2 by , 16 years ago
Looks good, except for the layout. It seems that an excessive amount of horizontal space is needed to get it right:
- in Chrome or Safari, the central table will overlap on the fieldsets on the right
- in IE, the table jumps at the bottom of the page
- FF displays it right, as the text in the directory column gets wrapped (though below a page width of 880px, it also starts overlapping)
Maybe we should have the fieldsets go float below the table?
For the synchronization, I think starting another thread won't work in some setups (e.g. mod_python recycling the process once the request is finished and MaxRequestsPerChild has been reached). Starting a process should be more robust, but raises other questions:
- how to start trac-admin reliably from trac/web (e.g. is sys.executable defined under mod_python?)
- how to gather the feedback from another request - termination, success/failure, error message?
- finally, the use case is not that obvious to me - when should one trigger a resync from the web admin? I see that more as maintenance task for which you really should have a command line at hand. Doing resyncs periodically through the web interface should never become a substitute for installing the proper hooks…
But I don't want to prevent you from doing it - if you can think about a good way to fire the trac-admin resync and indicate to the user that the resync is done (some additional methods at the Repository level?), fine by me!
Last minor nit concerning the last point, user feedback: adding an alias for a repository coming from the trac.ini fails with "Missing arguments to add an alias." warning, which isn't clear.
follow-up: 4 comment:3 by , 16 years ago
Replying to cboos:
Looks good, except for the layout. It seems that an excessive amount of horizontal space is needed to get it right:
Weird. Do you have the same issue with other admin panels? I have taken the layout more or less directly from the ticket components admin panel, so it should be the same there. I'll test with the other browsers as well.
- finally, the use case is not that obvious to me - when should one trigger a resync from the web admin?
The only reason I could find is that it feels weird to be able to add a repository in the web admin, but to have to switch to a console to resync the repository. Somehow, I expect to be able to perform all operations in the web admin.
Oh, and it has been requested before: #2382
But I don't want to prevent you from doing it - if you can think about a good way to fire the trac-admin resync and indicate to the user that the resync is done (some additional methods at the Repository level?), fine by me!
I'm not sure, but I'll try ;-)
Last minor nit concerning the last point, user feedback: adding an alias for a repository coming from the trac.ini fails with "Missing arguments to add an alias." warning, which isn't clear.
Strange indeed. I'll fix that.
follow-up: 5 comment:4 by , 16 years ago
Replying to rblank:
Replying to cboos:
- finally, the use case is not that obvious to me - when should one trigger a resync from the web admin?
The only reason I could find is that it feels weird to be able to add a repository in the web admin, but to have to switch to a console to resync the repository. Somehow, I expect to be able to perform all operations in the web admin.
Installing the hook as well? At least we should provide a hint for doing so (per-backend install hints?)
comment:5 by , 16 years ago
Replying to cboos:
Installing the hook as well? At least we should provide a hint for doing so (per-backend install hints?)
I had forgotten about that one. So yes, there's at least something to do in the console anyway, so the admin might sync the repositories there anyway. I'll leave out the web-sync, and add a hint after creating a repository that the admin should:
- Add the post-commit hook
- Sync the repository
We can still add web-sync later if desired.
comment:6 by , 16 years ago
comment:7 by , 16 years ago
I tried fixing the layout of the admin panels in [8246], hopefully this didn't break the more exotic browsers. I'll propagate the change to trunk and multirepos.
follow-up: 9 comment:8 by , 16 years ago
by , 16 years ago
Attachment: | r8246-layout.png added |
---|
show the effect of r8246 on the milestone admin panel
comment:9 by , 16 years ago
Replying to cboos:
While better than before, I think this is still perfectible.
It may be, but after spending over two hours to get this result, I'm afraid that this is the best I can do. Maybe a CSS wizard can have a go at it and make it better.
<rant> IMO, CSS layout is highly overrated. It takes an eternity and several ugly hacks to get the major browsers to agree on doing something as simple as a two-column layout. I can't help thinking that there must be a better way. Heck, even tables were easier. </rant>
Look at the following example: you won't notice that the count of tickets column is missing.
Well, you should have a scroll bar at the bottom of the table, so it should at least give a hint about what's going on.
comment:10 by , 15 years ago
[8250] adds zero-width spaces after path separators in the "Directory" column of the table, so the paths should break if the table gets too small. Conversely, spaces are replaced by non-breaking spaces to avoid confusion.
Combined with the recent change to overflow: auto
for the main <div>
, this is the best I can come up with at this point. I'm always open to new ideas, though.
What's still missing is a good message about syncing and post-commit hooks after adding a repository. Coming up shortly.
comment:11 by , 15 years ago
Messages with instructions for the admin have been added in [8257] (repository synchronization, post-commit hook).
As mentioned above, I'll leave the web-resync for later (in #2382), so this functionality should be complete (I understand we leave tickets on multirepos open until the branch is merged, right?). Still, feel free to suggest a better idea to fix the table layout for small screens.
comment:12 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Implemented on the branch for now.
comment:13 by , 15 years ago
Milestone: | 0.12 → 0.12-multirepos |
---|
comment:14 by , 14 years ago
Type: | task → enhancement |
---|
An admin panel for managing repositories has been added in [8202,8203]. It should already be completely functional, but the following items have to be improved:
trac-admin
) for the synchronization, so that the current request can terminate, and current status can be polled by clicking "Refresh" on the repository list page. But I'm not sure that this is the best thing to do in a web application.Ideas welcome, especially about the synchronization part.