RathodHarish commited on
Commit
d0b0f06
·
verified ·
1 Parent(s): c9d5c6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -159,7 +159,7 @@ def create_usage_chart(agg_data):
159
  logging.error(f"Failed to create usage chart: {str(e)}")
160
  return None
161
 
162
- # Create downtime chart
163
  def create_downtime_chart(agg_data):
164
  try:
165
  downtime_data = agg_data['downtime_per_device']
@@ -187,10 +187,10 @@ def create_downtime_chart(agg_data):
187
  color_discrete_map={"green": "#96CEB4", "red": "#FF0000"}
188
  )
189
  fig.update_traces(
190
-
191
- marker_line_color='#333333',
192
- marker_line_width=1.5,
193
- opacity=0.9
194
  fig.update_layout(
195
  title_font=dict(size=18, family="Arial", color="#333333"),
196
  font=dict(family="Arial", size=12, color="#333333"),
@@ -219,7 +219,7 @@ def create_downtime_chart(agg_data):
219
  logging.error(f"Failed to create downtime chart: {str(e)}")
220
  return None
221
 
222
- # Create Daily Log Trends chart (changed to area chart with markers)
223
  def create_daily_log_trends_chart(df):
224
  try:
225
  if df.empty or 'timestamp' not in df.columns:
@@ -345,7 +345,7 @@ def create_weekly_uptime_chart(df):
345
  logging.error(f"Failed to create Weekly Uptime Percentage chart: {str(e)}")
346
  return None
347
 
348
- # Create Anomaly Alerts chart (changed to bubble chart)
349
  def create_anomaly_alerts_chart(df, anomalies_df):
350
  try:
351
  if df.empty or anomalies_df.empty:
 
159
  logging.error(f"Failed to create usage chart: {str(e)}")
160
  return None
161
 
162
+ # Create downtime chart (fixed syntax error)
163
  def create_downtime_chart(agg_data):
164
  try:
165
  downtime_data = agg_data['downtime_per_device']
 
187
  color_discrete_map={"green": "#96CEB4", "red": "#FF0000"}
188
  )
189
  fig.update_traces(
190
+ marker_line_color='#333333',
191
+ marker_line_width=1.5,
192
+ opacity=0.9
193
+ )
194
  fig.update_layout(
195
  title_font=dict(size=18, family="Arial", color="#333333"),
196
  font=dict(family="Arial", size=12, color="#333333"),
 
219
  logging.error(f"Failed to create downtime chart: {str(e)}")
220
  return None
221
 
222
+ # Create Daily Log Trends chart (area chart with markers)
223
  def create_daily_log_trends_chart(df):
224
  try:
225
  if df.empty or 'timestamp' not in df.columns:
 
345
  logging.error(f"Failed to create Weekly Uptime Percentage chart: {str(e)}")
346
  return None
347
 
348
+ # Create Anomaly Alerts chart (bubble chart)
349
  def create_anomaly_alerts_chart(df, anomalies_df):
350
  try:
351
  if df.empty or anomalies_df.empty: