Skip to content

Commit

Permalink
Merge pull request #165 from diogomatoschaves/frontend-updates
Browse files Browse the repository at this point in the history
Replace index name
  • Loading branch information
diogomatoschaves authored Feb 25, 2024
2 parents a1b44c3 + d53d0fd commit 34107d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion data/service/helpers/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def add_current_timestamp(df, time_frame):

now = pd.Timestamp(datetime.datetime.now(tz=pytz.utc)).round(time_frame) - pd.Timedelta(time_frame)

df_now = pd.DataFrame(data={df.columns[0]: [None]}, index=[now])
df_now = pd.DataFrame(data={df.columns[0]: [None], "time": [now]}).set_index('time')

df = pd.concat([df, df_now], axis=0)

Expand Down
34 changes: 17 additions & 17 deletions data/tests/service/blueprints/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,13 +618,13 @@ def test_pipelines_metrics(
'/1',
{
"data": [
{"$": 1012.5, "index": 1696172400000},
{"$": 1010.0, "index": 1696174200000},
{"$": 1020.0, "index": 1696176000000},
{"$": 1015.0, "index": 1696177800000},
{"$": 1025.0, "index": 1696179600000},
{"$": 1030.0, "index": 1696181400000},
{"$": 1030.0, "index": 1698795000000},
{"$": 1012.5, "time": 1696172400000},
{"$": 1010.0, "time": 1696174200000},
{"$": 1020.0, "time": 1696176000000},
{"$": 1015.0, "time": 1696177800000},
{"$": 1025.0, "time": 1696179600000},
{"$": 1030.0, "time": 1696181400000},
{"$": 1030.0, "time": 1698795000000},
],
"success": True,
},
Expand All @@ -634,8 +634,8 @@ def test_pipelines_metrics(
'/1?maxItems=1',
{
"data": [
{"$": 1016.875, "index": 1696118400000},
{"$": 1016.875, "index": 1698710400000},
{"$": 1016.875, "time": 1696118400000},
{"$": 1016.875, "time": 1698710400000},
],
"success": True,
},
Expand All @@ -651,16 +651,16 @@ def test_pipelines_metrics(
{
"data": {
"live": [
{"$": 1011.25, "index": 1696172400000},
{"$": 1017.5, "index": 1696176000000},
{"$": 1027.5, "index": 1696179600000},
{"$": 1027.5, "index": 1698793200000},
{"$": 1011.25, "time": 1696172400000},
{"$": 1017.5, "time": 1696176000000},
{"$": 1027.5, "time": 1696179600000},
{"$": 1027.5, "time": 1698793200000},
],
"testnet": [
{"$": 1011.25, "index": 1696172400000},
{"$": 1017.5, "index": 1696176000000},
{"$": 1027.5, "index": 1696179600000},
{"$": 1027.5, "index": 1698793200000},
{"$": 1011.25, "time": 1696172400000},
{"$": 1017.5, "time": 1696176000000},
{"$": 1027.5, "time": 1696179600000},
{"$": 1027.5, "time": 1698793200000},
],
},
"success": True,
Expand Down

0 comments on commit 34107d7

Please sign in to comment.