diff --git a/mirage/factories/institution-summary-metric.ts b/mirage/factories/institution-summary-metric.ts index 96b8e39c8f..878b81ad77 100644 --- a/mirage/factories/institution-summary-metric.ts +++ b/mirage/factories/institution-summary-metric.ts @@ -11,28 +11,28 @@ export default Factory.extend({ return faker.random.number({ min: 10, max: 100 }); }, userCount() { - return faker.random.number({ min: 100, max: 1000 }); + return faker.random.number({ min: 10, max: 50}); }, publicRegistrationCount() { return faker.random.number({ min: 100, max: 1000 }); }, - preprintCount() { - return faker.random.number({ min: 100, max: 1000 }); - }, embargoedRegistrationCount() { - return faker.random.number({ min: 100, max: 1000 }); + return faker.random.number({ min: 0, max: 25}); + }, + preprintCount() { + return faker.random.number({ min: 15, max: 175}); }, storageByteCount() { - return faker.random.number({ min: 100, max: 1000 }); + return faker.random.number({ min: 1000 * 100, max: 1000 * 1000 * 100 }); }, publicFileCount() { - return faker.random.number({ min: 100, max: 1000 }); + return faker.random.number({ min: 15, max: 1000 }); }, monthlyActiveUserCount() { - return faker.random.number({ min: 100, max: 1000 }); + return faker.random.number({ min: 10, max: 100 * 10 }); }, monthlyLoggedInUserCount() { - return faker.random.number({ min: 100, max: 1000 }); + return faker.random.number({ min: 10, max: 100 * 100 }); }, }); diff --git a/mirage/factories/institution.ts b/mirage/factories/institution.ts index 89af620039..15de460256 100644 --- a/mirage/factories/institution.ts +++ b/mirage/factories/institution.ts @@ -39,29 +39,8 @@ export default Factory.extend({ const departmentMetrics = departmentNames.map(name => server.create('institution-department', { name })); - const userCount = userMetrics.length; - let publicProjectCount = 0; - let privateProjectCount = 0; - userMetrics.forEach(({ publicProjects, privateProjects }) => { - publicProjectCount += publicProjects; - privateProjectCount += privateProjects; - }); - const summaryMetrics = server.create('institution-summary-metric', { id: institution.id }); - summaryMetrics.update({ - publicProjectCount, - privateProjectCount, - userCount, - publicRegistrationCount: 1250, - preprintCount: 11250, - embargoedRegistrationCount: 456, - storageByteCount: 47382032, - publicFileCount: 87, - monthlyLoggedInUserCount: 24563, - monthlyActiveUserCount:456, - }); - institution.update({ userMetrics, departmentMetrics, summaryMetrics }); }, }),