@@ -6,7 +6,7 @@ import { getDomain } from 'layouts/Shell'
66import useSettings from 'hooks/useSettings'
77import Link from '@mui/material/Link'
88import { Link as RouterLink } from 'react-router-dom'
9- import { GetTeamApiResponse } from 'redux/otomiApi'
9+ import { GetAplTeamApiResponse } from 'redux/otomiApi'
1010import UpgradeVersion from './UpgradeVersion'
1111
1212// styles -----------------------------------------------------------
@@ -92,7 +92,7 @@ const useStyles = makeStyles()((theme) => ({
9292
9393// types -----------------------------------------------------------
9494interface Props {
95- team ?: GetTeamApiResponse
95+ team ?: GetAplTeamApiResponse
9696 inventory : any
9797}
9898
@@ -212,22 +212,22 @@ export default function Dashboard({ team, inventory }: Props): React.ReactElemen
212212 const hostname = window . location . hostname
213213 const domain = getDomain ( hostname )
214214 const [ isCookiesLoaded , setCookiesLoaded ] = React . useState ( false )
215+
215216 const onLoad = ( ) => {
216217 setTimeout ( ( ) => {
217218 setCookiesLoaded ( true )
218219 } , 500 )
219220 }
221+
220222 React . useEffect ( ( ) => {
221223 setCookiesLoaded ( false )
222224 } , [ themeView ] )
223225
224- // platform view base iframe urls
225226 const clusterResourceUtilization = `https://grafana.${ domain } /d-solo/efa86fd1d0c121a26444b636a3f509a8/kubernetes-compute-resources-cluster?orgId=1&refresh=30s&theme=${ theme . palette . mode } &panelId=`
226- const clusterCapacity = `https://grafana.${ domain } /d-solo/iJiti6Lnkgg/kubernetes-cluster-status?orgId=1&refresh=30s&theme=${ theme . palette . mode } &panelId=`
227- // team view base iframe urls
228227 const resourceStatus = `https://grafana-${ oboTeamId } .${ domain } /d-solo/iJiti6Lnkgg/team-status?orgId=1&refresh=30s&theme=${ theme . palette . mode } &panelId=`
229228 const resourceUtilization = `https://grafana-${ oboTeamId } .${ domain } /d-solo/JcVjFgdZz/kubernetes-deployment?orgId=1&theme=${ theme . palette . mode } &panelId=`
230229 const vulnerabilities = `https://grafana-${ oboTeamId } .${ domain } /d-solo/trivy_operator/container-scan-results?orgId=1&refresh=30s&theme=${ theme . palette . mode } &panelId=`
230+
231231 const views = {
232232 platform : [
233233 {
@@ -258,7 +258,7 @@ export default function Dashboard({ team, inventory }: Props): React.ReactElemen
258258 { id : '7' , src : `${ resourceStatus } 9` } ,
259259 { id : '8' , src : `${ resourceStatus } 10` } ,
260260 ] ,
261- show : team ?. managedMonitoring ?. grafana && oboTeamId !== 'admin' ,
261+ show : team ?. spec . managedMonitoring ?. grafana && oboTeamId !== 'admin' ,
262262 } ,
263263 {
264264 title : 'Resource Utilization' ,
@@ -267,7 +267,7 @@ export default function Dashboard({ team, inventory }: Props): React.ReactElemen
267267 { id : '9' , src : `${ resourceUtilization } 8` } ,
268268 { id : '10' , src : `${ resourceUtilization } 9` } ,
269269 ] ,
270- show : team ?. managedMonitoring ?. grafana && oboTeamId !== 'admin' ,
270+ show : team ?. spec . managedMonitoring ?. grafana && oboTeamId !== 'admin' ,
271271 } ,
272272 {
273273 title : 'Vulnerabilities' ,
@@ -278,7 +278,7 @@ export default function Dashboard({ team, inventory }: Props): React.ReactElemen
278278 { id : '13' , src : `${ vulnerabilities } 50` } ,
279279 { id : '14' , src : `${ vulnerabilities } 51` } ,
280280 ] ,
281- show : team ?. managedMonitoring ?. grafana && oboTeamId !== 'admin' && appsEnabled . trivy ,
281+ show : team ?. spec . managedMonitoring ?. grafana && oboTeamId !== 'admin' && appsEnabled . trivy ,
282282 } ,
283283 ] ,
284284 }
@@ -295,7 +295,6 @@ export default function Dashboard({ team, inventory }: Props): React.ReactElemen
295295 title = 'Inventory'
296296 />
297297
298- { /* Cookies Hack: Hidden iframe to load cookies for grafana */ }
299298 < iframe
300299 className = { classes . hiddenIframe }
301300 title = 'Hidden iFrame'
0 commit comments