From 97efb82b8ba420b7867384e47adc5cda0d5b2c07 Mon Sep 17 00:00:00 2001 From: Marc Neudert Date: Thu, 11 Jul 2024 10:53:26 +0200 Subject: [PATCH] Improved All Websites Dashboard (#22312) * Allow rendering dashboard without top controls * Bootstrap improved all websites dashboard * Display period selector * Add search/new-website controls * Add new icons circle, dollar-sign, hits * Add KPI cards * Fetch KPI data from store * Introduce delay before showing KPI data * Connect KPI evolution with PeriodSelector * Fetch mock dashboard data from API * Enable today report auto refresh * Allow displaying info badge on KPI cards * Display sites table * Connect site search * Keep sites table pagination centered if table scrolls * Display error message if loading fails * Apply review feedback * Remove KPI badge from API response * Update expected screenshots * Reset sorting/paging for consistency if period changes * Build vue components --- LEGALNOTICE | 4 +- plugins/Morpheus/Controller.php | 5 +- plugins/Morpheus/fonts/matomo.eot | Bin 40512 -> 41200 bytes plugins/Morpheus/fonts/matomo.svg | 3 + plugins/Morpheus/fonts/matomo.ttf | Bin 40352 -> 41040 bytes plugins/Morpheus/fonts/matomo.woff | Bin 40428 -> 41116 bytes plugins/Morpheus/fonts/matomo.woff2 | Bin 16452 -> 16792 bytes plugins/Morpheus/fonts/selection.json | 2 +- .../Morpheus/fonts/svgs/icon-dollar-sign.svg | 4 + plugins/Morpheus/fonts/svgs/icon-hits.svg | 11 + plugins/Morpheus/stylesheets/base/icons.css | 17 +- plugins/Morpheus/templates/dashboard.twig | 8 +- .../UI/expected-screenshots/Morpheus_load.png | 4 +- plugins/MultiSites/API.php | 90 ++ plugins/MultiSites/Controller.php | 20 +- .../ImprovedAllWebsitesDashboard.php | 22 + plugins/MultiSites/MultiSites.php | 12 + plugins/MultiSites/config/ui-test.php | 17 + plugins/MultiSites/images/kpi_divider.svg | 3 + plugins/MultiSites/lang/en.json | 13 +- .../templates/allWebsitesDashboard.twig | 36 + .../tests/UI/AllWebsitesDashboard_spec.js | 253 ++++ .../AllWebsitesDashboard_dashboard.png | 3 + .../AllWebsitesDashboard_error.png | 3 + .../AllWebsitesDashboard_evolution_change.png | 3 + .../AllWebsitesDashboard_no_revenue.png | 3 + .../AllWebsitesDashboard_no_sparklines.png | 3 + .../AllWebsitesDashboard_widgetized.png | 3 + plugins/MultiSites/vue/dist/MultiSites.umd.js | 1204 ++++++++++++++++- .../MultiSites/vue/dist/MultiSites.umd.min.js | 10 +- .../AllWebsitesDashboard.less | 367 +++++ .../AllWebsitesDashboard.store.ts | 307 +++++ .../AllWebsitesDashboard.vue | 195 +++ .../vue/src/AllWebsitesDashboard/KPICard.vue | 94 ++ .../AllWebsitesDashboard/KPICardContainer.vue | 65 + .../src/AllWebsitesDashboard/SitesTable.vue | 281 ++++ .../AllWebsitesDashboard/SitesTableSite.vue | 161 +++ plugins/MultiSites/vue/src/index.ts | 1 + plugins/MultiSites/vue/src/types.ts | 41 + tests/UI/expected-screenshots/Theme_demo.png | 4 +- 40 files changed, 3205 insertions(+), 67 deletions(-) create mode 100644 plugins/Morpheus/fonts/svgs/icon-dollar-sign.svg create mode 100644 plugins/Morpheus/fonts/svgs/icon-hits.svg create mode 100644 plugins/MultiSites/FeatureFlags/ImprovedAllWebsitesDashboard.php create mode 100644 plugins/MultiSites/config/ui-test.php create mode 100644 plugins/MultiSites/images/kpi_divider.svg create mode 100644 plugins/MultiSites/templates/allWebsitesDashboard.twig create mode 100644 plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js create mode 100644 plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_dashboard.png create mode 100644 plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_error.png create mode 100644 plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_evolution_change.png create mode 100644 plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_revenue.png create mode 100644 plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_sparklines.png create mode 100644 plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_widgetized.png create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.store.ts create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue create mode 100644 plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue create mode 100644 plugins/MultiSites/vue/src/types.ts diff --git a/LEGALNOTICE b/LEGALNOTICE index d3a63765028..6a277ec9f98 100644 --- a/LEGALNOTICE +++ b/LEGALNOTICE @@ -290,7 +290,7 @@ THIRD-PARTY CONTENT Link: https://icomoon.io/#icons-icomoon License: GPL - Name: FontAwesome icons ("icon-minus-square", "icon-plus-square", "icon-arrowup", "icon-arrowdown", "icon-outlink", "icon-chevron-right", "icon-chevron-left", "icon-chevron-down", "icon-chevron-up") in plugins/Morpheus/fonts + Name: FontAwesome icons ("icon-minus-square", "icon-plus-square", "icon-arrowup", "icon-arrowdown", "icon-outlink", "icon-chevron-right", "icon-chevron-left", "icon-chevron-down", "icon-chevron-up", "icon-circle") in plugins/Morpheus/fonts Link: https://fontawesome.com/ License: CC BY 4.0 @@ -298,7 +298,7 @@ THIRD-PARTY CONTENT Link: https://pictogrammers.com/ License: Apache License Version 2.0 - Name: Feather icons ("icon-marketplace") in plugins/Morpheus/fonts + Name: Feather icons ("icon-dollar-sign", "icon-marketplace") in plugins/Morpheus/fonts Link: https://feathericons.com/ License: MIT (Expat) diff --git a/plugins/Morpheus/Controller.php b/plugins/Morpheus/Controller.php index 837d1be4767..038b2c7fb6d 100644 --- a/plugins/Morpheus/Controller.php +++ b/plugins/Morpheus/Controller.php @@ -862,7 +862,10 @@ public function demo() 'admin-development', 'admin-settings', 'marketplace', - 'plugin' + 'plugin', + 'circle', + 'dollar-sign', + 'hits', ], ]; // @phpcs:enable Generic.Files.LineLength diff --git a/plugins/Morpheus/fonts/matomo.eot b/plugins/Morpheus/fonts/matomo.eot index ba0aac4814e2d6bf62501defdc57a80e8c5deed0..c1c8c620e67a598187fb0abd38198b7dc2df1fba 100644 GIT binary patch delta 1027 zcmZ8fT}%^M6h8M(XWG&-KW%4VDioN(j;4qf=rkf~vtUK)L$gsrB8k>N(8!M~SutwL zgVAi3#F!e>5F|YALbCq!!51Ge@nIkKk(%A8B+H9Fk|>D}ik>@FNt|Tnp7Wh^zH{z( zX6Y$idq#z|d4TNv9l_?{+;pL7E_mnXvHaHJbpTR_Z`V-n(l`Lf0CWIP&(MV{XYJO( zE9jp9DAo?2$(`PQ@sCx2nMsV>!w7gD^F8Q4M8A1>WMVQ_KnrG;v8L<7*r}Y{m@okD zBPVGb$xV*KEL{hf+l5Juqq&hYwg3Eja{_@ZCcGXWyEFkDBbeV+7$6UbT=3A}>j!I^ zw3phy+Mn7H?U0t%S~QRPpY&1sO-hR&N)PGl8+k1HyvW74B@m$=29eA(qE;(OblAy# zWDg0pw`nyIqJ{*wNMa;tCOV>~A=G0UL(~w9?jb6=XrmF*+S}~C1V31h$;cHW33OQ@ zDW^0`lw?^FEiKib((;?$!h#+M=qW254mUJ}!)Ys34(NKI{3E)+P*PSH1tU{7%8Dpe zY?&UNV&SO>5^URsR1v3sO3`&?%3*cD7rGMA@ve}E&r94W-hK;uA-s@VFby2piY7X6 z{-oXBhWD${xKY!%oXs9Pmd#!^4a59q8zy^t+Fl#o8MuR zoOOA4MJMzPuU3m1pIPxMl8Qt27J6(Rk z7ZfONRet>L4wvY?b(IlI z!lJ+))&pC)-2zQ2a&xC;wRGm{khzNW2=Pj%naFH!@>NsHdQ`dWp3?NK_i`OKeGZOG zUF+aORq@}8zx6Eu4m+(%)!(x8!0X)c0=r{*fOy|F*h-1F-1EdG>f-@DlNg^V$Q{%?QLjOrIHeKqfIT OO+LsZy!rFIzl;D=pJ+w^ diff --git a/plugins/Morpheus/fonts/matomo.svg b/plugins/Morpheus/fonts/matomo.svg index a899b60accc..75bd7dc9ace 100644 --- a/plugins/Morpheus/fonts/matomo.svg +++ b/plugins/Morpheus/fonts/matomo.svg @@ -143,6 +143,9 @@ + + + diff --git a/plugins/Morpheus/fonts/matomo.ttf b/plugins/Morpheus/fonts/matomo.ttf index 40a9c7ba010230bea62c9d86d5f7eb76f18848a4..8a437459cbd2103e11c3b74edb10f1237e48832d 100644 GIT binary patch delta 1007 zcmZ8fO-vI}5Pt7%cS~v6pSHWO6$S{Gn=L^AcV`|ZS7B;8A1q&2$6$u7WJPP>k9|E$G|^~&{SEvH`P;n>i%bhrbi(j zP6JT%lxCOf!8GHBC?xCTd)i+*kHJo#)j}V3?Hb6WZ?4S5V*7u=c9_j3!*6Sh7vsxRWj?|+??uk zs!=26@l;lNJTW7hcdDv0|35lMQJj}31tpVK^Aaxaohmt1xGTz_wFPDnZodIMH(bcd=^Bh|_(DxEe^CrKJwxiR~B|xR4x&>WcoS`}ex8s6T`X-i+5VS^2 zWh=4Q)G=sA>kE}uteImLlsC%@#X)mvg>_L_{|D>1&r-xnDkfi8xrA5P#F9f2?08ki znIjX$JQLW*TCMCnC)jKvw{EhlGj)d1EJ<7IEe_7^;uywmE7v;1zBZAS9juMTcAgMV zf0SInM0Hwh%&)v%5KER47KP_!cId`t3vau0juH#pJVzhe16ogG6kEa_xvvw;VmWj57&;`ht{^+83eV>!Pho|HGyC&a1W)Fg zroLg883f(4JEr`(__T~8FLy4t-)vv%2=BTWJ05$ryE|SM?~I?1zue>NJka?mQI+UP bJlyMme*vLM@*O!SCnDKu;>z8-{R{sFd)3OK delta 320 zcmca`fN8;QrU{Dm0yB~r7#L-M*d{%(xPXCyL4bjQDFR4yq~}zoNlu@28OTpyV3=Bw zk(!vIu0Ht)1H<$iKzXwapa91vR!0Vg89+S@DjB&Y6$+|A7Q+k^pdN#q{N%)=-{-Gk zV3?HxG+!z=v7&%sCev32hS?23MGAR|xv3Io%GyeR0t zi|4ob%D~M6GJ@e@&+;x9J$cS7bH<*{S7v=+ocv*y%H}U~L>Z0yoSwOuxJtQJxbe81 waQo%1<6h!^&6CZu$Mb@hh*zA~9-wYUAnsxM%)kROiGgXdB9rju;CX);0WRiZJpcdz diff --git a/plugins/Morpheus/fonts/matomo.woff b/plugins/Morpheus/fonts/matomo.woff index 25da267a200a8340ea0f3d6a7f464d8f8e189492..5daa8704c1664d7d311ea22f3c5de4440a079903 100644 GIT binary patch delta 1060 zcmZ8gO>7fa5T5teyN+XLe{AmyYl4&PCSIbrMowb84SyD-u8Aw*L&}9n$TWYgNJvZ6 z5H*o~h!RyrAY?!m1jK;@O%PHs5(h4+ltT}_x+-d$0~anxAQhw@Lg>78+DLuU?9O~M z^UcrOefgBG{6yL8$xH?a;JLd3Ugw<$QZ7(-HQHJ1tSpQdE=&W^d+2J|5q13B+!$gH z04jU9BxA#K6QhL@fSVf_ljPF%)&1ua2qLzHb_bV+N8-T5L-OlcR{OV9=jje)(o;X8Qbv8SH-k>edsY zmLHSv+lQOm+3)N(_5&MYCs>9>S%dye*;2k!GVrSaX=@LCGzXZW6E(eG$u)_F))D^dR>hBs!X?qY`AjJ;}oa zADEB9$kj~}X!1l-OEX(mR8^5}mOhnc#a(N4)$sd`w4DisT3bV*jGeCe4Z~miKf20M zQqwpEC)2iTnyl1ym3~&@?ot>D_U}iku#;cX3_~k9tPc3Aq4^D*6^ihFU6{h@_o5ZV zf!va1V#{_U(TDw~lD$1RUo#V?EOR!WKYco%pS4WW`d2qC@`Piiwd>!}@yfu3+g%sd z9DWOq!q-?O##hJp77v6;k?$#fl+;&cb&9-&xI5)+wv~jPJ;ojHfqJH!m`W9m3)E42=7jQ;7^cK9hRXopse1un6f0whB6uD9@RbCS+OqDNJV%2Lmb&}dR_U8DF zBme7x*|KQ2hG?)mOLP Gk$(VI!m)|fF(bDG zsAon4P`?2PE2uIs+#z`!U4!biW)Uz3|yQJ}-XF#8NpqXHPuWcr$yn41a| zdjnK-7lhB0wUrd)7ncBCe`eyJ?ToyWw=i}qMvBXc-4MGfwoEKg%uUQ$OjC?i^cw$9 z{x*JRzOM|-VDGtXUcxlBW%JF>&jK=UR)_tI=ePOFz|8`*h=Ji@&+;x9J^95fbH<*{ z3bQ{jPIj2Bve{v-D5G(o(=!(nS1H#DHy*bWZok}h+)LcAd9r!-cwX=l@rv`>1Jn%) X(;lYJ3_Ku{7?^+|D!h6AyuXY9Fsp4L diff --git a/plugins/Morpheus/fonts/matomo.woff2 b/plugins/Morpheus/fonts/matomo.woff2 index b460525c3384b5f6b395266241df8bc6e88ed53b..c542206db56a220579ed38e8f80bc91536f17f8a 100644 GIT binary patch literal 16792 zcmV)4K+3;&Pew8T0RR9106~}l3jhEB0H8zw06|9p0RR9100000000000000000000 z00006U;u(V5eN!`und9rFbjep00A}vBm;yz1Rw>2T?Zf=hJi&RDz^hbsp1P@W+2!& zfHpWMvi}bU+!zWr>~=vzI0bEJKs#M(VsQwT_WfWr0fRg|{*OlX%)jU>``y~!q zn3n@{Yie|{@QOvJkfBy+KyxurZp$%b<>dAMKc{xz|6gPjgxn6uDv?wM$0gn+ycfJm4LM42h9OIbnm)-UNU$GGcQ02LQxv4~{0)Y}oR>m1YFO^Z%RbXFCH7 zC{kfp++b_JL);WpbQB$O<<3nT@4NFJ@ZOslXl4LVgCVH}2~rDE3E-h*f}+j=1`5D{ zS~G0mhMWgfI3Rz**H8T4A%rr`V2Cc3VBZ2<`fb-YLM!*4V4`vhqoA`axb&w-OsC`o)9Xd`1xcez~*gXstmQWso zxNUKa-vhF%+|LIZbWclQ*$qkdI zANxG!J)ZIS@MFj08&4!pQl6-uOn+j3^3|)3*VxzDuRnGF=XN{H-3?v9uFN>79dY=w z4(-DHbR+*?d~hQ4Lg=~BpF)2O{ULNPG$S}Ckm^tNNBnO2o$#CISLVlM-DF*3^{|XA zEh~!^%_8_-r~XS_N6n)Axowx*C{+Caf1pxqQ$Ib>&uaQdEZ#eDd>>zL5aL3xw%|yz zk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vajm~S1%2P(6aQDhbwpYb0<2>8-{i1TBfS11!*Npgpk+iicP!EoS&VJiqdn)2)pLb6Vhr(`lYOpbE7WwaDHuLoy8nI3XjVIJG!6XC&pC>37 z_wT>YvCQ;JgpV}l2890^v!PPPD;jfPiv6OWtpT`9AS8W1J9%1Dy4Oz4o8I$hf1gBv zj=}$Y)D$HOQi!E`;Y26V@sEy2b?c`o#_=u1-yjY8I>RGsYhFvV9GR*hJfM(Q0-Y~) zNnA9Vo$HElJ$?J+=@oZ*+OY){fcoVEA%BWmgrT%!3yJ~vZ3cO2s!S<^6>^19rdQA` zG^N0#G!XC`{k(|7yWj=M842|2WFS<!h-Kn0wpKE!edy=NcQkR#-Js z({aDsOE>Zq5C9YAA^><14&Z>l+d)sQu(H){r(*sq&rPnLc?%w!aADjFewt!~2;iypEDX5AD}l|WMz|a7MR3o;0U3HY9`?fBXOSQX(hFpu zn;9%1Zp3KZ1Mu`&7@)u(0*k53+zs|3?^PZZ!l?XDb>V9Y5O2~;( zAVF#`YQt$RRD*dXA{Vj9B4)>hN?0}(GN7tK + + + diff --git a/plugins/Morpheus/fonts/svgs/icon-hits.svg b/plugins/Morpheus/fonts/svgs/icon-hits.svg new file mode 100644 index 00000000000..e5a7bde54b3 --- /dev/null +++ b/plugins/Morpheus/fonts/svgs/icon-hits.svg @@ -0,0 +1,11 @@ + + + + + diff --git a/plugins/Morpheus/stylesheets/base/icons.css b/plugins/Morpheus/stylesheets/base/icons.css index 201968e2689..f8992818007 100644 --- a/plugins/Morpheus/stylesheets/base/icons.css +++ b/plugins/Morpheus/stylesheets/base/icons.css @@ -1,10 +1,10 @@ @font-face { font-family: 'matomo'; src: - url('plugins/Morpheus/fonts/matomo.woff2?m6crfo') format('woff2'), - url('plugins/Morpheus/fonts/matomo.woff?m6crfo') format('woff'), - url('plugins/Morpheus/fonts/matomo.ttf?m6crfo') format('truetype'), - url('plugins/Morpheus/fonts/matomo.svg?m6crfo#matomo') format('svg'); + url('plugins/Morpheus/fonts/matomo.woff2?tat0k1') format('woff2'), + url('plugins/Morpheus/fonts/matomo.woff?tat0k1') format('woff'), + url('plugins/Morpheus/fonts/matomo.ttf?tat0k1') format('truetype'), + url('plugins/Morpheus/fonts/matomo.svg?tat0k1#matomo') format('svg'); font-weight: normal; font-style: normal; font-display: block; @@ -25,6 +25,15 @@ -moz-osx-font-smoothing: grayscale; } +.icon-circle:before { + content: "\e90f"; +} +.icon-dollar-sign:before { + content: "\e90e"; +} +.icon-hits:before { + content: "\e910"; +} .icon-merge:before { content: "\e904"; } diff --git a/plugins/Morpheus/templates/dashboard.twig b/plugins/Morpheus/templates/dashboard.twig index 744826e0693..99f4b700af4 100644 --- a/plugins/Morpheus/templates/dashboard.twig +++ b/plugins/Morpheus/templates/dashboard.twig @@ -21,10 +21,12 @@ {% include "@CoreHome/_topScreen.twig" %}

-
- {% block topcontrols %} - {% endblock %} + {% if hideTopControls is not defined or not hideTopControls %} +
+ {% block topcontrols %} + {% endblock %} + {% endif %}
diff --git a/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png b/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png index 59686a1ccb6..0e81b344c08 100644 --- a/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png +++ b/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea288dcb2f28919badb8d7f95f4e59d4729a04736d35981ba77de1debc69b52c -size 3010649 +oid sha256:442b5cb9f41a706abc1a93d8e9cfe73abcf44fa3fe62fbc3d624ed49ae7641c3 +size 3014549 diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php index 1563c2baab8..612a9ad6e90 100644 --- a/plugins/MultiSites/API.php +++ b/plugins/MultiSites/API.php @@ -16,10 +16,13 @@ use Piwik\Container\StaticContainer; use Piwik\DataTable; use Piwik\DataTable\Row; +use Piwik\NumberFormatter; use Piwik\Period; use Piwik\Period\Range; use Piwik\Piwik; +use Piwik\Plugins\FeatureFlags\FeatureFlagManager; use Piwik\Plugins\Goals\Archiver; +use Piwik\Plugins\MultiSites\FeatureFlags\ImprovedAllWebsitesDashboard; use Piwik\Plugins\SitesManager\API as APISitesManager; use Piwik\Scheduler\Scheduler; use Piwik\SettingsPiwik; @@ -384,6 +387,93 @@ function ($value) { return $dataTable; } + /** + * Temporary/partially mocked data for the all websites dashboard. + * + * @internal + * + * @param int $idSite + * @param string $period + * @param string $date + * @param string|false $segment + * @param string $pattern + * @return array + * @throws Exception + */ + public function mockDashboardData( + int $idSite, + string $period, + string $date, + int $filter_limit, + $segment = false, + string $pattern = '' + ): array { + $featureFlagManager = StaticContainer::get(FeatureFlagManager::class); + + if (!$featureFlagManager->isFeatureActive(ImprovedAllWebsitesDashboard::class)) { + throw new Exception('THIS API SHOULD NOT BE USED'); + } + + Piwik::checkUserHasSomeViewAccess(); + + if (Period::isMultiplePeriod($date, $period)) { + throw new Exception('Multiple periods are not supported'); + } + + $numberFormatter = NumberFormatter::getInstance(); + + $response = [ + 'totals' => [ + 'hits_evolution' => $numberFormatter->formatPercent(2.8, 2, 2), + 'hits_evolution_trend' => 1, + 'nb_hits' => $numberFormatter->formatNumber(582303), + 'nb_pageviews' => $numberFormatter->formatNumber(26027), + 'nb_visits' => $numberFormatter->formatNumber(10118), + 'pageviews_evolution' => $numberFormatter->formatPercent(0.3, 2, 2), + 'pageviews_evolution_trend' => -1, + 'visits_evolution' => $numberFormatter->formatPercent(2.4, 2, 2), + 'visits_evolution_trend' => 1, + 'revenue' => $numberFormatter->formatNumber(85958.30, 2, 2), + 'revenue_evolution' => $numberFormatter->formatPercent(0.0, 2, 2), + 'revenue_evolution_trend' => 0, + ], + ]; + + $segment = $segment ?: false; + $request = $_GET + $_POST; + $dashboard = new Dashboard($period, $date, $segment); + + if ('' !== $pattern) { + $dashboard->search(strtolower($pattern)); + } + + $sites = $dashboard->getSites($request, $filter_limit); + + foreach ($sites as &$site) { + $site['nb_hits'] = $site['nb_pageviews']; + $site['hits_evolution'] = $site['pageviews_evolution']; + $site['hits_evolution_trend'] = $site['pageviews_evolution_trend']; + } + + $response['numSites'] = $dashboard->getNumSites(); + $response['sites'] = $sites; + + if ('range' === $period) { + $response['sparklineDate'] = $date; + } else { + Piwik::checkUserHasViewAccess($idSite); + + $response['sparklineDate'] = Range::getRelativeToEndDate( + $period, + 'last30', + $date, + new Site($idSite) + ); + } + + return $response; + } + /** * Performs a binary filter of two * DataTables in order to correctly calculate evolution metrics. diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php index f0778c5f412..491668f7b74 100644 --- a/plugins/MultiSites/Controller.php +++ b/plugins/MultiSites/Controller.php @@ -13,20 +13,28 @@ use Piwik\Config; use Piwik\Date; use Piwik\Piwik; +use Piwik\Plugins\FeatureFlags\FeatureFlagManager; +use Piwik\Plugins\MultiSites\FeatureFlags\ImprovedAllWebsitesDashboard; use Piwik\Translation\Translator; use Piwik\View; class Controller extends \Piwik\Plugin\Controller { + /** + * @var FeatureFlagManager + */ + private $featureFlagManager; + /** * @var Translator */ private $translator; - public function __construct(Translator $translator) + public function __construct(Translator $translator, FeatureFlagManager $featureFlagManager) { parent::__construct(); + $this->featureFlagManager = $featureFlagManager; $this->translator = $translator; } @@ -50,7 +58,15 @@ public function getSitesInfo($isWidgetized = false) $date = Piwik::getDate('today'); $period = Piwik::getPeriod('day'); - $view = new View("@MultiSites/getSitesInfo"); + if ($this->featureFlagManager->isFeatureActive(ImprovedAllWebsitesDashboard::class)) { + $view = new View('@MultiSites/allWebsitesDashboard'); + + if (Piwik::hasUserSuperUserAccess()) { + $view->kpiBadgeHits = 'Plan: 600K hits/month'; + } + } else { + $view = new View('@MultiSites/getSitesInfo'); + } $view->isWidgetized = $isWidgetized; $view->displayRevenueColumn = Common::isGoalPluginEnabled(); diff --git a/plugins/MultiSites/FeatureFlags/ImprovedAllWebsitesDashboard.php b/plugins/MultiSites/FeatureFlags/ImprovedAllWebsitesDashboard.php new file mode 100644 index 00000000000..1da69a40c3a --- /dev/null +++ b/plugins/MultiSites/FeatureFlags/ImprovedAllWebsitesDashboard.php @@ -0,0 +1,22 @@ + DI::add([ + [ + 'API.MultiSites.mockDashboardData', + DI::value(function (&$parameters) { + if (StaticContainer::get('test.vars.forceMultiSitesDashboardFailure')) { + throw new Exception('Forced API error'); + } + }), + ], + ]), +]; diff --git a/plugins/MultiSites/images/kpi_divider.svg b/plugins/MultiSites/images/kpi_divider.svg new file mode 100644 index 00000000000..5ce4d3185b2 --- /dev/null +++ b/plugins/MultiSites/images/kpi_divider.svg @@ -0,0 +1,3 @@ + + + diff --git a/plugins/MultiSites/lang/en.json b/plugins/MultiSites/lang/en.json index 770ef0b81ca..ecb39b7724c 100644 --- a/plugins/MultiSites/lang/en.json +++ b/plugins/MultiSites/lang/en.json @@ -6,11 +6,20 @@ "TopLinkTooltip": "Compare Web Analytics stats for all of your Websites.", "SingleWebsitesDashboardDocumentation": "This report gives you an informational overview for a specific website, containing the most general metrics about your visitors.", "AllWebsitesDashboardDocumentation": "This report gives you an informational overview for each of your websites, containing the most general metrics about your visitors.", + "AllWebsitesDashboardTitle": "All Websites", "EvolutionComparisonIncomplete": "The currently selected time period is %1$s complete.", "EvolutionComparisonProportional": "When the previous period was also %1$s complete, there would have been an estimated %2$s %3$s\n(out of a total of %4$s %3$s in the previous period).", "EvolutionComparisonDay": "%1$s %2$s this day compared to %3$s %2$s in the previous partial period (%4$s) Evolution: %5$s", "EvolutionComparisonWeek": "%1$s %2$s this week compared to %3$s %2$s in the previous partial period (%4$s) Evolution: %5$s", "EvolutionComparisonMonth": "%1$s %2$s this month compared to %3$s %2$s in the previous partial period (%4$s) Evolution: %5$s", - "EvolutionComparisonYear": "%1$s %2$s this year compared to %3$s %2$s in the previous partial period (%4$s) Evolution: %5$s" + "EvolutionComparisonYear": "%1$s %2$s this year compared to %3$s %2$s in the previous partial period (%4$s) Evolution: %5$s", + "EvolutionFromPreviousDay": "From previous day", + "EvolutionFromPreviousMonth": "From previous month", + "EvolutionFromPreviousPeriod": "From previous period", + "EvolutionFromPreviousWeek": "From previous week", + "EvolutionFromPreviousYear": "From previous year", + "TotalHits": "Total Hits", + "TotalPageviews": "Total Pageviews", + "TotalVisits": "Total Visits" } -} \ No newline at end of file +} diff --git a/plugins/MultiSites/templates/allWebsitesDashboard.twig b/plugins/MultiSites/templates/allWebsitesDashboard.twig new file mode 100644 index 00000000000..1f902a1fd38 --- /dev/null +++ b/plugins/MultiSites/templates/allWebsitesDashboard.twig @@ -0,0 +1,36 @@ +{% extends isWidgetized ? 'empty.twig' : 'dashboard.twig' %} + +{% block root %} + {% set hideTopControls = true %} + {{ parent() }} +{% endblock %} + +{% block content %} +
+
+ {% if isWidgetized %} +
+ {% else %} +
+
+ {% endif %} + +
+ + {% if isWidgetized %} +
+ {% else %} +
+
+ {% endif %} +
+
+{% endblock %} diff --git a/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js b/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js new file mode 100644 index 00000000000..fb0cc0b601b --- /dev/null +++ b/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js @@ -0,0 +1,253 @@ +/*! + * Matomo - free/libre analytics platform + * + * Screenshot integration tests for MultiSites. + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +describe('AllWebsitesDashboard', function () { + this.fixture = 'Piwik\\Plugins\\MultiSites\\tests\\Fixtures\\ManySitesWithVisits'; + + const parentSuite = this; + + const generalParams = 'idSite=1&period=day&date=2013-01-23'; + const dashboardUrl = '?module=MultiSites&action=index&' + generalParams; + const widgetUrl = '?module=Widgetize&action=iframe&moduleToWidgetize=MultiSites&actionToWidgetize=standalone&' + generalParams; + + before(function() { + testEnvironment.overrideConfig('FeatureFlags', { + ImprovedAllWebsitesDashboard_feature: 'enabled', + }); + + // split 15 fixture sites into 2 pages + testEnvironment.overrideConfig('General', { + all_websites_website_per_page: 10, + }); + + testEnvironment.save(); + }); + + beforeEach(async function() { + // set in beforeEach() to have it set in each describe() + await page.webpage.setViewport({ + width: 1440, + height: 900, + }); + }); + + after(function () { + delete testEnvironment.configOverride.FeatureFlags; + delete testEnvironment.configOverride.General; + + testEnvironment.save(); + }); + + async function getSitesPagination() { + const pagination = await page.$('.sitesTablePagination .dataTablePages'); + const paginationContent = await pagination.getProperty('textContent'); + + return (await paginationContent.jsonValue()).trim(); + } + + async function getSitesTableCell(rowIndex, cellIndex) { + const cellSelector = `.sitesTableSite:nth-child(${rowIndex}) td:nth-child(${cellIndex})`; + + const cell = await page.$(cellSelector); + const cellContent = await cell.getProperty('textContent'); + + return (await cellContent.jsonValue()).trim(); + } + + describe('Rendering', function () { + this.title = parentSuite.title; // to make sure the screenshot prefix is the same + + afterEach(function() { + delete testEnvironment.configOverride.General.show_multisites_sparklines; + delete testEnvironment.pluginsToUnload; + + testEnvironment.save(); + }); + + it('should load the all websites dashboard correctly', async function () { + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await page.screenshotSelector('#main')).to.matchImage('dashboard'); + }); + + it('should render properly when widgetized', async function () { + await page.goto(widgetUrl); + await page.waitForNetworkIdle(); + + expect(await page.screenshotSelector('#main')).to.matchImage('widgetized'); + }); + + it('should not display revenue if disabled', async function () { + testEnvironment.pluginsToUnload = ['Goals']; + testEnvironment.save(); + + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await page.screenshotSelector('#main')).to.matchImage('no_revenue'); + }); + + it('should not display sparklines if disabled', async function () { + testEnvironment.overrideConfig('General', 'show_multisites_sparklines', 0); + testEnvironment.save(); + + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await page.screenshotSelector('#main')).to.matchImage('no_sparklines'); + }); + }); + + describe('Dashboard Controls', function () { + it('should link to the SitesManager', async function () { + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + await page.click('.dashboardControls .btn'); + await page.waitForNetworkIdle(); + + await page.waitForSelector('.modal .add-site-dialog', { visible: true }); + }); + + it('should allow searching', async function () { + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); + expect(await getSitesPagination()).to.equal('1–10 of 15'); + + await page.type('.siteSearch input', 'Site 15'); + await page.click('.siteSearch .icon-search'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 15'); + expect(await getSitesPagination()).to.equal('1–1 of 1'); + + await page.type('.siteSearch input', 'No Results'); + await page.click('.siteSearch .icon-search'); + await page.waitForNetworkIdle(); + + expect(await getSitesPagination()).to.equal('0–0 of 0'); + }); + }); + + describe('Loading Error', function () { + this.title = parentSuite.title; // to make sure the screenshot prefix is the same + + before(function () { + testEnvironment.forceMultiSitesDashboardFailure = 1; + testEnvironment.save(); + }); + + after(function () { + delete testEnvironment.forceMultiSitesDashboardFailure; + + testEnvironment.save(); + }); + + it('should display an error message', async function () { + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await page.screenshotSelector('#main')).to.matchImage('error'); + }); + }); + + describe('Period Selector', function () { + async function getPeriodSelectorTitle() { + const periodSelector = await page.$('.periodSelector .title'); + const periodSelectorTitle = await periodSelector.getProperty('textContent'); + + return (await periodSelectorTitle.jsonValue()).trim(); + } + + it('should allow changing periods', async function () { + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await getPeriodSelectorTitle()).to.equal('2013-01-23'); + expect(await getSitesTableCell(1, 2)).to.equal('2'); + + await page.click('.periodSelector .move-period-prev'); + await page.waitForNetworkIdle(); + + expect(await getPeriodSelectorTitle()).to.equal('2013-01-22'); + expect(await getSitesTableCell(1, 2)).to.equal('0'); + }); + }); + + describe('Sites Table', function () { + this.title = parentSuite.title; // to make sure the screenshot prefix is the same + + it('should allow reversing the default sorting', async function () { + await page.goto(dashboardUrl); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); + expect(await getSitesTableCell(1, 2)).to.equal('2'); + + // reverse default "visits" sorting + await page.click('.sitesTableSort.sitesTableSortDesc'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.not.equal('Site 1'); + expect(await getSitesTableCell(1, 2)).to.equal('0'); + }); + + it('should allow navigation through pages', async function () { + // sort by label for consistency + await page.click('.sitesTable th:nth-child(1)'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); + + await page.click('.sitesTablePagination .dataTableNext'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 11'); + expect(await getSitesPagination()).to.equal('11–15 of 15'); + + await page.click('.sitesTablePagination .dataTablePrevious'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); + expect(await getSitesPagination()).to.equal('1–10 of 15'); + }); + + it('should allow sorting by other metrics', async function () { + // sort by "pageviews" + await page.click('.sitesTable th:nth-child(3)'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); + expect(await getSitesTableCell(1, 3)).to.equal('3'); + + // reverse sorting + await page.click('.sitesTable th:nth-child(3)'); + await page.waitForNetworkIdle(); + + expect(await getSitesTableCell(1, 1)).to.not.equal('Site 1'); + expect(await getSitesTableCell(1, 3)).to.equal('0'); + }); + + it('should allow changing the evolution metric', async function () { + // select "Hits" evolution + await page.evaluate(() => { + const hitsOption = $('.sitesTableEvolutionSelector option:contains("Hits")'); + const select = $('.sitesTableEvolutionSelector select'); + + select.val(hitsOption.val()).change(); + }); + + await page.waitForNetworkIdle(); + + expect(await page.screenshotSelector('#main')).to.matchImage('evolution_change'); + }); + }); +}); diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_dashboard.png b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_dashboard.png new file mode 100644 index 00000000000..9b8afd52c7c --- /dev/null +++ b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_dashboard.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ef271d1d3af38d9ba2a2d777b5977c4b12b1471c3ec3af19a8cfcc501f5564d +size 90159 diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_error.png b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_error.png new file mode 100644 index 00000000000..4c8ee34a935 --- /dev/null +++ b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_error.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:465a014619dfc797eae4fdff607203991701f73eeab6c74511647cd197265f93 +size 57029 diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_evolution_change.png b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_evolution_change.png new file mode 100644 index 00000000000..32626e5c474 --- /dev/null +++ b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_evolution_change.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbd516e8f779b12f1b0d36a2caaa2b70b1af7c0f15999fabf2de35419cacbe08 +size 88067 diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_revenue.png b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_revenue.png new file mode 100644 index 00000000000..9f12a9591eb --- /dev/null +++ b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_revenue.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:787b9aebf178fa5ae1de44518274e250d79ca03a1fa4a47b0cad2768786daa08 +size 71362 diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_sparklines.png b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_sparklines.png new file mode 100644 index 00000000000..26323a4e5a0 --- /dev/null +++ b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_no_sparklines.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:048975edf1e5860830212c95b20bfd9d93effe18fc1a4854329c79ac7dbd5bb8 +size 88545 diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_widgetized.png b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_widgetized.png new file mode 100644 index 00000000000..6a9f6f3f98e --- /dev/null +++ b/plugins/MultiSites/tests/UI/expected-screenshots/AllWebsitesDashboard_widgetized.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6d807de4c4d8533295e2edef151ff0720c146748822f71f37173cd9a39c3f71 +size 83376 diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index cd9f566388d..9494e47603b 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -118,6 +118,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; __webpack_require__.r(__webpack_exports__); // EXPORTS +__webpack_require__.d(__webpack_exports__, "AllWebsitesDashboard", function() { return /* reexport */ AllWebsitesDashboard; }); __webpack_require__.d(__webpack_exports__, "MultisitesSite", function() { return /* reexport */ MultisitesSite; }); __webpack_require__.d(__webpack_exports__, "DashboadStore", function() { return /* reexport */ Dashboard_store; }); __webpack_require__.d(__webpack_exports__, "Dashboard", function() { return /* reexport */ Dashboard; }); @@ -141,78 +142,1191 @@ if (typeof window !== 'undefined') { // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=template&id=75bcc548 + +var _hoisted_1 = { + class: "dashboardHeader" +}; +var _hoisted_2 = { + class: "card-title" +}; +var _hoisted_3 = { + key: 0, + id: "periodString", + class: "borderedControl" +}; +var _hoisted_4 = { + class: "dashboardControls" +}; +var _hoisted_5 = { + class: "siteSearch" +}; +var _hoisted_6 = ["placeholder"]; +var _hoisted_7 = ["title"]; +var _hoisted_8 = ["href"]; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); + + var _component_PeriodSelector = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodSelector"); + + var _component_KPICardContainer = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("KPICardContainer"); + + var _component_SitesTable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SitesTable"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h1", _hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + "feature-name": _ctx.translate('MultiSites_AllWebsitesDashboardTitle') + }, { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('MultiSites_AllWebsitesDashboardTitle')), 1)]; + }), + _: 1 + }, 8, ["feature-name"])]), !_ctx.isWidgetized ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodSelector, { + periods: _ctx.selectablePeriods + }, null, 8, ["periods"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_KPICardContainer, { + "is-loading": _ctx.isLoadingKPIs, + "model-value": _ctx.kpis + }, null, 8, ["is-loading", "model-value"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + type: "text", + onKeydown: _cache[0] || (_cache[0] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function ($event) { + return _ctx.searchSite(_ctx.searchTerm); + }, ["enter"])), + "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { + return _ctx.searchTerm = $event; + }), + placeholder: _ctx.translate('Actions_SubmenuSitesearch') + }, null, 40, _hoisted_6), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "icon-search", + onClick: _cache[2] || (_cache[2] = function ($event) { + return _ctx.searchSite(_ctx.searchTerm); + }), + title: _ctx.translate('General_ClickToSearch') + }, null, 8, _hoisted_7)]), !_ctx.isWidgetized && _ctx.isUserAllowedToAddSite ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 0, + class: "btn", + href: _ctx.addSiteUrl + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_AddSite')), 9, _hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SitesTable, { + "display-revenue": _ctx.displayRevenue, + "display-sparklines": _ctx.displaySparklines + }, null, 8, ["display-revenue", "display-sparklines"])], 64); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=template&id=75bcc548 + +// EXTERNAL MODULE: external "CoreHome" +var external_CoreHome_ = __webpack_require__("19dc"); + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.store.ts +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + + +var DEFAULT_SORT_ORDER = 'desc'; +var DEFAULT_SORT_COLUMN = 'nb_visits'; + +var AllWebsitesDashboard_store_DashboardStore = /*#__PURE__*/function () { + function DashboardStore() { + var _this = this; + + _classCallCheck(this, DashboardStore); + + _defineProperty(this, "fetchAbort", null); + + _defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ + dashboardKPIs: { + evolutionPeriod: 'day', + hits: '?', + hitsEvolution: '', + hitsTrend: 0, + pageviews: '?', + pageviewsEvolution: '', + pageviewsTrend: 0, + revenue: '?', + revenueEvolution: '', + revenueTrend: 0, + visits: '?', + visitsEvolution: '', + visitsTrend: 0 + }, + dashboardSites: [], + errorLoading: false, + isLoadingKPIs: false, + isLoadingSites: false, + numSites: 0, + paginationCurrentPage: 0, + sparklineDate: '', + sortColumn: DEFAULT_SORT_COLUMN, + sortOrder: DEFAULT_SORT_ORDER + })); + + _defineProperty(this, "autoRefreshInterval", 0); + + _defineProperty(this, "autoRefreshTimeout", null); + + _defineProperty(this, "pageSize", 25); + + _defineProperty(this, "searchTerm", ''); + + _defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); + })); + + _defineProperty(this, "numberOfPages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Math.ceil(_this.state.value.numSites / _this.pageSize - 1); + })); + + _defineProperty(this, "currentPagingOffset", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Math.ceil(_this.state.value.paginationCurrentPage * _this.pageSize); + })); + + _defineProperty(this, "paginationLowerBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + if (_this.state.value.numSites === 0) { + return 0; + } + + return 1 + _this.currentPagingOffset.value; + })); + + _defineProperty(this, "paginationUpperBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + if (_this.state.value.numSites === 0) { + return 0; + } + + var end = _this.pageSize + _this.currentPagingOffset.value; + var max = _this.state.value.numSites; + + if (end < max) { + return end; + } + + return max; + })); + } + + _createClass(DashboardStore, [{ + key: "reloadDashboard", + value: function reloadDashboard() { + this.privateState.sortColumn = DEFAULT_SORT_COLUMN; + this.privateState.sortOrder = DEFAULT_SORT_ORDER; + this.privateState.paginationCurrentPage = 0; + this.refreshData(); + } + }, { + key: "navigateNextPage", + value: function navigateNextPage() { + if (this.privateState.paginationCurrentPage === this.numberOfPages.value) { + return; + } + + this.privateState.paginationCurrentPage += 1; + this.refreshData(true); + } + }, { + key: "navigatePreviousPage", + value: function navigatePreviousPage() { + if (this.privateState.paginationCurrentPage === 0) { + return; + } + + this.privateState.paginationCurrentPage -= 1; + this.refreshData(true); + } + }, { + key: "searchSite", + value: function searchSite(term) { + this.searchTerm = term; + this.privateState.paginationCurrentPage = 0; + this.refreshData(true); + } + }, { + key: "setAutoRefreshInterval", + value: function setAutoRefreshInterval(interval) { + this.autoRefreshInterval = interval; + } + }, { + key: "setPageSize", + value: function setPageSize(size) { + this.pageSize = size; + } + }, { + key: "sortBy", + value: function sortBy(column) { + if (this.privateState.sortColumn === column) { + this.privateState.sortOrder = this.privateState.sortOrder === 'desc' ? 'asc' : 'desc'; + } else { + this.privateState.sortOrder = column === 'label' ? 'asc' : 'desc'; + } + + this.privateState.sortColumn = column; + this.refreshData(true); + } + }, { + key: "cancelAutoRefresh", + value: function cancelAutoRefresh() { + if (!this.autoRefreshTimeout) { + return; + } + + clearTimeout(this.autoRefreshTimeout); + this.autoRefreshTimeout = null; + } + }, { + key: "refreshData", + value: function refreshData() { + var _this2 = this; + + var onlySites = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.fetchAbort) { + this.fetchAbort.abort(); + this.fetchAbort = null; + this.cancelAutoRefresh(); + } + + this.fetchAbort = new AbortController(); + this.privateState.errorLoading = false; + this.privateState.isLoadingKPIs = !onlySites; + this.privateState.isLoadingSites = true; + var params = { + method: 'MultiSites.mockDashboardData', + filter_limit: this.pageSize, + filter_offset: this.currentPagingOffset.value, + filter_sort_column: this.privateState.sortColumn, + filter_sort_order: this.privateState.sortOrder, + showColumns: ['hits_evolution', 'hits_evolution_trend', 'label', 'nb_hits', 'nb_pageviews', 'nb_visits', 'pageviews_evolution', 'pageviews_evolution_trend', 'revenue', 'revenue_evolution', 'revenue_evolution_trend', 'visits_evolution', 'visits_evolution_trend'].join(',') + }; + + if (this.searchTerm) { + params.pattern = this.searchTerm; + } + + return external_CoreHome_["AjaxHelper"].fetch(params, { + abortController: this.fetchAbort + }).then(function (response) { + if (!onlySites) { + _this2.updateDashboardKPIs(response); + } + + _this2.updateDashboardSites(response); + }).catch(function () { + _this2.privateState.dashboardSites = []; + _this2.privateState.errorLoading = true; + }).finally(function () { + _this2.privateState.isLoadingKPIs = false; + _this2.privateState.isLoadingSites = false; + _this2.fetchAbort = null; + + _this2.startAutoRefresh(); + }); + } + }, { + key: "startAutoRefresh", + value: function startAutoRefresh() { + var _this3 = this; + + this.cancelAutoRefresh(); + + if (this.autoRefreshInterval <= 0) { + return; + } + + var currentPeriod; + + try { + currentPeriod = external_CoreHome_["Periods"].parse(external_CoreHome_["Matomo"].period, external_CoreHome_["Matomo"].currentDateString); + } catch (e) {// gracefully ignore period parsing errors + } + + if (!currentPeriod || !currentPeriod.containsToday()) { + return; + } + + this.autoRefreshTimeout = setTimeout(function () { + _this3.autoRefreshTimeout = null; + + _this3.refreshData(); + }, this.autoRefreshInterval * 1000); + } + }, { + key: "updateDashboardKPIs", + value: function updateDashboardKPIs(response) { + this.privateState.dashboardKPIs = { + evolutionPeriod: external_CoreHome_["Matomo"].period, + hits: response.totals.nb_hits, + hitsEvolution: response.totals.hits_evolution, + hitsTrend: response.totals.hits_evolution_trend, + pageviews: response.totals.nb_pageviews, + pageviewsEvolution: response.totals.pageviews_evolution, + pageviewsTrend: response.totals.pageviews_evolution_trend, + revenue: response.totals.revenue, + revenueEvolution: response.totals.revenue_evolution, + revenueTrend: response.totals.revenue_evolution_trend, + visits: response.totals.nb_visits, + visitsEvolution: response.totals.visits_evolution, + visitsTrend: response.totals.visits_evolution_trend + }; + } + }, { + key: "updateDashboardSites", + value: function updateDashboardSites(response) { + this.privateState.dashboardSites = response.sites; + this.privateState.numSites = response.numSites; + this.privateState.sparklineDate = response.sparklineDate; + } + }]); + + return DashboardStore; +}(); + +/* harmony default export */ var AllWebsitesDashboard_store = (new AllWebsitesDashboard_store_DashboardStore()); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue?vue&type=template&id=87c62b90 + +var KPICardContainervue_type_template_id_87c62b90_hoisted_1 = { + class: "kpiCardContainer" +}; +var KPICardContainervue_type_template_id_87c62b90_hoisted_2 = { + key: 0, + class: "kpiCard kpiCardLoading" +}; + +var KPICardContainervue_type_template_id_87c62b90_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + class: "kpiCardTitle" +}, " ", -1); + +var KPICardContainervue_type_template_id_87c62b90_hoisted_4 = { + class: "kpiCardValue" +}; + +var KPICardContainervue_type_template_id_87c62b90_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + class: "kpiCardEvolution" +}, [/*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "kpiCardEvolutionTrend" +}, " ")], -1); + +var KPICardContainervue_type_template_id_87c62b90_hoisted_6 = { + key: 0, + class: "kpiCardBadge" +}; +function KPICardContainervue_type_template_id_87c62b90_render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); + + var _component_KPICard = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("KPICard"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_1, [_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_2, [KPICardContainervue_type_template_id_87c62b90_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader)]), KPICardContainervue_type_template_id_87c62b90_hoisted_5, _ctx.hasKpiBadge ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardContainervue_type_template_id_87c62b90_hoisted_6, " ")) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 1 + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.kpis, function (kpi, index) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: "kpi-card-".concat(index) + }, [index > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ + kpiCardDivider: true, + kpiCardDividerBadge: _ctx.hasKpiBadge + }) + }, " ", 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_KPICard, { + "model-value": kpi + }, null, 8, ["model-value"])], 64); + }), 128))]); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue?vue&type=template&id=87c62b90 + +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=template&id=3c2758fa + +var KPICardvue_type_template_id_3c2758fa_hoisted_1 = { + class: "kpiCard" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_2 = { + class: "kpiCardTitle" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_3 = { + class: "kpiCardValue" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_4 = { + class: "kpiCardEvolution" +}; +var KPICardvue_type_template_id_3c2758fa_hoisted_5 = { + key: 1, + class: "kpiCardEvolution" +}; + +var KPICardvue_type_template_id_3c2758fa_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "kpiCardEvolutionTrend" +}, " ", -1); + +var KPICardvue_type_template_id_3c2758fa_hoisted_7 = [KPICardvue_type_template_id_3c2758fa_hoisted_6]; +var KPICardvue_type_template_id_3c2758fa_hoisted_8 = ["innerHTML"]; +function KPICardvue_type_template_id_3c2758fa_render(_ctx, _cache, $props, $setup, $data, $options) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("kpiCardIcon ".concat(_ctx.kpi.icon)) + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(_ctx.kpi.title)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.kpi.value), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_4, [_ctx.kpi.evolutionValue !== '' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 0 + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("kpiCardEvolutionTrend ".concat(_ctx.evolutionTrendClass)) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("kpiCardEvolutionIcon ".concat(_ctx.evolutionTrendIcon)) + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.kpi.evolutionValue), 1)], 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate(_ctx.evolutionTrendFrom)), 1)], 64)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", KPICardvue_type_template_id_3c2758fa_hoisted_5, KPICardvue_type_template_id_3c2758fa_hoisted_7))]), _ctx.kpi.badge ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: 0, + innerHTML: _ctx.$sanitize(_ctx.kpi.badge), + class: "kpiCardBadge" + }, null, 8, KPICardvue_type_template_id_3c2758fa_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=template&id=3c2758fa + +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=script&lang=ts + +/* harmony default export */ var KPICardvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + modelValue: { + type: Object, + required: true + } + }, + computed: { + evolutionTrendFrom: function evolutionTrendFrom() { + switch (this.kpi.evolutionPeriod) { + case 'day': + return 'MultiSites_EvolutionFromPreviousDay'; + + case 'week': + return 'MultiSites_EvolutionFromPreviousWeek'; + + case 'month': + return 'MultiSites_EvolutionFromPreviousMonth'; + + case 'year': + return 'MultiSites_EvolutionFromPreviousYear'; + + default: + return 'MultiSites_EvolutionFromPreviousPeriod'; + } + }, + evolutionTrendClass: function evolutionTrendClass() { + if (this.kpi.evolutionTrend === 1) { + return 'kpiTrendPositive'; + } + + if (this.kpi.evolutionTrend === -1) { + return 'kpiTrendNegative'; + } + + return 'kpiTrendNeutral'; + }, + evolutionTrendIcon: function evolutionTrendIcon() { + if (this.kpi.evolutionTrend === 1) { + return 'icon-chevron-up'; + } + + if (this.kpi.evolutionTrend === -1) { + return 'icon-chevron-down'; + } + + return 'icon-circle'; + }, + kpi: function kpi() { + return this.modelValue; + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue + + + +KPICardvue_type_script_lang_ts.render = KPICardvue_type_template_id_3c2758fa_render + +/* harmony default export */ var KPICard = (KPICardvue_type_script_lang_ts); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue?vue&type=script&lang=ts + + + +/* harmony default export */ var KPICardContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + components: { + MatomoLoader: external_CoreHome_["MatomoLoader"], + KPICard: KPICard + }, + props: { + isLoading: Boolean, + modelValue: { + type: Array, + required: true + } + }, + computed: { + hasKpiBadge: function hasKpiBadge() { + return this.kpis.some(function (kpi) { + return !!kpi.badge; + }); + }, + kpis: function kpis() { + return this.modelValue; + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue + + + +KPICardContainervue_type_script_lang_ts.render = KPICardContainervue_type_template_id_87c62b90_render + +/* harmony default export */ var KPICardContainer = (KPICardContainervue_type_script_lang_ts); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=template&id=0d846a88 + +var SitesTablevue_type_template_id_0d846a88_hoisted_1 = { + class: "sitesTableContainer" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_2 = { + class: "card-table dataTable sitesTable" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_3 = { + class: "sitesTableEvolutionSelector" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_4 = ["value"]; +var SitesTablevue_type_template_id_0d846a88_hoisted_5 = { + value: "hits_evolution" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_6 = { + value: "visits_evolution" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_7 = { + value: "pageviews_evolution" +}; +var SitesTablevue_type_template_id_0d846a88_hoisted_8 = { + key: 0, + value: "revenue_evolution" +}; +var _hoisted_9 = { + key: 0 +}; +var _hoisted_10 = { + class: "sitesTableLoading", + colspan: "7" +}; +var _hoisted_11 = { + key: 1 +}; +var _hoisted_12 = { + colspan: "7" +}; +var _hoisted_13 = { + class: "notification system notification-error" +}; + +var _hoisted_14 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); + +var _hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); + +var _hoisted_16 = ["href"]; + +var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" – "); + +var _hoisted_18 = ["href"]; +var _hoisted_19 = ["href"]; + +var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(". "); + +var _hoisted_21 = { + key: 0, + class: "sitesTablePagination" +}; +var _hoisted_22 = { + class: "dataTablePages" +}; +function SitesTablevue_type_template_id_0d846a88_render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_MatomoLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoLoader"); + + var _component_SitesTableSite = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SitesTableSite"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SitesTablevue_type_template_id_0d846a88_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", SitesTablevue_type_template_id_0d846a88_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[0] || (_cache[0] = function ($event) { + return _ctx.sortBy('label'); + }), + class: "label" + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Website')) + " ", 1), _ctx.sortColumn === 'label' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[1] || (_cache[1] = function ($event) { + return _ctx.sortBy('nb_visits'); + }) + }, [_ctx.sortColumn === 'nb_visits' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[2] || (_cache[2] = function ($event) { + return _ctx.sortBy('nb_pageviews'); + }) + }, [_ctx.sortColumn === 'nb_pageviews' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[3] || (_cache[3] = function ($event) { + return _ctx.sortBy('nb_hits'); + }) + }, [_ctx.sortColumn === 'nb_hits' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1)]), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { + key: 0, + onClick: _cache[4] || (_cache[4] = function ($event) { + return _ctx.sortBy('revenue'); + }) + }, [_ctx.sortColumn === 'revenue' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + onClick: _cache[5] || (_cache[5] = function ($event) { + return _ctx.sortBy(_ctx.evolutionSelector); + }) + }, [_ctx.sortColumn === _ctx.evolutionSelector ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + key: 0, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.sortColumnClass) + }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('MultiSites_Evolution')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", SitesTablevue_type_template_id_0d846a88_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("select", { + class: "browser-default", + value: _ctx.evolutionSelector, + onChange: _cache[6] || (_cache[6] = function ($event) { + return _ctx.changeEvolutionSelector($event.target.value); + }) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnHits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnNbVisits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnPageviews')), 1), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("option", SitesTablevue_type_template_id_0d846a88_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ColumnRevenue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 40, SitesTablevue_type_template_id_0d846a88_hoisted_4)])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [_ctx.isLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", _hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoLoader)])])) : _ctx.errorLoading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _hoisted_14, _hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_NeedMoreHelp')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.externalRawLink('https://matomo.org/faq/troubleshooting/faq_19489/') + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Faq')), 9, _hoisted_16), _hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.externalRawLink('https://forum.matomo.org/') + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_CommunityHelp')), 9, _hoisted_18), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, " – ", 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.errorShowProfessionalHelp]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.externalRawLink('https://matomo.org/support-plans/') + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Feedback_ProfessionalHelp')), 9, _hoisted_19), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.errorShowProfessionalHelp]]), _hoisted_20])])])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 2 + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.sites, function (site) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_SitesTableSite, { + "display-revenue": _ctx.displayRevenue, + "evolution-metric": _ctx.evolutionMetric, + key: "site-".concat(site.idsite), + "model-value": site, + "sparkline-date": _ctx.sparklineDate, + "sparkline-metric": _ctx.sparklineMetric + }, null, 8, ["display-revenue", "evolution-metric", "model-value", "sparkline-date", "sparkline-metric"]); + }), 128))])])]), !_ctx.isLoading || _ctx.paginationUpperBound > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_21, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "dataTablePrevious", + onClick: _cache[7] || (_cache[7] = function ($event) { + return _ctx.navigatePreviousPage(); + }) + }, " « " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Previous')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.paginationCurrentPage !== 0]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_22, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Pagination', _ctx.paginationLowerBound, _ctx.paginationUpperBound, _ctx.numberOfFilteredSites)), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "dataTableNext", + onClick: _cache[8] || (_cache[8] = function ($event) { + return _ctx.navigateNextPage(); + }) + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Next')) + " » ", 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.paginationCurrentPage < _ctx.paginationMaxPage]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=template&id=0d846a88 + +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=47f7cfe0 + +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_1 = { + class: "label" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_2 = ["href", "title"]; + +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "icon icon-outlink" +}, null, -1); + +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_4 = [SitesTableSitevue_type_template_id_47f7cfe0_hoisted_3]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_5 = ["href"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_6 = { + key: 1, + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_7 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_8 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_9 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_10 = { + key: 0 +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_11 = { + class: "value" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_12 = ["colspan"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_13 = ["src"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_14 = { + key: 1, + class: "sitesTableSparkline" +}; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_15 = ["href", "title"]; +var SitesTableSitevue_type_template_id_47f7cfe0_hoisted_16 = ["src"]; +function SitesTableSitevue_type_template_id_47f7cfe0_render(_ctx, _cache, $props, $setup, $data, $options) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ + sitesTableGroup: !!_ctx.site.isGroup, + sitesTableGroupSite: !_ctx.site.isGroup && !!_ctx.site.group, + sitesTableSite: !_ctx.site.isGroup && !_ctx.site.group + }) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_1, [!_ctx.site.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 0 + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.site.main_url, + title: _ctx.translate('General_GoTo', _ctx.site.main_url) + }, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_4, 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + title: "View reports", + class: "value", + href: _ctx.dashboardUrl + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 9, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_5)], 64)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 1))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.nb_visits), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.nb_pageviews), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.nb_hits), 1)]), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site.revenue), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + colspan: _ctx.displaySparkline ? 1 : 2 + }, [!_ctx.site.isGroup && !!_ctx.site[_ctx.evolutionMetric] ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + key: 0 + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + src: _ctx.evolutionIconSrc, + alt: "" + }, null, 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.evolutionTrendClass) + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.site[_ctx.evolutionMetric]), 3)], 64)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_12), _ctx.displaySparkline ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_47f7cfe0_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + rel: "noreferrer noopener", + target: "_blank", + href: _ctx.dashboardUrl, + title: _ctx.translate('General_GoTo', _ctx.translate('Dashboard_DashboardOf', _ctx.siteLabel)) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + alt: "", + width: "100", + height: "25", + src: _ctx.evolutionSparklineSrc + }, null, 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_16)], 8, SitesTableSitevue_type_template_id_47f7cfe0_hoisted_15)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); +} +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=47f7cfe0 + +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=script&lang=ts + + +/* harmony default export */ var SitesTableSitevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + displayRevenue: { + type: Boolean, + required: true + }, + evolutionMetric: { + type: String, + required: true + }, + modelValue: { + type: Object, + required: true + }, + sparklineDate: String, + sparklineMetric: String + }, + computed: { + dashboardUrl: function dashboardUrl() { + var dashboardParams = external_CoreHome_["MatomoUrl"].stringify({ + module: 'CoreHome', + action: 'index', + date: external_CoreHome_["Matomo"].currentDateString, + period: external_CoreHome_["Matomo"].period, + idSite: this.site.idsite + }); + return "?".concat(dashboardParams).concat(this.tokenParam); + }, + displaySparkline: function displaySparkline() { + return !this.site.isGroup && this.sparklineDate && this.sparklineMetric; + }, + evolutionIconSrc: function evolutionIconSrc() { + if (this.evolutionTrend === 1) { + return 'plugins/MultiSites/images/arrow_up.png'; + } + + if (this.evolutionTrend === -1) { + return 'plugins/MultiSites/images/arrow_down.png'; + } + + return 'plugins/MultiSites/images/stop.png'; + }, + evolutionSparklineSrc: function evolutionSparklineSrc() { + var sparklineParams = external_CoreHome_["MatomoUrl"].stringify({ + module: 'MultiSites', + action: 'getEvolutionGraph', + date: this.sparklineDate, + period: external_CoreHome_["Matomo"].period, + idSite: this.site.idsite, + columns: this.sparklineMetric, + evolutionBy: this.sparklineMetric, + colors: JSON.stringify(external_CoreHome_["Matomo"].getSparklineColors()), + viewDataTable: 'sparkline' + }); + return "?".concat(sparklineParams).concat(this.tokenParam); + }, + evolutionTrend: function evolutionTrend() { + var property = "".concat(this.evolutionMetric, "_trend"); + return this.site[property]; + }, + evolutionTrendClass: function evolutionTrendClass() { + if (this.evolutionTrend === 1) { + return 'evolutionTrendPositive'; + } + + if (this.evolutionTrend === -1) { + return 'evolutionTrendNegative'; + } + + return ''; + }, + site: function site() { + return this.modelValue; + }, + siteLabel: function siteLabel() { + return external_CoreHome_["Matomo"].helper.htmlDecode(this.site.label); + }, + tokenParam: function tokenParam() { + var token_auth = external_CoreHome_["MatomoUrl"].urlParsed.value.token_auth; + return token_auth ? "&token_auth=".concat(token_auth) : ''; + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue + + + +SitesTableSitevue_type_script_lang_ts.render = SitesTableSitevue_type_template_id_47f7cfe0_render + +/* harmony default export */ var SitesTableSite = (SitesTableSitevue_type_script_lang_ts); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=script&lang=ts + + + + +/* harmony default export */ var SitesTablevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + components: { + MatomoLoader: external_CoreHome_["MatomoLoader"], + SitesTableSite: SitesTableSite + }, + props: { + displayRevenue: { + type: Boolean, + required: true + }, + displaySparklines: { + type: Boolean, + required: true + } + }, + data: function data() { + return { + evolutionSelector: 'visits_evolution' + }; + }, + computed: { + errorLoading: function errorLoading() { + return AllWebsitesDashboard_store.state.value.errorLoading; + }, + errorShowProfessionalHelp: function errorShowProfessionalHelp() { + return external_CoreHome_["Matomo"].config && external_CoreHome_["Matomo"].config.are_ads_enabled; + }, + evolutionMetric: function evolutionMetric() { + return this.evolutionSelector; + }, + isLoading: function isLoading() { + return AllWebsitesDashboard_store.state.value.isLoadingSites; + }, + numberOfFilteredSites: function numberOfFilteredSites() { + return AllWebsitesDashboard_store.state.value.numSites; + }, + paginationCurrentPage: function paginationCurrentPage() { + return AllWebsitesDashboard_store.state.value.paginationCurrentPage; + }, + paginationLowerBound: function paginationLowerBound() { + return AllWebsitesDashboard_store.paginationLowerBound.value; + }, + paginationUpperBound: function paginationUpperBound() { + return AllWebsitesDashboard_store.paginationUpperBound.value; + }, + paginationMaxPage: function paginationMaxPage() { + return AllWebsitesDashboard_store.numberOfPages.value; + }, + sites: function sites() { + return AllWebsitesDashboard_store.state.value.dashboardSites; + }, + sortColumn: function sortColumn() { + return AllWebsitesDashboard_store.state.value.sortColumn; + }, + sortColumnClass: function sortColumnClass() { + return { + sitesTableSort: true, + sitesTableSortAsc: this.sortOrder === 'asc', + sitesTableSortDesc: this.sortOrder === 'desc' + }; + }, + sortOrder: function sortOrder() { + return AllWebsitesDashboard_store.state.value.sortOrder; + }, + sparklineMetric: function sparklineMetric() { + switch (this.evolutionMetric) { + case 'hits_evolution': + return 'nb_hits'; + + case 'pageviews_evolution': + return 'nb_pageviews'; + + case 'revenue_evolution': + return 'revenue'; + + case 'visits_evolution': + return 'nb_visits'; + + default: + return ''; + } + }, + sparklineDate: function sparklineDate() { + return this.displaySparklines ? AllWebsitesDashboard_store.state.value.sparklineDate : null; + } + }, + methods: { + changeEvolutionSelector: function changeEvolutionSelector(metric) { + this.evolutionSelector = metric; + this.sortBy(metric); + }, + navigateNextPage: function navigateNextPage() { + AllWebsitesDashboard_store.navigateNextPage(); + }, + navigatePreviousPage: function navigatePreviousPage() { + AllWebsitesDashboard_store.navigatePreviousPage(); + }, + sortBy: function sortBy(column) { + AllWebsitesDashboard_store.sortBy(column); + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue + + + +SitesTablevue_type_script_lang_ts.render = SitesTablevue_type_template_id_0d846a88_render + +/* harmony default export */ var SitesTable = (SitesTablevue_type_script_lang_ts); +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=script&lang=ts + + + + + +/* harmony default export */ var AllWebsitesDashboardvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + components: { + EnrichedHeadline: external_CoreHome_["EnrichedHeadline"], + KPICardContainer: KPICardContainer, + PeriodSelector: external_CoreHome_["PeriodSelector"], + SitesTable: SitesTable + }, + props: { + autoRefreshInterval: { + type: Number, + required: true + }, + displayRevenue: { + type: Boolean, + required: true + }, + displaySparklines: { + type: Boolean, + required: true + }, + isWidgetized: { + type: Boolean, + required: true + }, + kpiBadgeHits: { + type: String, + required: true + }, + pageSize: { + type: Number, + required: true + }, + selectablePeriods: { + type: Array, + required: true + } + }, + data: function data() { + return { + searchTerm: '' + }; + }, + mounted: function mounted() { + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () { + return external_CoreHome_["MatomoUrl"].hashParsed.value; + }, function () { + return AllWebsitesDashboard_store.reloadDashboard(); + }); + AllWebsitesDashboard_store.setAutoRefreshInterval(this.autoRefreshInterval); + AllWebsitesDashboard_store.setPageSize(this.pageSize); + AllWebsitesDashboard_store.reloadDashboard(); + }, + computed: { + addSiteUrl: function addSiteUrl() { + return "?".concat(external_CoreHome_["MatomoUrl"].stringify(Object.assign(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].urlParsed.value), external_CoreHome_["MatomoUrl"].hashParsed.value), {}, { + module: 'SitesManager', + action: 'index', + showaddsite: '1' + }))); + }, + isLoadingKPIs: function isLoadingKPIs() { + return AllWebsitesDashboard_store.state.value.isLoadingKPIs; + }, + kpis: function kpis() { + var dashboardKPIs = AllWebsitesDashboard_store.state.value.dashboardKPIs; + var kpis = [{ + icon: 'icon-user', + title: 'MultiSites_TotalVisits', + value: dashboardKPIs.visits, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.visitsTrend, + evolutionValue: dashboardKPIs.visitsEvolution + }, { + icon: 'icon-show', + title: 'MultiSites_TotalPageviews', + value: dashboardKPIs.pageviews, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.pageviewsTrend, + evolutionValue: dashboardKPIs.pageviewsEvolution + }, { + badge: this.kpiBadgeHits, + icon: 'icon-hits', + title: 'MultiSites_TotalHits', + value: dashboardKPIs.hits, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.hitsTrend, + evolutionValue: dashboardKPIs.hitsEvolution + }]; + + if (this.displayRevenue) { + kpis.push({ + icon: 'icon-dollar-sign', + title: 'General_TotalRevenue', + value: dashboardKPIs.revenue, + evolutionPeriod: dashboardKPIs.evolutionPeriod, + evolutionTrend: dashboardKPIs.revenueTrend, + evolutionValue: dashboardKPIs.revenueEvolution + }); + } + + return kpis; + }, + isUserAllowedToAddSite: function isUserAllowedToAddSite() { + return external_CoreHome_["Matomo"].hasSuperUserAccess; + } + }, + methods: { + searchSite: function searchSite(term) { + AllWebsitesDashboard_store.searchSite(term); + } + } +})); +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue + + + +AllWebsitesDashboardvue_type_script_lang_ts.render = render + +/* harmony default export */ var AllWebsitesDashboard = (AllWebsitesDashboardvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=052ab191 -var _hoisted_1 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_1 = { key: 0, class: "multisites-label label" }; -var _hoisted_2 = ["href"]; -var _hoisted_3 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_2 = ["href"]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_3 = { key: 0 }; -var _hoisted_4 = ["href", "title"]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_4 = ["href", "title"]; -var _hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var MultisitesSitevue_type_template_id_052ab191_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-outlink" }, null, -1); -var _hoisted_6 = [_hoisted_5]; -var _hoisted_7 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_6 = [MultisitesSitevue_type_template_id_052ab191_hoisted_5]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_7 = { key: 1, class: "multisites-label label" }; -var _hoisted_8 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_8 = { class: "value" }; -var _hoisted_9 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_9 = { class: "multisites-column" }; -var _hoisted_10 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_10 = { class: "value" }; -var _hoisted_11 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_11 = { class: "multisites-column" }; -var _hoisted_12 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_12 = { class: "value" }; -var _hoisted_13 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_13 = { key: 2, class: "multisites-column" }; -var _hoisted_14 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_14 = { class: "value" }; -var _hoisted_15 = ["title"]; -var _hoisted_16 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_15 = ["title"]; +var MultisitesSitevue_type_template_id_052ab191_hoisted_16 = { key: 0, class: "visits value" }; -var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var MultisitesSitevue_type_template_id_052ab191_hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/arrow_up.png", alt: "" }, null, -1); -var _hoisted_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var MultisitesSitevue_type_template_id_052ab191_hoisted_18 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_19 = { +var MultisitesSitevue_type_template_id_052ab191_hoisted_19 = { style: { "color": "green" } }; -var _hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var MultisitesSitevue_type_template_id_052ab191_hoisted_20 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/stop.png", alt: "" }, null, -1); -var _hoisted_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); +var MultisitesSitevue_type_template_id_052ab191_hoisted_21 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(); -var _hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var MultisitesSitevue_type_template_id_052ab191_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { class: "multisites_icon", src: "plugins/MultiSites/images/arrow_down.png", alt: "" @@ -241,7 +1355,7 @@ var _hoisted_26 = { }; var _hoisted_27 = ["href", "title"]; var _hoisted_28 = ["src"]; -function render(_ctx, _cache, $props, $setup, $data, $options) { +function MultisitesSitevue_type_template_id_052ab191_render(_ctx, _cache, $props, $setup, $data, $options) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ 'groupedWebsite': _ctx.website.group, @@ -249,20 +1363,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { 'group': _ctx.website.isGroup }), ref: "root" - }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", MultisitesSitevue_type_template_id_052ab191_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { title: "View reports", class: "value truncated-text-line", href: _ctx.dashboardUrl(_ctx.website) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 9, _hoisted_2), _ctx.website.main_url ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 9, MultisitesSitevue_type_template_id_052ab191_hoisted_2), _ctx.website.main_url ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", MultisitesSitevue_type_template_id_052ab191_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.website.main_url, title: _ctx.translate('General_GoTo', _ctx.website.main_url) - }, _hoisted_6, 8, _hoisted_4)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_visits), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_pageviews), 1)]), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.revenue), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.period !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", { + }, MultisitesSitevue_type_template_id_052ab191_hoisted_6, 8, MultisitesSitevue_type_template_id_052ab191_hoisted_4)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", MultisitesSitevue_type_template_id_052ab191_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.websiteLabel), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", MultisitesSitevue_type_template_id_052ab191_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_visits), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", MultisitesSitevue_type_template_id_052ab191_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.nb_pageviews), 1)]), _ctx.displayRevenueColumn ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", MultisitesSitevue_type_template_id_052ab191_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website.revenue), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.period !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", { key: 3, class: "multisites-evolution", title: _ctx.website.tooltip - }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_17, _hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_19, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 1]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_20, _hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 0]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_22, _hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === -1]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, _hoisted_15)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSparklines ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_25, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_26, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultisitesSitevue_type_template_id_052ab191_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [MultisitesSitevue_type_template_id_052ab191_hoisted_17, MultisitesSitevue_type_template_id_052ab191_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", MultisitesSitevue_type_template_id_052ab191_hoisted_19, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 1]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [MultisitesSitevue_type_template_id_052ab191_hoisted_20, MultisitesSitevue_type_template_id_052ab191_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === 0]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [MultisitesSitevue_type_template_id_052ab191_hoisted_22, _hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.website[_ctx.evolutionMetric]), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.website["".concat(_ctx.evolutionMetric, "_trend")] === -1]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, MultisitesSitevue_type_template_id_052ab191_hoisted_15)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSparklines ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", _hoisted_25, [!_ctx.website.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_26, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.dashboardUrl(_ctx.website), @@ -276,9 +1390,6 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { } // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=template&id=052ab191 -// EXTERNAL MODULE: external "CoreHome" -var external_CoreHome_ = __webpack_require__("19dc"); - // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/MultiSites/vue/src/MultisitesSite/MultisitesSite.vue?vue&type=script&lang=ts @@ -356,17 +1467,17 @@ var external_CoreHome_ = __webpack_require__("19dc"); -MultisitesSitevue_type_script_lang_ts.render = render +MultisitesSitevue_type_script_lang_ts.render = MultisitesSitevue_type_template_id_052ab191_render /* harmony default export */ var MultisitesSite = (MultisitesSitevue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function Dashboard_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function Dashboard_store_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function Dashboard_store_createClass(Constructor, protoProps, staticProps) { if (protoProps) Dashboard_store_defineProperties(Constructor.prototype, protoProps); if (staticProps) Dashboard_store_defineProperties(Constructor, staticProps); return Constructor; } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function Dashboard_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*! * Matomo - free/libre analytics platform @@ -383,9 +1494,9 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { function DashboardStore() { var _this = this; - _classCallCheck(this, DashboardStore); + Dashboard_store_classCallCheck(this, DashboardStore); - _defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ + Dashboard_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ sites: [], isLoading: false, pageSize: 25, @@ -405,31 +1516,31 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { errorLoadingSites: false })); - _defineProperty(this, "refreshTimeout", null); + Dashboard_store_defineProperty(this, "refreshTimeout", null); - _defineProperty(this, "fetchAbort", null); + Dashboard_store_defineProperty(this, "fetchAbort", null); - _defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); })); - _defineProperty(this, "numberOfFilteredSites", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "numberOfFilteredSites", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return _this.state.value.numberOfSites; })); - _defineProperty(this, "numberOfPages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "numberOfPages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Math.ceil(_this.numberOfFilteredSites.value / _this.state.value.pageSize - 1); })); - _defineProperty(this, "currentPagingOffset", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "currentPagingOffset", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Math.ceil(_this.state.value.currentPage * _this.state.value.pageSize); })); - _defineProperty(this, "paginationLowerBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "paginationLowerBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return _this.currentPagingOffset.value + 1; })); - _defineProperty(this, "paginationUpperBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + Dashboard_store_defineProperty(this, "paginationUpperBound", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { var end = _this.currentPagingOffset.value + _this.state.value.pageSize; var max = _this.numberOfFilteredSites.value; @@ -441,7 +1552,7 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { })); } - _createClass(DashboardStore, [{ + Dashboard_store_createClass(DashboardStore, [{ key: "cancelRefereshInterval", value: function cancelRefereshInterval() { if (this.refreshTimeout) { @@ -1075,6 +2186,7 @@ Dashboardvue_type_script_lang_ts.render = Dashboardvue_type_template_id_40e2a52d + // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index 232b90a68f9..7b01d735c78 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js @@ -1,10 +1,16 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["MultiSites"]=t(require("CoreHome"),require("vue")):e["MultiSites"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/MultiSites/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"MultisitesSite",(function(){return G})),n.d(t,"DashboadStore",(function(){return q})),n.d(t,"Dashboard",(function(){return Ge})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var o=n("8bbf"),i={key:0,class:"multisites-label label"},s=["href"],l={key:0},c=["href","title"],u=Object(o["createElementVNode"])("span",{class:"icon icon-outlink"},null,-1),b=[u],d={key:1,class:"multisites-label label"},m={class:"value"},p={class:"multisites-column"},v={class:"value"},f={class:"multisites-column"},h={class:"value"},O={key:2,class:"multisites-column"},j={class:"value"},g=["title"],S={key:0,class:"visits value"},_=Object(o["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_up.png",alt:""},null,-1),y=Object(o["createTextVNode"])(),w={style:{color:"green"}},k=Object(o["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/stop.png",alt:""},null,-1),V=Object(o["createTextVNode"])(),E=Object(o["createElementVNode"])("img",{class:"multisites_icon",src:"plugins/MultiSites/images/arrow_down.png",alt:""},null,-1),N=Object(o["createTextVNode"])(),C={style:{color:"red"}},M={key:4,style:{width:"180px"}},P={key:0,class:"sparkline",style:{width:"100px",margin:"auto"}},B=["href","title"],T=["src"];function x(e,t,n,r,a,u){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{class:Object(o["normalizeClass"])({groupedWebsite:e.website.group,website:!e.website.group,group:e.website.isGroup}),ref:"root"},[e.website.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",i,[Object(o["createElementVNode"])("a",{title:"View reports",class:"value truncated-text-line",href:e.dashboardUrl(e.website)},Object(o["toDisplayString"])(e.websiteLabel),9,s),e.website.main_url?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",l,[Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.website.main_url,title:e.translate("General_GoTo",e.website.main_url)},b,8,c)])):Object(o["createCommentVNode"])("",!0)])),e.website.isGroup?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",d,[Object(o["createElementVNode"])("span",m,Object(o["toDisplayString"])(e.websiteLabel),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",p,[Object(o["createElementVNode"])("span",v,Object(o["toDisplayString"])(e.website.nb_visits),1)]),Object(o["createElementVNode"])("td",f,[Object(o["createElementVNode"])("span",h,Object(o["toDisplayString"])(e.website.nb_pageviews),1)]),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",O,[Object(o["createElementVNode"])("span",j,Object(o["toDisplayString"])(e.website.revenue),1)])):Object(o["createCommentVNode"])("",!0),"range"!==e.period?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",{key:3,class:"multisites-evolution",title:e.website.tooltip},[e.website.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",S,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[_,y,Object(o["createElementVNode"])("span",w,Object(o["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[o["vShow"],1===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[k,V,Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[o["vShow"],0===e.website["".concat(e.evolutionMetric,"_trend")]]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[E,N,Object(o["createElementVNode"])("span",C,Object(o["toDisplayString"])(e.website[e.evolutionMetric]),1)],512),[[o["vShow"],-1===e.website["".concat(e.evolutionMetric,"_trend")]]])]))],8,g)):Object(o["createCommentVNode"])("",!0),e.showSparklines?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",M,[e.website.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",P,[Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.dashboardUrl(e.website),title:e.translate("General_GoTo",e.translate("Dashboard_DashboardOf",e.websiteLabel))},[Object(o["createElementVNode"])("img",{alt:"",width:"100",height:"25",src:e.sparklineImage(e.website)},null,8,T)],8,B)]))])):Object(o["createCommentVNode"])("",!0)],2)}var D=n("19dc"),A=Object(o["defineComponent"])({props:{website:{type:Object,required:!0},evolutionMetric:{type:String,required:!0},showSparklines:Boolean,dateSparkline:String,displayRevenueColumn:Boolean,metric:String},mounted:function(){D["Matomo"].postEvent("MultiSites.MultiSitesSite.mounted",{element:this.$refs.root})},unmounted:function(){D["Matomo"].postEvent("MultiSites.MultiSitesSite.unmounted",{element:this.$refs.root})},methods:{dashboardUrl:function(e){return"index.php?module=CoreHome&action=index&date=".concat(this.date,"&period=").concat(this.period)+"&idSite=".concat(e.idsite).concat(this.tokenParam)},sparklineImage:function(e){var t=this.metric;switch(this.evolutionMetric){case"visits_evolution":t="nb_visits";break;case"pageviews_evolution":t="nb_pageviews";break;case"revenue_evolution":t="revenue";break;default:break}return"index.php?module=MultiSites&action=getEvolutionGraph&period=".concat(this.period,"&date=")+"".concat(this.dateSparkline,"&evolutionBy=").concat(t,"&columns=").concat(t,"&idSite=").concat(e.idsite)+"&idsite=".concat(e.idsite,"&viewDataTable=sparkline").concat(this.tokenParam,"&colors=")+"".concat(encodeURIComponent(JSON.stringify(D["Matomo"].getSparklineColors())))}},computed:{tokenParam:function(){var e=D["MatomoUrl"].urlParsed.value.token_auth;return e?"&token_auth=".concat(e):""},period:function(){return D["Matomo"].period},date:function(){return D["MatomoUrl"].urlParsed.value.date},websiteLabel:function(){return D["Matomo"].helper.htmlDecode(this.website.label)}}});A.render=x;var G=A;function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;nn&&(e=n),e})))}return I(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=H.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,a="0",o="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=H.formatNumber(e.previous_nb_visits),o=H.formatNumber(e.nb_visits),i=H.formatPercent(e.visits_evolution),r=Object(D["translate"])("General_ColumnNbVisits"),s=H.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(a="".concat(e.previous_Actions_nb_pageviews),o="".concat(e.nb_pageviews),i=H.formatPercent(e.pageviews_evolution),r=Object(D["translate"])("General_ColumnPageviews"),s=H.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(a=H.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),o=H.formatCurrency(e.revenue,e.currencySymbol),i=H.formatPercent(e.revenue_evolution),r=Object(D["translate"])("General_ColumnRevenue"),s=H.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(D["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(D["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(s),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonDay",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(D["translate"])("MultiSites_EvolutionComparisonYear",["".concat(o),r,"".concat(s),e.previousRange,"".concat(i)]);break;default:break}}})),this.privateState.totalVisits=e.totals.nb_visits,this.privateState.totalPageviews=e.totals.nb_pageviews,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.nb_visits_lastdate,this.privateState.sites=n,this.privateState.numberOfSites=e.numSites,this.privateState.lastVisitsDate=e.lastDate}else this.onError()}},{key:"sortBy",value:function(e){this.state.value.sortColumn===e&&(this.privateState.reverse=!this.state.value.reverse),this.privateState.sortColumn=e,this.fetchAllSites()}},{key:"previousPage",value:function(){this.privateState.currentPage=this.state.value.currentPage-1,this.fetchAllSites()}},{key:"nextPage",value:function(){this.privateState.currentPage=this.state.value.currentPage+1,this.fetchAllSites()}},{key:"searchSite",value:function(e){this.privateState.searchTerm=e,this.privateState.currentPage=0,this.fetchAllSites()}},{key:"fetchAllSites",value:function(){var e=this;this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelRefereshInterval()),this.privateState.isLoading=!0,this.privateState.errorLoadingSites=!1;var t={method:"MultiSites.getAllWithGroups",hideMetricsDoc:"1",filter_sort_order:"asc",filter_limit:this.state.value.pageSize,filter_offset:this.currentPagingOffset.value,showColumns:["label","nb_visits","nb_pageviews","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","revenue_evolution","revenue_evolution_trend","nb_actions,revenue"].join(",")};return this.privateState.searchTerm&&(t.pattern=this.privateState.searchTerm),this.privateState.sortColumn&&(t.filter_sort_column=this.privateState.sortColumn),this.privateState.reverse&&(t.filter_sort_order="desc"),this.fetchAbort=new AbortController,D["AjaxHelper"].fetch(t,{abortController:this.fetchAbort}).then((function(t){e.updateWebsitesList(t)})).catch((function(){e.onError()})).finally((function(){e.privateState.isLoading=!1,e.fetchAbort=null,e.state.value.refreshInterval&&e.state.value.refreshInterval>0&&(e.cancelRefereshInterval(),e.refreshTimeout=setTimeout((function(){e.refreshTimeout=null,e.fetchAllSites()}),1e3*e.state.value.refreshInterval))}))}},{key:"onError",value:function(){this.privateState.errorLoadingSites=!0,this.privateState.sites=[]}},{key:"setRefreshInterval",value:function(e){this.privateState.refreshInterval=e}},{key:"setPageSize",value:function(e){this.privateState.pageSize=e}}]),e}(),q=new F,W={ref:"root"},$={class:"card-title"},K=["innerHTML","title"],J={id:"mt",class:"dataTable card-table",cellspacing:"0"},Y={class:"heading"},Q={class:"heading"},X={class:"heading"},Z={class:"heading"},ee=["colspan"],te=["value"],ne={value:"visits_evolution"},re={value:"pageviews_evolution"},ae={key:0,value:"revenue_evolution"},oe={key:0},ie={colspan:"7",class:"allWebsitesLoading"},se={key:1},le={key:0},ce={colspan:"7"},ue={class:"notification system notification-error"},be=Object(o["createElementVNode"])("br",null,null,-1),de=Object(o["createElementVNode"])("br",null,null,-1),me=["href"],pe=Object(o["createTextVNode"])(" – "),ve=["href"],fe=["href"],he=Object(o["createTextVNode"])(". "),Oe={colspan:"8",class:"paging"},je={class:"row"},ge={class:"col s3 add_new_site"},Se=["href"],_e=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),ye={class:"col s6"},we={style:{cursor:"pointer"}},ke={class:"dataTablePages"},Ve={id:"counter"},Ee={style:{cursor:"pointer"},class:"pointer"},Ne=Object(o["createElementVNode"])("div",{class:"col s3"}," ",-1),Ce={row_id:"last"},Me={colspan:"8",class:"site_search"},Pe={class:"row"},Be={class:"input-field col s12"},Te=["placeholder"],xe=["title"];function De(e,t,n,r,a,i){var s=this,l=Object(o["resolveComponent"])("EnrichedHeadline"),c=Object(o["resolveComponent"])("ActivityIndicator"),u=Object(o["resolveComponent"])("MultisitesSite");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",W,[Object(o["createElementVNode"])("h2",$,[Object(o["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/faq/new-to-piwik/all-websites-dashboard/"),"feature-name":e.translate("General_AllWebsitesDashboard")},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_AllWebsitesDashboard"))+" ",1),Object(o["createElementVNode"])("span",{class:"smallTitle",innerHTML:e.$sanitize(s.smallTitleContent),title:e.smallTitleTooltip},null,8,K)]})),_:1},8,["help-url","feature-name"])]),Object(o["createElementVNode"])("table",J,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",{id:"names",class:Object(o["normalizeClass"])(["label",{columnSorted:"label"===e.sortColumn}]),onClick:t[0]||(t[0]=function(t){return e.sortBy("label")})},[Object(o["createElementVNode"])("span",Y,Object(o["toDisplayString"])(e.translate("General_Website")),1),Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"label"===e.sortColumn,multisites_desc:e.reverse&&"label"===e.sortColumn}]),style:{"margin-left":"3.5px"}},null,2)],2),Object(o["createElementVNode"])("th",{id:"visits",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"nb_visits"===e.sortColumn}]),onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_visits"===e.sortColumn,multisites_desc:e.reverse&&"nb_visits"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",Q,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],2),Object(o["createElementVNode"])("th",{id:"pageviews",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"nb_pageviews"===e.sortColumn}]),onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_pageviews"===e.sortColumn,multisites_desc:e.reverse&&"nb_pageviews"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",X,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,id:"revenue",class:Object(o["normalizeClass"])(["multisites-column",{columnSorted:"revenue"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("revenue")})},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"revenue"===e.sortColumn,multisites_desc:e.reverse&&"revenue"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",Z,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],2)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",{id:"evolution",class:Object(o["normalizeClass"])({columnSorted:e.evolutionSelector===e.sortColumn}),colspan:e.showSparklines?2:1},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&e.evolutionSelector===e.sortColumn,multisites_desc:e.reverse&&e.evolutionSelector===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(o["createElementVNode"])("span",{class:"evolution",onClick:t[4]||(t[4]=function(t){return e.sortBy(e.evolutionSelector)}),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("MultiSites_Evolution")),1),Object(o["createElementVNode"])("select",{class:"selector browser-default",id:"evolution_selector",value:e.evolutionSelector,onChange:t[5]||(t[5]=function(t){e.evolutionSelector=t.target.value,e.sortBy(e.evolutionSelector)})},[Object(o["createElementVNode"])("option",ne,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",re,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenueColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",ae,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,te)],10,ee)])]),e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",oe,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",ie,[Object(o["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.isLoading},null,8,["loading-message","loading"])])])])):Object(o["createCommentVNode"])("",!0),e.isLoading?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",se,[e.errorLoadingSites?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",le,[Object(o["createElementVNode"])("td",ce,[Object(o["createElementVNode"])("div",ue,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),be,de,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(o["toDisplayString"])(e.translate("General_Faq")),9,me),pe,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,ve),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null," – ",512),[[o["vShow"],e.areAdsForProfessionalServicesEnabled]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.professionalHelpUrl},Object(o["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,fe),[[o["vShow"],e.areAdsForProfessionalServicesEnabled]]),he])])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sites,(function(t){return Object(o["openBlock"])(),Object(o["createBlock"])(u,{key:t.idsite,website:t,"evolution-metric":e.evolutionSelector,"date-sparkline":e.dateSparkline,"show-sparklines":e.showSparklines,metric:e.sortColumn,"display-revenue-column":e.displayRevenueColumn},null,8,["website","evolution-metric","date-sparkline","show-sparklines","metric","display-revenue-column"])})),128))])),Object(o["createElementVNode"])("tfoot",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",Oe,[Object(o["createElementVNode"])("div",je,[Object(o["createElementVNode"])("div",ge,[e.hasSuperUserAccess?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[_e,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,Se)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",ye,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[6]||(t[6]=function(t){return e.previousPage()})},[Object(o["createElementVNode"])("span",we,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],512),[[o["vShow"],!(0===e.currentPage)]]),Object(o["createElementVNode"])("span",ke,[Object(o["createElementVNode"])("span",Ve,Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"next",class:"next dataTableNext",onClick:t[7]||(t[7]=function(t){return e.nextPage()})},[Object(o["createElementVNode"])("span",Ee,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[o["vShow"],!(e.currentPage>=e.numberOfPages)]])]),Ne])])]),Object(o["createElementVNode"])("tr",Ce,[Object(o["createElementVNode"])("td",Me,[Object(o["createElementVNode"])("div",Pe,[Object(o["createElementVNode"])("div",Be,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onKeydown:t[8]||(t[8]=Object(o["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,Te),[[o["vModelText"],e.searchTerm]]),Object(o["createElementVNode"])("span",{class:"icon-search search_ico",onClick:t[10]||(t[10]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,xe)])])])])])])],512)}var Ae=Object(o["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:D["EnrichedHeadline"],ActivityIndicator:D["ActivityIndicator"],MultisitesSite:G},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&q.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){q.setRefreshInterval(e),q.fetchAllSites()},sortBy:function(e){q.sortBy(e)},previousPage:function(){q.previousPage()},nextPage:function(){q.nextPage()},searchSite:function(){q.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return D["Matomo"].hasSuperUserAccess},date:function(){return D["MatomoUrl"].urlParsed.value.date},idSite:function(){return D["MatomoUrl"].urlParsed.value.idSite},url:function(){return D["Matomo"].piwik_url},period:function(){return D["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return D["Matomo"].config&&D["Matomo"].config.are_ads_enabled},sortColumn:function(){return q.state.value.sortColumn},reverse:function(){return q.state.value.reverse},smallTitleContent:function(){var e=q.state.value;return Object(D["translate"])("General_TotalVisitsPageviewsActionsRevenue","".concat(e.totalVisits,""),"".concat(e.totalPageviews,""),"".concat(e.totalActions,""),"".concat(e.totalRevenue,""))},smallTitleTooltip:function(){var e=q.state.value;return Object(D["translate"])("General_EvolutionSummaryGeneric",Object(D["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(D["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return q.state.value.loadingMessage},isLoading:function(){return q.state.value.isLoading},errorLoadingSites:function(){return q.state.value.errorLoadingSites},sites:function(){return q.state.value.sites},numberOfPages:function(){return q.numberOfPages.value},currentPage:function(){return q.state.value.currentPage},paginationLowerBound:function(){return q.paginationLowerBound.value},paginationUpperBound:function(){return q.paginationUpperBound.value},numberOfFilteredSites:function(){return q.numberOfFilteredSites.value},professionalHelpUrl:function(){return Object(D["externalRawLink"])("https://matomo.org/support-plans/")},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});Ae.render=De;var Ge=Ae; + */var g="desc",S="nb_visits",k=function(){function e(){var t=this;h(this,e),f(this,"fetchAbort",null),f(this,"privateState",Object(a["reactive"])({dashboardKPIs:{evolutionPeriod:"day",hits:"?",hitsEvolution:"",hitsTrend:0,pageviews:"?",pageviewsEvolution:"",pageviewsTrend:0,revenue:"?",revenueEvolution:"",revenueTrend:0,visits:"?",visitsEvolution:"",visitsTrend:0},dashboardSites:[],errorLoading:!1,isLoadingKPIs:!1,isLoadingSites:!1,numSites:0,paginationCurrentPage:0,sparklineDate:"",sortColumn:S,sortOrder:g})),f(this,"autoRefreshInterval",0),f(this,"autoRefreshTimeout",null),f(this,"pageSize",25),f(this,"searchTerm",""),f(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),f(this,"numberOfPages",Object(a["computed"])((function(){return Math.ceil(t.state.value.numSites/t.pageSize-1)}))),f(this,"currentPagingOffset",Object(a["computed"])((function(){return Math.ceil(t.state.value.paginationCurrentPage*t.pageSize)}))),f(this,"paginationLowerBound",Object(a["computed"])((function(){return 0===t.state.value.numSites?0:1+t.currentPagingOffset.value}))),f(this,"paginationUpperBound",Object(a["computed"])((function(){if(0===t.state.value.numSites)return 0;var e=t.pageSize+t.currentPagingOffset.value,n=t.state.value.numSites;return e0&&void 0!==arguments[0]&&arguments[0];this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelAutoRefresh()),this.fetchAbort=new AbortController,this.privateState.errorLoading=!1,this.privateState.isLoadingKPIs=!t,this.privateState.isLoadingSites=!0;var n={method:"MultiSites.mockDashboardData",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,showColumns:["hits_evolution","hits_evolution_trend","label","nb_hits","nb_pageviews","nb_visits","pageviews_evolution","pageviews_evolution_trend","revenue","revenue_evolution","revenue_evolution_trend","visits_evolution","visits_evolution_trend"].join(",")};return this.searchTerm&&(n.pattern=this.searchTerm),m["AjaxHelper"].fetch(n,{abortController:this.fetchAbort}).then((function(n){t||e.updateDashboardKPIs(n),e.updateDashboardSites(n)})).catch((function(){e.privateState.dashboardSites=[],e.privateState.errorLoading=!0})).finally((function(){e.privateState.isLoadingKPIs=!1,e.privateState.isLoadingSites=!1,e.fetchAbort=null,e.startAutoRefresh()}))}},{key:"startAutoRefresh",value:function(){var e=this;if(this.cancelAutoRefresh(),!(this.autoRefreshInterval<=0)){var t;try{t=m["Periods"].parse(m["Matomo"].period,m["Matomo"].currentDateString)}catch(n){}t&&t.containsToday()&&(this.autoRefreshTimeout=setTimeout((function(){e.autoRefreshTimeout=null,e.refreshData()}),1e3*this.autoRefreshInterval))}}},{key:"updateDashboardKPIs",value:function(e){this.privateState.dashboardKPIs={evolutionPeriod:m["Matomo"].period,hits:e.totals.nb_hits,hitsEvolution:e.totals.hits_evolution,hitsTrend:e.totals.hits_evolution_trend,pageviews:e.totals.nb_pageviews,pageviewsEvolution:e.totals.pageviews_evolution,pageviewsTrend:e.totals.pageviews_evolution_trend,revenue:e.totals.revenue,revenueEvolution:e.totals.revenue_evolution,revenueTrend:e.totals.revenue_evolution_trend,visits:e.totals.nb_visits,visitsEvolution:e.totals.visits_evolution,visitsTrend:e.totals.visits_evolution_trend}}},{key:"updateDashboardSites",value:function(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites,this.privateState.sparklineDate=e.sparklineDate}}]),e}(),y=new k,_={class:"kpiCardContainer"},C={key:0,class:"kpiCard kpiCardLoading"},E=Object(a["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),V={class:"kpiCardValue"},N=Object(a["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(a["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),w={key:0,class:"kpiCardBadge"};function T(e,t,n,r,o,i){var s=Object(a["resolveComponent"])("MatomoLoader"),l=Object(a["resolveComponent"])("KPICard");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_,[e.isLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",C,[E,Object(a["createElementVNode"])("div",V,[Object(a["createVNode"])(s)]),N,e.hasKpiBadge?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",w," ")):Object(a["createCommentVNode"])("",!0)])):(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:1},Object(a["renderList"])(e.kpis,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:"kpi-card-".concat(n)},[n>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64)})),128))])}var B={class:"kpiCard"},P={class:"kpiCardTitle"},M={class:"kpiCardValue"},D={class:"kpiCardEvolution"},x={key:1,class:"kpiCardEvolution"},L=Object(a["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),R=[L],G=["innerHTML"];function A(e,t,n,r,o,i){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",B,[Object(a["createElementVNode"])("div",P,[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("kpiCardIcon ".concat(e.kpi.icon))},null,2),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(a["createElementVNode"])("div",M,Object(a["toDisplayString"])(e.kpi.value),1),Object(a["createElementVNode"])("div",D,[""!==e.kpi.evolutionValue?(Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],{key:0},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("kpiCardEvolutionTrend ".concat(e.evolutionTrendClass))},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("kpiCardEvolutionIcon ".concat(e.evolutionTrendIcon))},null,2),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.kpi.evolutionValue),1)],2),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",x,R))]),e.kpi.badge?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.kpi.badge),class:"kpiCardBadge"},null,8,G)):Object(a["createCommentVNode"])("",!0)])}var I=Object(a["defineComponent"])({props:{modelValue:{type:Object,required:!0}},computed:{evolutionTrendFrom:function(){switch(this.kpi.evolutionPeriod){case"day":return"MultiSites_EvolutionFromPreviousDay";case"week":return"MultiSites_EvolutionFromPreviousWeek";case"month":return"MultiSites_EvolutionFromPreviousMonth";case"year":return"MultiSites_EvolutionFromPreviousYear";default:return"MultiSites_EvolutionFromPreviousPeriod"}},evolutionTrendClass:function(){return 1===this.kpi.evolutionTrend?"kpiTrendPositive":-1===this.kpi.evolutionTrend?"kpiTrendNegative":"kpiTrendNeutral"},evolutionTrendIcon:function(){return 1===this.kpi.evolutionTrend?"icon-chevron-up":-1===this.kpi.evolutionTrend?"icon-chevron-down":"icon-circle"},kpi:function(){return this.modelValue}}});I.render=A;var z=I,U=Object(a["defineComponent"])({components:{MatomoLoader:m["MatomoLoader"],KPICard:z},props:{isLoading:Boolean,modelValue:{type:Array,required:!0}},computed:{hasKpiBadge:function(){return this.kpis.some((function(e){return!!e.badge}))},kpis:function(){return this.modelValue}}});U.render=T;var F=U,H={class:"sitesTableContainer"},q={class:"card-table dataTable sitesTable"},K={class:"sitesTableEvolutionSelector"},W=["value"],$={value:"hits_evolution"},J={value:"visits_evolution"},Y={value:"pageviews_evolution"},Q={key:0,value:"revenue_evolution"},X={key:0},Z={class:"sitesTableLoading",colspan:"7"},ee={key:1},te={colspan:"7"},ne={class:"notification system notification-error"},re=Object(a["createElementVNode"])("br",null,null,-1),oe=Object(a["createElementVNode"])("br",null,null,-1),ae=["href"],ie=Object(a["createTextVNode"])(" – "),se=["href"],le=["href"],ce=Object(a["createTextVNode"])(". "),ue={key:0,class:"sitesTablePagination"},de={class:"dataTablePages"};function be(e,t,n,r,o,i){var s=Object(a["resolveComponent"])("MatomoLoader"),l=Object(a["resolveComponent"])("SitesTableSite");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",H,[Object(a["createElementVNode"])("table",q,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",{onClick:t[0]||(t[0]=function(t){return e.sortBy("label")}),class:"label"},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},["nb_visits"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(a["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},["nb_pageviews"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1)]),Object(a["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.sortBy("nb_hits")})},["nb_hits"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnHits")),1)]),e.displayRevenue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("th",{key:0,onClick:t[4]||(t[4]=function(t){return e.sortBy("revenue")})},["revenue"===e.sortColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.sortBy(e.evolutionSelector)})},[e.sortColumn===e.evolutionSelector?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:Object(a["normalizeClass"])(e.sortColumnClass)},null,2)):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("MultiSites_Evolution")),1)]),Object(a["createElementVNode"])("th",K,[Object(a["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[6]||(t[6]=function(t){return e.changeEvolutionSelector(t.target.value)})},[Object(a["createElementVNode"])("option",$,Object(a["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(a["createElementVNode"])("option",J,Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(a["createElementVNode"])("option",Y,Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("option",Q,Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(a["createCommentVNode"])("",!0)],40,W)])])]),Object(a["createElementVNode"])("tbody",null,[e.isLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",X,[Object(a["createElementVNode"])("td",Z,[Object(a["createVNode"])(s)])])):e.errorLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",ee,[Object(a["createElementVNode"])("td",te,[Object(a["createElementVNode"])("div",ne,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),re,oe,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(a["toDisplayString"])(e.translate("General_Faq")),9,ae),ie,Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(a["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,se),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null," – ",512),[[a["vShow"],e.errorShowProfessionalHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(a["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,le),[[a["vShow"],e.errorShowProfessionalHelp]]),ce])])])):(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],{key:2},Object(a["renderList"])(e.sites,(function(t){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-".concat(t.idsite),"model-value":t,"sparkline-date":e.sparklineDate,"sparkline-metric":e.sparklineMetric},null,8,["display-revenue","evolution-metric","model-value","sparkline-date","sparkline-metric"])})),128))])])]),!e.isLoading||e.paginationUpperBound>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ue,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.navigatePreviousPage()})}," « "+Object(a["toDisplayString"])(e.translate("General_Previous")),513),[[a["vShow"],0!==e.paginationCurrentPage]]),Object(a["createElementVNode"])("span",de,Object(a["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"dataTableNext",onClick:t[8]||(t[8]=function(t){return e.navigateNextPage()})},Object(a["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[a["vShow"],e.paginationCurrentPagen&&(e=n),e})))}return mt(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=jt.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,o="0",a="0",i="0",s="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(o=jt.formatNumber(e.previous_nb_visits),a=jt.formatNumber(e.nb_visits),i=jt.formatPercent(e.visits_evolution),r=Object(m["translate"])("General_ColumnNbVisits"),s=jt.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(o="".concat(e.previous_Actions_nb_pageviews),a="".concat(e.nb_pageviews),i=jt.formatPercent(e.pageviews_evolution),r=Object(m["translate"])("General_ColumnPageviews"),s=jt.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(o=jt.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),a=jt.formatCurrency(e.revenue,e.currencySymbol),i=jt.formatPercent(e.revenue_evolution),r=Object(m["translate"])("General_ColumnRevenue"),s=jt.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(m["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(m["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(s),r,"".concat(o)]),"\n"),e.periodName){case"day":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonDay",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"week":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"month":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;case"year":e.tooltip+=Object(m["translate"])("MultiSites_EvolutionComparisonYear",["".concat(a),r,"".concat(s),e.previousRange,"".concat(i)]);break;default:break}}})),this.privateState.totalVisits=e.totals.nb_visits,this.privateState.totalPageviews=e.totals.nb_pageviews,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.nb_visits_lastdate,this.privateState.sites=n,this.privateState.numberOfSites=e.numSites,this.privateState.lastVisitsDate=e.lastDate}else this.onError()}},{key:"sortBy",value:function(e){this.state.value.sortColumn===e&&(this.privateState.reverse=!this.state.value.reverse),this.privateState.sortColumn=e,this.fetchAllSites()}},{key:"previousPage",value:function(){this.privateState.currentPage=this.state.value.currentPage-1,this.fetchAllSites()}},{key:"nextPage",value:function(){this.privateState.currentPage=this.state.value.currentPage+1,this.fetchAllSites()}},{key:"searchSite",value:function(e){this.privateState.searchTerm=e,this.privateState.currentPage=0,this.fetchAllSites()}},{key:"fetchAllSites",value:function(){var e=this;this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelRefereshInterval()),this.privateState.isLoading=!0,this.privateState.errorLoadingSites=!1;var t={method:"MultiSites.getAllWithGroups",hideMetricsDoc:"1",filter_sort_order:"asc",filter_limit:this.state.value.pageSize,filter_offset:this.currentPagingOffset.value,showColumns:["label","nb_visits","nb_pageviews","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","revenue_evolution","revenue_evolution_trend","nb_actions,revenue"].join(",")};return this.privateState.searchTerm&&(t.pattern=this.privateState.searchTerm),this.privateState.sortColumn&&(t.filter_sort_column=this.privateState.sortColumn),this.privateState.reverse&&(t.filter_sort_order="desc"),this.fetchAbort=new AbortController,m["AjaxHelper"].fetch(t,{abortController:this.fetchAbort}).then((function(t){e.updateWebsitesList(t)})).catch((function(){e.onError()})).finally((function(){e.privateState.isLoading=!1,e.fetchAbort=null,e.state.value.refreshInterval&&e.state.value.refreshInterval>0&&(e.cancelRefereshInterval(),e.refreshTimeout=setTimeout((function(){e.refreshTimeout=null,e.fetchAllSites()}),1e3*e.state.value.refreshInterval))}))}},{key:"onError",value:function(){this.privateState.errorLoadingSites=!0,this.privateState.sites=[]}},{key:"setRefreshInterval",value:function(e){this.privateState.refreshInterval=e}},{key:"setPageSize",value:function(e){this.privateState.pageSize=e}}]),e}(),gt=new ft,St={ref:"root"},kt={class:"card-title"},yt=["innerHTML","title"],_t={id:"mt",class:"dataTable card-table",cellspacing:"0"},Ct={class:"heading"},Et={class:"heading"},Vt={class:"heading"},Nt={class:"heading"},wt=["colspan"],Tt=["value"],Bt={value:"visits_evolution"},Pt={value:"pageviews_evolution"},Mt={key:0,value:"revenue_evolution"},Dt={key:0},xt={colspan:"7",class:"allWebsitesLoading"},Lt={key:1},Rt={key:0},Gt={colspan:"7"},At={class:"notification system notification-error"},It=Object(a["createElementVNode"])("br",null,null,-1),zt=Object(a["createElementVNode"])("br",null,null,-1),Ut=["href"],Ft=Object(a["createTextVNode"])(" – "),Ht=["href"],qt=["href"],Kt=Object(a["createTextVNode"])(". "),Wt={colspan:"8",class:"paging"},$t={class:"row"},Jt={class:"col s3 add_new_site"},Yt=["href"],Qt=Object(a["createElementVNode"])("span",{class:"icon-add"},null,-1),Xt={class:"col s6"},Zt={style:{cursor:"pointer"}},en={class:"dataTablePages"},tn={id:"counter"},nn={style:{cursor:"pointer"},class:"pointer"},rn=Object(a["createElementVNode"])("div",{class:"col s3"}," ",-1),on={row_id:"last"},an={colspan:"8",class:"site_search"},sn={class:"row"},ln={class:"input-field col s12"},cn=["placeholder"],un=["title"];function dn(e,t,n,r,o,i){var s=this,l=Object(a["resolveComponent"])("EnrichedHeadline"),c=Object(a["resolveComponent"])("ActivityIndicator"),u=Object(a["resolveComponent"])("MultisitesSite");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",St,[Object(a["createElementVNode"])("h2",kt,[Object(a["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/faq/new-to-piwik/all-websites-dashboard/"),"feature-name":e.translate("General_AllWebsitesDashboard")},{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_AllWebsitesDashboard"))+" ",1),Object(a["createElementVNode"])("span",{class:"smallTitle",innerHTML:e.$sanitize(s.smallTitleContent),title:e.smallTitleTooltip},null,8,yt)]})),_:1},8,["help-url","feature-name"])]),Object(a["createElementVNode"])("table",_t,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",{id:"names",class:Object(a["normalizeClass"])(["label",{columnSorted:"label"===e.sortColumn}]),onClick:t[0]||(t[0]=function(t){return e.sortBy("label")})},[Object(a["createElementVNode"])("span",Ct,Object(a["toDisplayString"])(e.translate("General_Website")),1),Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"label"===e.sortColumn,multisites_desc:e.reverse&&"label"===e.sortColumn}]),style:{"margin-left":"3.5px"}},null,2)],2),Object(a["createElementVNode"])("th",{id:"visits",class:Object(a["normalizeClass"])(["multisites-column",{columnSorted:"nb_visits"===e.sortColumn}]),onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_visits"===e.sortColumn,multisites_desc:e.reverse&&"nb_visits"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(a["createElementVNode"])("span",Et,Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],2),Object(a["createElementVNode"])("th",{id:"pageviews",class:Object(a["normalizeClass"])(["multisites-column",{columnSorted:"nb_pageviews"===e.sortColumn}]),onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"nb_pageviews"===e.sortColumn,multisites_desc:e.reverse&&"nb_pageviews"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(a["createElementVNode"])("span",Vt,Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],2),e.displayRevenueColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("th",{key:0,id:"revenue",class:Object(a["normalizeClass"])(["multisites-column",{columnSorted:"revenue"===e.sortColumn}]),onClick:t[3]||(t[3]=function(t){return e.sortBy("revenue")})},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&"revenue"===e.sortColumn,multisites_desc:e.reverse&&"revenue"===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(a["createElementVNode"])("span",Nt,Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],2)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("th",{id:"evolution",class:Object(a["normalizeClass"])({columnSorted:e.evolutionSelector===e.sortColumn}),colspan:e.showSparklines?2:1},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["arrow",{multisites_asc:!e.reverse&&e.evolutionSelector===e.sortColumn,multisites_desc:e.reverse&&e.evolutionSelector===e.sortColumn}]),style:{"margin-right":"3.5px"}},null,2),Object(a["createElementVNode"])("span",{class:"evolution",onClick:t[4]||(t[4]=function(t){return e.sortBy(e.evolutionSelector)}),style:{"margin-right":"3.5px"}},Object(a["toDisplayString"])(e.translate("MultiSites_Evolution")),1),Object(a["createElementVNode"])("select",{class:"selector browser-default",id:"evolution_selector",value:e.evolutionSelector,onChange:t[5]||(t[5]=function(t){e.evolutionSelector=t.target.value,e.sortBy(e.evolutionSelector)})},[Object(a["createElementVNode"])("option",Bt,Object(a["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(a["createElementVNode"])("option",Pt,Object(a["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenueColumn?(Object(a["openBlock"])(),Object(a["createElementBlock"])("option",Mt,Object(a["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(a["createCommentVNode"])("",!0)],40,Tt)],10,wt)])]),e.isLoading?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tbody",Dt,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("td",xt,[Object(a["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.isLoading},null,8,["loading-message","loading"])])])])):Object(a["createCommentVNode"])("",!0),e.isLoading?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("tbody",Lt,[e.errorLoadingSites?(Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",Rt,[Object(a["createElementVNode"])("td",Gt,[Object(a["createElementVNode"])("div",At,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),It,zt,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(a["toDisplayString"])(e.translate("General_Faq")),9,Ut),Ft,Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(a["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,Ht),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null," – ",512),[[a["vShow"],e.areAdsForProfessionalServicesEnabled]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.professionalHelpUrl},Object(a["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,qt),[[a["vShow"],e.areAdsForProfessionalServicesEnabled]]),Kt])])])):Object(a["createCommentVNode"])("",!0),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t){return Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:t.idsite,website:t,"evolution-metric":e.evolutionSelector,"date-sparkline":e.dateSparkline,"show-sparklines":e.showSparklines,metric:e.sortColumn,"display-revenue-column":e.displayRevenueColumn},null,8,["website","evolution-metric","date-sparkline","show-sparklines","metric","display-revenue-column"])})),128))])),Object(a["createElementVNode"])("tfoot",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("td",Wt,[Object(a["createElementVNode"])("div",$t,[Object(a["createElementVNode"])("div",Jt,[e.hasSuperUserAccess?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,href:e.addSiteUrl},[Qt,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("SitesManager_AddSite")),1)],8,Yt)):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Xt,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{id:"prev",class:"previous dataTablePrevious",onClick:t[6]||(t[6]=function(t){return e.previousPage()})},[Object(a["createElementVNode"])("span",Zt,"« "+Object(a["toDisplayString"])(e.translate("General_Previous")),1)],512),[[a["vShow"],!(0===e.currentPage)]]),Object(a["createElementVNode"])("span",en,[Object(a["createElementVNode"])("span",tn,Object(a["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1)]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{id:"next",class:"next dataTableNext",onClick:t[7]||(t[7]=function(t){return e.nextPage()})},[Object(a["createElementVNode"])("span",nn,Object(a["toDisplayString"])(e.translate("General_Next"))+" »",1)],512),[[a["vShow"],!(e.currentPage>=e.numberOfPages)]])]),rn])])]),Object(a["createElementVNode"])("tr",on,[Object(a["createElementVNode"])("td",an,[Object(a["createElementVNode"])("div",sn,[Object(a["createElementVNode"])("div",ln,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",onKeydown:t[8]||(t[8]=Object(a["withKeys"])((function(t){return e.searchSite(e.searchTerm)}),["enter"])),"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.searchTerm=t}),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,cn),[[a["vModelText"],e.searchTerm]]),Object(a["createElementVNode"])("span",{class:"icon-search search_ico",onClick:t[10]||(t[10]=function(t){return e.searchSite(e.searchTerm)}),title:e.translate("General_ClickToSearch")},null,8,un)])])])])])])],512)}var bn=Object(a["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:m["EnrichedHeadline"],ActivityIndicator:m["ActivityIndicator"],MultisitesSite:bt},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&>.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){gt.setRefreshInterval(e),gt.fetchAllSites()},sortBy:function(e){gt.sortBy(e)},previousPage:function(){gt.previousPage()},nextPage:function(){gt.nextPage()},searchSite:function(){gt.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return m["Matomo"].hasSuperUserAccess},date:function(){return m["MatomoUrl"].urlParsed.value.date},idSite:function(){return m["MatomoUrl"].urlParsed.value.idSite},url:function(){return m["Matomo"].piwik_url},period:function(){return m["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return m["Matomo"].config&&m["Matomo"].config.are_ads_enabled},sortColumn:function(){return gt.state.value.sortColumn},reverse:function(){return gt.state.value.reverse},smallTitleContent:function(){var e=gt.state.value;return Object(m["translate"])("General_TotalVisitsPageviewsActionsRevenue","".concat(e.totalVisits,""),"".concat(e.totalPageviews,""),"".concat(e.totalActions,""),"".concat(e.totalRevenue,""))},smallTitleTooltip:function(){var e=gt.state.value;return Object(m["translate"])("General_EvolutionSummaryGeneric",Object(m["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(m["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return gt.state.value.loadingMessage},isLoading:function(){return gt.state.value.isLoading},errorLoadingSites:function(){return gt.state.value.errorLoadingSites},sites:function(){return gt.state.value.sites},numberOfPages:function(){return gt.numberOfPages.value},currentPage:function(){return gt.state.value.currentPage},paginationLowerBound:function(){return gt.paginationLowerBound.value},paginationUpperBound:function(){return gt.paginationUpperBound.value},numberOfFilteredSites:function(){return gt.numberOfFilteredSites.value},professionalHelpUrl:function(){return Object(m["externalRawLink"])("https://matomo.org/support-plans/")},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});bn.render=dn;var pn=bn; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less new file mode 100644 index 00000000000..35d48401751 --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.less @@ -0,0 +1,367 @@ +#multisitesAllWebsitesDashboard { + .widgetized & { + // required for widgetized display + + // @see Morpheus/_default.less body + line-height: 1.33; + + .dashboardHeader { + margin: 20px 10px; + } + + .sitesTableContainer { + margin-left: 0; + margin-right: 0; + overflow-x: auto; + width: 100%; + } + + .sitesTable { + table-layout: auto; + } + } + + > .col { + padding-left: 0; + padding-right: 0; + } + + [vue-entry="MultiSites.AllWebsitesDashboard"] { + display: flex; + flex-direction: column; + } + + #periodString { + // override #periodString + float: none; + margin-right: 0; + position: initial; + } + + .periodSelector { + // @see #root .top_controls .piwikTopControl + font-size: 11px; + + // required to align dropdown + position: relative; + + .dropdown { + right: 0; + } + } + + .dashboardControls { + align-items: flex-end; + column-gap: 1rem; + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin: 0 10px 20px 10px; + + .btn { + margin-bottom: 8px; + } + + .siteSearch { + flex-basis: 0; + flex-grow: 1; + max-width: 300px; + position: relative; + + input { + box-sizing: border-box; + height: 2.5rem; + padding-left: 0.3125rem; + padding-right: 2.5rem; + width: 100%; + } + + label { + position: static; + } + + .icon-search { + position: absolute; + right: 0.625rem; + top: 0.625rem; + cursor: pointer; + font-size: 1.25rem; + } + } + } + + .dashboardHeader { + align-items: flex-start; + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin-bottom: 20px; + row-gap: 20px; + + .card-title { + margin-bottom: 0; + } + } + + .kpiCardContainer { + align-items: flex-start; + display: flex; + justify-content: space-between; + margin: 0 40px 20px 40px; + overflow-x: auto; + + .kpiCard { + flex-basis: 0; + flex-grow: 1; + margin: 20px 0; + padding: 0 40px; + white-space: nowrap; + + &:first-child { + padding-left: 0; + } + + &:last-child { + padding-right: 0; + } + } + + .kpiCardLoading { + text-align: center; + + .kpiCardBadge { + visibility: hidden; + } + + .matomo-loader { + top: -8px; + } + } + + .kpiCardDivider { + align-self: stretch; + background-image: url('plugins/MultiSites/images/kpi_divider.svg'); + margin: 20px 0; + width: 1px; + } + + .kpiCardDividerBadge { + // do not stretch divider into badge space + margin-bottom: 3rem; + } + + .kpiCardIcon { + font-size: 0.9rem; + position: relative; + top: 1px; + } + + .kpiCardTitle { + color: #76838f; + font-size: 0.9rem; + text-transform: uppercase; + } + + .kpiCardValue { + font-size: 3rem; + font-weight: bold; + padding: 0.25rem 0; + } + + .kpiCardEvolution { + color: #76838f; + font-size: 0.9rem; + } + + .kpiCardEvolutionIcon { + font-size: 0.7rem; + } + + .kpiCardEvolutionTrend { + font-size: 1rem; + } + + .kpiTrendNegative { + color: red; + } + + .kpiTrendNeutral { + .kpiCardEvolutionIcon { + color: #ccc; + } + } + + .kpiTrendPositive { + color: green; + } + + .kpiCardBadge { + background-color: #ecf7fe; + border: 2px solid #0d94e3; + border-radius: 2px; + display: inline-block; + font-size: 0.9rem; + height: 1.5rem; + margin-top: 0.5rem; + padding: 0 0.35rem; + } + } + + .sitesTableContainer { + margin: 0 -20px; + overflow-x: auto; + width: calc(~"100% + 40px"); + } + + .sitesTable { + margin: 0; + width: 100%; + + th { + cursor: pointer; + white-space: nowrap; + } + + tr { + height: 38px; + } + + .sitesTableGroup { + font-weight: bold; + } + + .sitesTableGroupSite .label { + padding-left: 50px; + } + + td { + vertical-align: middle; + + // improve automatic table cell width + width: auto; + } + + td:not(.label) { + padding-right: 12px; + text-align: right; + } + + td:first-child, + th:first-child { + padding-left: calc(~"1rem + 20px"); + } + + td:last-child, + th:last-child { + padding-right: calc(~"1rem + 20px"); + } + + td.sitesTableLoading { + padding: 2rem; + text-align: center; + } + + img { + vertical-align: middle; + } + + .notification-error { + margin-top: 20px; + text-align: center; + } + + .evolutionTrendPositive { + color: green; + } + + .evolutionTrendNegative { + color: red; + } + } + + .sitesTableSort:after { + border-left: 4px solid rgba(0, 0, 0, 0); + border-right: 4px solid rgba(0, 0, 0, 0); + color: @theme-color-brand; + content: " \25BC"; + display: inline-block; + height: 6px; + font-size: 1px; + margin-top: 4px; + vertical-align: top; + } + + .sitesTableSortAsc:after { + border-bottom: 5px solid @theme-color-brand; + } + + .sitesTableSortDesc:after { + border-top: 5px solid @theme-color-brand; + } + + .sitesTableEvolutionSelector, + .sitesTableSparkline { + padding-left: 0; + text-align: left; + + // collapse sparkline cell + width: 1%; + } + + .sitesTableEvolutionSelector select { + height: 28px; + margin: -8px 0; + display: inline-block; + width: 100px; + } + + .sitesTableSparkline img { + margin: 0; + } + + .sitesTablePagination { + line-height: 38px; + text-align: center; + + .dataTablePrevious, + .dataTableNext { + cursor: pointer; + visibility: visible; + } + } + + @media all and (max-width: 600px) { + #periodString { + width: 100%; + } + + .periodSelector { + width: 100%; + + .dropdown { + right: auto; + } + } + + .dashboardControls { + flex-direction: column-reverse; + margin-left: 0; + margin-right: 0; + + .btn { + margin-bottom: 20px; + width: 100%; + } + + .siteSearch { + max-width: none; + width: 100%; + } + } + + .kpiCardContainer { + margin-left: 20px; + margin-right: 20px; + } + } +} diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.store.ts b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.store.ts new file mode 100644 index 00000000000..9004bdbf864 --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.store.ts @@ -0,0 +1,307 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +import { computed, reactive, readonly } from 'vue'; +import { AjaxHelper, Matomo, Periods } from 'CoreHome'; + +import { + DashboardMetrics, + DashboardSiteData, + DashboardSortOrder, + EvolutionTrend, +} from '../types'; + +interface DashboardKPIData { + evolutionPeriod: string; + hits: string; + hitsEvolution: string; + hitsTrend: EvolutionTrend; + pageviews: string; + pageviewsEvolution: string; + pageviewsTrend: EvolutionTrend; + revenue: string; + revenueEvolution: string; + revenueTrend: EvolutionTrend; + visits: string; + visitsEvolution: string; + visitsTrend: EvolutionTrend; +} + +interface DashboardStoreState { + dashboardKPIs: DashboardKPIData; + dashboardSites: DashboardSiteData[]; + errorLoading: boolean; + isLoadingKPIs: boolean; + isLoadingSites: boolean; + numSites: number; + paginationCurrentPage: number; + sparklineDate: string; + sortColumn: string; + sortOrder: DashboardSortOrder; +} + +interface GetDashboardMockDataResponse { + sites: DashboardSiteData[]; + totals: DashboardMetrics; + numSites: number; + sparklineDate: string; +} + +const DEFAULT_SORT_ORDER = 'desc'; +const DEFAULT_SORT_COLUMN = 'nb_visits'; + +class DashboardStore { + private fetchAbort: AbortController|null = null; + + private privateState = reactive({ + dashboardKPIs: { + evolutionPeriod: 'day', + hits: '?', + hitsEvolution: '', + hitsTrend: 0, + pageviews: '?', + pageviewsEvolution: '', + pageviewsTrend: 0, + revenue: '?', + revenueEvolution: '', + revenueTrend: 0, + visits: '?', + visitsEvolution: '', + visitsTrend: 0, + }, + dashboardSites: [], + errorLoading: false, + isLoadingKPIs: false, + isLoadingSites: false, + numSites: 0, + paginationCurrentPage: 0, + sparklineDate: '', + sortColumn: DEFAULT_SORT_COLUMN, + sortOrder: DEFAULT_SORT_ORDER, + }); + + private autoRefreshInterval = 0; + + private autoRefreshTimeout: ReturnType|null = null; + + private pageSize = 25; + + private searchTerm = ''; + + readonly state = computed(() => readonly(this.privateState)); + + readonly numberOfPages = computed( + () => Math.ceil(this.state.value.numSites / this.pageSize - 1), + ); + + readonly currentPagingOffset = computed( + () => Math.ceil(this.state.value.paginationCurrentPage * this.pageSize), + ); + + readonly paginationLowerBound = computed(() => { + if (this.state.value.numSites === 0) { + return 0; + } + + return 1 + this.currentPagingOffset.value; + }); + + readonly paginationUpperBound = computed(() => { + if (this.state.value.numSites === 0) { + return 0; + } + + const end = this.pageSize + this.currentPagingOffset.value; + const max = this.state.value.numSites; + + if (end < max) { + return end; + } + + return max; + }); + + reloadDashboard(): void { + this.privateState.sortColumn = DEFAULT_SORT_COLUMN; + this.privateState.sortOrder = DEFAULT_SORT_ORDER; + this.privateState.paginationCurrentPage = 0; + + this.refreshData(); + } + + navigateNextPage(): void { + if (this.privateState.paginationCurrentPage === this.numberOfPages.value) { + return; + } + + this.privateState.paginationCurrentPage += 1; + + this.refreshData(true); + } + + navigatePreviousPage(): void { + if (this.privateState.paginationCurrentPage === 0) { + return; + } + + this.privateState.paginationCurrentPage -= 1; + + this.refreshData(true); + } + + searchSite(term: string): void { + this.searchTerm = term; + this.privateState.paginationCurrentPage = 0; + + this.refreshData(true); + } + + setAutoRefreshInterval(interval: number) { + this.autoRefreshInterval = interval; + } + + setPageSize(size: number) { + this.pageSize = size; + } + + sortBy(column: string) { + if (this.privateState.sortColumn === column) { + this.privateState.sortOrder = this.privateState.sortOrder === 'desc' ? 'asc' : 'desc'; + } else { + this.privateState.sortOrder = column === 'label' ? 'asc' : 'desc'; + } + + this.privateState.sortColumn = column; + + this.refreshData(true); + } + + private cancelAutoRefresh() { + if (!this.autoRefreshTimeout) { + return; + } + + clearTimeout(this.autoRefreshTimeout); + + this.autoRefreshTimeout = null; + } + + private refreshData(onlySites = false) { + if (this.fetchAbort) { + this.fetchAbort.abort(); + this.fetchAbort = null; + + this.cancelAutoRefresh(); + } + + this.fetchAbort = new AbortController(); + this.privateState.errorLoading = false; + this.privateState.isLoadingKPIs = !onlySites; + this.privateState.isLoadingSites = true; + + const params: QueryParameters = { + method: 'MultiSites.mockDashboardData', + filter_limit: this.pageSize, + filter_offset: this.currentPagingOffset.value, + filter_sort_column: this.privateState.sortColumn, + filter_sort_order: this.privateState.sortOrder, + showColumns: [ + 'hits_evolution', + 'hits_evolution_trend', + 'label', + 'nb_hits', + 'nb_pageviews', + 'nb_visits', + 'pageviews_evolution', + 'pageviews_evolution_trend', + 'revenue', + 'revenue_evolution', + 'revenue_evolution_trend', + 'visits_evolution', + 'visits_evolution_trend', + ].join(','), + }; + + if (this.searchTerm) { + params.pattern = this.searchTerm; + } + + return AjaxHelper.fetch( + params, + { abortController: this.fetchAbort }, + ).then((response) => { + if (!onlySites) { + this.updateDashboardKPIs(response); + } + + this.updateDashboardSites(response); + }).catch(() => { + this.privateState.dashboardSites = []; + this.privateState.errorLoading = true; + }).finally(() => { + this.privateState.isLoadingKPIs = false; + this.privateState.isLoadingSites = false; + this.fetchAbort = null; + + this.startAutoRefresh(); + }); + } + + private startAutoRefresh() { + this.cancelAutoRefresh(); + + if (this.autoRefreshInterval <= 0) { + return; + } + + let currentPeriod; + + try { + currentPeriod = Periods.parse( + Matomo.period as string, + Matomo.currentDateString as string, + ); + } catch (e) { + // gracefully ignore period parsing errors + } + + if (!currentPeriod || !currentPeriod.containsToday()) { + return; + } + + this.autoRefreshTimeout = setTimeout(() => { + this.autoRefreshTimeout = null; + this.refreshData(); + }, this.autoRefreshInterval * 1000); + } + + private updateDashboardKPIs(response: GetDashboardMockDataResponse) { + this.privateState.dashboardKPIs = { + evolutionPeriod: Matomo.period as string, + hits: response.totals.nb_hits, + hitsEvolution: response.totals.hits_evolution, + hitsTrend: response.totals.hits_evolution_trend, + pageviews: response.totals.nb_pageviews, + pageviewsEvolution: response.totals.pageviews_evolution, + pageviewsTrend: response.totals.pageviews_evolution_trend, + revenue: response.totals.revenue, + revenueEvolution: response.totals.revenue_evolution, + revenueTrend: response.totals.revenue_evolution_trend, + visits: response.totals.nb_visits, + visitsEvolution: response.totals.visits_evolution, + visitsTrend: response.totals.visits_evolution_trend, + }; + } + + private updateDashboardSites(response: GetDashboardMockDataResponse) { + this.privateState.dashboardSites = response.sites; + this.privateState.numSites = response.numSites; + this.privateState.sparklineDate = response.sparklineDate; + } +} + +export default new DashboardStore(); diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue new file mode 100644 index 00000000000..8fa0235d672 --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/AllWebsitesDashboard.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue new file mode 100644 index 00000000000..cf019f84739 --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICard.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue new file mode 100644 index 00000000000..481a52a7474 --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/KPICardContainer.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue new file mode 100644 index 00000000000..85a49a0af2e --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue b/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue new file mode 100644 index 00000000000..33e568e6bdd --- /dev/null +++ b/plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/plugins/MultiSites/vue/src/index.ts b/plugins/MultiSites/vue/src/index.ts index e6e8d63d6e4..78cffb03cdb 100644 --- a/plugins/MultiSites/vue/src/index.ts +++ b/plugins/MultiSites/vue/src/index.ts @@ -5,6 +5,7 @@ * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +export { default as AllWebsitesDashboard } from './AllWebsitesDashboard/AllWebsitesDashboard.vue'; export { default as MultisitesSite } from './MultisitesSite/MultisitesSite.vue'; export { default as DashboadStore } from './Dashboard/Dashboard.store'; export { default as Dashboard } from './Dashboard/Dashboard.vue'; diff --git a/plugins/MultiSites/vue/src/types.ts b/plugins/MultiSites/vue/src/types.ts new file mode 100644 index 00000000000..d1c201f68e3 --- /dev/null +++ b/plugins/MultiSites/vue/src/types.ts @@ -0,0 +1,41 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +import { Site } from 'CoreHome'; + +export type DashboardSortOrder = 'asc' | 'desc'; +export type EvolutionTrend = -1 | 0 | 1; + +export interface DashboardMetrics { + hits_evolution: string; + hits_evolution_trend: EvolutionTrend; + nb_hits: string; + nb_pageviews: string; + nb_visits: string; + pageviews_evolution: string; + pageviews_evolution_trend: EvolutionTrend; + visits_evolution: string; + visits_evolution_trend: EvolutionTrend; + revenue: string; + revenue_evolution: string; + revenue_evolution_trend: EvolutionTrend; +} + +export interface DashboardSiteData extends DashboardMetrics, Site { + isGroup?: number, + label: string; +} + +export interface KPICardData { + evolutionPeriod: string; + evolutionTrend: EvolutionTrend; + evolutionValue: string; + badge?: string; + icon: string; + title: string; + value: string; +} diff --git a/tests/UI/expected-screenshots/Theme_demo.png b/tests/UI/expected-screenshots/Theme_demo.png index 9299f8942ba..5cdbf8d39c3 100644 --- a/tests/UI/expected-screenshots/Theme_demo.png +++ b/tests/UI/expected-screenshots/Theme_demo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00ea40d5733a283c94d7445bf015135dfd0871021c15e46f0c529ca5e092c602 -size 3010228 +oid sha256:21355e326f69cb190ff714c6d574d2c33e18d7f6949738f7ea0dfab96871085c +size 3014260