Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: page bug #432

Merged
merged 5 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cypress/e2e/schedulers/scheduler.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('Scheduler', () => {
cy.get('#port').should('contain', '-');

// Show Start.
cy.get(':nth-child(5) > .show_headerText__DJulT').should('contain', '-');
cy.get('#status').should('contain', '-');

// Show Features.
cy.get('#features').should('contain', '-');
Expand Down Expand Up @@ -256,7 +256,7 @@ describe('Scheduler', () => {
cy.get('#port').should('contain', '-');

// Show Start.
cy.get(':nth-child(5) > .show_headerText__DJulT').should('contain', '-');
cy.get('#status').should('contain', '-');

// Show Features.
cy.get('#features').should('contain', '-');
Expand Down
1 change: 0 additions & 1 deletion public/icons/cluster/page-loading.svg

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
1 change: 0 additions & 1 deletion public/icons/peer/commit.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/icons/peer/versions.svg

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/clusters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default function Clusters() {
</Box>
</Grid>
</Box>
<Box component="img" src="/icons/peer/statistics.svg" />
<Box component="img" src="/icons/cluster/peer/statistics.svg" />
</Box>
</Box>
</Card>
Expand Down Expand Up @@ -326,7 +326,7 @@ export default function Clusters() {
</Box>
</Grid>
</Box>
<Box component="img" src="/icons/peer/statistics.svg" />
<Box component="img" src="/icons/cluster/peer/statistics.svg" />
</Box>
</Box>
</Card>
Expand Down Expand Up @@ -366,7 +366,7 @@ export default function Clusters() {
</Box>
</Grid>
</Box>
<Box component="img" src="/icons/peer/statistics.svg" />
<Box component="img" src="/icons/cluster/peer/statistics.svg" />
</Box>
</Box>
</Card>
Expand Down
70 changes: 0 additions & 70 deletions src/components/clusters/information.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,56 +49,14 @@
font-family: 'mabry-bold' !important;
}

/* .informationWrapper:nth-child(5) {
display: flex;
align-items: center;
width: 66.66%;
padding: 1rem;
} */

.informationLable {
color: #80828b;
/* font-family: 'mabry-bold' !important; */
margin-right: 0.3rem !important;
}

.informationIcon {
width: 1.2rem;
height: 1.2rem;
margin-right: 0.5rem;
}

.informationTitel {
display: flex;
align-items: center;
width: 80%;
}

.informationDescriptionTitel {
display: flex;
align-items: center;
width: 40% !important;
}

.divider {
margin: 1.5rem 0px;
flex-shrink: 0;
border-width: 0px 0px thin;
border-color: var(--palette-divider);
border-style: dashed;
}

.clusterContainer {
display: flex;
justify-content: space-between;
flex-wrap: wrap;

/* background-color: #f7f7f8 !important; */
}

.clusterWrap {
display: flex;
/* align-items: center; */
width: 25%;
flex-direction: column;
}
Expand Down Expand Up @@ -155,13 +113,6 @@
grid-template-columns: repeat(2, 1fr);
}

.locationContainer {
padding: 1.4rem;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.scopesIcon {
width: 1.6rem;
height: 1.6rem;
Expand Down Expand Up @@ -189,24 +140,11 @@
align-items: flex-end;
}

.locationContent {
width: 80%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.cidrsContainer {
padding: 1.2rem;
display: flex;
flex-direction: column;
justify-content: space-between;
/* height: 9rem; */
/* background-color: #f4f6f8 !important; */
}

.cidrsTitleWrapper {
padding-bottom: 1rem;
}

.cidrsTitle {
Expand Down Expand Up @@ -290,13 +228,6 @@
overflow: hidden;
text-overflow: ellipsis;
color: #637381;
/* font-family: 'mabry-bold' !important; */
}

.configRightContainer {
display: flex;
flex-direction: column;
margin-top: 2rem;
}

.scopesWrapper {
Expand Down Expand Up @@ -324,7 +255,6 @@
}

.configContentTitle {
/* width: 85%; */
display: flex;
align-items: center;
padding-bottom: 0.4rem;
Expand Down
9 changes: 4 additions & 5 deletions src/components/clusters/peers/inde.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
}

.descriptionIcon {
width: 1.2rem !important ;
height: 1.2rem !important;
width: 1rem !important ;
height: 1rem !important;
color: rgb(188, 188, 188);
}

Expand Down Expand Up @@ -145,10 +145,9 @@
}

.divider {
flex-shrink: 0;
border-width: 0px 0px thin;
border-color: var(--palette-divider);
border-style: dashed;
border-color: var(--palette-divider) !important;
border-style: dashed !important;
}

.visualizationWrapper {
Expand Down
34 changes: 17 additions & 17 deletions src/components/clusters/peers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ export default function Peer() {
try {
setIsLoading(true);

if (cluster.seed_peer_cluster_id) {
if (cluster.scheduler_cluster_id) {
const peer = await getPeers({
page: 1,
per_page: MAX_PAGE_SIZE,
scheduler_cluster_id: cluster.seed_peer_cluster_id,
scheduler_cluster_id: cluster.scheduler_cluster_id,
});

setPeer(peer);
Expand All @@ -122,7 +122,7 @@ export default function Peer() {
}
}
})();
}, [cluster.seed_peer_cluster_id]);
}, [cluster.scheduler_cluster_id]);

useEffect(() => {
const gitVersionCount = new Set(peer.map((item) => item.git_version)).size;
Expand Down Expand Up @@ -414,7 +414,7 @@ export default function Peer() {

const params = {
type: 'sync_peers',
scheduler_cluster_ids: [cluster.seed_peer_cluster_id],
scheduler_cluster_ids: [cluster.scheduler_cluster_id],
};

try {
Expand All @@ -423,7 +423,7 @@ export default function Peer() {
const peer = await getPeers({
page: 1,
per_page: MAX_PAGE_SIZE,
scheduler_cluster_id: cluster.seed_peer_cluster_id,
scheduler_cluster_id: cluster.scheduler_cluster_id,
});
setPeer(peer);

Expand Down Expand Up @@ -497,9 +497,9 @@ export default function Peer() {
}}
startIcon={
refresh ? (
<Box component="img" sx={{ width: '1.2rem' }} src="/icons/peer/refresh-loading.svg" />
<Box component="img" sx={{ width: '1.2rem' }} src="/icons/cluster/peer/refresh-loading.svg" />
) : (
<Box component="img" sx={{ width: '1.2rem' }} src="/icons/peer/refresh.svg" />
<Box component="img" sx={{ width: '1.2rem' }} src="/icons/cluster/peer/refresh.svg" />
)
}
>
Expand Down Expand Up @@ -545,7 +545,7 @@ export default function Peer() {
</Typography>
</Box>
<Box className={styles.navigation}></Box>
<Box component="img" className={styles.navigationIcon} src="/icons/peer/total.svg" />
<Box component="img" className={styles.navigationIcon} src="/icons/cluster/peer/total.svg" />
</Box>
</Card>
</Box>
Expand All @@ -568,7 +568,7 @@ export default function Peer() {
</Typography>
</Box>
<Box className={styles.navigation} />
<Box component="img" className={styles.navigationIcon} src="/icons/peer/git-versions.svg" />
<Box component="img" className={styles.navigationIcon} src="/icons/cluster/peer/git-versions.svg" />
</Box>
</Card>
</Box>
Expand All @@ -591,7 +591,7 @@ export default function Peer() {
</Typography>
</Box>
<Box className={styles.navigation} />
<Box component="img" className={styles.navigationIcon} src="/icons/peer/git-commits.svg" />
<Box component="img" className={styles.navigationIcon} src="/icons/cluster/peer/git-commits.svg" />
</Box>
</Card>
</Box>
Expand Down Expand Up @@ -643,13 +643,13 @@ export default function Peer() {
<HelpOutlineOutlinedIcon className={styles.descriptionIcon} />
</MuiTooltip>
</Box>
<hr className={styles.divider} />
<Divider className={styles.divider} />
<Box className={styles.pieWrapper}>
<Pie data={gitVersionDoughnut} options={doughnutOptions} />
</Box>
</Box>
<Box className={styles.activeContainer}>
<Box component="img" className={styles.activeIcon} src="/icons/peer/active.svg" />
<Box component="img" className={styles.activeIcon} src="/icons/cluster/peer/active.svg" />
<Box sx={{ width: '100%' }}>
<Box className={styles.activeContent}>
<Typography variant="subtitle2" fontFamily="mabry-light">
Expand Down Expand Up @@ -745,13 +745,13 @@ export default function Peer() {
<HelpOutlineOutlinedIcon className={styles.descriptionIcon} />
</MuiTooltip>
</Box>
<hr className={styles.divider} />
<Divider className={styles.divider} />
<Box className={styles.pieWrapper}>
<Pie data={gitCommitDoughnut} options={doughnutOptions} />
</Box>
</Box>
<Box className={styles.activeContainer}>
<Box component="img" className={styles.activeIcon} src="/icons/peer/active.svg" />
<Box component="img" className={styles.activeIcon} src="/icons/cluster/peer/active.svg" />
<Box sx={{ width: '100%' }}>
<Box className={styles.activeContent}>
<Typography variant="subtitle2" fontFamily="mabry-light">
Expand Down Expand Up @@ -790,7 +790,7 @@ export default function Peer() {
>
<Box sx={{ display: 'flex', justifyContent: 'space-between', p: '1rem' }}>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Box component="img" className={styles.exportIcon} src="/icons/peer/export.svg" />
<Box component="img" className={styles.exportIcon} src="/icons/cluster/peer/export.svg" />
<Typography variant="h6" fontFamily="mabry-bold" pl="0.5rem">
Export
</Typography>
Expand Down Expand Up @@ -822,7 +822,7 @@ export default function Peer() {
pb: '1rem',
}}
>
<Box component="img" sx={{ width: '2.8rem', pb: '0.8rem' }} src="/icons/peer/export-file.svg" />
<Box component="img" sx={{ width: '2.8rem', pb: '0.8rem' }} src="/icons/cluster/peer/export-file.svg" />
<Typography variant="subtitle1" fontFamily="mabry-bold">
Export Your Data With Fun
</Typography>
Expand Down Expand Up @@ -912,7 +912,7 @@ export default function Peer() {
>
<Box sx={{ display: 'flex', justifyContent: 'space-between', p: '1rem' }}>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Box component="img" className={styles.exportIcon} src="/icons/peer/refresh-dialog.svg" />
<Box component="img" className={styles.exportIcon} src="/icons/cluster/peer/refresh-dialog.svg" />
<Typography variant="h6" fontFamily="mabry-bold" pl="0.5rem">
Refresh
</Typography>
Expand Down
Loading
Loading