Skip to content

Commit

Permalink
feat(ui): terraform backend mock
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Dec 8, 2024
1 parent f85c75e commit 0cb1d52
Showing 1 changed file with 13 additions and 96 deletions.
109 changes: 13 additions & 96 deletions web/src/views/project/template/TemplateTerraformState.vue
Original file line number Diff line number Diff line change
@@ -1,99 +1,19 @@
<template>
<v-container fluid class="pb-0">
<v-alert
text
type="info"
class="mb-0 ml-4 mr-4 mb-2"
v-if="template.description"
>{{ template.description }}
</v-alert>

<v-row>
<v-col>
<v-list subheader>
<v-list-item>
<v-list-item-icon>
<v-icon>mdi-book-play</v-icon>
</v-list-item-icon>

<v-list-item-content>
<v-list-item-title>{{ $t('playbook') }}</v-list-item-title>
<v-list-item-subtitle>{{ template.playbook }}</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>
</v-col>
<v-col>
<v-list subheader>
<v-list-item>
<v-list-item-icon>
<v-icon>{{ TEMPLATE_TYPE_ICONS[template.type] }}</v-icon>
</v-list-item-icon>

<v-list-item-content>
<v-list-item-title>{{ $t('type') }}</v-list-item-title>
<v-list-item-subtitle>{{ $t(TEMPLATE_TYPE_TITLES[template.type]) }}
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>
</v-col>
<v-col>
<v-list subheader>
<v-list-item>
<v-list-item-icon>
<v-icon>mdi-monitor</v-icon>
</v-list-item-icon>

<v-list-item-content>
<v-list-item-title>{{ $t('inventory') }}</v-list-item-title>
<v-list-item-subtitle>
{{ (inventory.find((x) => x.id === template.inventory_id) || {name: '—'}).name }}
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>
</v-col>
<v-col>
<v-list subheader>
<v-list-item>
<v-list-item-icon>
<v-icon>mdi-code-braces</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>{{ $t('environment') }}</v-list-item-title>
<v-list-item-subtitle>
{{ environment.find((x) => x.id === template.environment_id).name }}
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>
</v-col>
<v-col>
<v-list subheader>
<v-list-item>
<v-list-item-icon>
<v-icon>mdi-git</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>{{ $t('repository2') }}</v-list-item-title>
<v-list-item-subtitle>
{{ repositories.find((x) => x.id === template.repository_id).name }}
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>
</v-col>
</v-row>
</v-container>

<v-alert
type="info"
text
color="hsl(348deg, 86%, 61%)"
style="border-radius: 0;"
>
Terraform/OpenTofu HTTP backend available only in <b>PRO</b> version.
<v-btn
class="ml-2"
color="hsl(348deg, 86%, 61%)"
href="https://semaphoreui.com/pro"
>Upgrade</v-btn>
</v-alert>
</template>
<script>
import {
TEMPLATE_TYPE_ACTION_TITLES,
TEMPLATE_TYPE_ICONS,
TEMPLATE_TYPE_TITLES,
} from '@/lib/constants';
export default {
props: {
Expand All @@ -104,9 +24,6 @@ export default {
},
data() {
return {
TEMPLATE_TYPE_ICONS,
TEMPLATE_TYPE_TITLES,
TEMPLATE_TYPE_ACTION_TITLES,
};
},
};
Expand Down

0 comments on commit 0cb1d52

Please sign in to comment.