Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
akucharska committed Oct 28, 2024
1 parent cb7ff87 commit 5a8ae45
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
37 changes: 35 additions & 2 deletions src/components/Externals/Externals.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
import { useEffect, useState } from 'react';
import { useFetch } from 'shared/hooks/BackendAPI/useFetch';

export default function Externals() {
const [src, setSrc] = useState(null);

// const fetch = useFetch();
const fetchSrc = async () => {
const res = await fetch('https://ui-btp.a83a150.stage.kyma.ondemand.com/');

const sth = await res.text();

// const iframe = document.getElementById('iframe')?.contentWindow?.document?.write(`<html><body>${sth}</body></html>`);
// console.log('lo iframe',iframe)
return sth;
};
useEffect(() => {
fetch('https://ui-btp.a83a150.stage.kyma.ondemand.com/').then(r => {
console.log('roro r', r);
r.text().then(t => {
console.log('lolo t', t);
setSrc(t);
});
});
console.log('lolo', src);
}, [src, setSrc]);

return (
<>
<div>lo Externals</div>
<iframe
// src="http://127.0.0.1:8001/api/v1/namespaces/ak/services/nginx-service/proxy/"
src="http://localhost:8000"
src="https://ui-btp.a83a150.stage.kyma.ondemand.com/"
width="100%"
height="100%"
height="50%"
// style="border:none;"
title="description"
></iframe>
<iframe
className="lolo"
id="iframe"
width="100%"
height="50%"
srcDoc={src}
></iframe>
</>
);
}
1 change: 1 addition & 0 deletions src/shared/components/ResourcesList/ResourcesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ResourcesList.propTypes = {
description: PropTypes.node,
readOnly: PropTypes.bool,
customUrl: PropTypes.func,
customUIUrl: PropTypes.any,
testid: PropTypes.string,
omitColumnsIds: PropTypes.arrayOf(PropTypes.string.isRequired),
resourceUrlPrefix: PropTypes.string,
Expand Down

0 comments on commit 5a8ae45

Please sign in to comment.