Skip to content

Commit

Permalink
added some buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
vik378 committed Jan 26, 2024
1 parent ab9239c commit 034053b
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions capella_model_explorer/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,22 @@ def load_model() -> capellambse.MelodyModel:
)
st.image(cap.context_diagram.as_svg)

st.write("## Required Functions")
st.write("""
## Functional Requirements
This section provides a summary of what functions are required from the System and the actors to enable the system Capability.
""")

cap_real_entities = {
entity.owner for entity in cap.involved_functions if entity.owner
}

for entity in cap_real_entities:
st.write(f"### {entity.name} \nTo enable the system Capability **{cap.name}** the **{entity.name}** shall:")
for fnc in cap.involved_functions:
if fnc.owner == entity:
st.button(fnc.name)

table = pd.DataFrame(
[
{
Expand All @@ -63,10 +75,10 @@ def load_model() -> capellambse.MelodyModel:
]
)

st.dataframe(
table.style.set_properties(**{"white-space": "pre-wrap"}),
hide_index=True,
)
# st.dataframe(
# table.style.set_properties(**{"white-space": "pre-wrap"}),
# hide_index=True,
# )

elif viewpoint == "Functions":
table_template = """
Expand Down

0 comments on commit 034053b

Please sign in to comment.