Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8921 closed enhancement (fixed)

Create a Plugin Information section on the About Trac page

Reported by: Ryan Ollos <ryano@…> Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: general Version: 0.11.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The th:FullBlogPlugin added version information to About Trac in [th 7214]. This is a really nice feature from a system administration standpoint. I currently have dozens of plugins installed in the Trac installation that I administer and need to keep track of the version info for each plugin manually on a wiki page.

I'm looking at following the lead of osimons and creating version info patches for all of the plugins that I have installed.

When I got to thinking about this, it occurred to me that it might be better to have a Plugin Information section, rather than mixing the version info for all of the installed plugins in the System Information table of the About Trac page.

Attachments (2)

AboutTracSystemInformation.png (110.0 KB ) - added by Ryan Ollos <ryano@…> 15 years ago.
WebAdminPlugins.png (53.1 KB ) - added by Ryan Ollos <ryano@…> 15 years ago.

Download all attachments as: .zip

Change History (17)

by Ryan Ollos <ryano@…>, 15 years ago

comment:1 by Ryan Ollos <ryano@…>, 15 years ago

Title of ticket should have been: Create a Plugin Information setcion on the About Trac page

comment:2 by Ryan Ollos <ryano@…>, 15 years ago

Summary: Create a Plugin Information page on the About Trac pageCreate a Plugin Information section on the About Trac page

Was slightly confused for a second by the new interface and see now that I can change the ticket summary.

comment:3 by Remy Blank, 15 years ago

Milestone: 0.12

That's a good idea. It could be done with a specific interface, like suggested in comment:2:ticket:8908:

class IPluginInfoProvider(Interface):
    """Provider of plugin information, displayed in the "About Trac" page."""
    def get_plugin_info():
        """Return a tuple `(name, version)` describing the name and version
        information of a plugin.
        """

