jnfrati 4 лет назад
Родитель
Сommit
49c4c4c877
1 измененных файлов с 23 добавлено и 9 удалено
  1. 23 9
      dashboard/src/main/home/cluster-dashboard/stacks/types.ts

+ 23 - 9
dashboard/src/main/home/cluster-dashboard/stacks/types.ts

@@ -20,26 +20,31 @@ export type CreateStackBody = {
   }[];
   }[];
 };
 };
 
 
-export type CreateStackResponse = {
+export type CreateStackResponse = Stack;
+
+export type GetStacksResponse = Stack[];
+
+export type Stack = {
   id: string;
   id: string;
   name: string;
   name: string;
   created_at: string;
   created_at: string;
   updated_at: string;
   updated_at: string;
 
 
-  revisions: {
-    id: number;
-    created_at: string;
-  }[];
+  revisions: StackRevision[];
 
 
-  latest_revision: {
-    id: number;
-    created_at: string;
+  latest_revision: StackRevision & {
     resources: AppResource[];
     resources: AppResource[];
-
     source_configs: SourceConfig[];
     source_configs: SourceConfig[];
   };
   };
 };
 };
 
 
+export type StackRevision = {
+  id: number;
+  created_at: string;
+  status: string; // type with enum
+  stack_id: string;
+};
+
 export type SourceConfig = {
 export type SourceConfig = {
   id: string;
   id: string;
   name: string;
   name: string;
@@ -49,6 +54,9 @@ export type SourceConfig = {
   image_repo_uri: string;
   image_repo_uri: string;
   image_tag: string;
   image_tag: string;
 
 
+  stack_id: string;
+  stack_revision_id: number;
+
   build?: {
   build?: {
     method: "pack" | "docker";
     method: "pack" | "docker";
     folder_path: string;
     folder_path: string;
@@ -67,4 +75,10 @@ export type AppResource = {
   stack_id: string;
   stack_id: string;
 
 
   stack_source_config: SourceConfig;
   stack_source_config: SourceConfig;
+  stack_revision_id: number;
+  stack_app_data: {
+    template_repo_url: string;
+    template_name: string;
+    template_version: string;
+  };
 };
 };