From 5945db10dc17458960d432bfe5003e3465873f6d Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Tue, 19 Jul 2022 13:29:06 +0530 Subject: [PATCH] fix: don't log telemetry on setup or dummy create - add a baseCount modal if dev mode for dummy create --- dummy/index.ts | 5 ++- src/pages/DatabaseSelector.vue | 57 ++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/dummy/index.ts b/dummy/index.ts index 2aaafbfe..2f3923ad 100644 --- a/dummy/index.ts +++ b/dummy/index.ts @@ -14,7 +14,7 @@ import { flow, getFlowConstant, getRandomDates, - purchaseItemPartyMap, + purchaseItemPartyMap } from './helpers'; import items from './items.json'; import logo from './logo'; @@ -29,8 +29,6 @@ export async function setupDummyInstance( baseCount: number = 1000, notifier?: Notifier ) { - fyo.store.skipTelemetryLogging = true; - fyo.purgeCache(); notifier?.(fyo.t`Setting Up Instance`, -1); const options = { @@ -46,6 +44,7 @@ export async function setupDummyInstance( chartOfAccounts: 'India - Chart of Accounts', }; await setupInstance(dbPath, options, fyo); + fyo.store.skipTelemetryLogging = true; years = Math.floor(years); notifier?.(fyo.t`Creating Items and Parties`, -1); diff --git a/src/pages/DatabaseSelector.vue b/src/pages/DatabaseSelector.vue index ded0c734..6d88e578 100644 --- a/src/pages/DatabaseSelector.vue +++ b/src/pages/DatabaseSelector.vue @@ -168,6 +168,46 @@ :percent="creationPercent" :message="creationMessage" /> + + + +
+

Set Base Count

+

+ Base Count is a lower bound on the number of entries made when + creating the dummy instance. +

+
+ + +
+
+ + +
+
+