@uptime.link/statuspage 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +14 -25
- package/dist_bundle/bundle.js.map +2 -2
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/upl-statuspage-incidents.js +1 -1
- package/dist_ts_web/elements/upl-statuspage-statsgrid.d.ts +3 -0
- package/dist_ts_web/elements/upl-statuspage-statsgrid.js +36 -24
- package/dist_watch/bundle.js +32 -26
- package/dist_watch/bundle.js.map +2 -2
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/upl-statuspage-incidents.ts +4 -3
- package/ts_web/elements/upl-statuspage-statsgrid.ts +32 -24
package/package.json
CHANGED
|
@@ -355,9 +355,10 @@ export class UplStatuspageIncidents extends DeesElement {
|
|
|
355
355
|
.timeline::before {
|
|
356
356
|
content: '';
|
|
357
357
|
position: absolute;
|
|
358
|
-
left:
|
|
359
|
-
top:
|
|
360
|
-
bottom:
|
|
358
|
+
left: 7px;
|
|
359
|
+
top: 10px;
|
|
360
|
+
bottom: calc(100% - 10px);
|
|
361
|
+
height: auto;
|
|
361
362
|
width: 2px;
|
|
362
363
|
background: ${cssManager.bdTheme(
|
|
363
364
|
'linear-gradient(to bottom, #e5e7eb 0%, #d1d5db 50%, #e5e7eb 100%)',
|
|
@@ -114,38 +114,27 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
114
114
|
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
/* Dynamic status-based accent colors for all stat cards */
|
|
118
|
+
.stat-card.operational::before {
|
|
118
119
|
background: ${sharedStyles.colors.status.operational};
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
.stat-card.
|
|
122
|
+
.stat-card.degraded::before {
|
|
122
123
|
background: ${sharedStyles.colors.status.degraded};
|
|
123
124
|
}
|
|
124
125
|
|
|
125
|
-
.stat-card.
|
|
126
|
+
.stat-card.partial_outage::before {
|
|
126
127
|
background: ${sharedStyles.colors.status.partial};
|
|
127
128
|
}
|
|
128
129
|
|
|
129
|
-
.stat-card.
|
|
130
|
+
.stat-card.major_outage::before {
|
|
130
131
|
background: ${sharedStyles.colors.status.major};
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
.stat-card.
|
|
134
|
+
.stat-card.maintenance::before {
|
|
134
135
|
background: ${sharedStyles.colors.status.maintenance};
|
|
135
136
|
}
|
|
136
137
|
|
|
137
|
-
.stat-card.uptime-card::before {
|
|
138
|
-
background: ${sharedStyles.colors.status.operational};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.stat-card.response-card::before {
|
|
142
|
-
background: ${sharedStyles.colors.status.maintenance};
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.stat-card.incident-card::before {
|
|
146
|
-
background: ${sharedStyles.colors.status.partial};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
138
|
.stat-card:hover {
|
|
150
139
|
border-color: ${sharedStyles.colors.border.muted};
|
|
151
140
|
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
|
|
@@ -391,7 +380,7 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
391
380
|
</div>
|
|
392
381
|
` : html`
|
|
393
382
|
<div class="stats-grid">
|
|
394
|
-
<div class="stat-card
|
|
383
|
+
<div class="stat-card ${this.currentStatus}">
|
|
395
384
|
<div class="stat-label">
|
|
396
385
|
<span class="status-indicator ${this.currentStatus}"></span>
|
|
397
386
|
Current Status
|
|
@@ -401,7 +390,7 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
401
390
|
</div>
|
|
402
391
|
</div>
|
|
403
392
|
|
|
404
|
-
<div class="stat-card
|
|
393
|
+
<div class="stat-card ${this.getUptimeCardStatus()}">
|
|
405
394
|
<div class="stat-label">
|
|
406
395
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
407
396
|
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
|
|
@@ -416,7 +405,7 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
416
405
|
</div>
|
|
417
406
|
</div>
|
|
418
407
|
|
|
419
|
-
<div class="stat-card
|
|
408
|
+
<div class="stat-card ${this.getResponseCardStatus()}">
|
|
420
409
|
<div class="stat-label">
|
|
421
410
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
422
411
|
<circle cx="12" cy="12" r="10"></circle>
|
|
@@ -430,7 +419,7 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
430
419
|
${this.renderResponseChange()}
|
|
431
420
|
</div>
|
|
432
421
|
|
|
433
|
-
<div class="stat-card
|
|
422
|
+
<div class="stat-card ${this.getIncidentCardStatus()}">
|
|
434
423
|
<div class="stat-label">
|
|
435
424
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
436
425
|
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
|
|
@@ -442,8 +431,8 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
442
431
|
<div class="stat-value">
|
|
443
432
|
${this.totalIncidents}
|
|
444
433
|
</div>
|
|
445
|
-
<div class="stat-change
|
|
446
|
-
${this.affectedServices} of ${this.totalServices} services
|
|
434
|
+
<div class="stat-change ${this.affectedServices === 0 ? 'positive' : 'negative'}">
|
|
435
|
+
${this.affectedServices === 0 ? 'All services ok.' : `${this.affectedServices} of ${this.totalServices} services affected`}
|
|
447
436
|
</div>
|
|
448
437
|
</div>
|
|
449
438
|
</div>
|
|
@@ -467,7 +456,7 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
467
456
|
// This could be enhanced with actual trend data
|
|
468
457
|
const trend = this.avgResponseTime < 200 ? 'positive' : this.avgResponseTime > 500 ? 'negative' : 'neutral';
|
|
469
458
|
const icon = trend === 'positive' ? '↓' : trend === 'negative' ? '↑' : '→';
|
|
470
|
-
|
|
459
|
+
|
|
471
460
|
return html`
|
|
472
461
|
<div class="stat-change ${trend}">
|
|
473
462
|
<span>${icon}</span>
|
|
@@ -475,4 +464,23 @@ export class UplStatuspageStatsgrid extends DeesElement {
|
|
|
475
464
|
</div>
|
|
476
465
|
`;
|
|
477
466
|
}
|
|
467
|
+
|
|
468
|
+
private getUptimeCardStatus(): string {
|
|
469
|
+
if (this.uptime >= 99.9) return 'operational';
|
|
470
|
+
if (this.uptime >= 99.0) return 'degraded';
|
|
471
|
+
return 'partial_outage';
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
private getResponseCardStatus(): string {
|
|
475
|
+
if (this.avgResponseTime < 200) return 'operational';
|
|
476
|
+
if (this.avgResponseTime < 500) return 'degraded';
|
|
477
|
+
return 'partial_outage';
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
private getIncidentCardStatus(): string {
|
|
481
|
+
if (this.affectedServices === 0) return 'operational';
|
|
482
|
+
if (this.currentStatus === 'major_outage') return 'major_outage';
|
|
483
|
+
if (this.currentStatus === 'partial_outage') return 'partial_outage';
|
|
484
|
+
return 'degraded';
|
|
485
|
+
}
|
|
478
486
|
}
|