diff --git a/ecc_dashboard.py b/ecc_dashboard.py index ff9e932d9a..b7e3f93f56 100644 --- a/ecc_dashboard.py +++ b/ecc_dashboard.py @@ -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 # ========================================================================= @@ -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(