View is the frontend of Cockpit solution.
This project is built with Vue.js.
Installation of Core API is required before working on View !
See the docker image
yarn install
To run site on local server, you need to put Keycloak config file in public directory
// cockptiview-auth.json to put in public directory
{
"realm": "cockpit-ce",
"auth-server-url": "https://keycloak.example.com/auth/",
"ssl-required": "external",
"resource": "cockpitview",
"public-client": true,
"confidential-port": 0
}
If needed, update target attribute in vue.config.js
to match the Core API URL
// default config
devServer: {
proxy: {
'^/core/api': {
target: 'https://cockpitce.example.com',
ws: true,
changeOrigin: true
},
}
}
After that, compile (with hot-reloads) and run local server
yarn serve
# Compiles and minifies for production
yarn build
# Run unit tests
yarn test:unit
# Lints and fixes files
yarn lint