From a762cf79759861d98d576b10044cb89706f82ee6 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Feb 02 2024 16:58:48 +0000 Subject: filter on state --- diff --git a/mbsweb/templates/module.html b/mbsweb/templates/module.html index 5e14ee4..55209dd 100644 --- a/mbsweb/templates/module.html +++ b/mbsweb/templates/module.html @@ -87,7 +87,7 @@ State - {{ info.state_name }} + {{ info.state_name }} State Reason diff --git a/mbsweb/templates/modules.html b/mbsweb/templates/modules.html index 65b27a4..8587600 100644 --- a/mbsweb/templates/modules.html +++ b/mbsweb/templates/modules.html @@ -22,7 +22,7 @@ {{ mod.stream }} {{ mod.version }} {{ mod.context }} - {{ mod.state_name }} + {{ mod.state_name }} {% endfor %} diff --git a/mbsweb/ui.py b/mbsweb/ui.py index abe9a92..43040ec 100644 --- a/mbsweb/ui.py +++ b/mbsweb/ui.py @@ -53,6 +53,7 @@ def module_list(page=None): 'context', 'scmurl', 'scratch', + 'state', 'owner', ) for key in allowed_filters: @@ -88,6 +89,7 @@ def module_info(moduleid): num_built_components = len([r for r in rpms.values() if r['state'] == 1]) info['components_desc'] = f'{num_built_components}/{num_components} complete' info['koji_nvr'] = '%(name)s-%(stream)s-%(version)s.%(context)s' % info + info['state_class'] = get_module_css_class(info) for key in 'time_completed', 'time_modified', 'time_submitted': val = info[key] key2 = f"str_{key}"