17169 use config_name for matching in plugin catalog (#17172)

* 17169 use config_name for matching

* 17169 remove cache buster
This commit is contained in:
Arthur Hanson 2024-08-15 21:18:34 +07:00 committed by GitHub
parent 122522a625
commit 93a13ce311
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View File

@ -81,8 +81,9 @@ def get_local_plugins(plugins=None):
plugin_config: PluginConfig = plugin.config
local_plugins[plugin_config.name] = Plugin(
slug=plugin_config.name,
config_name=plugin_config.name,
title_short=plugin_config.verbose_name,
title_long=plugin_config.verbose_name,
tag_line=plugin_config.description,
description_short=plugin_config.description,
is_local=True,
@ -181,7 +182,7 @@ def get_catalog_plugins():
author = None
# Populate plugin data
plugins[data['slug']] = Plugin(
plugins[data['config_name']] = Plugin(
id=data['id'],
status=data['status'],
title_short=data['title_short'],

View File

@ -39,8 +39,8 @@ class PluginVersionTable(BaseTable):
class CatalogPluginTable(BaseTable):
title_short = tables.Column(
linkify=('core:plugin', [tables.A('slug')]),
title_long = tables.Column(
linkify=('core:plugin', [tables.A('config_name')]),
verbose_name=_('Name')
)
author = tables.Column(
@ -69,11 +69,11 @@ class CatalogPluginTable(BaseTable):
class Meta(BaseTable.Meta):
empty_text = _('No plugin data found')
fields = (
'title_short', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
'installed_version',
)
default_columns = (
'title_short', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
'title_long', 'author', 'is_local', 'is_installed', 'is_certified', 'created_at', 'updated_at',
)
# List installed plugins first, then certified plugins, then
# everything else (with each tranche ordered alphabetically)

View File

@ -3,7 +3,7 @@
{% load form_helpers %}
{% load i18n %}
{% block title %}{{ plugin.title_short }}{% endblock %}
{% block title %}{{ plugin.title_long }}{% endblock %}
{% block object_identifier %}
{% endblock object_identifier %}
@ -51,7 +51,7 @@
<table class="table table-hover attr-table">
<tr>
<th scope="row">{% trans "Name" %}</th>
<td>{{ plugin.title_short }}</td>
<td>{{ plugin.title_long }}</td>
</tr>
<tr>
<th scope="row">{% trans "Summary" %}</th>