vars: update displaying

Change some columns sizes
Show also tags/refs
This commit is contained in:
Simone Gotti 2019-07-09 13:29:03 +02:00
parent 42f7ce7eaa
commit 239f7ee516
1 changed files with 24 additions and 22 deletions

View File

@ -1,12 +1,12 @@
<template> <template>
<div> <div>
<div class="my-3 flex font-bold"> <div class="my-3 flex font-bold">
<div class="w-1/3">Name</div> <div class="w-2/12">Name</div>
<div class="w-2/3"> <div class="w-10/12">
<div class="flex"> <div class="flex">
<div class="w-1/3">Secret Name</div> <div class="w-2/12">Secret Name</div>
<div class="w-1/3">Secret Value</div> <div class="w-2/12">Secret Value</div>
<div class="w-1/3"> <div class="w-8/12">
<div class="flex"> <div class="flex">
<div class="w-1/3 mr-2">Conditions</div> <div class="w-1/3 mr-2">Conditions</div>
<div class="w-1/3 mr-2">Include</div> <div class="w-1/3 mr-2">Include</div>
@ -17,13 +17,13 @@
</div> </div>
</div> </div>
<div class="flex" v-for="variable in variables" v-bind:key="variable.id"> <div class="flex" v-for="variable in variables" v-bind:key="variable.id">
<div class="w-1/3"> <div class="w-2/12">
<span class="name">{{variable.name}}</span> <span class="name">{{variable.name}}</span>
<div v-if="showparentpath" class="text-sm font-light">from {{variable.parent_path}}</div> <div v-if="showparentpath" class="text-sm font-light">from {{variable.parent_path}}</div>
</div> </div>
<div class="w-2/3"> <div class="w-10/12">
<div class="flex" v-for="val in variable.values" v-bind:key="val.id"> <div class="flex" v-for="val in variable.values" v-bind:key="val.id">
<div class="w-1/3"> <div class="w-2/12">
<span>{{val.secret_name}}</span> <span>{{val.secret_name}}</span>
<div <div
v-if="val.matching_secret_parent_path" v-if="val.matching_secret_parent_path"
@ -31,24 +31,26 @@
>using secret from {{val.matching_secret_parent_path}}</div> >using secret from {{val.matching_secret_parent_path}}</div>
<div v-else class="text-sm text-red-600">no matching secret</div> <div v-else class="text-sm text-red-600">no matching secret</div>
</div> </div>
<div class="w-1/3"> <div class="w-2/12">
<span>{{val.secret_var}}</span> <span>{{val.secret_var}}</span>
</div> </div>
<div class="w-1/3"> <div class="w-8/12">
<div v-if="val.when"> <div v-if="val.when">
<div v-if="val.when.branch"> <div v-for="type in ['branch', 'tag', 'ref']" v-bind:key="type">
<div class="flex"> <div v-if="val.when[type]">
<div class="w-1/3"> <div class="flex">
<span>branch</span> <div class="w-1/3">
</div> <span>{{ type }}</span>
<div class="w-1/3">
<div v-for="include in val.when.branch.include" v-bind:key="include.match">
<span>{{include.match}}</span>
</div> </div>
</div> <div class="w-1/3">
<div class="w-1/3"> <div v-for="include in val.when[type].include" v-bind:key="include.match">
<div v-for="exclude in val.when.branch.exclude" v-bind:key="exclude.match"> <div>{{include.match}}</div>
<span>{{exclude.match}}</span> </div>
</div>
<div class="w-1/3">
<div v-for="exclude in val.when[type].exclude" v-bind:key="exclude.match">
<div>{{exclude.match}}</div>
</div>
</div> </div>
</div> </div>
</div> </div>