Fleet fix various css in dashboard components

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2025-05-05 19:23:38 +02:00
parent 8717b9caf5
commit 78407de932
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
7 changed files with 49 additions and 19 deletions

View File

@ -2493,11 +2493,6 @@ fleet:
learnMoreLink: https://fleet.rancher.io
noRepo: "You don't have any Git Repositories in your Workspaces"
getStarted: Get started
thereIsMore: |-
{count, plural,
=1 { There is one other workspace with no repositories}
other { There are { count } other workspaces with no repositories}
}
workspace: Workspace
expand: Expand
collapse: Collapse
@ -2597,7 +2592,7 @@ fleet:
placeholder: e.g. https://github.com/rancher/fleet-examples.git or git@github.com:rancher/fleet-examples.git
addRepo: Add Repository
noRepos: No repositories have been added
noWorkspaces: There are no workspaces. <br/> Please create a workspace before adding repositories
noWorkspaces: There are no workspaces.
resources:
label: 'Resource Handling'
keepResources: Always keep resources

View File

@ -25,7 +25,6 @@ export default {
<div class="intro-box">
<i class="icon icon-repository" />
<div class="title">
<!-- TODO include helmOps -->
<span v-clean-html="t('fleet.gitRepo.repo.noWorkspaces', null, true)" />
</div>
<div

View File

@ -39,7 +39,6 @@ export default {
{{ t('fleet.dashboard.learnMore') }} <i class="icon icon-external-link" />
</a>
</p>
<!-- TODO -add helm Ops -->
<template v-if="permissions.gitRepos">
<h3 class="mb-30">
{{ t('fleet.dashboard.noRepo', null, true) }}

View File

@ -42,7 +42,7 @@ export default {
<template>
<div
class="panel"
class="resource-card-panel"
:class="{
['selected']: selected
}"
@ -69,13 +69,15 @@ export default {
</template>
<style lang="scss" scoped>
.panel {
.resource-card-panel {
border: 1px solid var(--modal-border);
border-radius: 10px;
padding: 10px;
margin: 10px;
&.selected {
border: 2px solid var(--primary);
margin: 9px;
}
.title {

View File

@ -75,7 +75,12 @@ export default {
</div>
<div class="mt-5 summary">
<div v-if="value.stateDescription">
<span :class="{ 'text-error' : value.stateObj.error }">{{ value.stateDescription }}</span>
<span
class="msg"
:class="{ 'text-error' : value.stateObj.error }"
>
{{ value.stateDescription }}
</span>
</div>
<div
v-else
@ -102,6 +107,7 @@ export default {
<style lang="scss" scoped>
.summary-panel {
max-width: 300px;
.details {
display: flex;
align-items: center;
@ -115,6 +121,10 @@ export default {
.summary {
margin-top: 5px;
.msg {
overflow-wrap: break-word;
}
.description {
display: flex;
align-items: center;

View File

@ -42,6 +42,14 @@ export default {
value: cluster.id
}));
},
noResources() {
return !this.value.resourcesStatuses?.length;
},
showClusterSelector() {
return this.workspace.id !== 'fleet-local' && !this.noResources;
}
},
methods: {
@ -53,7 +61,7 @@ export default {
</script>
<template>
<div class="panel">
<div class="details-panel">
<div class="header">
<div class="title">
<i :class="value.dashboardIcon" />
@ -77,12 +85,16 @@ export default {
@click="closePanel"
/>
</div>
<h3>
{{ t('fleet.dashboard.resources') }}
</h3>
<FleetResources
:rows=value.resourcesStatuses
:cluster-id="cluster"
:search="!noResources"
>
<template
v-if="workspace.id !== 'fleet-local'"
v-if="showClusterSelector"
#header-left
>
<div class="row">
@ -101,18 +113,19 @@ export default {
</template>
<style lang="scss">
.panel {
.details-panel {
padding: 10px;
.header {
display: flex;
align-items: center;
padding: 4px 0;
margin-bottom: 10px;
padding: 0;
margin: 0 0 20px 0;
.title {
display: flex;
align-items: center;
flex: 1;
margin: 10px 0;
font-style: normal;
font-weight: 400;
font-size: 18px;

View File

@ -414,7 +414,10 @@ export default {
</div>
</div>
<div class="card-panel-main-actions">
<div class="expand-button">
<div
v-if="workspace.repos.length || workspace.helmOps.length"
class="expand-button"
>
<i
:class="{
['icon icon-lg icon-chevron-right']: isWorkspaceCollapsed[workspace.id],
@ -553,17 +556,23 @@ export default {
border-radius: 10px;
background-color: var(--body-bg);
min-width: 550px;
padding-left: 15px;
padding-right: 15px;
.card-panel-main {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: auto;
margin-bottom: auto;
.card-panel-main-details {
display: flex;
align-items: center;
.title {
margin: 0;
.label {
display: flex;
align-items: center;
@ -592,6 +601,10 @@ export default {
.title {
display: flex;
}
.body {
margin-top: 10px;
}
}
}
@ -674,7 +687,6 @@ export default {
flex-wrap: wrap;
.resource-card {
margin: 10px;
cursor: pointer;
}
}