Skip to content

Commit

Permalink
Add API, Statistics, API consummer example.
Browse files Browse the repository at this point in the history
  • Loading branch information
klelostec committed Sep 7, 2022
1 parent 0786f67 commit 3473c64
Show file tree
Hide file tree
Showing 58 changed files with 14,629 additions and 986 deletions.
1 change: 1 addition & 0 deletions .docksal/commands/drupguard/update
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ then
else
echo-lavender-bg "* Cache clear"
fin symfony console cache:clear
fin symfony console doctrine:migrations:migrate
fi
#-------------------------- END: Execution --------------------------------
20 changes: 20 additions & 0 deletions .docksal/docksal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ services:
service: apache
depends_on:
- cli
# Web
api:
extends:
file: ${HOME}/.docksal/stacks/services.yml
service: apache
hostname: api
volumes:
- api_root:/var/www:ro,nocopy,cached # Project root volume (read-only)
labels:
- io.docksal.virtual-host=api.${VIRTUAL_HOST}
environment:
- APACHE_DOCUMENTROOT=/var/www

# DB
db:
Expand Down Expand Up @@ -41,3 +53,11 @@ services:
- ADMINER_DESIGN=price # To use a bundled Adminer design
labels:
- io.docksal.virtual-host=adminer.${VIRTUAL_HOST}

volumes:
api_root: # Project root volume (bind mount)
driver: local
driver_opts:
type: none
device: ${PROJECT_ROOT}/api_example/build
o: bind
20 changes: 20 additions & 0 deletions api_example/react/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
70 changes: 70 additions & 0 deletions api_example/react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
13 changes: 13 additions & 0 deletions api_example/react/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files": {
"main.css": "./static/css/main.97a2db72.css",
"main.js": "./static/js/main.0b9432d3.js",
"index.html": "./index.html",
"main.97a2db72.css.map": "./static/css/main.97a2db72.css.map",
"main.0b9432d3.js.map": "./static/js/main.0b9432d3.js.map"
},
"entrypoints": [
"static/css/main.97a2db72.css",
"static/js/main.0b9432d3.js"
]
}
Binary file added api_example/react/build/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added api_example/react/build/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added api_example/react/build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions api_example/react/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Drupguard API Client"/><title>Drupguard API Client</title><script defer="defer" src="./static/js/main.0b9432d3.js"></script><link href="./static/css/main.97a2db72.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>window.APP_CONFIG={backend:"<API_URL>",token:"<API_ACCESS_TOKEN>",interval:5e3,refresh:36e5}</script></body></html>
7 changes: 7 additions & 0 deletions api_example/react/build/static/css/main.97a2db72.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api_example/react/build/static/css/main.97a2db72.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions api_example/react/build/static/js/main.0b9432d3.js

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions api_example/react/build/static/js/main.0b9432d3.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* @license C3.js v0.4.24 | (c) C3 Team and other contributors | http://c3js.org/ */

/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions api_example/react/build/static/js/main.0b9432d3.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 3473c64

Please sign in to comment.