diff --git a/changes/issue-340-nav-open-new-tab b/changes/issue-340-nav-open-new-tab new file mode 100644 index 000000000..fa8672fdf --- /dev/null +++ b/changes/issue-340-nav-open-new-tab @@ -0,0 +1 @@ +* Nav items can be opened in a new tab or window \ No newline at end of file diff --git a/cypress/integration/all/app/hosts.spec.ts b/cypress/integration/all/app/hosts.spec.ts index 1e4a402a1..a1f00db4e 100644 --- a/cypress/integration/all/app/hosts.spec.ts +++ b/cypress/integration/all/app/hosts.spec.ts @@ -69,7 +69,7 @@ describe( // Go to host details page cy.location("pathname").should("match", /hosts\/[0-9]/i); - cy.get("span.status").should("contain", /online/i); + cy.getAttached("span.status").should("contain", /online/i); // Run policy on host let policyname = ""; diff --git a/frontend/components/side_panels/SiteTopNav/SiteTopNav.jsx b/frontend/components/side_panels/SiteTopNav/SiteTopNav.jsx index 9d3240001..97ca7d1fb 100644 --- a/frontend/components/side_panels/SiteTopNav/SiteTopNav.jsx +++ b/frontend/components/side_panels/SiteTopNav/SiteTopNav.jsx @@ -1,4 +1,5 @@ import React, { Component } from "react"; +import { Link } from "react-router"; import PropTypes from "prop-types"; import classnames from "classnames"; @@ -35,7 +36,6 @@ class SiteTopNav extends Component { renderNavItem = (navItem) => { const { name, iconName } = navItem; const { - onNavItemClick, pathname, config: { org_logo_url: orgLogoURL }, } = this.props; @@ -51,12 +51,12 @@ class SiteTopNav extends Component { if (iconName === "logo") { return (
  • - - +
  • ); } @@ -82,9 +82,9 @@ class SiteTopNav extends Component { return (
  • - {icon} {name} - +
  • ); }; diff --git a/frontend/components/side_panels/SiteTopNav/_styles.scss b/frontend/components/side_panels/SiteTopNav/_styles.scss index 35bec8d68..d727c46ec 100644 --- a/frontend/components/side_panels/SiteTopNav/_styles.scss +++ b/frontend/components/side_panels/SiteTopNav/_styles.scss @@ -67,6 +67,7 @@ display: flex; align-items: center; padding: 14px 20px 17px; + text-decoration: none; } &--active {