Change Patches Tab to Releases Tab

This is part of the changes required to implement USM in GUI (Horizon).

In order to improve the user experience, some labels have been modified
as part of the USM integration.

Change-Id: I9c951f368d37ecec51d0450bfd990944c9c11621
This commit is contained in:
Italo Lemos 2024-03-26 15:46:58 -03:00 committed by Italo Lemos
parent f04638e8f8
commit 2123c1a6f1
1 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
# Copyright (c) 2013-2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -18,14 +18,14 @@ from starlingx_dashboard.dashboards.admin.software_management import \
LOG = logging.getLogger(__name__)
class PatchesTab(tabs.TableTab):
class ReleasesTab(tabs.TableTab):
table_classes = (toplevel_tables.PatchesTable,)
name = _("Patches")
slug = "patches"
template_name = ("admin/software_management/_patches.html")
name = _("Releases")
slug = "releases"
template_name = "admin/software_management/_releases.html"
def get_context_data(self, request):
context = super(PatchesTab, self).get_context_data(request)
context = super(ReleasesTab, self).get_context_data(request)
phosts = []
try:
@ -39,16 +39,16 @@ class PatchesTab(tabs.TableTab):
return context
def get_patches_data(self):
def get_releases_data(self):
request = self.request
patches = []
releases = []
try:
patches = stx_api.patch.get_patches(request)
releases = stx_api.patch.get_patches(request)
except Exception:
exceptions.handle(self.request,
_('Unable to retrieve patch list.'))
_('Unable to retrieve release list.'))
return patches
return releases
class PatchOrchestrationTab(tabs.TableTab):
@ -137,5 +137,5 @@ class UpgradeOrchestrationTab(tabs.TableTab):
class SoftwareManagementTabs(tabs.TabGroup):
slug = "software_management_tabs"
tabs = (PatchesTab, PatchOrchestrationTab, UpgradeOrchestrationTab)
tabs = (ReleasesTab, PatchOrchestrationTab, UpgradeOrchestrationTab)
sticky = True