From df1a8dbe2b07d9879ca43715c5d80c19778d0a87 Mon Sep 17 00:00:00 2001 From: cbrianbet Date: Sun, 19 May 2024 20:20:40 +0300 Subject: [PATCH] Added COP dashboards to highlight of the month --- package.json | 4 +- src/views/Highlight/Highlight.js | 25 +------ src/views/Highlight/HighlightCOP.js | 95 ++++++++++++++++++++++++ src/views/Highlight/HighlightInternal.js | 30 ++++++++ src/views/Highlight/HighlightTabs.js | 56 ++++++++++++++ 5 files changed, 186 insertions(+), 24 deletions(-) create mode 100644 src/views/Highlight/HighlightCOP.js create mode 100644 src/views/Highlight/HighlightInternal.js create mode 100644 src/views/Highlight/HighlightTabs.js diff --git a/package.json b/package.json index 53988e1b..c64ff3b8 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "@mui/icons-material": "^5.11.11", "@mui/material": "^5.11.14", "@reduxjs/toolkit": "^1.8.5", + "@superset-ui/embedded-sdk": "^0.1.0-alpha.8", + "@superset-ui/switchboard": "^1.5.0", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", @@ -23,7 +25,7 @@ "highcharts": "^8.2.2", "highcharts-react-official": "^3.0.0", "lodash": "^4.17.20", - "moment": "^2.27.0", + "moment": "^2.29.0", "mui-datatables": "^4.3.0", "oidc-client": "^1.10.1", "powerbi-client": "^2.22.2", diff --git a/src/views/Highlight/Highlight.js b/src/views/Highlight/Highlight.js index 77ae1865..52b8bef6 100644 --- a/src/views/Highlight/Highlight.js +++ b/src/views/Highlight/Highlight.js @@ -1,30 +1,9 @@ -import { useState, useEffect } from 'react'; -import { DWH_API_URL } from '../../constants'; -import axios from 'axios'; +import HighlightTabs from './HighlightTabs'; const Highlight = () => { - const [iframeUrl, setIframeUrl] = useState(''); - - useEffect(() => { - axios.get(`${DWH_API_URL}self-service/monthly-highlight`) - .then(res => { - const url = res.data?.url; - setIframeUrl(url); - }) - .catch(error => { - console.error('Error fetching iframe URL:', error); - }); - }, []); - console.log(iframeUrl) return ( -