]> git.ipfire.org Git - pbs.git/blame - src/templates/events/modules/system-message.html
events: Show error message when mirrors go offline
[pbs.git] / src / templates / events / modules / system-message.html
CommitLineData
4309513e 1<div class="media log">
110ad0ee 2 {% block thumbnail %}
55343561
MT
3 <div class="media-left has-text-centered">
4 {% if event.type == "job-created" %}
5 <p class="icon is-large has-text-info">
6 <i class="fa-solid fa-2x fa-plus"></i>
7 </p>
8 {% elif event.type == "job-dispatched" %}
9 <p class="icon is-large has-text-info">
10 <i class="fa-solid fa-2x fa-gear"></i>
11 </p>
e216d860
MT
12 {% elif event.type == "job-retry" %}
13 <p class="icon is-large has-text-info">
14 <i class="fa-solid fa-2x fa-arrow-rotate-left"></i>
15 </p>
55343561
MT
16 {% elif event.type == "build-finished" %}
17 <p class="icon is-large has-text-success">
18 <i class="fa-solid fa-2x fa-check-double"></i>
19 </p>
20 {% elif event.type == "job-finished" %}
21 <p class="icon is-large has-text-success">
22 <i class="fa-solid fa-2x fa-check"></i>
23 </p>
24 {% elif event.type in ("build-failed", "job-failed") %}
25 <p class="icon is-large has-text-danger">
26 <i class="fa-solid fa-2x fa-xmark"></i>
27 </p>
0fb7cf34
MT
28 {% elif event.type == "build-points" and event.points > 0 %}
29 <p class="icon is-large has-text-success">
30 <i class="fa-solid fa-2x fa-thumbs-up"></i>
31 </p>
32 {% elif event.type == "build-points" and event.points < 0 %}
33 <p class="icon is-large has-text-danger">
34 <i class="fa-solid fa-2x fa-thumbs-down"></i>
35 </p>
202aff1e
MT
36 {% elif event.type == "test-builds-succeeded" %}
37 <p class="icon is-large has-text-success">
38 <i class="fa-solid fa-2x fa-flask-vial"></i>
39 </p>
40 {% elif event.type == "test-builds-failed" %}
41 <p class="icon is-large has-text-danger">
42 <i class="fa-solid fa-2x fa-flask-vial"></i>
43 </p>
87e9d6f8
MT
44 {% elif event.type == "mirror-online" %}
45 <p class="icon is-large has-text-success">
46 <i class="fa-solid fa-2x fa-server"></i>
47 </p>
48 {% elif event.type == "mirror-offline" %}
49 <p class="icon is-large has-text-danger">
50 <i class="fa-solid fa-2x fa-server"></i>
51 </p>
110ad0ee 52 {% else %}
55343561
MT
53 <p class="icon is-large has-text-light">
54 <i class="fa-solid fa-2x fa-question"></i>
55 </p>
110ad0ee
MT
56 {% end %}
57 </div>
58 {% end block %}
550e7194 59
8020fd1b
MT
60 <div class="media-content">
61 <p>
55343561
MT
62 <strong>
63 {% if event.type == "build-comment" %}
64 {{ event.by_user }}
65 {% elif event.type == "build-created" %}
66 {{ _("Build Created") }}
67 {% elif event.type == "build-deleted" %}
68 {{ _("Build Deleted") }}
69 {% elif event.type == "build-failed" %}
70 {{ _("Build Failed") }}
71 {% elif event.type == "build-finished" %}
72 {{ _("Build Finished") }}
73 {% elif event.type == "build-deprecated" %}
74 {{ _("This build was deprecated") }}
75 {% elif event.type == "build-watcher-added" %}
76 {{ _("%s started watching this build") % event.user }}
77 {% elif event.type == "build-watcher-removed" %}
78 {{ _("%s stopped watching this build") % event.user }}
0fb7cf34
MT
79 {% elif event.type == "build-points" %}
80 {% if event.points > 0 %}
81 {{ _("This build has gained one point", "This build has gained %(points)s points", event.points) % { "points" : event.points } }}
82 {% elif event.points < 0 %}
83 {{ _("This build has lost one point", "This build has lost %(points)s points", -event.points) % { "points" : -event.points } }}
84 {% end %}
202aff1e
MT
85 {% elif event.type == "test-builds-succeeded" %}
86 {{ _("All Test Builds Succeeded") }}
87 {% elif event.type == "test-builds-failed" %}
88 {{ _("Test Builds Failed") }}
55343561
MT
89 {% elif event.type == "job-created" %}
90 {{ _("Job Created") }}
91 {% elif event.type == "job-failed" %}
92 {{ _("Job Failed") }}
93 {% elif event.type == "job-finished" %}
94 {{ _("Job Finished") }}
95 {% elif event.type == "job-aborted" %}
96 {{ _("Job Aborted") }}
97 {% elif event.type == "job-dispatched" %}
98 {{ _("Job Dispatched") }}
e216d860
MT
99 {% elif event.type == "job-retry" %}
100 {{ _("Job Restarted") }}
87e9d6f8
MT
101 {% elif event.type == "mirror-created" %}
102 {{ _("Mirror Created") }}
103 {% elif event.type == "mirror-deleted" %}
104 {{ _("Mirror Deleted") }}
105 {% elif event.type == "mirror-online" %}
106 {{ _("Mirror Came Online") }}
107 {% elif event.type == "mirror-offline" %}
108 {{ _("Mirror Went Offline") }}
55343561
MT
109 {% elif event.type == "repository-build-added" %}
110 {{ _("Build has been added to repository %s") % event.repository }}
111 {% elif event.type == "repository-build-removed" %}
112 {{ _("Build has been removed from repository %s") % event.repository }}
113 {% else %}
114 {{ _("- Unknown Event %s -") % event.type }}
115 {% end %}
116 </strong>
117
118 <small>{{ locale.format_date(event.t, shorter=True) }}</small>
8020fd1b 119 </p>
8db2f279 120
652b2943
MT
121 {# Show the error message #}
122 {% if event.error %}
123 <p class="has-text-danger">
124 {{ event.error }}
125 </p>
126 {% end %}
127
8020fd1b 128 {% block content %}{% end %}
8db2f279 129
8020fd1b 130 <nav class="level">
4309513e 131 <div class="level-left">
cdfd27cf 132 {# Build #}
bc29422a 133 {% if show_build and event.build and not event.job %}
8020fd1b
MT
134 <a class="level-item" href="/builds/{{ event.build.uuid }}">
135 {{ event.build }}
136 </a>
137 {% end %}
8db2f279 138
cdfd27cf
MT
139 {# By Build #}
140 {% if event.by_build %}
141 <a class="level-item" href="/builds/{{ event.by_build.uuid }}">
142 {{ _("by %s") % event.by_build }}
143 </a>
144 {% end %}
145
25697713
MT
146 {# Build Group #}
147 {% if event.build_group %}
148 <a class="level-item" href="/builds/groups/{{ event.build_group.uuid }}">
149 {{ _("Builds") }}
150 </a>
151 {% end %}
152
bc29422a
MT
153 {# Job #}
154 {% if event.job %}
155 <a class="level-item" href="/builds/{{ event.job.build.uuid }}#{{ event.job.arch }}">
156 {{ event.job }}
157 </a>
158 {% end %}
159
87e9d6f8
MT
160 {# Mirror #}
161 {% if event.mirror %}
162 <a class="level-item" href="/mirrors/{{ event.mirror.hostname }}">
163 {{ event.mirror }}
164 </a>
165 {% end %}
166
79d48fd1
MT
167 {# Repository #}
168 {% if event.repository %}
169 <a class="level-item" href="{{ event.repository.url }}">
170 {{ event.repository }}
171 </a>
172 {% end %}
173
cdfd27cf 174 {# By User #}
55343561 175 {% if not event.type == "build-comment" and event.by_user %}
8020fd1b
MT
176 <a class="level-item" href="/users/{{ event.by_user.name }}">
177 {{ _("by %s") % event.by_user }}
178 </a>
179 {% end %}
b01d926f
MT
180
181 {# Builder #}
d27d670e 182 {% if show_builder and event.builder %}
b01d926f
MT
183 <a class="level-item" href="/builders/{{ event.builder.hostname }}">
184 {{ event.builder }}
185 </a>
186 {% end %}
8020fd1b
MT
187 </div>
188 </nav>
550e7194
MT
189 </div>
190</div>