Edgewall Software
Modify

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#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:
Release Notes:
API 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 and trac-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)

r8246-layout.png (28.0 KB ) - added by Christian Boos 8 years ago.
show the effect of r8246 on the milestone admin panel

Download all attachments as: .zip

Change History (15)

comment:1 Changed 8 years ago by Remy Blank

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:

  • Error handling: for example, adding a repository with the same name as an existing repository leads to an internal error.
  • Repository synchronization: there is currently no way of resynchronizing a repository from the admin panel. For single revisions, I have an idea how this could be integrated. But for complete repositories, where this can take a long time, I don't know yet how to handle that. I could launch a separate thread (or even a separate process, calling 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.
  • User feedback: I'd like to give better feedback to the user about the operations that have been done. This requires #8166.

Ideas welcome, especially about the synchronization part.

comment:2 Changed 8 years ago by Christian Boos

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.

comment:3 in reply to:  2 ; Changed 8 years ago by Remy Blank

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.

comment:4 in reply to:  3 ; Changed 8 years ago by Christian Boos

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 in reply to:  4 Changed 8 years ago by Remy Blank

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 in reply to:  2 Changed 8 years ago by Remy Blank

Replying to cboos:

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.

Fixed in [8245]. Actually, alias creation was completely broken.

comment:7 Changed 8 years ago by Remy Blank

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.

comment:8 Changed 8 years ago by Christian Boos

While better than before, I think this is still perfectible. Look at the following example: you won't notice that the count of tickets column is missing.

show the effect of r8246 on the milestone admin panel

I don't immediately see a better way to handle this, though… Maybe it's just a minor annoyance we can accept, but at first, it seemed disturbing.

Changed 8 years ago by Christian Boos

Attachment: r8246-layout.png added

show the effect of r8246 on the milestone admin panel

comment:9 in reply to:  8 Changed 8 years ago by Remy Blank

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 Changed 8 years ago by Remy Blank

[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 Changed 8 years ago by Remy Blank

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 Changed 8 years ago by Christian Boos

Resolution: fixed
Status: newclosed

Implemented on the branch for now.

comment:13 Changed 8 years ago by Christian Boos

Milestone: 0.120.12-multirepos

comment:14 Changed 7 years ago by Remy Blank

Type: taskenhancement

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .

 
Note: See TracTickets for help on using tickets.