Skip to content

Commit

Permalink
Merge branch 'improvement/2149-documentation-access-from-the-UI' into…
Browse files Browse the repository at this point in the history
… q/2.4
  • Loading branch information
bert-e committed Jan 17, 2020
2 parents b322516 + 5d51fd9 commit 1ac6677
Show file tree
Hide file tree
Showing 10 changed files with 336 additions and 273 deletions.
3 changes: 2 additions & 1 deletion salt/metalk8s/addons/ui/deployed/ui.sls
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Create metalk8s-ui ConfigMap:
"url": "/api/kubernetes",
"url_salt": "/api/salt",
"url_prometheus": "/api/prometheus",
"url_grafana": "/grafana"
"url_grafana": "/grafana",
"url_doc": "/docs"
}

Create ui-branding ConfigMap:
Expand Down
4 changes: 4 additions & 0 deletions ui/cypress/integration/AccessDocumentation.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Feature: AccessDocumentation
Scenario: Access documentation from the Navbar
Given I log in
Then I can access the documentation from the navbar
21 changes: 21 additions & 0 deletions ui/cypress/integration/common/accessDocumentation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Then } from 'cypress-cucumber-preprocessor/steps';

Then('I can access the documentation from the navbar', () => {
const target_url = Cypress.env('target_url');

cy.visit(target_url, {
onBeforeLoad(win) {
// win is the the remote page's window object
// `cy.stub()` stubs the window.open method
cy.stub(win, 'open', url => {
expect(url).to.have.string('/docs/index.html');
});
},
});

cy.get('.sc-dropdown')
.eq(1)
.click();

cy.get('[data-cy = documentation]').click();
});
3 changes: 2 additions & 1 deletion ui/public/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"url": "https://{ip}:8443/api/kubernetes",
"url_salt": "https://{ip}:8443/api/salt",
"url_prometheus": "https://{ip}:8443/api/prometheus",
"url_grafana": "https://{ip}:8443/grafana"
"url_grafana": "https://{ip}:8443/grafana",
"url_doc": "https://{ip}:8443/docs"
}
4 changes: 2 additions & 2 deletions ui/src/containers/ClusterMonitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const ClusterStatusValue = styled.span`
}};
`;

const QuestionMarkIcon = styled.i`
const InformationMarkIcon = styled.i`
color: ${props => props.theme.brand.primary};
`;

Expand Down Expand Up @@ -222,7 +222,7 @@ const ClusterMonitoring = props => {
</TooltipContent>
}
>
<QuestionMarkIcon className="fas fa-question-circle" />
<InformationMarkIcon className="fas fa-info-circle" />
</Tooltip>
{clusterStatus.isLoading ? <LoaderCoreUI size="small" /> : null}
</LeftClusterStatusContainer>
Expand Down
Loading

0 comments on commit 1ac6677

Please sign in to comment.