Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions ecc_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,17 @@ def create_commands_tab(self):
scrollbar.pack(side=tk.RIGHT, fill=tk.Y)

# Populate
for i, cmd in enumerate(self.commands, 1):
self.command_tree.insert('', tk.END, text=str(i),
self.populate_commands(self.commands)

def populate_commands(self, commands: List[Dict]):
"""Populate commands list"""
for item in self.command_tree.get_children():
self.command_tree.delete(item)

for i, cmd in enumerate(commands, 1):
self.command_tree.insert('', tk.END, text=str(i),
values=('/' + cmd['name'], cmd['description']))

# =========================================================================
# RULES TAB
# =========================================================================
Expand Down Expand Up @@ -868,6 +875,8 @@ def refresh_data(self):
# Repopulate
self.populate_agents(self.agents)
self.populate_skills(self.skills)
self.populate_commands(self.commands)
self.populate_rules(self.rules)

# Update status
self.status_label.config(
Expand Down