Skip to content

Commit

Permalink
Remove no longer needed API metric nb_visits_lastdate
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Nov 12, 2024
1 parent 90ce1e9 commit 7964187
Show file tree
Hide file tree
Showing 16 changed files with 4 additions and 17 deletions.
1 change: 0 additions & 1 deletion plugins/MultiSites/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public function getTotals()
'previous_hits' => $this->sitesByGroup->getMetadata('previous_total_hits'),
'previous_nb_actions' => $this->sitesByGroup->getMetadata('previous_total_nb_actions'),
'previous_revenue' => $this->sitesByGroup->getMetadata('previous_total_revenue'),
'nb_visits_lastdate' => $this->sitesByGroup->getMetadata('total_nb_visits_lastdate') ? : 0,
];
$this->formatMetrics($totals);
return $totals;
Expand Down
1 change: 0 additions & 1 deletion plugins/MultiSites/tests/Integration/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function testConstructShouldFetchSitesWithNeededColumnsAndReturnEvenSites
'nb_visits' => 0,
'nb_actions' => 0,
'revenue' => 0,
'nb_visits_lastdate' => 0,
'hits' => 0,
);
$this->assertEquals($expectedTotals, $dashboard->getTotals());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<previous_hits>0</previous_hits>
<previous_nb_actions>0</previous_nb_actions>
<previous_revenue>0</previous_revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2013-01-22</lastDate>
<sites>
Expand Down
2 changes: 1 addition & 1 deletion plugins/MultiSites/vue/dist/MultiSites.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/MultiSites/vue/dist/MultiSites.umd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ interface SiteTotals {
nb_pageviews: string|number;
hits: string|number;
nb_visits: string|number;
nb_visits_lastdate: string|number;
revenue: string|number;
previous_nb_visits: string|number;
}

interface DashboardStoreState {
Expand Down Expand Up @@ -263,7 +263,7 @@ class DashboardStore {
this.privateState.totalHits = report.totals.hits;
this.privateState.totalActions = report.totals.nb_actions;
this.privateState.totalRevenue = report.totals.revenue;
this.privateState.lastVisits = report.totals.nb_visits_lastdate;
this.privateState.lastVisits = report.totals.previous_nb_visits;
this.privateState.sites = allSites;
this.privateState.numberOfSites = report.numSites;
this.privateState.lastVisitsDate = report.lastDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<hits>57</hits>
<nb_actions>57</nb_actions>
<revenue>195</revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2012-07-09</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<hits>8</hits>
<nb_actions>8</nb_actions>
<revenue>43</revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2010-03-05</lastDate>
<sites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<hits>0</hits>
<nb_actions>0</nb_actions>
<revenue>0</revenue>
<nb_visits_lastdate>0</nb_visits_lastdate>
</totals>
<lastDate>2009-01-03</lastDate>
<sites>
Expand Down

0 comments on commit 7964187

Please sign in to comment.