CarlyneB commited on
Commit
783b23b
·
1 Parent(s): 21d63fb

[FEAT] adding a info/warning icon

Browse files
tabs/tab5_sensitivity.py CHANGED
@@ -58,7 +58,7 @@ def panel_resource_sensitivity(baseline_removed, all_resources, resource_to_unit
58
  )
59
 
60
  if not selected_resources:
61
- st.warning("Please select at least one resource to run the sensitivity analysis.")
62
  return
63
 
64
  percentages = list(range(0, 210, 10))
@@ -135,7 +135,7 @@ def panel_method_sensitivity(baseline_removed):
135
  )
136
 
137
  if not selected_methods:
138
- st.warning("Please select at least one method to run the sensitivity analysis.")
139
  return
140
 
141
  percentages = list(range(0, 110, 10))
@@ -178,7 +178,7 @@ def panel_method_sensitivity(baseline_removed):
178
  })
179
 
180
  for m in skipped:
181
- st.warning(f"Method **{m}** has a cap of 0 — set a value first to include it.", icon="⚠️")
182
 
183
  if not all_data:
184
  return
@@ -231,7 +231,7 @@ def render_tab():
231
  or "constraints" not in st.session_state
232
  or "costs" not in st.session_state
233
  ):
234
- st.warning("Please complete the setup in previous tabs before running sensitivity analysis.")
235
  return
236
 
237
  baseline_removed, all_resources, resource_to_unit = compute_baseline()
 
58
  )
59
 
60
  if not selected_resources:
61
+ st.warning("Please select at least one resource to run the sensitivity analysis.", icon=":material/warning:")
62
  return
63
 
64
  percentages = list(range(0, 210, 10))
 
135
  )
136
 
137
  if not selected_methods:
138
+ st.warning("Please select at least one method to run the sensitivity analysis.", icon=":material/warning:")
139
  return
140
 
141
  percentages = list(range(0, 110, 10))
 
178
  })
179
 
180
  for m in skipped:
181
+ st.warning(f"Method **{m}** has a cap of 0 — set a value first to include it.", icon=":material/warning:")
182
 
183
  if not all_data:
184
  return
 
231
  or "constraints" not in st.session_state
232
  or "costs" not in st.session_state
233
  ):
234
+ st.warning("Please complete the setup in previous tabs before running sensitivity analysis.", icon=":material/warning:")
235
  return
236
 
237
  baseline_removed, all_resources, resource_to_unit = compute_baseline()
tabs/tab6_scenarios.py CHANGED
@@ -130,7 +130,7 @@ def show_resource_usage(df):
130
  None
131
  """
132
  if df.empty:
133
- st.info("No resource usage data available (method_costs missing from scenarios?).")
134
  return
135
 
136
  st.markdown("""<p class="crra-sub-heading">Resource Use per Method</p>""", unsafe_allow_html=True)
@@ -162,7 +162,7 @@ def render_tab():
162
  panel_load_scenario()
163
 
164
  if not st.session_state.scenarios:
165
- st.info("No scenarios saved yet. Run an optimization in **Portfolio Optimization** tab or load a file above.")
166
  return
167
 
168
  # Select & manage scenarios
@@ -180,7 +180,7 @@ def render_tab():
180
  st.rerun()
181
 
182
  if not selected:
183
- st.warning("Please select at least one scenario.")
184
  return
185
 
186
  # Comparison
 
130
  None
131
  """
132
  if df.empty:
133
+ st.info("No resource usage data available (method_costs missing from scenarios?).", icon=":material/info:")
134
  return
135
 
136
  st.markdown("""<p class="crra-sub-heading">Resource Use per Method</p>""", unsafe_allow_html=True)
 
162
  panel_load_scenario()
163
 
164
  if not st.session_state.scenarios:
165
+ st.info("No scenarios saved yet. Run an optimization in **Portfolio Optimization** tab or load a file above.", icon=":material/info:")
166
  return
167
 
168
  # Select & manage scenarios
 
180
  st.rerun()
181
 
182
  if not selected:
183
+ st.warning("Please select at least one scenario.", icon=":material/warning:")
184
  return
185
 
186
  # Comparison