Skip to content

Commit

Permalink
frontend basic
Browse files Browse the repository at this point in the history
  • Loading branch information
kayra1 committed May 15, 2024
1 parent 232c449 commit 618afe2
Show file tree
Hide file tree
Showing 9 changed files with 395 additions and 16 deletions.
125 changes: 116 additions & 9 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"test": "vitest run"
},
"dependencies": {
"next": "14.2.3",
"react": "^18",
"react-dom": "^18",
"next": "14.2.3"
"sass": "^1.77.1",
"vanilla-framework": "^4.11.0"
},
"devDependencies": {
"@testing-library/react": "^15.0.4",
Expand All @@ -29,4 +31,4 @@
"overrides": {
"rollup": "npm:@rollup/wasm-node@*"
}
}
}
Empty file.
10 changes: 10 additions & 0 deletions ui/src/app/certificate_requests/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"use client"

import { useState } from "react"
import { CertificateRequestsTable } from "./table"

export default function CertificateRequests() {
return (
<CertificateRequestsTable />
)
}
49 changes: 49 additions & 0 deletions ui/src/app/certificate_requests/table.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Dispatch, SetStateAction, useContext } from "react"
import { AsideContext } from "../nav"


export function CertificateRequestsTable() {
const { isOpen: isAsideOpen, setIsOpen: setAsideIsOpen } = useContext(AsideContext)
return (
<div className="p-panel">
<div className="p-panel__header">
<h4 className="p-panel__title">Certificate Requests</h4>
<div className="p-panel__controls">
<button className="u-no-margin--bottom" onClick={() => setAsideIsOpen(true)}>Add New CSR</button>
</div>
</div>
<div className="p-panel__content">
<div className="u-fixed-width">
<table aria-label="Certificate Requests Table" className="p-main-table">
<thead>
<tr>
<th>ID</th>
<th>Details</th>
<th>CSR Status</th>
<th>Sign/Reject</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<tr data-test-model-uuid="2f995dee-392e-4459-8eb9-839c501590af">
<td className="" data-test-column="id">1</td>
<td className="u-overflow--visible" data-test-column="details">
<p>CN: example.com</p>
<p>SAN: example.com, 127.0.0.1, 1.2.3.4.5.56</p>
</td>
<td className="" data-test-column="status">outstanding</td>
<td className="" data-test-column="action">
<button>Sign</button>
<button>Reject</button>
</td>
<td className="" data-test-column="delete">
<button>Delete CSR</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
)
}
Loading

0 comments on commit 618afe2

Please sign in to comment.