Skip to content

Commit

Permalink
Add server guide to Admin UI Documentation menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Jul 30, 2023
1 parent 760b7fc commit 2445b5f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ publishing.md
bin/linkpackages

fly_io
.github
.github

docs/src
docs/book.toml
docs/docker-compose.yml
2 changes: 0 additions & 2 deletions docs/.gitignore

This file was deleted.

Binary file added docs/src/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


<img src="https://user-images.githubusercontent.com/5200296/226164888-d33b2349-e608-4bed-965f-ebe4339b4376.png" width="75" >
<img src="./img/logo.png" width="75" >

## Introduction

Expand Down
5 changes: 5 additions & 0 deletions packages/server-admin-ui/src/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class Sidebar extends Component {

// nav dropdown
const navDropdown = (item, key) => {
console.log('****', item)
return (
<li key={key} className={activeRoute(item.url, props)}>
<a
Expand Down Expand Up @@ -320,6 +321,10 @@ const mapStateToProps = (state) => {
url: '/doc',
icon: 'icon-settings',
children: [
{
name: 'Server Guide',
url: `${window.location.protocol}//${window.location.host}/doc/server-guide`,
},
{
name: 'OpenApi',
url: `${window.location.protocol}//${window.location.host}/doc/openapi`,
Expand Down
7 changes: 7 additions & 0 deletions src/serverroutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ module.exports = function (
// mount before the main /admin
mountSwaggerUi(app, '/doc/openapi')

// mount server-guide
app.use('/doc/server-guide',
express.static(
__dirname + '/../docs/server-guide'
)
)

app.get('/admin/', (req: Request, res: Response) => {
fs.readFile(
path.join(
Expand Down

0 comments on commit 2445b5f

Please sign in to comment.