Skip to content

Commit

Permalink
Merge pull request #149 from stat-kwon/master
Browse files Browse the repository at this point in the history
Add labels_info, data_info and order fields in DataTableManager
  • Loading branch information
stat-kwon authored Jan 2, 2025
2 parents b285a4f + 8074440 commit a696321
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/spaceone/dashboard/manager/data_table_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self, *args, **kwargs):

self.df: Union[pd.DataFrame, None] = None
self.data_keys = None
self.label_keys = None
self.jinja_variables = None
self.state = None
self.error_message = None
Expand Down Expand Up @@ -105,9 +106,13 @@ def response_data_from_widget(
if page:
data = self.apply_page(data, page)

data_info, labels_info = self.get_data_and_labels_info()
return {
"results": data,
"total_count": total_count,
"labels_info": labels_info,
"data_info": data_info,
"order": self.label_keys + self.data_keys,
}

def response_sum_data_from_widget(self, response: dict) -> dict:
Expand Down

0 comments on commit a696321

Please sign in to comment.