Skip to content

Commit 2de586b

Browse files
authored
Merge pull request #10 from lubianat/master
Change colorcode so failures are clearer
2 parents 262284c + bb99bf3 commit 2de586b

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

index.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,20 @@ <h1>OME Project Dashboard</h1>
5353
}
5454

5555
function createStatusIcon(status) {
56-
if (!status) return null;
57-
const normalized = String(status).toUpperCase();
56+
const normalized = status ? String(status).toUpperCase() : 'NO_TESTS';
5857
const map = {
59-
SUCCESS: { text: '✓', className: 'status-success' },
60-
FAILURE: { text: '✗', className: 'status-failure' },
61-
ERROR: { text: '✗', className: 'status-failure' },
62-
PENDING: { text: '•', className: 'status-pending' },
58+
SUCCESS: { text: '✓', className: 'status-success', title: 'Checks: ok' },
59+
FAILURE: { text: '✗', className: 'status-failure', title: 'Checks: failed' },
60+
ERROR: { text: '✗', className: 'status-failure', title: 'Checks: failed' },
61+
PENDING: { text: '•', className: 'status-pending', title: 'Checks: in progress' },
62+
NO_TESTS: { text: '−', className: 'status-absent', title: 'Checks: none' },
6363
};
6464
const match = map[normalized];
6565
if (!match) return null;
6666
const span = document.createElement('span');
6767
span.className = 'status-icon ' + match.className;
6868
span.textContent = match.text;
69-
span.title = 'Checks: ' + normalized.toLowerCase();
70-
return span;
69+
span.title = match.title || 'Checks: ' + normalized.toLowerCase(); return span;
7170
}
7271

7372
function normalizeSortValue(rawValue) {
@@ -416,4 +415,4 @@ <h1>OME Project Dashboard</h1>
416415
</script>
417416
</body>
418417

419-
</html>
418+
</html>

static/style.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ a:hover {
112112
color: #9a6700;
113113
}
114114

115+
.status-absent {
116+
color: #8c959f;
117+
}
118+
119+
115120
.status-warning {
116121
color: #c28e00;
117122
}
@@ -141,7 +146,7 @@ a:hover {
141146
}
142147

143148
.commit-date.commit-old {
144-
color: #b75a55;
149+
color: #9a8f86;
145150
}
146151

147152
.commit-actor {
@@ -186,4 +191,4 @@ a:hover {
186191
.error-note {
187192
color: #d1242f;
188193
font-weight: 600;
189-
}
194+
}

0 commit comments

Comments
 (0)