File tree Expand file tree Collapse file tree
frontend/templates/container_image Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,26 +97,6 @@ def collect_project_container_images(project) -> dict:
9797 return result
9898
9999
100- def collect_project_container_images_size (container_image : dict ) -> dict :
101- """
102- get all tags of a container repository of a project
103- :param container_image:
104- :return:
105- """
106- container_image_id = container_image ['id' ]
107- try :
108- response = gitlab_session_get (
109- f'{ config .api .url } { API_SUFFIX } /registry/repositories/{ container_image_id } ' ,
110- params = {'size' : True })
111- pass
112- #tags[tag_name] = loads(response.text)
113- # overwrite tags with more detailed info
114- #container_image['tags'] = tags
115- except Exception as exception :
116- log .error (f"Container image data: { container_image } " )
117- return container_image
118-
119-
120100def collect_project_container_images_tag (container_image : dict ) -> dict :
121101 """
122102 get all tags of a container repository of a project
@@ -275,8 +255,6 @@ def collect_container_images(projects_list: list = None) -> None:
275255 container_images = collect_project_container_images (project )
276256 if container_images :
277257 for container_image in container_images :
278- # add size information
279- container_image = collect_project_container_images_size (container_image )
280258 # add tag information
281259 container_image = collect_project_container_images_tag (container_image )
282260 # only store container images which have tags
Original file line number Diff line number Diff line change 99 </ div >
1010</ div >
1111{% if container_image['size'] %}
12- < div class ="row mb-2 ">
13- < div class ="col " title ="size ">
14- < i class ="bi bi-database-fill "> </ i > {{ container_image['size_human_readable'] }}
12+ {% if container_image['project']['container_expiration_policy']['enabled'] %}
13+ {% set expiration_policy_icon='bi-recycle text-success' %}
14+ {% set expiration_policy_text='enabled' %}
15+ {% else %}
16+ {% set expiration_policy_icon='bi-infinity text-danger' %}
17+ {% set expiration_policy_text='disabled' %}
18+ {% endif %}
19+ < div class ="row mb-2 ">
20+ < div class ="col " title ="summarized size of images with expiration policy {{ expiration_policy_text }} ">
21+ < i class ="bi bi-database-fill "> </ i > {{ container_image['size_human_readable'] }} < i class ="bi {{ expiration_policy_icon }} "> </ i >
22+ </ div >
1523 </ div >
16- </ div >
1724{% endif %}
1825< div class ="row ">
1926 < div class ="col " title ="link to Gitlab repository of project ">
You can’t perform that action at this time.
0 commit comments