[NEW] Add enterprise data to statistics (#19363)

pull/19089/head
Diego Sampaio 6 years ago committed by GitHub
parent 25c3457c35
commit 831ff3ebee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/statistics/server/lib/statistics.js
  2. 16
      ee/app/license/server/getStatistics.ts
  3. 9
      ee/app/license/server/index.ts

@ -23,6 +23,7 @@ import { getStatistics as federationGetStatistics } from '../../../federation/se
import { NotificationQueue } from '../../../models/server/raw';
import { readSecondaryPreferred } from '../../../../server/database/readSecondaryPreferred';
import { getAppsStatistics } from './getAppsStatistics';
import { getStatistics as getEnterpriseStatistics } from '../../../../ee/app/license/server';
const wizardFields = [
'Organization_Type',
@ -177,6 +178,8 @@ export const statistics = {
statistics.pushQueue = Promise.await(NotificationQueue.col.estimatedDocumentCount());
statistics.enterprise = getEnterpriseStatistics();
return statistics;
},
save() {

@ -0,0 +1,16 @@
import { getModules, getTags } from './license';
type ENTERPRISE_STATISTICS = {
modules: string[];
tags: string[];
}
export function getStatistics(): ENTERPRISE_STATISTICS {
const modules = getModules();
const tags = getTags().map(({ name }) => name);
return {
modules,
tags,
};
}

@ -2,4 +2,11 @@ import './settings';
import './methods';
import './startup';
export { onLicense, overwriteClassOnLicense, isEnterprise, getMaxGuestUsers } from './license';
export {
onLicense,
overwriteClassOnLicense,
isEnterprise,
getMaxGuestUsers,
} from './license';
export { getStatistics } from './getStatistics';

Loading…
Cancel
Save