Skip to content

Commit 9374c4e

Browse files
authored
Merge pull request #7 from localstack-samples/ui-updates
UI updates
2 parents df9b031 + fc6c46b commit 9374c4e

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ __pycache__
2020
# Native App
2121

2222
app/output/
23+
.DS_Store
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
[server]
22
runOnSave = true
3+
enableStaticServing = true
4+
[theme]
5+
font = "sans-serif"
6+
base = "dark"
7+
primaryColor = "#AC85FA"
8+
backgroundColor = "#101114"
9+
secondaryBackgroundColor = "#4d0dcf"
10+
textColor = "#eaeaf0"
11+
linkColor = "#AC85FA"
12+
borderColor = "#9361f7"

app/src/module-ui/src/ui.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def create_gauge_chart(value, title, min_val, max_val, threshold_ranges):
8383
title = {'text': title},
8484
gauge = {
8585
'axis': {'range': [min_val, max_val]},
86-
'bar': {'color': "darkblue"},
86+
'bar': {'color': "#6179ED"},
8787
'steps': [
8888
{'range': threshold_ranges[0], 'color': colors[0]},
8989
{'range': threshold_ranges[1], 'color': colors[1]},
@@ -121,7 +121,7 @@ def create_time_series(df, machine_id, metric, anomaly_threshold=None):
121121
y=machine_data[metric],
122122
name=metric.title(),
123123
mode='lines',
124-
line=dict(color='blue'),
124+
line=dict(color='#6179ED'),
125125
hovertemplate=
126126
'<b>Time</b>: %{x}<br>' +
127127
'<b>Value</b>: %{y:.2f}<br>'
@@ -135,7 +135,7 @@ def create_time_series(df, machine_id, metric, anomaly_threshold=None):
135135
y=anomalies[metric],
136136
mode='markers',
137137
name='Anomalies',
138-
marker=dict(color='red', size=8, symbol='circle'),
138+
marker=dict(color='#e9041e', size=8, symbol='circle'),
139139
hovertemplate=
140140
'<b>Anomaly</b><br>' +
141141
'<b>Time</b>: %{x}<br>' +
@@ -164,23 +164,23 @@ def create_time_series(df, machine_id, metric, anomaly_threshold=None):
164164
background-color: #1E2022;
165165
padding: 15px;
166166
border-radius: 8px;
167-
border: 1px solid #2E3236;
167+
border: 1px solid #9361f7;
168168
min-height: 120px; /* Fixed height for all metric cards */
169169
}
170170
.stMetric:hover {
171171
background-color: #2E3236;
172172
border-color: #3E4246;
173173
}
174174
.stMetric [data-testid="stMetricLabel"] {
175-
color: #E0E2E6 !important;
175+
color: #AC85FA !important;
176176
font-size: 1rem !important;
177177
}
178178
.stMetric [data-testid="stMetricValue"] {
179179
color: #FFFFFF !important;
180180
font-size: 2rem !important;
181181
}
182182
.stMetric [data-testid="stMetricDelta"] {
183-
color: #B0B2B6 !important;
183+
color: #AC85FA !important;
184184
}
185185
.stProgress .st-bo {
186186
background-color: #00ff00;
@@ -325,7 +325,7 @@ def create_time_series(df, machine_id, metric, anomaly_threshold=None):
325325
names=status_counts.index,
326326
title="Health Status Distribution",
327327
color_discrete_map={
328-
'HEALTHY': '#00ff00',
328+
'HEALTHY': '#AC85FA',
329329
'NEEDS_MAINTENANCE': '#ffa500',
330330
'CRITICAL': '#ff0000'
331331
})
@@ -340,7 +340,7 @@ def create_time_series(df, machine_id, metric, anomaly_threshold=None):
340340
color='health_status',
341341
title="Failure Risk Scores by Machine",
342342
color_discrete_map={
343-
'HEALTHY': '#00ff00',
343+
'HEALTHY': 'green',
344344
'NEEDS_MAINTENANCE': '#ffa500',
345345
'CRITICAL': '#ff0000'
346346
})

0 commit comments

Comments
 (0)