From 608624252466acf9f1d9ee1c1170bd4fe4d18d18 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 15 Nov 2017 11:00:25 +0100 Subject: Rename Pod -> Server --- .../followers-list/followers-list.component.ts | 10 +- .../following-add/following-add.component.html | 2 +- .../following-add/following-add.component.ts | 2 - .../following-list/following-list.component.ts | 11 +- .../app/+admin/follows/shared/follow.service.ts | 6 +- .../video-abuse-list.component.html | 2 +- .../videos/+video-watch/video-watch.component.html | 2 +- .../src/app/videos/shared/video-details.model.ts | 2 +- client/src/app/videos/shared/video.model.ts | 10 +- server/controllers/activitypub/pods.ts | 69 ----- server/controllers/activitypub/videos.ts | 278 --------------------- server/controllers/api/application/follows.ts | 127 ---------- server/controllers/api/application/index.ts | 12 - server/controllers/api/index.ts | 2 +- server/controllers/api/server/follows.ts | 127 ++++++++++ server/controllers/api/server/index.ts | 12 + server/controllers/api/videos/abuse.ts | 6 +- server/controllers/api/videos/index.ts | 6 +- server/controllers/api/videos/rate.ts | 2 +- server/controllers/client.ts | 4 +- server/controllers/static.ts | 2 +- server/helpers/activitypub.ts | 16 +- server/helpers/custom-validators/accounts.ts | 2 +- server/helpers/custom-validators/index.ts | 4 +- server/helpers/custom-validators/pods.ts | 34 --- server/helpers/custom-validators/servers.ts | 34 +++ server/helpers/custom-validators/videos.ts | 4 +- server/helpers/webfinger.ts | 6 +- server/initializers/constants.ts | 10 +- server/initializers/database.ts | 4 +- server/lib/cache/videos-preview-cache.ts | 2 +- .../video-file-optimizer-handler.ts | 4 +- .../video-file-transcoder-handler.ts | 4 +- server/lib/user.ts | 2 +- server/lib/video-channel.ts | 6 +- server/middlewares/activitypub.ts | 4 +- server/middlewares/index.ts | 2 +- server/middlewares/pods.ts | 58 ----- server/middlewares/servers.ts | 58 +++++ server/middlewares/sort.ts | 7 - server/middlewares/validators/index.ts | 2 +- server/middlewares/validators/pods.ts | 32 --- server/middlewares/validators/servers.ts | 32 +++ server/middlewares/validators/video-channels.ts | 4 +- server/middlewares/validators/videos.ts | 4 +- server/models/account/account-follow.ts | 4 +- server/models/account/account-interface.ts | 11 +- server/models/account/account.ts | 37 +-- server/models/index.ts | 2 +- server/models/pod/index.ts | 1 - server/models/pod/pod-interface.ts | 61 ----- server/models/pod/pod.ts | 248 ------------------ server/models/server/index.ts | 1 + server/models/server/server-interface.ts | 56 +++++ server/models/server/server.ts | 233 +++++++++++++++++ server/models/video/video-abuse-interface.ts | 4 +- server/models/video/video-abuse.ts | 18 +- server/models/video/video-channel-interface.ts | 2 +- server/models/video/video-channel.ts | 14 +- server/models/video/video-interface.ts | 12 +- server/models/video/video.ts | 58 ++--- shared/models/accounts/follow.model.ts | 7 + shared/models/index.ts | 2 - shared/models/pods/index.ts | 3 - shared/models/pods/pod-signature.model.ts | 4 - shared/models/pods/pod.model.ts | 6 - shared/models/pods/remote-video/index.ts | 12 - .../remote-qadu-video-request.model.ts | 10 - .../remote-video-author-create-request.model.ts | 11 - .../remote-video-author-remove-request.model.ts | 10 - .../remote-video-channel-create-request.model.ts | 15 -- .../remote-video-channel-remove-request.model.ts | 10 - .../remote-video-channel-update-request.model.ts | 15 -- .../remote-video-create-request.model.ts | 32 --- .../remote-video-event-request.model.ts | 11 - .../remote-video-remove-request.model.ts | 10 - .../remote-video-report-abuse-request.model.ts | 12 - .../remote-video/remote-video-request.model.ts | 9 - .../remote-video-update-request.model.ts | 30 --- shared/models/request-scheduler.model.ts | 19 -- shared/models/videos/video-abuse.model.ts | 2 +- shared/models/videos/video.model.ts | 2 +- 82 files changed, 716 insertions(+), 1307 deletions(-) delete mode 100644 server/controllers/activitypub/pods.ts delete mode 100644 server/controllers/activitypub/videos.ts delete mode 100644 server/controllers/api/application/follows.ts delete mode 100644 server/controllers/api/application/index.ts create mode 100644 server/controllers/api/server/follows.ts create mode 100644 server/controllers/api/server/index.ts delete mode 100644 server/helpers/custom-validators/pods.ts create mode 100644 server/helpers/custom-validators/servers.ts delete mode 100644 server/middlewares/pods.ts create mode 100644 server/middlewares/servers.ts delete mode 100644 server/middlewares/validators/pods.ts create mode 100644 server/middlewares/validators/servers.ts delete mode 100644 server/models/pod/index.ts delete mode 100644 server/models/pod/pod-interface.ts delete mode 100644 server/models/pod/pod.ts create mode 100644 server/models/server/index.ts create mode 100644 server/models/server/server-interface.ts create mode 100644 server/models/server/server.ts delete mode 100644 shared/models/pods/index.ts delete mode 100644 shared/models/pods/pod-signature.model.ts delete mode 100644 shared/models/pods/pod.model.ts delete mode 100644 shared/models/pods/remote-video/index.ts delete mode 100644 shared/models/pods/remote-video/remote-qadu-video-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-author-create-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-author-remove-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-channel-create-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-channel-remove-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-channel-update-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-create-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-event-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-remove-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-report-abuse-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-request.model.ts delete mode 100644 shared/models/pods/remote-video/remote-video-update-request.model.ts delete mode 100644 shared/models/request-scheduler.model.ts diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index 208a0c648..8dc2d9317 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts @@ -1,11 +1,9 @@ -import { Component, OnInit } from '@angular/core' +import { Component } from '@angular/core' import { NotificationsService } from 'angular2-notifications' import { SortMeta } from 'primeng/primeng' - -import { ConfirmService } from '../../../core' -import { RestTable, RestPagination } from '../../../shared' -import { Pod } from '../../../../../../shared' +import { AccountFollow } from '../../../../../../shared/models/accounts/follow.model' +import { RestPagination, RestTable } from '../../../shared' import { FollowService } from '../shared' @Component({ @@ -14,7 +12,7 @@ import { FollowService } from '../shared' styleUrls: [ './followers-list.component.scss' ] }) export class FollowersListComponent extends RestTable { - followers: Pod[] = [] + followers: AccountFollow[] = [] totalRecords = 0 rowsPerPage = 10 sort: SortMeta = { field: 'createdAt', order: 1 } diff --git a/client/src/app/+admin/follows/following-add/following-add.component.html b/client/src/app/+admin/follows/following-add/following-add.component.html index 111f6a8de..8e7dddc11 100644 --- a/client/src/app/+admin/follows/following-add/following-add.component.html +++ b/client/src/app/+admin/follows/following-add/following-add.component.html @@ -26,7 +26,7 @@
- It seems that you are not on a HTTPS pod. Your webserver need to have TLS activated in order to follow servers. + It seems that you are not on a HTTPS server. Your webserver need to have TLS activated in order to follow servers.
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.ts b/client/src/app/+admin/follows/following-add/following-add.component.ts index d95d6afa9..0ceb4c1db 100644 --- a/client/src/app/+admin/follows/following-add/following-add.component.ts +++ b/client/src/app/+admin/follows/following-add/following-add.component.ts @@ -94,8 +94,6 @@ export class FollowingAddComponent implements OnInit { this.followService.follow(notEmptyHosts).subscribe( status => { this.notificationsService.success('Success', 'Follow request(s) sent!') - // Wait requests between pods - setTimeout(() => this.router.navigate([ '/admin/friends/list' ]), 1000) }, err => this.notificationsService.error('Error', err.message) diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index 7d2c5084b..a1dff1db3 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts @@ -1,11 +1,8 @@ -import { Component, OnInit } from '@angular/core' - +import { Component } from '@angular/core' import { NotificationsService } from 'angular2-notifications' import { SortMeta } from 'primeng/primeng' - -import { ConfirmService } from '../../../core' -import { RestTable, RestPagination } from '../../../shared' -import { Pod } from '../../../../../../shared' +import { AccountFollow } from '../../../../../../shared/models/accounts/follow.model' +import { RestPagination, RestTable } from '../../../shared' import { FollowService } from '../shared' @Component({ @@ -13,7 +10,7 @@ import { FollowService } from '../shared' templateUrl: './following-list.component.html' }) export class FollowingListComponent extends RestTable { - following: Pod[] = [] + following: AccountFollow[] = [] totalRecords = 0 rowsPerPage = 10 sort: SortMeta = { field: 'createdAt', order: 1 } diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts index 622c33cea..3dc91dfca 100644 --- a/client/src/app/+admin/follows/shared/follow.service.ts +++ b/client/src/app/+admin/follows/shared/follow.service.ts @@ -7,7 +7,7 @@ import 'rxjs/add/operator/map' import { SortMeta } from 'primeng/primeng' import { RestExtractor, RestPagination, RestService } from '../../../shared' -import { Pod, ResultList } from '../../../../../../shared' +import { AccountFollow, ResultList } from '../../../../../../shared' @Injectable() export class FollowService { @@ -19,7 +19,7 @@ export class FollowService { private restExtractor: RestExtractor ) {} - getFollowing (pagination: RestPagination, sort: SortMeta): Observable> { + getFollowing (pagination: RestPagination, sort: SortMeta): Observable> { let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) @@ -28,7 +28,7 @@ export class FollowService { .catch(res => this.restExtractor.handleError(res)) } - getFollowers (pagination: RestPagination, sort: SortMeta): Observable> { + getFollowers (pagination: RestPagination, sort: SortMeta): Observable> { let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html index e73f38112..1d8bb4d38 100644 --- a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html +++ b/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html @@ -9,7 +9,7 @@ > - + diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index ee7bbec74..fd3ce2b84 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -2,7 +2,7 @@
The video load seems to be abnormally long.