From 5cd80545422bba855cc9a730a2e13cc9d982c34b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Nov 2017 10:51:13 +0100 Subject: Add ability to list jobs --- shared/models/job.model.ts | 10 ++++++++++ shared/models/users/user-right.enum.ts | 1 + shared/models/users/user-role.ts | 1 + 3 files changed, 12 insertions(+) (limited to 'shared') diff --git a/shared/models/job.model.ts b/shared/models/job.model.ts index 10696e3f8..1c46a7900 100644 --- a/shared/models/job.model.ts +++ b/shared/models/job.model.ts @@ -1,2 +1,12 @@ export type JobState = 'pending' | 'processing' | 'error' | 'success' export type JobCategory = 'transcoding' | 'activitypub-http' + +export interface Job { + id: number + state: JobState + category: JobCategory + handlerName: string + handlerInputData: any + createdAt: Date + updatedAt: Date +} diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 9460b668e..238e38a36 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts @@ -4,6 +4,7 @@ export enum UserRight { MANAGE_SERVER_FOLLOW, MANAGE_VIDEO_ABUSES, MANAGE_VIDEO_BLACKLIST, + MANAGE_JOBS, REMOVE_ANY_VIDEO, REMOVE_ANY_VIDEO_CHANNEL } diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index cc32c768d..954fa426e 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -1,4 +1,5 @@ import { UserRight } from './user-right.enum' +import user from '../../../server/models/account/user' // Keep the order export enum UserRole { -- cgit v1.2.3