Commit af8b6a3d authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Adds new piwik config for the separate servers

parent d1a04b0d
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
}, },
{ {
"replace": "src/assets/piwik/piwik.js", "replace": "src/assets/piwik/piwik.js",
"with": "src/assets/piwik/piwik.prod.js" "with": "src/assets/piwik/piwik.staging.js"
} }
], ],
"styles": [ "styles": [
...@@ -311,7 +311,7 @@ ...@@ -311,7 +311,7 @@
}, },
{ {
"replace": "src/assets/piwik/piwik.js", "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", "replace": "src/assets/images/logo.svg",
......
...@@ -8,6 +8,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; ...@@ -8,6 +8,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { RxStompService } from '@stomp/ng2-stompjs'; import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq'; import { SimpleMQ } from 'ng2-simple-mq';
import { MarkdownService } from 'ngx-markdown';
import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock'; import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock';
import { jwtOptionsFactory } from '../../../lib/jwt.factory'; import { jwtOptionsFactory } from '../../../lib/jwt.factory';
import { ServerUnavailableModalComponent } from '../../../modals/server-unavailable-modal/server-unavailable-modal.component'; import { ServerUnavailableModalComponent } from '../../../modals/server-unavailable-modal/server-unavailable-modal.component';
...@@ -46,6 +47,7 @@ describe('LeaderboardComponent', () => { ...@@ -46,6 +47,7 @@ describe('LeaderboardComponent', () => {
}), }),
], ],
providers: [ providers: [
MarkdownService,
RxStompService, RxStompService,
SimpleMQ, { SimpleMQ, {
provide: StorageService, provide: StorageService,
......
...@@ -8,6 +8,7 @@ import { JWT_OPTIONS, JwtModule } from '@auth0/angular-jwt'; ...@@ -8,6 +8,7 @@ import { JWT_OPTIONS, JwtModule } from '@auth0/angular-jwt';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { RxStompService } from '@stomp/ng2-stompjs'; import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq'; import { SimpleMQ } from 'ng2-simple-mq';
import { MarkdownService } from 'ngx-markdown';
import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock'; import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock';
import { jwtOptionsFactory } from '../../../lib/jwt.factory'; import { jwtOptionsFactory } from '../../../lib/jwt.factory';
import { ServerUnavailableModalComponent } from '../../../modals/server-unavailable-modal/server-unavailable-modal.component'; import { ServerUnavailableModalComponent } from '../../../modals/server-unavailable-modal/server-unavailable-modal.component';
...@@ -43,7 +44,7 @@ describe('QuizFlow: ReadingConfirmationComponent', () => { ...@@ -43,7 +44,7 @@ describe('QuizFlow: ReadingConfirmationComponent', () => {
}), }),
], ],
providers: [ providers: [
RxStompService, RxStompService, MarkdownService,
{ {
provide: StorageService, provide: StorageService,
useClass: StorageServiceMock, useClass: StorageServiceMock,
......
...@@ -9,6 +9,7 @@ import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap'; ...@@ -9,6 +9,7 @@ import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { RxStompService } from '@stomp/ng2-stompjs'; import { RxStompService } from '@stomp/ng2-stompjs';
import { SimpleMQ } from 'ng2-simple-mq'; import { SimpleMQ } from 'ng2-simple-mq';
import { MarkdownService } from 'ngx-markdown';
import { TranslatePipeMock } from '../../../../_mocks/TranslatePipeMock'; import { TranslatePipeMock } from '../../../../_mocks/TranslatePipeMock';
import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock'; import { TranslateServiceMock } from '../../../../_mocks/TranslateServiceMock';
import { jwtOptionsFactory } from '../../../lib/jwt.factory'; import { jwtOptionsFactory } from '../../../lib/jwt.factory';
...@@ -46,6 +47,7 @@ describe('VotingComponent', () => { ...@@ -46,6 +47,7 @@ describe('VotingComponent', () => {
}), }),
], ],
providers: [ providers: [
MarkdownService,
RxStompService, RxStompService,
{ {
provide: StorageService, provide: StorageService,
......
...@@ -19,4 +19,8 @@ export class AttendeeMockService { ...@@ -19,4 +19,8 @@ export class AttendeeMockService {
public cleanUp(): void { public cleanUp(): void {
this.attendees = []; this.attendees = [];
} }
public hasConfidenceValue(): boolean {
return false;
}
} }
...@@ -19,6 +19,7 @@ export class StorageServiceMock { ...@@ -19,6 +19,7 @@ export class StorageServiceMock {
constructor() { constructor() {
this._db[DbTable.Quiz] = { this._db[DbTable.Quiz] = {
get: () => new Promise(resolve => resolve()), get: () => new Promise(resolve => resolve()),
delete: () => new Promise(resolve => resolve()),
toCollection: () => { toCollection: () => {
return { return {
sortBy: () => new Promise(resolve => resolve([])), sortBy: () => new Promise(resolve => resolve([])),
...@@ -28,6 +29,7 @@ export class StorageServiceMock { ...@@ -28,6 +29,7 @@ export class StorageServiceMock {
}; };
this._db[DbTable.Config] = { this._db[DbTable.Config] = {
get: () => new Promise(resolve => resolve()), get: () => new Promise(resolve => resolve()),
delete: () => new Promise(resolve => resolve()),
toCollection: () => { toCollection: () => {
return { return {
sortBy: (data) => new Promise(resolve => resolve(data)), sortBy: (data) => new Promise(resolve => resolve(data)),
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 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'; import { NoDataErrorComponent } from './no-data-error.component';
...@@ -8,7 +11,16 @@ describe('NoDataErrorComponent', () => { ...@@ -8,7 +11,16 @@ describe('NoDataErrorComponent', () => {
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [NoDataErrorComponent], imports: [RouterTestingModule],
declarations: [NoDataErrorComponent, TranslatePipeMock],
providers: [
{
provide: NgbActiveModal,
useValue: {
close: () => {},
},
},
],
}) })
.compileComponents(); .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 || []; var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function () { (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