Skip to content
Snippets Groups Projects
Commit 3befe043 authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch 'revert-874eaece' into 'staging'

Revert "Merge branch '187-display-the-amount-of-active-users-for-a-session' into 'staging'"

See merge request arsnova/topic-cloud!100
parents 874eaece b2a19214
No related merge requests found
......@@ -26,14 +26,6 @@
"ws": true,
"logLevel": "debug"
},
"/api/roomsubscription": {
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/api": ""
},
"logLevel": "debug"
},
"/api": {
"target": "http://localhost:8888",
"secure": false,
......
......@@ -258,13 +258,6 @@
</app-comment>
</div>
<!-- Active User Overlay -->
<div class="activeUserOverlay">
<div class="viewer-icon">
</div>
<p style="float:left;">Active Users: {{activeUsers}}</p>
</div>
<!-- No Questions Present -->
<div *ngIf="comments && (commentsFilteredByTime.length < 1 && period === 'time-all' || comments.length === 0) && !isLoading"
fxLayout="row"
......
......@@ -258,24 +258,3 @@ h3 {
h1{
color: red;
}
.activeUserOverlay{
width:180px;
height:25px;
position:fixed;
top:80px;
left:20px;
>*{
float:left;
padding:0;
margin:0;
}
>p{
font-family:'Roboto', sans-serif;
font-weight:bold;
float:left;
padding:5px;
margin:0;
color:var(--on-background);
}
}
......@@ -30,7 +30,6 @@ import { CreateCommentWrapper } from '../../../utils/CreateCommentWrapper';
import { TopicCloudAdminService } from '../../../services/util/topic-cloud-admin.service';
import { RoomDataService } from '../../../services/util/room-data.service';
import { WsRoomService } from '../../../services/websockets/ws-room.service';
import {ActiveUserService} from '../../../services/http/active-user.service';
export interface CommentListData {
comments: Comment[];
......@@ -104,7 +103,6 @@ export class CommentListComponent implements OnInit, OnDestroy {
private _subscriptionEventServiceTagConfig = null;
private _subscriptionEventServiceRoomData = null;
private _subscriptionRoomService = null;
activeUsers: number = 0;
constructor(
private commentService: CommentService,
......@@ -125,8 +123,7 @@ export class CommentListComponent implements OnInit, OnDestroy {
private moderatorService: ModeratorService,
private topicCloudAdminService: TopicCloudAdminService,
private roomDataService: RoomDataService,
private wsRoomService: WsRoomService,
private activeUserService: ActiveUserService
private wsRoomService: WsRoomService
) {
langService.langEmitter.subscribe(lang => {
translateService.use(lang);
......@@ -242,10 +239,6 @@ export class CommentListComponent implements OnInit, OnDestroy {
this.roomService.getRoomByShortId(this.shortId).subscribe(room => {
this.room = room;
this.roomId = room.id;
this.activeUserService.getActiveUser(this.room)
.subscribe(i=>{
this.activeUsers=i.length;
});
this._subscriptionRoomService = this.wsRoomService.getRoomStream(this.roomId).subscribe(msg => {
const message = JSON.parse(msg.body);
if (message.type === 'RoomPatched') {
......
// import { TestBed } from '@angular/core/testing';
//
// import { ActiveUserService } from './active-user.service';
//
// describe('ActiveUserService', () => {
// let service: ActiveUserService;
//
// beforeEach(() => {
// TestBed.configureTestingModule({});
// service = TestBed.inject(ActiveUserService);
// });
//
// it('should be created', () => {
// expect(service).toBeTruthy();
// });
// });
import { Injectable } from '@angular/core';
import {Observable} from 'rxjs';
import {Room} from '../../models/room';
import {catchError,tap} from 'rxjs/operators';
import {BaseHttpService} from './base-http.service';
import {HttpClient,HttpHeaders} from '@angular/common/http';
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};
@Injectable({
providedIn: 'root'
})
export class ActiveUserService extends BaseHttpService {
constructor(private http: HttpClient) {
super();
}
public getActiveUser(room: Room):Observable<any>{
const url = '/api/roomsubscription/usercount?ids='+room.id;
return this.http.get(url, httpOptions).pipe(
tap(_ => ''),
catchError(this.handleError<any>('yeet'))
);
}
}
src/assets/icons/view.png

1.12 KiB

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<path fill="#000000" d="M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7
64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1
68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1
112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5
16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0
48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256
128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"/>
</svg>
......@@ -240,10 +240,3 @@ a {
height: 1px !important;
border-top-color: rgba(0, 0, 0, 0.12) !important;
}
.viewer-icon{
width:25px;
height:25px;
background-size:cover;
background-image:url("assets/icons/view.png");
}
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