From 1ce862765f4fdbad8420ec29eab1b69008451ed1 Mon Sep 17 00:00:00 2001 From: "andy.lee" Date: Tue, 4 Jun 2024 17:23:30 +0800 Subject: [PATCH] make worload/pod modal context to 100% width Signed-off-by: andy.lee --- src/assets/styles/antd-customize/generic.less | 8 +++++++- src/components/Layout/Menu.js | 2 +- src/routes/systemBackups/systemBackupsList.js | 3 +-- src/routes/systemBackups/systemRestoresList.js | 4 ++-- src/routes/volume/VolumeList.js | 1 - src/routes/volume/WorkloadDetailModal.js | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/assets/styles/antd-customize/generic.less b/src/assets/styles/antd-customize/generic.less index 075e6659f..618809a38 100644 --- a/src/assets/styles/antd-customize/generic.less +++ b/src/assets/styles/antd-customize/generic.less @@ -125,7 +125,7 @@ &:hover, &:focus { border: 1px solid #e5e5e5;; outline: 0; - box-shadow: none; + box-shadow: none; } } .ant-radio-inner { @@ -140,6 +140,12 @@ color: white !important; } + .ant-table-empty{ + .ant-table-fixed-right { + height: 56.55px; + } + } + // Use ant footer css replace table empty text .cron-job-modal { .ant-table-footer { diff --git a/src/components/Layout/Menu.js b/src/components/Layout/Menu.js index 05a704f56..053fd7a1a 100755 --- a/src/components/Layout/Menu.js +++ b/src/components/Layout/Menu.js @@ -18,7 +18,7 @@ const getMenus = function (menuArray, siderFold) { {item.icon ? : ''} {siderFold && topMenus.indexOf(item.key) >= 0 ? '' : item.name} - + }> {getMenus(item.child, false)} diff --git a/src/routes/systemBackups/systemBackupsList.js b/src/routes/systemBackups/systemBackupsList.js index 819689669..a326f63b3 100644 --- a/src/routes/systemBackups/systemBackupsList.js +++ b/src/routes/systemBackups/systemBackupsList.js @@ -103,7 +103,6 @@ function list({ loading, dataSource, height, rowSelection, deleteSystemBackup, c columnWidth += ele.width }) - const scroll = dataSource.length > 0 ? { x: columnWidth, y: height } : { x: columnWidth } return ( record.name} loading={loading} height={`${dataSource.length > 0 ? height : 1}px`} - scroll={scroll} + scroll={{ x: columnWidth, y: dataSource.length > 0 ? height : 1 }} pagination={pagination('systemBackupSize')} simple /> diff --git a/src/routes/systemBackups/systemRestoresList.js b/src/routes/systemBackups/systemRestoresList.js index c0d82e296..bce1a9a92 100644 --- a/src/routes/systemBackups/systemRestoresList.js +++ b/src/routes/systemBackups/systemRestoresList.js @@ -101,7 +101,7 @@ function list({ loading, dataSource, height, rowSelection, deleteSystemRestore } columns.forEach((ele) => { columnWidth += ele.width }) - const scroll = dataSource.length > 0 ? { x: columnWidth, y: height } : { x: columnWidth } + // const scroll = dataSource.length > 0 ? { x: columnWidth, y: height } : { x: columnWidth } return (
record.name} loading={loading} height={`${dataSource.length > 0 ? height : 1}px`} - scroll={scroll} + scroll={{ x: columnWidth, y: dataSource.length > 0 ? height : 1 }} pagination={pagination('SystemRestoreSize')} simple /> diff --git a/src/routes/volume/VolumeList.js b/src/routes/volume/VolumeList.js index 9ac46726a..8e6a304b6 100755 --- a/src/routes/volume/VolumeList.js +++ b/src/routes/volume/VolumeList.js @@ -172,7 +172,6 @@ function list({ }) let statusForWorkloadMessage = `Not ready for workload. ${record.robustness === 'faulted' ? 'Volume Faulted' : 'Volume may be under maintenance or in the restore process.'} ` let statusForWorkload = - console.log('🚀 ~ statusForWorkloadMessage:', statusForWorkloadMessage) let stateText = (() => { if (text.hyphenToHump() === 'attached' && record.robustness === 'healthy') { return (
{ return ( -
+
{item.snapshotCreated ?
Created Time : {formatDate(item.snapshotCreated)}
: ''}
{item.lastPodRefAt ?
Last time used by Pod : {formatDate(item.lastPodRefAt)}
: ''}
{item.lastPodRefAt ? 'Last ' : ''}Workload Name : {ele.workloadName}
@@ -36,7 +36,7 @@ const modal = ({ return (
-
+
{CardItem}