Skip to content

Commit

Permalink
Merge pull request #202 from Spyderisk/191-link-to-contributing-in-ss…
Browse files Browse the repository at this point in the history
…m-ui

#191: Add "Report an Issue" option in Help menu
  • Loading branch information
kenmeacham authored Sep 17, 2024
2 parents b296d5c + ac2afc0 commit 1ddae17
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 10 additions & 1 deletion src/main/webapp/app/common/components/header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { connect } from "react-redux";
import { getAboutInfo, hideAboutModal, getUser, saveDownload } from "../../../common/actions/api";
import * as Constants from "../../../common/constants.js";
import { openDocumentation, openApiDocs, openAdaptorApiDocs } from "../../../common/documentation/documentation";
import { openDocumentation, openApiDocs, openAdaptorApiDocs, reportIssue } from "../../../common/documentation/documentation";
import {
reCentreCanvas,
reCentreModel,
Expand Down Expand Up @@ -476,6 +476,15 @@ class Header extends React.Component {
>
Spyderisk Adaptor REST API
</MenuItem>
<MenuItem
key={13}
eventKey={13}
onClick={(e) =>
reportIssue(e)
}
>
Report an Issue
</MenuItem>
<MenuItem divider />
<h4 style={{ color: "black", paddingLeft: "20px" }}>
Tutorials
Expand Down
11 changes: 8 additions & 3 deletions src/main/webapp/app/common/documentation/documentation.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
export function openDocumentation(e, link) {
e.stopPropagation();
window.open("/documentation/" + link, "system-modeller-docs");
window.open("/documentation/" + link, "system-modeller-docs", "noopener");
}

export function openApiDocs(e) {
e.stopPropagation();
window.open("/system-modeller/swagger-ui.html", "openapi-docs");
window.open("/system-modeller/swagger-ui.html", "openapi-docs", "noopener");
}

export function openAdaptorApiDocs(e) {
e.stopPropagation();
window.open("/system-modeller/adaptor/docs#/", "adaptor-openapi-docs");
window.open("/system-modeller/adaptor/docs#/", "adaptor-openapi-docs", "noopener");
}

export function reportIssue(e) {
e.stopPropagation();
window.open("https://github.com/Spyderisk/system-modeller/blob/dev/CONTRIBUTING.md#how-to-open-a-query-or-bug-report", "report-issue", "noopener");
}

0 comments on commit 1ddae17

Please sign in to comment.