Skip to content

Commit

Permalink
Updated df field name to reflect changes in scheduler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alserene committed Nov 2, 2023
1 parent 7eab0a8 commit 850a35b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions schedview/app/scheduler_dashboard/scheduler_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,11 @@ def make_scheduler_summary_df(self):
)

# Duplicate column and apply URL formatting to one of the columns.
scheduler_summary_df["survey"] = scheduler_summary_df.loc[:, "survey_name"]
scheduler_summary_df["survey_name"] = scheduler_summary_df.apply(
scheduler_summary_df["survey"] = scheduler_summary_df.loc[:, "survey_name_with_id"]
scheduler_summary_df["survey_name_with_id"] = scheduler_summary_df.apply(
url_formatter,
axis=1,
args=("survey_name", "survey_url"),
args=("survey_name_with_id", "survey_url"),
)
self._scheduler_summary_df = scheduler_summary_df

Expand Down Expand Up @@ -563,21 +563,21 @@ def create_summary_widget(self):
return

self._debugging_message = "Starting to create summary widget."
tabulator_formatter = {"survey_name": HTMLTemplateFormatter(template="<%= value %>")}
tabulator_formatter = {"survey_name_with_id": HTMLTemplateFormatter(template="<%= value %>")}
columns = [
"tier",
"survey_name",
"survey_name_with_id",
"reward",
"survey",
"survey_url",
]
titles = {
"survey_name": "Survey",
"survey_name_with_id": "Survey",
"reward": "Reward",
}
summary_widget = pn.widgets.Tabulator(
self._scheduler_summary_df[self._scheduler_summary_df["tier"] == self._tier][columns],
widths={"survey_name": "60%", "reward": "40%"},
widths={"survey_name_with_id": "60%", "reward": "40%"},
show_index=False,
formatters=tabulator_formatter,
titles=titles,
Expand All @@ -596,7 +596,7 @@ def update_summary_widget_data(self):
self._debugging_message = "Starting to update summary widget."
columns = [
"tier",
"survey_name",
"survey_name_with_id",
"reward",
"survey",
"survey_url",
Expand Down

0 comments on commit 850a35b

Please sign in to comment.