aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-25 17:19:46 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-25 17:19:46 +0200
commite636eb88101a51399057c86477af6677f5614d48 (patch)
treeba56f0da932613c8013a2c52905ded1987cd6d6d /client/src
parent4f133041819409a72cf70fa2fa6c4df14c6de4fd (diff)
downloadPeerTube-e636eb88101a51399057c86477af6677f5614d48.tar.gz
PeerTube-e636eb88101a51399057c86477af6677f5614d48.tar.zst
PeerTube-e636eb88101a51399057c86477af6677f5614d48.zip
Requests -> RequestSchedulers
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+admin/admin-routing.module.ts4
-rw-r--r--client/src/app/+admin/admin.module.ts8
-rw-r--r--client/src/app/+admin/index.ts5
-rw-r--r--client/src/app/+admin/request-schedulers/index.ts4
-rw-r--r--client/src/app/+admin/request-schedulers/request-schedulers-stats/index.ts1
-rw-r--r--client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.html (renamed from client/src/app/+admin/requests/request-stats/request-stats.component.html)0
-rw-r--r--client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.scss (renamed from client/src/app/+admin/requests/request-stats/request-stats.component.scss)0
-rw-r--r--client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.ts (renamed from client/src/app/+admin/requests/request-stats/request-stats.component.ts)16
-rw-r--r--client/src/app/+admin/request-schedulers/request-schedulers.component.ts (renamed from client/src/app/+admin/requests/requests.component.ts)2
-rw-r--r--client/src/app/+admin/request-schedulers/request-schedulers.routes.ts (renamed from client/src/app/+admin/requests/requests.routes.ts)10
-rw-r--r--client/src/app/+admin/request-schedulers/shared/index.ts2
-rw-r--r--client/src/app/+admin/request-schedulers/shared/request-schedulers-stats-attributes.model.ts (renamed from client/src/app/+admin/requests/shared/request-stats-attributes.model.ts)4
-rw-r--r--client/src/app/+admin/request-schedulers/shared/request-schedulers.service.ts (renamed from client/src/app/+admin/requests/shared/request.service.ts)14
-rw-r--r--client/src/app/+admin/requests/index.ts4
-rw-r--r--client/src/app/+admin/requests/request-stats/index.ts1
-rw-r--r--client/src/app/+admin/requests/shared/index.ts2
16 files changed, 36 insertions, 41 deletions
diff --git a/client/src/app/+admin/admin-routing.module.ts b/client/src/app/+admin/admin-routing.module.ts
index 839913135..bcc94a9f3 100644
--- a/client/src/app/+admin/admin-routing.module.ts
+++ b/client/src/app/+admin/admin-routing.module.ts
@@ -3,7 +3,7 @@ import { RouterModule, Routes } from '@angular/router'
3 3
4import { AdminComponent } from './admin.component' 4import { AdminComponent } from './admin.component'
5import { FriendsRoutes } from './friends' 5import { FriendsRoutes } from './friends'
6import { RequestsRoutes } from './requests' 6import { RequestSchedulersRoutes } from './request-schedulers'
7import { UsersRoutes } from './users' 7import { UsersRoutes } from './users'
8import { VideoAbusesRoutes } from './video-abuses' 8import { VideoAbusesRoutes } from './video-abuses'
9 9
@@ -18,7 +18,7 @@ const adminRoutes: Routes = [
18 pathMatch: 'full' 18 pathMatch: 'full'
19 }, 19 },
20 ...FriendsRoutes, 20 ...FriendsRoutes,
21 ...RequestsRoutes, 21 ...RequestSchedulersRoutes,
22 ...UsersRoutes, 22 ...UsersRoutes,
23 ...VideoAbusesRoutes 23 ...VideoAbusesRoutes
24 ] 24 ]
diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts
index 9ecce5dc3..e4ba8e5b7 100644
--- a/client/src/app/+admin/admin.module.ts
+++ b/client/src/app/+admin/admin.module.ts
@@ -3,7 +3,7 @@ import { NgModule } from '@angular/core'
3import { AdminComponent } from './admin.component' 3import { AdminComponent } from './admin.component'
4import { AdminRoutingModule } from './admin-routing.module' 4import { AdminRoutingModule } from './admin-routing.module'
5import { FriendsComponent, FriendAddComponent, FriendListComponent, FriendService } from './friends' 5import { FriendsComponent, FriendAddComponent, FriendListComponent, FriendService } from './friends'
6import { RequestsComponent, RequestStatsComponent, RequestService } from './requests' 6import { RequestSchedulersComponent, RequestSchedulersStatsComponent, RequestSchedulersService } from './request-schedulers'
7import { UsersComponent, UserAddComponent, UserListComponent, UserService } from './users' 7import { UsersComponent, UserAddComponent, UserListComponent, UserService } from './users'
8import { VideoAbusesComponent, VideoAbuseListComponent } from './video-abuses' 8import { VideoAbusesComponent, VideoAbuseListComponent } from './video-abuses'
9import { SharedModule } from '../shared' 9import { SharedModule } from '../shared'
@@ -21,8 +21,8 @@ import { SharedModule } from '../shared'
21 FriendAddComponent, 21 FriendAddComponent,
22 FriendListComponent, 22 FriendListComponent,
23 23
24 RequestsComponent, 24 RequestSchedulersComponent,
25 RequestStatsComponent, 25 RequestSchedulersStatsComponent,
26 26
27 UsersComponent, 27 UsersComponent,
28 UserAddComponent, 28 UserAddComponent,
@@ -38,7 +38,7 @@ import { SharedModule } from '../shared'
38 38
39 providers: [ 39 providers: [
40 FriendService, 40 FriendService,
41 RequestService, 41 RequestSchedulersService,
42 UserService 42 UserService
43 ] 43 ]
44}) 44})
diff --git a/client/src/app/+admin/index.ts b/client/src/app/+admin/index.ts
index 11e2587c0..b628a3662 100644
--- a/client/src/app/+admin/index.ts
+++ b/client/src/app/+admin/index.ts
@@ -1,6 +1 @@
1export * from './friends'
2export * from './requests'
3export * from './users'
4export * from './admin-routing.module'
5export * from './admin.module' export * from './admin.module'
6export * from './admin.component'
diff --git a/client/src/app/+admin/request-schedulers/index.ts b/client/src/app/+admin/request-schedulers/index.ts
new file mode 100644
index 000000000..87b72e8c7
--- /dev/null
+++ b/client/src/app/+admin/request-schedulers/index.ts
@@ -0,0 +1,4 @@
1export * from './request-schedulers-stats'
2export * from './shared'
3export * from './request-schedulers.component'
4export * from './request-schedulers.routes'
diff --git a/client/src/app/+admin/request-schedulers/request-schedulers-stats/index.ts b/client/src/app/+admin/request-schedulers/request-schedulers-stats/index.ts
new file mode 100644
index 000000000..a3323e6be
--- /dev/null
+++ b/client/src/app/+admin/request-schedulers/request-schedulers-stats/index.ts
@@ -0,0 +1 @@
export * from './request-schedulers-stats.component'
diff --git a/client/src/app/+admin/requests/request-stats/request-stats.component.html b/client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.html
index 4508ab4c2..4508ab4c2 100644
--- a/client/src/app/+admin/requests/request-stats/request-stats.component.html
+++ b/client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.html
diff --git a/client/src/app/+admin/requests/request-stats/request-stats.component.scss b/client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.scss
index b2c413259..b2c413259 100644
--- a/client/src/app/+admin/requests/request-stats/request-stats.component.scss
+++ b/client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.scss
diff --git a/client/src/app/+admin/requests/request-stats/request-stats.component.ts b/client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.ts
index 140aaf47e..4e3fabc64 100644
--- a/client/src/app/+admin/requests/request-stats/request-stats.component.ts
+++ b/client/src/app/+admin/request-schedulers/request-schedulers-stats/request-schedulers-stats.component.ts
@@ -2,22 +2,22 @@ import { Component, OnInit, OnDestroy } from '@angular/core'
2 2
3import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
4 4
5import { RequestService, RequestSchedulerStatsAttributes } from '../shared' 5import { RequestSchedulersService, RequestSchedulerStatsAttributes } from '../shared'
6import { RequestScheduler } from '../../../../../../shared' 6import { RequestSchedulerStats } from '../../../../../../shared'
7 7
8@Component({ 8@Component({
9 selector: 'my-request-stats', 9 selector: 'my-request-schedulers-stats',
10 templateUrl: './request-stats.component.html', 10 templateUrl: './request-schedulers-stats.component.html',
11 styleUrls: [ './request-stats.component.scss' ] 11 styleUrls: [ './request-schedulers-stats.component.scss' ]
12}) 12})
13export class RequestStatsComponent implements OnInit, OnDestroy { 13export class RequestSchedulersStatsComponent implements OnInit, OnDestroy {
14 statsTitles = { 14 statsTitles = {
15 requestScheduler: 'Basic request scheduler', 15 requestScheduler: 'Basic request scheduler',
16 requestVideoEventScheduler: 'Video events request scheduler', 16 requestVideoEventScheduler: 'Video events request scheduler',
17 requestVideoQaduScheduler: 'Quick and dirty video updates request scheduler' 17 requestVideoQaduScheduler: 'Quick and dirty video updates request scheduler'
18 } 18 }
19 19
20 stats: RequestScheduler 20 stats: RequestSchedulerStats
21 21
22 private intervals: { [ id: string ]: number } = { 22 private intervals: { [ id: string ]: number } = {
23 requestScheduler: null, 23 requestScheduler: null,
@@ -33,7 +33,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy {
33 33
34 constructor ( 34 constructor (
35 private notificationsService: NotificationsService, 35 private notificationsService: NotificationsService,
36 private requestService: RequestService 36 private requestService: RequestSchedulersService
37 ) { } 37 ) { }
38 38
39 ngOnInit () { 39 ngOnInit () {
diff --git a/client/src/app/+admin/requests/requests.component.ts b/client/src/app/+admin/request-schedulers/request-schedulers.component.ts
index 88a90fa4e..5444d6ea5 100644
--- a/client/src/app/+admin/requests/requests.component.ts
+++ b/client/src/app/+admin/request-schedulers/request-schedulers.component.ts
@@ -3,5 +3,5 @@ import { Component } from '@angular/core'
3@Component({ 3@Component({
4 template: '<router-outlet></router-outlet>' 4 template: '<router-outlet></router-outlet>'
5}) 5})
6export class RequestsComponent { 6export class RequestSchedulersComponent {
7} 7}
diff --git a/client/src/app/+admin/requests/requests.routes.ts b/client/src/app/+admin/request-schedulers/request-schedulers.routes.ts
index 84db3fea8..4961c646b 100644
--- a/client/src/app/+admin/requests/requests.routes.ts
+++ b/client/src/app/+admin/request-schedulers/request-schedulers.routes.ts
@@ -1,12 +1,12 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2 2
3import { RequestsComponent } from './requests.component' 3import { RequestSchedulersComponent } from './request-schedulers.component'
4import { RequestStatsComponent } from './request-stats' 4import { RequestSchedulersStatsComponent } from './request-schedulers-stats'
5 5
6export const RequestsRoutes: Routes = [ 6export const RequestSchedulersRoutes: Routes = [
7 { 7 {
8 path: 'requests', 8 path: 'requests',
9 component: RequestsComponent, 9 component: RequestSchedulersComponent,
10 children: [ 10 children: [
11 { 11 {
12 path: '', 12 path: '',
@@ -15,7 +15,7 @@ export const RequestsRoutes: Routes = [
15 }, 15 },
16 { 16 {
17 path: 'stats', 17 path: 'stats',
18 component: RequestStatsComponent, 18 component: RequestSchedulersStatsComponent,
19 data: { 19 data: {
20 meta: { 20 meta: {
21 title: 'Request stats' 21 title: 'Request stats'
diff --git a/client/src/app/+admin/request-schedulers/shared/index.ts b/client/src/app/+admin/request-schedulers/shared/index.ts
new file mode 100644
index 000000000..1a0174409
--- /dev/null
+++ b/client/src/app/+admin/request-schedulers/shared/index.ts
@@ -0,0 +1,2 @@
1export * from './request-schedulers-stats-attributes.model'
2export * from './request-schedulers.service'
diff --git a/client/src/app/+admin/requests/shared/request-stats-attributes.model.ts b/client/src/app/+admin/request-schedulers/shared/request-schedulers-stats-attributes.model.ts
index 394acc73d..6e19a0e44 100644
--- a/client/src/app/+admin/requests/shared/request-stats-attributes.model.ts
+++ b/client/src/app/+admin/request-schedulers/shared/request-schedulers-stats-attributes.model.ts
@@ -1,11 +1,11 @@
1import { RequestSchedulerAttributes as FormatedRequestSchedulerAttributes } from '../../../../../../shared' 1import { RequestSchedulerStatsAttributes as FormatedRequestSchedulerStatsAttributes } from '../../../../../../shared'
2 2
3export interface Request { 3export interface Request {
4 request: any 4 request: any
5 to: any 5 to: any
6} 6}
7 7
8export class RequestSchedulerStatsAttributes implements FormatedRequestSchedulerAttributes { 8export class RequestSchedulerStatsAttributes implements FormatedRequestSchedulerStatsAttributes {
9 requestsLimitPods: number 9 requestsLimitPods: number
10 requestsLimitPerPod: number 10 requestsLimitPerPod: number
11 milliSecondsInterval: number 11 milliSecondsInterval: number
diff --git a/client/src/app/+admin/requests/shared/request.service.ts b/client/src/app/+admin/request-schedulers/shared/request-schedulers.service.ts
index 53682b111..e9b166f78 100644
--- a/client/src/app/+admin/requests/shared/request.service.ts
+++ b/client/src/app/+admin/request-schedulers/shared/request-schedulers.service.ts
@@ -3,27 +3,27 @@ import { Observable } from 'rxjs/Observable'
3import 'rxjs/add/operator/catch' 3import 'rxjs/add/operator/catch'
4import 'rxjs/add/operator/map' 4import 'rxjs/add/operator/map'
5 5
6import { RequestScheduler } from '../../../../../../shared' 6import { RequestSchedulerStats } from '../../../../../../shared'
7import { AuthHttp, RestExtractor } from '../../../shared' 7import { AuthHttp, RestExtractor } from '../../../shared'
8import { RequestSchedulerStatsAttributes } from './request-stats-attributes.model' 8import { RequestSchedulerStatsAttributes } from './request-schedulers-stats-attributes.model'
9 9
10@Injectable() 10@Injectable()
11export class RequestService { 11export class RequestSchedulersService {
12 private static BASE_REQUEST_URL = API_URL + '/api/v1/requests/' 12 private static BASE_REQUEST_URL = API_URL + '/api/v1/request-schedulers/'
13 13
14 constructor ( 14 constructor (
15 private authHttp: AuthHttp, 15 private authHttp: AuthHttp,
16 private restExtractor: RestExtractor 16 private restExtractor: RestExtractor
17 ) {} 17 ) {}
18 18
19 getStats (): Observable<RequestScheduler> { 19 getStats (): Observable<RequestSchedulerStats> {
20 return this.authHttp.get(RequestService.BASE_REQUEST_URL + 'stats') 20 return this.authHttp.get(RequestSchedulersService.BASE_REQUEST_URL + 'stats')
21 .map(this.restExtractor.extractDataGet) 21 .map(this.restExtractor.extractDataGet)
22 .map(this.buildRequestObjects) 22 .map(this.buildRequestObjects)
23 .catch((res) => this.restExtractor.handleError(res)) 23 .catch((res) => this.restExtractor.handleError(res))
24 } 24 }
25 25
26 private buildRequestObjects (data: RequestScheduler) { 26 private buildRequestObjects (data: RequestSchedulerStats) {
27 const requestSchedulers = {} 27 const requestSchedulers = {}
28 28
29 Object.keys(data).forEach(requestSchedulerName => { 29 Object.keys(data).forEach(requestSchedulerName => {
diff --git a/client/src/app/+admin/requests/index.ts b/client/src/app/+admin/requests/index.ts
deleted file mode 100644
index d96a893c3..000000000
--- a/client/src/app/+admin/requests/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
1export * from './request-stats'
2export * from './shared'
3export * from './requests.component'
4export * from './requests.routes'
diff --git a/client/src/app/+admin/requests/request-stats/index.ts b/client/src/app/+admin/requests/request-stats/index.ts
deleted file mode 100644
index 740c401bb..000000000
--- a/client/src/app/+admin/requests/request-stats/index.ts
+++ /dev/null
@@ -1 +0,0 @@
1export * from './request-stats.component'
diff --git a/client/src/app/+admin/requests/shared/index.ts b/client/src/app/+admin/requests/shared/index.ts
deleted file mode 100644
index 857fe9d29..000000000
--- a/client/src/app/+admin/requests/shared/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
1export * from './request-stats-attributes.model'
2export * from './request.service'