chore(dashboard): Integrate dashboard app into the SPA bundle (#14356)

* chore(dashboard): Integrate dashboard app into the SPA bundle

* fix url params

* change variable name

* change title correctly

* custom css

* lint

* remove unused file

* remove content assertions from dashboard tests

* fix case with missing bootstrap data

* fix: respect crud views flag

* crud views -> spa

* remove unused dashboard templates

* fix: remove unused variable

* fix: missed a spot with the crudViews -> spa

* router link to dashboard from dashboard list page

* link using the router when in card mode

* lint

* fix tests, add memory router

* remove  dashboard app files

* split up the bundle a little more

* use webpack preload
This commit is contained in:
David Aaron Suddjian
2021-05-04 08:51:17 -07:00
committed by GitHub
parent 158ac302d8
commit 21cf12a480
25 changed files with 194 additions and 316 deletions

View File

@@ -17,11 +17,14 @@
* under the License.
*/
import React, { useState } from 'react';
import { t, styled } from '@superset-ui/core';
import { Nav, Navbar, NavItem } from 'react-bootstrap';
import NavDropdown from 'src/components/NavDropdown';
import { Menu as DropdownMenu } from 'src/common/components';
import { Link } from 'react-router-dom';
import { Nav, Navbar, NavItem } from 'react-bootstrap';
import { t, styled } from '@superset-ui/core';
import { Menu as DropdownMenu } from 'src/common/components';
import NavDropdown from 'src/components/NavDropdown';
import { getUrlParam } from 'src/utils/urlUtils';
import MenuObject, {
MenuObjectProps,
MenuObjectChildProps,
@@ -159,6 +162,10 @@ export function Menu({
}: MenuProps) {
const [dropdownOpen, setDropdownOpen] = useState(false);
// would useQueryParam here but not all apps provide a router context
const standalone = getUrlParam('standalone', 'boolean');
if (standalone) return <></>;
return (
<StyledHeader className="top" id="main-menu">
<Navbar inverse fluid staticTop role="navigation">