diff --git a/packages/backend/src/studio-api-impl.ts b/packages/backend/src/studio-api-impl.ts index 4b1ac3f5d..813e55fc9 100644 --- a/packages/backend/src/studio-api-impl.ts +++ b/packages/backend/src/studio-api-impl.ts @@ -7,6 +7,9 @@ import { Task } from '@shared/models/ITask'; export const RECENT_CATEGORY_ID = 'recent-category'; export class StudioApiImpl implements StudioAPI { + + private status: Map = new Map(); + async getPullingStatus(recipeId: string): Promise { return []; } @@ -38,4 +41,11 @@ export class StudioApiImpl implements StudioAPI { async searchRecipes(query: string): Promise { return []; // todo: not implemented } + + async pullApplication(recipeId: string): Promise { + const recipe: Recipe = await this.getRecipeById(recipeId); + + //todo: stuff here + return Promise.resolve(undefined); + } } diff --git a/packages/frontend/src/pages/Recipe.svelte b/packages/frontend/src/pages/Recipe.svelte index 69fe230c4..29e8b78f9 100644 --- a/packages/frontend/src/pages/Recipe.svelte +++ b/packages/frontend/src/pages/Recipe.svelte @@ -28,12 +28,7 @@ onMount(async () => { }) const onPullingRequest = () => { - pulling = [ - {state: 'success', name: 'Pulling image:latest'}, - {state: 'error', name: 'Pulling database:latest'}, - {state: 'loading', name: 'Pulling redis:latest'}, - {state: 'loading', name: 'Downloading model:latest'}, - ] + studioClient.pullApplication(recipeId); } diff --git a/packages/shared/StudioAPI.ts b/packages/shared/StudioAPI.ts index c964030db..42e96916e 100644 --- a/packages/shared/StudioAPI.ts +++ b/packages/shared/StudioAPI.ts @@ -10,5 +10,6 @@ export abstract class StudioAPI { abstract getRecipeById(recipeId: string): Promise; abstract searchRecipes(query: string): Promise; abstract getPullingStatus(recipeId: string): Promise + abstract pullApplication(recipeId: string): Promise; }