Adding staging matomo sites

This commit is contained in:
softsimon 2022-08-12 16:08:34 +04:00
parent 329e9aa034
commit 576400414f
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 31 additions and 9 deletions

View File

@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { Env, StateService } from '../../services/state.service';
import { Observable } from 'rxjs';
import { LanguageService } from 'src/app/services/language.service';
import { EnterpriseService } from 'src/app/services/enterprise.service';
@Component({
selector: 'app-bisq-master-page',
@ -18,6 +19,7 @@ export class BisqMasterPageComponent implements OnInit {
constructor(
private stateService: StateService,
private languageService: LanguageService,
private enterpriseService: EnterpriseService,
) { }
ngOnInit() {

View File

@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { Env, StateService } from '../../services/state.service';
import { merge, Observable, of} from 'rxjs';
import { LanguageService } from 'src/app/services/language.service';
import { EnterpriseService } from 'src/app/services/enterprise.service';
@Component({
selector: 'app-liquid-master-page',
@ -20,6 +21,7 @@ export class LiquidMasterPageComponent implements OnInit {
constructor(
private stateService: StateService,
private languageService: LanguageService,
private enterpriseService: EnterpriseService,
) { }
ngOnInit() {

View File

@ -58,15 +58,33 @@ export class EnterpriseService {
let statsUrl = '//stats.mempool.space/';
if (!siteId) {
siteId = 5;
if (this.document.location.hostname === 'liquid.network') {
statsUrl = '//stats.liquid.network/';
siteId = 8;
} else if (this.document.location.hostname === 'bisq.markets') {
statsUrl = '//stats.bisq.markets/';
siteId = 7;
} else if (this.document.location.hostname !== 'mempool.space') {
return;
switch (this.document.location.hostname) {
case 'mempool.space':
statsUrl = '//stats.mempool.space/';
siteId = 5;
break;
case 'mempool.ninja':
statsUrl = '//stats.mempool.space/';
siteId = 4;
break;
case 'liquid.network':
siteId = 8;
statsUrl = '//stats.liquid.network/';
break;
case 'liquid.place':
siteId = 10;
statsUrl = '//stats.liquid.network/';
break;
case 'bisq.markets':
siteId = 7;
statsUrl = '//stats.bisq.markets/';
break;
case 'bisq.ninja':
statsUrl = '//stats.bisq.markets/';
siteId = 11;
break;
default:
return;
}
}