OTOH, the name and version information of plugins should already be available, as it is displayed in "Plugins" admin panel (though it's not necessarily reliable, IIRC), so we could use that instead.

Last edited 15 years ago by Remy Blank (previous) (diff)

comment:4 by Remy Blank, 15 years ago

Owner: set to Remy Blank

in reply to:  3 ; comment:5 by Christian Boos, 15 years ago

Replying to rblank:

… the name and version information of plugins should already be available, as it is displayed in "Plugins" admin panel (though it's not necessarily reliable, IIRC), so we could use that instead.

Right, I think that's much better, the information is already available in a systematic way, so adding an additional interface for that will not help, some plugins will implement it, some others won't (unless that's seen as a feature …).

See #5516 which contains a patch that implemented this feature for the error page.

in reply to:  5 comment:6 by Ryan Ollos <ryano@…>, 15 years ago

Replying to cboos:

Right, I think that's much better, the information is already available in a systematic way, so adding an additional interface for that will not help, some plugins will implement it, some others won't (unless that's seen as a feature …).

See #5516 which contains a patch that implemented this feature for the error page.

Thanks for the feedback. I didn't realize that the plugin version info was contained on the WebAdmin Plugins page because the Trac instance for my company has the Plugins page disabled. The hosting provider does this intentionally for reasons I'm not sure about.

However, I have Trac installed locally (0.12dev-r8794) and I don't see any version info on the plugins page as you suggest.

The th:TicketDeletePlugin appears to contain version info in setup.py: th:browser:ticketdeleteplugin/0.11/setup.py.

I'll try:

  • Updating my local Trac installation to the trunk.
  • Installing some additional plugins and see if they display version info.

by Ryan Ollos <ryano@…>, 15 years ago

Attachment: WebAdminPlugins.png added

comment:7 by Christian Boos, 15 years ago

Well, look again ;-) That "2.0" in the title is the actual version. The others (Color, PlannedMilestones and SmallSearch) are likely single file plugins. For those, there's a special way to set up the version info by defining globals, see for example the source:trunk/sample-plugins/revision_links.py.

in reply to:  7 comment:8 by Ryan Ollos <ryano@…>, 15 years ago

Replying to cboos:

Well, look again ;-) That "2.0" in the title is the actual version. The others (Color, PlannedMilestones and SmallSearch) are likely single file plugins. For those, there's a special way to set up the version info by defining globals, see for example the source:trunk/sample-plugins/revision_links.py.

Gotcha … I was thinking the version info would be listed with author, homepage, etc … (too much tunnel vision on my part)

Back to my original issue, because I can't directly see the Plugin information page on my Trac installation it would be nice for my purposes if the plugin version info was displayed in the About page. The nice thing I see about that approach would be that the About page would contain version info of everything installed. However, I can also see that this might not be all that useful to everyone, and might not be worth the effort.

If the latter is true, maybe the best approach to tackling my issue would be to write a macro that displayed all of the plugin version info on a wiki page (assuming this is practical)?

comment:9 by Remy Blank, 15 years ago

I also think it would be interesting information to have on the "About Trac" page, so I'll give it a shot. I'll see if I can also include that information in the semi-automatic bug reporting (#5516).

in reply to:  9 comment:10 by Ryan Ollos <ryano@…>, 15 years ago

Replying to rblank:

I also think it would be interesting information to have on the "About Trac" page, so I'll give it a shot. I'll see if I can also include that information in the semi-automatic bug reporting (#5516).

The more I think about this, I like the idea of having a macro to list plugin version information. That way, the macro could be used on the About Trac page, or included where else. In my case, I have SysAdmin/ pages where I might use the plugin. Would it be practical to create a PluginVersion macro?

comment:11 by osimons, 15 years ago

I'm not too keen on more macros. Feel free to suggest a community macro or make one yourself, but I don't think that should be done as part of Trac. I run a Trac hosting service, so removing anything related to system-admin is part of my needs - I see system administration as different from project administration. Unfortunately the TRAC_ADMIN permission don't… Versions, plugins, trac.ini settings and so on is definately system-stuff that I hide. 'About Trac' is not available in any of my projects for this reason. No system/install-related things should be available for project 'users' of any kind.

However, there is no reason why 'About' couldn't be available if I could better control the information made available. Say for instance that 'About' page was made from some AboutSectionProvider API with separate components providing the various parts (currently versions and settings that I could then enable/disable as I like). A custom provider could then provide any kind of information it wanted - related to internal or external stuff as it sees fit. That also includes making its own API for collecting information such as system/plugin info suggested above.

Slightly cleaner structure using APIs would go a long way to improving things for 'About Trac' - and cater for all types of needs.

comment:12 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Plugin version information has been added to the "About Trac" page in [9001]. The plugin info gathering was also extracted from PluginAdminPanel, so that it can be reused for #5516.

I also don't think having a macro for displaying plugin version information is useful in core.

Replying to osimons:

However, there is no reason why 'About' couldn't be available if I could better control the information made available.

You can already configure what information should be available on the "About Trac" page by using fine-grained permissions. More specifically, by enabling or disabling CONFIG_VIEW on the "config" realm, and the following ids: "systeminfo" for system information, "plugins" for plugin version information, and "ini" for configuration infromation. See about.py.

comment:13 by Ryan Ollos <ryano@…>, 15 years ago

This looks really nice and exactly what I was hoping for. Now just have to add the keywords to all the macros I have installed.

Screen capture shown in th:#6391 since its not possible to see on the About page here (unless you are an admin, I presume).

comment:14 by anatoly techtonik <techtonik@…>, 15 years ago

The patch [9001/trunk/sample-plugins] adds revision and url to the last plugin without this info. Are these fields required from now on?

in reply to:  14 comment:15 by Remy Blank, 15 years ago

Replying to anatoly techtonik <techtonik@…>:

The patch [9001/trunk/sample-plugins] adds revision and url to the last plugin without this info. Are these fields required from now on?

They aren't required, but if they are not specified, you don't see any version information on the "About Trac" page (for single-file plugins). Obviously, having the info helps for troubleshooting.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
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.