MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / UrlDialogContent

Function UrlDialogContent

web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx:21–45  ·  view source on GitHub ↗
({ url, helpFile, onClose })

Source from the content-addressed store, hash-verified

19import { ModalContent, ModalFooter }from '../../../static/js/components/ModalContent';
20
21export default function UrlDialogContent({ url, helpFile, onClose }) {
22 return (
23 <ModalContent>
24 <Box flexGrow="1">
25 <iframe src={url} title=" " width="100%" height="100%" onLoad={(e)=>{
26 e.target?.contentWindow?.focus();
27 }}/>
28 </Box>
29 <ModalFooter>
30 <Box style={{ marginRight: 'auto' }}>
31 <PgIconButton data-test={'help-'+helpFile} title={gettext('Help')} icon={<HelpIcon />} onClick={() => {
32 let _url = url_for('help.static', {
33 'filename': helpFile,
34 });
35 window.open(_url, 'pgadmin_help');
36 }} >
37 </PgIconButton>
38 </Box>
39 <DefaultButton data-test="close" startIcon={<CloseIcon />} onClick={() => {
40 onClose();
41 }} >{gettext('Close')}</DefaultButton>
42 </ModalFooter>
43 </ModalContent>
44 );
45}
46
47UrlDialogContent.propTypes = {
48 url: PropTypes.string,

Callers

nothing calls this directly

Calls 4

gettextFunction · 0.85
focusMethod · 0.80
onCloseFunction · 0.70
openMethod · 0.45

Tested by

no test coverage detected