File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ const dockerfilePath = ref("Dockerfile");
7373const buildContext = ref (" ." );
7474const variables = ref <Variable []>([]);
7575const detectedVariables = ref <NonNullable <Validation [" summary" ][" environment_variables" ]>>([]);
76+ const runtime = ref <{ mode: string ; status: string ; services: Array <{ name: string ; image: string ; desired: number ; running: number ; failed: number }> } | null >(null );
7677const sourceTypes = [
7778 { value: " compose" , label: " Docker Compose" },
7879 { value: " image" , label: " Imagem Docker" },
@@ -99,6 +100,7 @@ async function load() {
99100 );
100101 detectedVariables .value = application .value .source_summary ?.environment_variables || [];
101102 await loadSource ();
103+ runtime .value = await api <typeof runtime .value >(` /api/v1/applications/${route .params .applicationId }/runtime ` );
102104 } catch (err ) {
103105 error .value =
104106 err instanceof Error
@@ -377,6 +379,12 @@ onMounted(load);
377379 detectados.
378380 </p >
379381 </article >
382+ <article v-if =" sourceType === 'compose' && runtime" class =" panel full-width" >
383+ <p class =" label" >PUBLICAÇÃO</p >
384+ <h2 >{{ runtime.status === "running" ? "Aplicação em execução" : "Ainda não publicada" }}</h2 >
385+ <p class =" muted" >Modo: {{ runtime.mode === "swarm" ? "Docker Swarm" : "Docker em servidor único" }}</p >
386+ <div v-if =" runtime.services.length" class =" summary-grid compact" ><div v-for =" service in runtime.services" :key =" service.name" ><span >{{ service.name }}</span ><strong >{{ service.running }}/{{ service.desired }}</strong ><small >{{ service.image }}</small ></div ></div >
387+ </article >
380388 </section >
381389 <section v-else-if =" tab === 'source'" class =" source-editor" >
382390 <div class =" section-head" >
You can’t perform that action at this time.
0 commit comments