Skip to content
Commits on Source (2)
...@@ -5,10 +5,12 @@ import { Subscription } from 'rxjs'; ...@@ -5,10 +5,12 @@ import { Subscription } from 'rxjs';
import { Client, Upload } from '../../services/api'; import { Client, Upload } from '../../services/api';
import { MindsTitle } from '../../services/ux/title'; import { MindsTitle } from '../../services/ux/title';
import { Session } from '../../services/session'; import { Session } from '../../services/session';
import { ActivityService } from '../../common/services/activity.service';
@Component({ @Component({
selector: 'minds-admin', selector: 'minds-admin',
templateUrl: 'admin.html', templateUrl: 'admin.html',
providers: [ActivityService],
}) })
export class Admin { export class Admin {
filter: string = ''; filter: string = '';
......
...@@ -24,6 +24,8 @@ import { CommonModule as NgCommonModule } from '@angular/common'; ...@@ -24,6 +24,8 @@ import { CommonModule as NgCommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing'; import { RouterTestingModule } from '@angular/router/testing';
import { TokenPipe } from '../../../common/pipes/token.pipe'; import { TokenPipe } from '../../../common/pipes/token.pipe';
import { OverlayModalService } from '../../../services/ux/overlay-modal'; import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { ActivityService } from '../../../common/services/activity.service';
import { activityServiceMock } from '../../../../tests/activity-service-mock.spec';
import { overlayModalServiceMock } from '../../../../tests/overlay-modal-service-mock.spec'; import { overlayModalServiceMock } from '../../../../tests/overlay-modal-service-mock.spec';
@Component({ @Component({
...@@ -144,6 +146,7 @@ describe('AdminBoosts', () => { ...@@ -144,6 +146,7 @@ describe('AdminBoosts', () => {
providers: [ providers: [
{ provide: Client, useValue: clientMock }, { provide: Client, useValue: clientMock },
{ provide: OverlayModalService, useValue: overlayModalServiceMock }, { provide: OverlayModalService, useValue: overlayModalServiceMock },
{ provide: ActivityService, useValue: activityServiceMock },
], ],
}).compileComponents(); // compile template and css }).compileComponents(); // compile template and css
})); }));
......
...@@ -8,6 +8,7 @@ import { RejectionReasonModalComponent } from './modal/rejection-reason-modal.co ...@@ -8,6 +8,7 @@ import { RejectionReasonModalComponent } from './modal/rejection-reason-modal.co
import { Reason, rejectionReasons } from './rejection-reasons'; import { Reason, rejectionReasons } from './rejection-reasons';
import { ReportCreatorComponent } from '../../../modules/report/creator/creator.component'; import { ReportCreatorComponent } from '../../../modules/report/creator/creator.component';
import { OverlayModalService } from '../../../services/ux/overlay-modal'; import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { ActivityService } from '../../../common/services/activity.service';
@Component({ @Component({
moduleId: module.id, moduleId: module.id,
...@@ -42,7 +43,8 @@ export class AdminBoosts { ...@@ -42,7 +43,8 @@ export class AdminBoosts {
constructor( constructor(
public client: Client, public client: Client,
private overlayModal: OverlayModalService, private overlayModal: OverlayModalService,
private route: ActivatedRoute private route: ActivatedRoute,
protected activityService: ActivityService
) {} ) {}
ngOnInit() { ngOnInit() {
......
...@@ -16,8 +16,10 @@ import { RouterTestingModule } from '@angular/router/testing'; ...@@ -16,8 +16,10 @@ import { RouterTestingModule } from '@angular/router/testing';
import { NewsfeedHashtagSelectorService } from '../../../modules/newsfeed/services/newsfeed-hashtag-selector.service'; import { NewsfeedHashtagSelectorService } from '../../../modules/newsfeed/services/newsfeed-hashtag-selector.service';
import { newsfeedHashtagSelectorServiceMock } from '../../../../tests/newsfeed-hashtag-selector-service-mock.spec'; import { newsfeedHashtagSelectorServiceMock } from '../../../../tests/newsfeed-hashtag-selector-service-mock.spec';
import { overlayModalServiceMock } from '../../../../tests/overlay-modal-service-mock.spec'; import { overlayModalServiceMock } from '../../../../tests/overlay-modal-service-mock.spec';
import { activityServiceMock } from '../../../../tests/activity-service-mock.spec';
import { OverlayModalService } from '../../../services/ux/overlay-modal'; import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { EventEmitter } from '@angular/core'; import { EventEmitter } from '@angular/core';
import { ActivityService } from '../../../common/services/activity.service';
@Component({ @Component({
selector: 'minds-activity', selector: 'minds-activity',
...@@ -72,6 +74,7 @@ describe('AdminFirehose', () => { ...@@ -72,6 +74,7 @@ describe('AdminFirehose', () => {
useValue: newsfeedHashtagSelectorServiceMock, useValue: newsfeedHashtagSelectorServiceMock,
}, },
{ provide: OverlayModalService, useValue: overlayModalServiceMock }, { provide: OverlayModalService, useValue: overlayModalServiceMock },
{ provide: ActivityService, useValue: activityServiceMock },
], ],
}).compileComponents(); }).compileComponents();
})); }));
......
...@@ -6,7 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router'; ...@@ -6,7 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { NewsfeedHashtagSelectorService } from '../../../modules/newsfeed/services/newsfeed-hashtag-selector.service'; import { NewsfeedHashtagSelectorService } from '../../../modules/newsfeed/services/newsfeed-hashtag-selector.service';
import { ReportCreatorComponent } from '../../../modules/report/creator/creator.component'; import { ReportCreatorComponent } from '../../../modules/report/creator/creator.component';
import { ActivityService } from '../../../common/services/activity.service';
@Component({ @Component({
moduleId: module.id, moduleId: module.id,
selector: 'minds-admin-firehose', selector: 'minds-admin-firehose',
...@@ -30,7 +30,8 @@ export class AdminFirehoseComponent implements OnInit, OnDestroy { ...@@ -30,7 +30,8 @@ export class AdminFirehoseComponent implements OnInit, OnDestroy {
public router: Router, public router: Router,
public route: ActivatedRoute, public route: ActivatedRoute,
protected newsfeedHashtagSelectorService: NewsfeedHashtagSelectorService, protected newsfeedHashtagSelectorService: NewsfeedHashtagSelectorService,
private overlayModal: OverlayModalService private overlayModal: OverlayModalService,
protected activityService: ActivityService
) { ) {
this.paramsSubscription = this.route.params.subscribe(params => { this.paramsSubscription = this.route.params.subscribe(params => {
this.algorithm = params['algorithm'] || 'latest'; this.algorithm = params['algorithm'] || 'latest';
......