Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
akucharska committed Oct 24, 2024
1 parent cb7ff87 commit aa17c09
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
28 changes: 26 additions & 2 deletions src/components/Externals/Externals.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
export default function Externals() {
async function getSrc() {
const res = await fetch(
'http://localhost:3001/backend/api/v1/namespaces/kyma-system/services/btp-manager-metrics-service:8080/proxy/',
{
method: 'GET',
headers: {
Origin: 'http://localhost:8080',
'X-Cluster-Certificate-Authority-Data':
'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQ1akNDQWs2Z0F3SUJBZ0lRQjkwT2xRYVFlcnJod2U4V2s5MTRVekFOQmdrcWhraUc5dzBCQVFzRkFEQU4KTVFzd0NRWURWUVFERXdKallUQWVGdzB5TkRBNU1UY3dPRFUwTlRKYUZ3MHpOREE1TVRjd09EVTBOVEphTUEweApDekFKQmdOVkJBTVRBbU5oTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUF3NjM5Cnk0bVlFUEF0b21mYUc0Um03S0JCMkxUc1J4UHVTUWRyUWZ3WnhNWXN4dm1zcUhlRGgxblkvS21jZG4wNjladkIKYUpmY2d2aE53VDNLQnhDRW9zek5jMDJUaDBncnZjblh0S0wvckRPRzZ2VzJzb3QwM2lIRUIrRWtNRlZHdkdTcApNZUdUV20vM3FHb3dDUUNwRjljQlJXc2ZiZ0ozYmhGNFNWWmozWEFlQlhONnREZkxmSkFNWGtjd1RCeVZXT2s5CkR1SW5SSVluY1BFTWlnVEUxdDFxbnFsUUdtbDFHamFGbDlOVlFoMnZ1MU5uSE1rcGVTZEdPUVhNRjF2ZFp4bEMKeHRQc29HV3lGdERlQnpLOXVmYVM5TkNhcjljc3YrREZpMjQzeGlPbG4xQnFTVUNSMGMyOEJ1MDZEWDhXa2FIYgp0SDllb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E9FYUmEFlVlXjxMQP1mwQpTtEgJyqeVa-fjZGDaGdbL6Zs5hrA7Au8jIRjQJ_JOXgy5ZwPJQ-J3y9Aw4kaKBTfp6Yn-6BgTiJJMFxQanBp7N8bLFELQGXglz1g_OaJqDkIEaeH06FKE6bucz0jFqcihdRQvF9CTQZdk0m1wQYFtLVRWkkyNKuuNwUS1IHS0yeG5p7uS1-XCdWQSjquus3S5lylZNPczs9L2_RYHRX4MP_ICNn8_QvdElTBFm-bKUEylG6wgrP5zkJzGoJTZw0x1K0JKv6fWg',
},
},
);
const sth = await res.html();
// const blob = await res.blob();
// console.log('lololo res',sth,blob );
// return URL.createObjectURL(sth);
document.querySelector('iframe').setAttribute('srcDoc', sth);
return sth;
}

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="http://localhost:8001/api/v1/namespaces/kyma-system/services/btp-manager-metrics-service:8080/proxy/"
width="100%"
height="100%"
height="50%"
// style="border:none;"
title="description"
></iframe>
<iframe 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 aa17c09

Please sign in to comment.