Skip to content

Commit cba26f6

Browse files
committed
[chores] Minor improvements to highlighted command status color
1 parent 190d53d commit cba26f6

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

openwisp_controller/connection/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def output_data(self, obj):
149149

150150
def status_display(self, obj):
151151
status_value = obj.status
152-
css_class = f"command-status-{status_value}"
152+
css_class = f"command-status {status_value}"
153153
return format_html(
154154
'<span class="{0}">{1}</span>',
155155
css_class,

openwisp_controller/connection/static/connection/css/command-inline.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ li.commands:not(.recent) {
233233
}
234234

235235
/* Command status highlighting */
236-
.command-status-success {
237-
color: #417927;
238-
font-weight: bold;
236+
.command-status.success {
237+
color: var(--ow-color-success);
239238
}
240-
.command-status-failed {
241-
color: #ba2121;
242-
font-weight: bold;
239+
.command-status.failed {
240+
color: var(--error-fg);
243241
}
244-
.command-status-in-progress {
245-
color: #666;
242+
.command-status.in-progress {
243+
color: var(--body-quiet-color);
244+
}
245+
.command-status {
246246
font-weight: bold;
247247
}

openwisp_controller/connection/tests/test_admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_command_status_highlighting(self):
189189
response = self.client.get(url)
190190
self.assertContains(
191191
response,
192-
'<span class="command-status-success">success</span>',
192+
'<span class="command-status success">success</span>',
193193
html=True,
194194
)
195195

@@ -199,7 +199,7 @@ def test_command_status_highlighting(self):
199199
response = self.client.get(url)
200200
self.assertContains(
201201
response,
202-
'<span class="command-status-failed">failed</span>',
202+
'<span class="command-status failed">failed</span>',
203203
html=True,
204204
)
205205

@@ -209,7 +209,7 @@ def test_command_status_highlighting(self):
209209
response = self.client.get(url)
210210
self.assertContains(
211211
response,
212-
'<span class="command-status-in-progress">in progress</span>',
212+
'<span class="command-status in-progress">in progress</span>',
213213
html=True,
214214
)
215215

0 commit comments

Comments
 (0)