Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts')
-rw-r--r--plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts b/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts
index fabfff4220..2b9080a00c 100644
--- a/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts
+++ b/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts
@@ -5,16 +5,10 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-// TODO:
-// - state property types
-// - method signatures
-// - method code
-
import {
reactive,
computed,
readonly,
- DeepReadonly,
} from 'vue';
import {
AjaxHelper,
@@ -65,7 +59,7 @@ interface DashboardStoreState {
loadingMessage: string;
reverse: boolean;
sortColumn: string;
- refreshInterval: number;
+ refreshInterval?: number;
errorLoadingSites: boolean;
}
@@ -343,7 +337,7 @@ class DashboardStore {
this.refreshTimeout = setTimeout(() => {
this.refreshTimeout = null;
this.fetchAllSites();
- }, this.state.value.refreshInterval * 1000);
+ }, this.state.value.refreshInterval! * 1000);
}
});
}
@@ -352,6 +346,14 @@ class DashboardStore {
this.privateState.errorLoadingSites = true;
this.privateState.sites = [];
}
+
+ setRefreshInterval(interval?: number): void {
+ this.privateState.refreshInterval = interval;
+ }
+
+ setPageSize(pageSize: number): void {
+ this.privateState.pageSize = pageSize;
+ }
}
export default new DashboardStore();