Skip to content

Commit

Permalink
πŸ’„ : add output description
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Aug 13, 2021
1 parent b039c89 commit 407eb1f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/client/app/pages/stacks/job/job.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<app-stack-outputs
v-if="isJobApplied"
:outputs="state.outputs || state.modules[0].outputs"
:module-outputs="stack.module.outputs"
class="mt-2"
/>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/main/client/app/pages/stacks/stack-edition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@
</div>

<div class="col-md-6">
<app-stack-outputs :outputs="state.outputs || state.modules[0].outputs" />
<app-stack-outputs
:outputs="state.outputs || state.modules[0].outputs"
:module-outputs="stack.module.outputs"
/>
</div>
</div>

Expand Down
19 changes: 18 additions & 1 deletion src/main/client/app/pages/stacks/stack-outputs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
v-for="(output, key) in outputs"
:key="key"
>
<td>{{ key }}</td>
<td>
{{ key }}
<br>
<small>{{ description(key) }}</small>
</td>
<td>{{ output.value }}</td>
</tr>
</tbody>
Expand All @@ -42,6 +46,19 @@
name: 'AppStackOutputs',
props: {
outputs: { type: Object, default: () => {} },
moduleOutputs: { type: Array, default: () => [] },
},
methods: {
description(outputName) {
const output = this.moduleOutputs.find((out) => out.name === outputName);
return output ? output.description : '';
},
},
};
</script>

<style>
small {
color: grey;
}
</style>

0 comments on commit 407eb1f

Please sign in to comment.