Morphling User Interface
This is the source code for the Morphling UI.
Prerequisites
Folder structure
-
For React frontend, you can find it under console/frontend.
-
For Go backend you, can find it under console/backend.
Development
Build Console Backend Server
go build -mod=vendor -o backend-server morphling/console/backend
Run local Console Backend Server
- Prepare a
kubeconfig
file which defines k8s development environment.
- Set
KUBECONFIG
environment variable.
export KUBECONFIG={/path-to-kubeconfig-file}
Serve UI frontend
cd console/frontend/
- Install dependencies (optional)
npm install
-
Run npm run build
under /frontend
folder. It will create /frontend/dist
directory with optimized production build.
-
Go to console/backend/
.
-
Run backend server with disabled authentication mode
./backend-server
After that, you can access the UI using this URL: http://localhost:9091
.
Optional: Start Console Frontend with Connection to other dev Backend-Server directly
If you are not able to run local console backend server, or other dev console backend server is already present, you could make frontend dev server to proxy API requests to other dev backend server directly.
- Change Proxy Backend
Path: console/frontend/config/config.js
proxy: [
{
target: "http://localhost:9091",
...
}
]
change the target to address ip:port of other present console backend server.
- Run Console Frontend Dev Server
npm run start
Code style
Our UI is built upon Ant Design.