fix(trace-viewer): info message for actions without snapshots (#11765)

This commit is contained in:
Yury Semikhatsky 2022-02-01 09:26:38 -08:00 committed by GitHub
parent e0c4e66272
commit c2f6462a6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -88,3 +88,8 @@ iframe#snapshot {
height: 100%; height: 100%;
border: none; border: none;
} }
.no-snapshot {
text-align: center;
padding: 50px;
}

View File

@ -101,13 +101,14 @@ export const SnapshotTab: React.FunctionComponent<{
</div> </div>
<div className='snapshot-url' title={snapshotInfo.url}>{snapshotInfo.url}</div> <div className='snapshot-url' title={snapshotInfo.url}>{snapshotInfo.url}</div>
<div ref={ref} className='snapshot-wrapper'> <div ref={ref} className='snapshot-wrapper'>
<div className='snapshot-container' style={{ { snapshots.length ? <div className='snapshot-container' style={{
width: snapshotSize.width + 'px', width: snapshotSize.width + 'px',
height: snapshotSize.height + 'px', height: snapshotSize.height + 'px',
transform: `translate(${-snapshotSize.width * (1 - scale) / 2 + (measure.width - scaledSize.width) / 2}px, ${-snapshotSize.height * (1 - scale) / 2 + (measure.height - scaledSize.height) / 2}px) scale(${scale})`, transform: `translate(${-snapshotSize.width * (1 - scale) / 2 + (measure.width - scaledSize.width) / 2}px, ${-snapshotSize.height * (1 - scale) / 2 + (measure.height - scaledSize.height) / 2}px) scale(${scale})`,
}}> }}>
<iframe ref={iframeRef} id='snapshot' name='snapshot'></iframe> <iframe ref={iframeRef} id='snapshot' name='snapshot'></iframe>
</div> </div> : <div className='no-snapshot'>Action does not have snapshots</div>
}
</div> </div>
</div>; </div>;
}; };