Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
grolu committed Jan 22, 2025
1 parent 3aec2d2 commit 0c20607
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 deletions.
7 changes: 1 addition & 6 deletions frontend/src/components/Secrets/GSecretDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SPDX-License-Identifier: Apache-2.0
</template>
</g-toolbar>
<v-card-text>
<div class="d-flex flex-row pa-3 card-content">
<div class="d-flex flex-row pa-3">
<div
ref="secretDetails"
class="d-flex flex-column flex-grow-1"
Expand Down Expand Up @@ -398,9 +398,4 @@ export default {
pointer-events: none;
}

.card-content {
overflow: scroll;
height: auto;
}

</style>
1 change: 0 additions & 1 deletion frontend/src/components/Secrets/GSecretRowDns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export default {
$highlighted-color: rgb(var(--v-theme-accent));

.secret-row {
background-color: inherit;
transition: background-color 0.5s ease;

&.highlighted {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Secrets/GSecretRowInfra.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export default {
$highlighted-color: rgb(var(--v-theme-accent));

.secret-row {
background-color: inherit;
transition: background-color 0.5s ease;

&.highlighted {
Expand Down
41 changes: 22 additions & 19 deletions frontend/src/views/GSecrets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ import {
mapActions,
} from 'pinia'
import { useUrlSearchParams } from '@vueuse/core'
import { toRef } from 'vue'

import { useCloudProfileStore } from '@/store/cloudProfile'
import { useGardenerExtensionStore } from '@/store/gardenerExtension'
Expand Down Expand Up @@ -303,6 +304,13 @@ export default {
GDataTableFooter,
},
inject: ['mergeProps'],
setup () {
const hashParams = useUrlSearchParams('hash-params')
const highlightedUid = toRef(hashParams, 'credential-uid')
return {
highlightedUid,
}
},
data () {
return {
selectedSecretBinding: {},
Expand All @@ -318,7 +326,6 @@ export default {
{ value: 10, title: '10' },
{ value: 20, title: '20' },
],
hashParams: useUrlSearchParams('hash-params'),
}
},
computed: {
Expand Down Expand Up @@ -467,29 +474,25 @@ export default {
return this.computeItem(secretBinding, relatedShootCount)
})
},
highlightedUid: {
get () {
return this.hashParams['credential-uid']
},
set (highlightedUid) {
this.hashParams['credential-uid'] = highlightedUid
},
},
},
watch: {
namespace () {
this.reset()
},
},
mounted () {
const infraIndex = findIndex(this.infrastructureSecretSortedItems, { secretBinding: { metadata: { uid: this.highlightedUid } } })
if (infraIndex !== -1) {
this.infraSecretPage = Math.floor(infraIndex / this.infraSecretItemsPerPage) + 1
}
const dnsIndex = findIndex(this.dnsSecretSortedItems, { secretBinding: { metadata: { uid: this.highlightedUid } } })
if (dnsIndex !== -1) {
this.dnsSecretPage = Math.floor(dnsIndex / this.dnsSecretItemsPerPage) + 1
}
highlightedUid: {
immediate: true,
handler (value) {
const infraIndex = findIndex(this.infrastructureSecretSortedItems, ['secretBinding.metadata.uid', value])
if (infraIndex !== -1) {
this.infraSecretPage = Math.floor(infraIndex / this.infraSecretItemsPerPage) + 1
}

const dnsIndex = findIndex(this.dnsSecretSortedItems, ['secretBinding.metadata.uid', value])
if (dnsIndex !== -1) {
this.dnsSecretPage = Math.floor(dnsIndex / this.dnsSecretItemsPerPage) + 1
}
},
},
},
methods: {
...mapActions(useCredentialStore, [
Expand Down

0 comments on commit 0c20607

Please sign in to comment.