@plutonhq/core-frontend 0.1.31 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.js +33 -33
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.js.map +1 -1
- package/dist-lib/components/Plan/BackupEvents/BackupEvents.module.scss.js +36 -36
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.d.ts.map +1 -1
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.js +36 -27
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.js.map +1 -1
- package/dist-lib/components/Plan/BackupProgress/BackupProgress.module.scss.js +32 -32
- package/dist-lib/components/Plan/Backups/Backups.d.ts.map +1 -1
- package/dist-lib/components/Plan/Backups/Backups.js +148 -144
- package/dist-lib/components/Plan/Backups/Backups.js.map +1 -1
- package/dist-lib/components/Plan/Backups/Backups.module.scss.js +34 -32
- package/dist-lib/components/Plan/Backups/Backups.module.scss.js.map +1 -1
- package/dist-lib/styles/core-frontend.css +1 -1
- package/dist-lib/styles/global.scss +4 -0
- package/package.json +1 -1
- package/src/components/Plan/BackupEvents/BackupEvents.module.scss +2 -0
- package/src/components/Plan/BackupEvents/BackupEvents.tsx +2 -2
- package/src/components/Plan/BackupProgress/BackupProgress.module.scss +1 -0
- package/src/components/Plan/BackupProgress/BackupProgress.tsx +6 -1
- package/src/components/Plan/Backups/Backups.module.scss +16 -0
- package/src/components/Plan/Backups/Backups.tsx +13 -2
- package/src/styles/global.scss +4 -0
package/package.json
CHANGED
|
@@ -154,8 +154,8 @@ const BackupEvents = ({ id, type = 'backup', sourceId, sourceType, planId, inPro
|
|
|
154
154
|
)}
|
|
155
155
|
</div>
|
|
156
156
|
{showError && (
|
|
157
|
-
<Modal title="Error Details" closeModal={() => setShowError(false)} width=
|
|
158
|
-
<div className={classes.errorDetails}>
|
|
157
|
+
<Modal title="Error Details" closeModal={() => setShowError(false)} width={'400px'}>
|
|
158
|
+
<div className={classes.errorDetails} data-length={showError.length}>
|
|
159
159
|
{(() => {
|
|
160
160
|
if (typeof showError === 'string') {
|
|
161
161
|
if (showError.startsWith('main-')) {
|
|
@@ -148,7 +148,12 @@ const BackupProgress = ({ item, sourceId, sourceType, planId, type = 'backup' }:
|
|
|
148
148
|
{item.errorMsg && (
|
|
149
149
|
<span className={classes.backupError}>
|
|
150
150
|
<Icon type="error-circle-filled" size={13} />{' '}
|
|
151
|
-
<i
|
|
151
|
+
<i
|
|
152
|
+
data-tooltip-id="htmlToolTip"
|
|
153
|
+
data-tooltip-place="top"
|
|
154
|
+
data-tooltip-html={`<div class="linebreak-tooltip-content">${item.errorMsg.slice(0, 120) + (item.errorMsg.length > 120 ? '...' : '')}</div>`}
|
|
155
|
+
onClick={() => setShowProgressDetails(true)}
|
|
156
|
+
>
|
|
152
157
|
<u>Error</u> Occurred.
|
|
153
158
|
</i>{' '}
|
|
154
159
|
Retrying...
|
|
@@ -233,6 +233,22 @@
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
+
.errorDetailsModal {
|
|
237
|
+
width: 100%;
|
|
238
|
+
max-height: 500px;
|
|
239
|
+
overflow: auto;
|
|
240
|
+
font-family: monospace;
|
|
241
|
+
box-sizing: border-box;
|
|
242
|
+
border-radius: 6px;
|
|
243
|
+
background-color: var(--primary-color-lighter);
|
|
244
|
+
p {
|
|
245
|
+
border-bottom: 1px solid;
|
|
246
|
+
padding: 12px;
|
|
247
|
+
margin: 0;
|
|
248
|
+
border-color: var(--line-color);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
236
252
|
@media only screen and (max-width: 768px) {
|
|
237
253
|
.backupsTable {
|
|
238
254
|
overflow: auto;
|
|
@@ -21,7 +21,7 @@ import BackupEvents from '../BackupEvents/BackupEvents';
|
|
|
21
21
|
import Input from '../../common/form/Input/Input';
|
|
22
22
|
import MirrorStatusBadge from '../Mirrors/MirrorStatusBadge';
|
|
23
23
|
import MirrorStorageSelectorModal from '../Mirrors/MirrorStorageSelectorModal';
|
|
24
|
-
import { SidePanel, SnapshotViewer } from '../..';
|
|
24
|
+
import { Modal, SidePanel, SnapshotViewer } from '../..';
|
|
25
25
|
|
|
26
26
|
const DownloadLabel = ({ download, downloadBackup }: { download: Backup['download']; downloadBackup: () => void }) => {
|
|
27
27
|
if (download?.status === 'started') {
|
|
@@ -101,6 +101,7 @@ const Backups = ({
|
|
|
101
101
|
const [showRestoreModal, setShowRestoreModal] = useState<Backup | false>(false);
|
|
102
102
|
const [showBackupEvents, setShowBackupEvents] = useState<false | string>(false);
|
|
103
103
|
const [showSnapshotViewer, setShowSnapshotViewer] = useState<Backup | false>(false);
|
|
104
|
+
const [showBackupError, setShowBackupError] = useState<string | false>(false);
|
|
104
105
|
const [showEditModal, setShowEditModal] = useState<Backup | false>(false);
|
|
105
106
|
const [showStorageSelector, setShowStorageSelector] = useState<Backup | false>(false);
|
|
106
107
|
const queryClient = useQueryClient();
|
|
@@ -240,8 +241,9 @@ const Backups = ({
|
|
|
240
241
|
<div
|
|
241
242
|
className={`${classes.status} ${errorMsg ? classes.statusHasError : ''}`}
|
|
242
243
|
data-tooltip-id="htmlToolTip"
|
|
243
|
-
data-tooltip-html={`<div><string>Error</string>: ${errorMsg}</div>`}
|
|
244
|
+
data-tooltip-html={`<div class="linebreak-tooltip-content"><string>Error</string>: ${errorMsg?.slice(0, 120) + (errorMsg && errorMsg.length > 120 ? '...' : '')}</div>`}
|
|
244
245
|
data-tooltip-hidden={!errorMsg}
|
|
246
|
+
onClick={() => errorMsg && errorMsg.length > 120 && setShowBackupError(errorMsg)}
|
|
245
247
|
>
|
|
246
248
|
<StatusLabel status={status} hasError={!!errorMsg} />
|
|
247
249
|
</div>
|
|
@@ -453,6 +455,15 @@ const Backups = ({
|
|
|
453
455
|
/>
|
|
454
456
|
</SidePanel>
|
|
455
457
|
)}
|
|
458
|
+
{showBackupError && (
|
|
459
|
+
<Modal title="Error Details" closeModal={() => setShowBackupError(false)} width={'600px'}>
|
|
460
|
+
<div className={`${classes.errorDetailsModal} styled__scrollbar`}>
|
|
461
|
+
{showBackupError.split('\n').map((line, index) => (
|
|
462
|
+
<p key={index}>{line}</p>
|
|
463
|
+
))}
|
|
464
|
+
</div>
|
|
465
|
+
</Modal>
|
|
466
|
+
)}
|
|
456
467
|
</div>
|
|
457
468
|
);
|
|
458
469
|
};
|