The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/app/statistics/server/lib/getAppsStatistics.js

17 lines
612 B

import { AppStatus } from '@rocket.chat/apps-engine/definition/AppStatus';
import { Apps } from '../../../../ee/server/apps';
import { Info } from '../../../utils/server';
export function getAppsStatistics() {
return {
engineVersion: Info.marketplaceApiVersion,
totalInstalled: Apps.isInitialized() && Apps.getManager().get().length,
totalActive: Apps.isInitialized() && Apps.getManager().get({ enabled: true }).length,
totalFailed:
Apps.isInitialized() &&
Apps.getManager()
.get({ disabled: true })
.filter(({ app: { status } }) => status !== AppStatus.MANUALLY_DISABLED).length,
};
}