mirror of
https://github.com/affaan-m/ECC.git
synced 2026-08-17 21:15:40 +02:00
fix(ecc_dashboard): repopulate Rules and Commands trees on Refresh Data
`refresh_data` reloaded the four data lists and updated the tab labels plus status bar, but only called `populate_agents` and `populate_skills`. Rules were not repopulated (though `populate_rules` already existed) and Commands had no reusable populate helper at all — initial population was inlined in `create_commands_tab`. After clicking "Refresh Data" the tab counts changed but the Rules and Commands treeviews still showed pre- refresh rows, and the "Data refreshed successfully!" popup silently lied. Extract the commands-tree insertion into `populate_commands` mirroring `populate_agents`/`populate_rules`, then call both `populate_commands` and `populate_rules` from `refresh_data`. Fixes #2513
This commit is contained in:
+10
-1
@@ -656,7 +656,14 @@ Usage: This skill is automatically activated when working with related technolog
|
||||
scrollbar.pack(side=tk.RIGHT, fill=tk.Y)
|
||||
|
||||
# Populate
|
||||
for i, cmd in enumerate(self.commands, 1):
|
||||
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']))
|
||||
|
||||
@@ -868,6 +875,8 @@ Project: github.com/affaan-m/ECC"""
|
||||
# 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(
|
||||
|
||||
Reference in New Issue
Block a user