Skip to content
Snippets Groups Projects
Commit 9206e751 authored by Steve Reis's avatar Steve Reis
Browse files

feat: Remove Matomo configuration

parent fe680a12
No related branches found
No related tags found
No related merge requests found
import { registerAs } from '@nestjs/config';
import { parseToBoolean } from 'src/common/utils/shared.utils';
export default registerAs('matomo', () => {
return {
enabled: parseToBoolean(process.env.MATOMO_ENABLED, false),
urlBase: process.env.MATOMO_URL || undefined,
siteId: process.env.MATOMO_SITE_ID || undefined,
};
});
...@@ -38,7 +38,6 @@ export class EngineResolver { ...@@ -38,7 +38,6 @@ export class EngineResolver {
@Public() @Public()
configuration(): Configuration { configuration(): Configuration {
const engineConf = this.engineService.getConfiguration(); const engineConf = this.engineService.getConfiguration();
const matomo = this.configSerivce.get('matomo');
const authConf: ConfigType<typeof authConfig> = const authConf: ConfigType<typeof authConfig> =
this.configSerivce.get('auth'); this.configSerivce.get('auth');
...@@ -48,7 +47,6 @@ export class EngineResolver { ...@@ -48,7 +47,6 @@ export class EngineResolver {
skipTos: parseToBoolean(this.configSerivce.get(ENGINE_SKIP_TOS)), skipTos: parseToBoolean(this.configSerivce.get(ENGINE_SKIP_TOS)),
enableSSO: parseToBoolean(authConf.enableSSO), enableSSO: parseToBoolean(authConf.enableSSO),
skipAuth: parseToBoolean(authConf.skipAuth, true), skipAuth: parseToBoolean(authConf.skipAuth, true),
matomo,
ontologyUrl: this.configSerivce.get(ENGINE_ONTOLOGY_URL), ontologyUrl: this.configSerivce.get(ENGINE_ONTOLOGY_URL),
contactLink: this.configSerivce.get(ENGINE_CONTACT_LINK), contactLink: this.configSerivce.get(ENGINE_CONTACT_LINK),
}; };
......
import { Field, ObjectType } from '@nestjs/graphql'; import { Field, ObjectType } from '@nestjs/graphql';
import { Matomo } from './configuration/matomo.model';
@ObjectType() @ObjectType()
export class Configuration { export class Configuration {
@Field() @Field()
...@@ -34,9 +33,6 @@ export class Configuration { ...@@ -34,9 +33,6 @@ export class Configuration {
@Field({ nullable: true, defaultValue: true }) @Field({ nullable: true, defaultValue: true })
enableSSO?: boolean; enableSSO?: boolean;
@Field(() => Matomo, { nullable: true })
matomo?: Matomo;
@Field({ nullable: true }) @Field({ nullable: true })
ontologyUrl?: string; ontologyUrl?: string;
} }
import { Field, ObjectType } from '@nestjs/graphql';
@ObjectType()
export class Matomo {
@Field({ nullable: true, defaultValue: false })
enabled?: boolean;
@Field({ nullable: true })
siteId?: string;
@Field({ nullable: true })
urlBase?: string;
}
...@@ -9,7 +9,6 @@ import { AuthModule } from 'src/auth/auth.module'; ...@@ -9,7 +9,6 @@ import { AuthModule } from 'src/auth/auth.module';
import authConfig from 'src/config/auth.config'; import authConfig from 'src/config/auth.config';
import cacheConfig from 'src/config/cache.config'; import cacheConfig from 'src/config/cache.config';
import dbConfig from 'src/config/db.config'; import dbConfig from 'src/config/db.config';
import matomoConfig from 'src/config/matomo.config';
import { EngineModule } from 'src/engine/engine.module'; import { EngineModule } from 'src/engine/engine.module';
import { ExperimentsModule } from 'src/experiments/experiments.module'; import { ExperimentsModule } from 'src/experiments/experiments.module';
import { FilesModule } from 'src/files/files.module'; import { FilesModule } from 'src/files/files.module';
...@@ -22,7 +21,7 @@ import { AppService } from './app.service'; ...@@ -22,7 +21,7 @@ import { AppService } from './app.service';
ConfigModule.forRoot({ ConfigModule.forRoot({
isGlobal: true, isGlobal: true,
envFilePath: ['.env', '.env.defaults'], envFilePath: ['.env', '.env.defaults'],
load: [dbConfig, matomoConfig, cacheConfig, authConfig], load: [dbConfig, cacheConfig, authConfig],
}), }),
GraphQLModule.forRoot<ApolloDriverConfig>({ GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver, driver: ApolloDriver,
......
...@@ -26,12 +26,6 @@ type AuthenticationOutput { ...@@ -26,12 +26,6 @@ type AuthenticationOutput {
refreshToken: String! refreshToken: String!
} }
type Matomo {
enabled: Boolean
siteId: String
urlBase: String
}
type Configuration { type Configuration {
connectorId: String! connectorId: String!
hasGalaxy: Boolean @deprecated(reason: "Only used for legacy reason should be avoided") hasGalaxy: Boolean @deprecated(reason: "Only used for legacy reason should be avoided")
...@@ -43,7 +37,6 @@ type Configuration { ...@@ -43,7 +37,6 @@ type Configuration {
skipAuth: Boolean skipAuth: Boolean
skipTos: Boolean skipTos: Boolean
enableSSO: Boolean enableSSO: Boolean
matomo: Matomo
ontologyUrl: String ontologyUrl: String
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment