Commit af8b6a3d authored by Christopher Fullarton's avatar Christopher Fullarton

Adds new piwik config for the separate servers

parent d1a04b0d
Pipeline #34137 passed with stages
in 15 minutes and 42 seconds
......@@ -224,7 +224,7 @@
},
{
"replace": "src/assets/piwik/piwik.js",
"with": "src/assets/piwik/piwik.prod.js"
"with": "src/assets/piwik/piwik.staging.js"
}
],
"styles": [
......@@ -311,7 +311,7 @@
},
{
"replace": "src/assets/piwik/piwik.js",
"with": "src/assets/piwik/piwik.prod.js"
"with": "src/assets/piwik/piwik.beta.js"
},
{
"replace": "src/assets/images/logo.svg",
......
......@@ -8,6 +8,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { TranslateService } from '@ngx-translate/core';
import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq';
import { MarkdownService } from 'ngx-markdown';
import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock';
import { jwtOptionsFactory } from '../../../lib/jwt.factory';
import { ServerUnavailableModalComponent } from '../../../modals/server-unavailable-modal/server-unavailable-modal.component';
......@@ -46,6 +47,7 @@ describe('LeaderboardComponent', () => {
}),
],
providers: [
MarkdownService,
RxStompService,
SimpleMQ, {
provide: StorageService,
......
......@@ -8,6 +8,7 @@ import { JWT_OPTIONS, JwtModule } from '@auth0/angular-jwt';
import { TranslateService } from '@ngx-translate/core';
import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq';
import { MarkdownService } from 'ngx-markdown';
import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock';
import { jwtOptionsFactory } from '../../../lib/jwt.factory';
import { ServerUnavailableModalComponent } from '../../../modals/server-unavailable-modal/server-unavailable-modal.component';
......@@ -43,7 +44,7 @@ describe('QuizFlow: ReadingConfirmationComponent', () => {
}),
],
providers: [
RxStompService,
RxStompService, MarkdownService,
{
provide: StorageService,
useClass: StorageServiceMock,
......
......@@ -9,6 +9,7 @@ import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateService } from '@ngx-translate/core';
import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq';
import { MarkdownService } from 'ngx-markdown';
import { TranslatePipeMock } from '../../../../_mocks/TranslatePipeMock';
import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock';
import { jwtOptionsFactory } from '../../../lib/jwt.factory';
......@@ -46,6 +47,7 @@ describe('VotingComponent', () => {
}),
],
providers: [
MarkdownService,
RxStompService,
{
provide: StorageService,
......
......@@ -19,4 +19,8 @@ export class AttendeeMockService {
public cleanUp(): void {
this.attendees = [];
}
public hasConfidenceValue(): boolean {
return false;
}
}
......@@ -19,6 +19,7 @@ export class StorageServiceMock {
constructor() {
this._db[DbTable.Quiz] = {
get: () => new Promise(resolve => resolve()),
delete: () => new Promise(resolve => resolve()),
toCollection: () => {
return {
sortBy: () => new Promise(resolve => resolve([])),
......@@ -28,6 +29,7 @@ export class StorageServiceMock {
};
this._db[DbTable.Config] = {
get: () => new Promise(resolve => resolve()),
delete: () => new Promise(resolve => resolve()),
toCollection: () => {
return {
sortBy: (data) => new Promise(resolve => resolve(data)),
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { TranslatePipeMock } from '../../../_mocks/TranslatePipeMock';
import { NoDataErrorComponent } from './no-data-error.component';
......@@ -8,7 +11,16 @@ describe('NoDataErrorComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [NoDataErrorComponent],
imports: [RouterTestingModule],
declarations: [NoDataErrorComponent, TranslatePipeMock],
providers: [
{
provide: NgbActiveModal,
useValue: {
close: () => {},
},
},
],
})
.compileComponents();
}));
......
var _paq = _paq || [];
_paq.push(['enableLinkTracking']);
(function () {
const u = "https://arsnova.thm.de/stats/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '8']);
const d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
s.parentNode.insertBefore(g, s);
})();
var _paq = _paq || [];
_paq.push(['enableLinkTracking']);
(function () {
const u = "https://arsnova.thm.de/stats/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '7']);
const d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
s.parentNode.insertBefore(g, s);
})();
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
......
Markdown is supported
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