Skip to content

Commit

Permalink
Added access restrictions to issue template (gardener#1422)
Browse files Browse the repository at this point in the history
* Fixed access restrictions chips layout

* added access restrictions to ticket template

* Updated issue template access restriction variable description
  • Loading branch information
grolu authored Feb 23, 2023
1 parent ec6b0f3 commit 4df6a87
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
16 changes: 15 additions & 1 deletion charts/gardener-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,27 @@ global:
# # - `${projectName}`: name of the project
# # - `${utcDateTimeNow}`: current date-time in utc format
# # - `${seedName}`: shoot's seed name
# # - `${accessRestrictions}`: list with shoot's selected access restrictions
# # accessRestrictions[].title: access restriction title
# # accessRestrictions[].description: access restriction description
# # accessRestrictions[].key: unique identifier
# # accessRestrictions[].options: list with selected options for the access restriction
# # accessRestrictions[].options[].title: option title
# # accessRestrictions[].options[].description: option description
# # accessRestrictions[].options[].key: unique identifier
# issueDescriptionTemplate: |
# ## Which cluster is affected?

# `Cluster Details Dashboard Link`: [${projectName}/${shootName}](${shootUrl})
# `Operating System`: ${machineImageNames}
# `Platform`: ${providerType}

# <% if(accessRestrictions.length) { %>
# ## Attention: This cluster has access restrictions
# <% accessRestrictions.forEach(accessRestriction => { %>
# - <%- accessRestriction.title %><% accessRestriction.options.forEach(option => { %>
# - <%- option.title %><% }) }) %>
# <%
# }%>
# ## What happened?

# ## What you expected to happen?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: Apache-2.0

<template>
<div>
<v-row v-for="{ key, title, description, options } in selectedAccessRestrictions" :key="key" class="mx-0 mb-1">
<div v-for="{ key, title, description, options } in selectedAccessRestrictions" :key="key" class="d-flex">
<v-tooltip
top
:disabled="!description"
Expand All @@ -18,7 +18,7 @@ SPDX-License-Identifier: Apache-2.0
small
outlined
color="primary"
class="mr-2 mb-1"
class="mr-2 my-0"
>{{title}}</v-chip>
</template>
<section v-html="transformHtml(description)"/>
Expand All @@ -41,7 +41,7 @@ SPDX-License-Identifier: Apache-2.0
</template>
<section v-html="transformHtml(description)"/>
</v-tooltip>
</v-row>
</div>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ShootDetails/ShootDetailsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ SPDX-License-Identifier: Apache-2.0
</v-list-item-icon>
<v-list-item-content>
<v-list-item-subtitle>Access Restrictions</v-list-item-subtitle>
<v-list-item-title v-if="shootSelectedAccessRestrictions.length" class="d-flex align-center pt-1 flex-wrap">
<v-list-item-title v-if="shootSelectedAccessRestrictions.length" class="d-flex flex-wrap align-center pt-1">
<access-restriction-chips :selected-access-restrictions="shootSelectedAccessRestrictions"></access-restriction-chips>
</v-list-item-title>
<v-list-item-title v-else class="d-flex align-center pt-1">
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/TicketsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export default {
machineImageNames: this.shootMachineImageNames,
projectName: this.shootProjectName,
utcDateTimeNow: moment().utc().format(),
seedName: this.shootSeedName
seedName: this.shootSeedName,
accessRestrictions: this.shootSelectedAccessRestrictions
})
},
shootUrl () {
Expand Down

0 comments on commit 4df6a87

Please sign in to comment.