diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-14 17:56:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-14 18:01:23 +0200 |
commit | a76138ff56ad3ad2df926f59578a06b22fb1f93c (patch) | |
tree | 2b97808cbb492af2356beb26d02749223abc6154 /client/src/app | |
parent | 614d1ae928ec307b708c4a3eb423797353b1df2a (diff) | |
download | PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.tar.gz PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.tar.zst PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.zip |
Add quota used in users list
Diffstat (limited to 'client/src/app')
3 files changed, 8 insertions, 6 deletions
diff --git a/client/src/app/+admin/users/shared/user.service.ts b/client/src/app/+admin/users/shared/user.service.ts index ad7fb1eee..a0e2f666d 100644 --- a/client/src/app/+admin/users/shared/user.service.ts +++ b/client/src/app/+admin/users/shared/user.service.ts | |||
@@ -4,9 +4,9 @@ import { Injectable } from '@angular/core' | |||
4 | import { BytesPipe } from 'ngx-pipes' | 4 | import { BytesPipe } from 'ngx-pipes' |
5 | import { SortMeta } from 'primeng/components/common/sortmeta' | 5 | import { SortMeta } from 'primeng/components/common/sortmeta' |
6 | import { Observable } from 'rxjs' | 6 | import { Observable } from 'rxjs' |
7 | import { ResultList, UserCreate, UserUpdate } from '../../../../../../shared' | 7 | import { ResultList, UserCreate, UserUpdate, User } from '../../../../../../shared' |
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | import { RestExtractor, RestPagination, RestService, User } from '../../../shared' | 9 | import { RestExtractor, RestPagination, RestService } from '../../../shared' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 10 | import { I18n } from '@ngx-translate/i18n-polyfill' |
11 | 11 | ||
12 | @Injectable() | 12 | @Injectable() |
@@ -79,8 +79,11 @@ export class UserService { | |||
79 | videoQuota = this.bytesPipe.transform(user.videoQuota, 0) | 79 | videoQuota = this.bytesPipe.transform(user.videoQuota, 0) |
80 | } | 80 | } |
81 | 81 | ||
82 | const videoQuotaUsed = this.bytesPipe.transform(user.videoQuotaUsed, 0) | ||
83 | |||
82 | return Object.assign(user, { | 84 | return Object.assign(user, { |
83 | videoQuota | 85 | videoQuota, |
86 | videoQuotaUsed | ||
84 | }) | 87 | }) |
85 | } | 88 | } |
86 | } | 89 | } |
diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.html index a92fe95ef..bb1b26442 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.html +++ b/client/src/app/+admin/users/user-list/user-list.component.html | |||
@@ -36,7 +36,7 @@ | |||
36 | <span *ngIf="user.blocked" class="banned-info">(banned)</span> | 36 | <span *ngIf="user.blocked" class="banned-info">(banned)</span> |
37 | </td> | 37 | </td> |
38 | <td>{{ user.email }}</td> | 38 | <td>{{ user.email }}</td> |
39 | <td>{{ user.videoQuota }}</td> | 39 | <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td> |
40 | <td>{{ user.roleLabel }}</td> | 40 | <td>{{ user.roleLabel }}</td> |
41 | <td>{{ user.createdAt }}</td> | 41 | <td>{{ user.createdAt }}</td> |
42 | <td class="action-cell"> | 42 | <td class="action-cell"> |
diff --git a/client/src/app/shared/video-import/video-import.service.ts b/client/src/app/shared/video-import/video-import.service.ts index f63bfb2b1..fc34dbf2d 100644 --- a/client/src/app/shared/video-import/video-import.service.ts +++ b/client/src/app/shared/video-import/video-import.service.ts | |||
@@ -5,9 +5,8 @@ import { Observable } from 'rxjs' | |||
5 | import { VideoImport } from '../../../../../shared' | 5 | import { VideoImport } from '../../../../../shared' |
6 | import { environment } from '../../../environments/environment' | 6 | import { environment } from '../../../environments/environment' |
7 | import { RestExtractor, RestService } from '../rest' | 7 | import { RestExtractor, RestService } from '../rest' |
8 | import { VideoImportCreate } from '../../../../../shared/models/videos' | 8 | import { VideoImportCreate, VideoUpdate } from '../../../../../shared/models/videos' |
9 | import { objectToFormData } from '@app/shared/misc/utils' | 9 | import { objectToFormData } from '@app/shared/misc/utils' |
10 | import { VideoUpdate } from '../../../../../shared/models/videos' | ||
11 | import { ResultList } from '../../../../../shared/models/result-list.model' | 10 | import { ResultList } from '../../../../../shared/models/result-list.model' |
12 | import { UserService } from '@app/shared/users/user.service' | 11 | import { UserService } from '@app/shared/users/user.service' |
13 | import { SortMeta } from 'primeng/components/common/sortmeta' | 12 | import { SortMeta } from 'primeng/components/common/sortmeta' |