All files / pages DeveloperPage.jsx

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65              1x 2x 2x                                                                                                              
import React from "react";
import BasicLayout from "main/layouts/BasicLayout/BasicLayout";
import { Inspector } from "react-inspector";
import { useSystemInfo } from "main/utils/systemInfo";
 
import Table from "react-bootstrap/Table";
 
const DeveloperPage = () => {
  const { data: systemInfo } = useSystemInfo();
  return (
    <BasicLayout>
      <h1>Developer Information</h1>
      <h2>Current Deployed Branch</h2>
      <Table striped bordered hover>
        <tbody>
          <tr>
            <td>GitHub Repo:</td>
            <td>
              <a href={systemInfo.sourceRepo}>{systemInfo.sourceRepo}</a>
            </td>
          </tr>
          <tr>
            <td>Commit Link:</td>
            <td>
              <a href={systemInfo.githubUrl}>{systemInfo.githubUrl}</a>
            </td>
          </tr>
          <tr>
            <td>Commit Hash:</td>
            <td>{systemInfo.commitId}</td>
          </tr>
          <tr>
            <td>Commit Message:</td>
            <td>{systemInfo.commitMessage}</td>
          </tr>
        </tbody>
      </Table>
      <blockquote>
        <p>
          Note: to ensure that the links to the currently deployed commit work
          properly, be sure to set the <code>SOURCE_REPO</code> property on your
          dokku deployment. For example:
        </p>
        <pre>
          {`dokku config:set my-deployment SOURCE_REPO=https://github.com/ucsb-cs156-s26/proj-dining-s26-17
`}
        </pre>
      </blockquote>
      <h2>Backend Endpoints</h2>
      <ul>
        <li>
          <a href="/swagger-ui/index.html">Swagger</a>
        </li>
      </ul>
      <h2>System Info</h2>
      <p>
        Click <span className="expand-icon">▶</span> character below to expand
      </p>
      <Inspector data={systemInfo} />
    </BasicLayout>
  );
};
 
export default DeveloperPage;