agama/web
2023-03-16 16:13:52 +00:00
..
__mocks__ [web] Simplify SVG mock 2023-02-26 18:02:44 +00:00
package Bump version and update changes file 2023-03-16 16:13:52 +00:00
po Add Cockpit Starter Kit infrastructure 2022-04-08 21:07:13 +01:00
public [web] Add Vite as a development dependency 2022-02-23 14:41:35 +00:00
src [web] Reorder routes 2023-03-16 14:26:42 +00:00
.babelrc.json Add Cockpit Starter Kit infrastructure 2022-04-08 21:07:13 +01:00
.editorconfig Add a React-based web interface 2021-12-22 10:02:10 +00:00
.eslintignore Add Cockpit Starter Kit infrastructure 2022-04-08 21:07:13 +01:00
.eslintrc.json Update eslint and friends to latest versions 2022-11-23 10:15:57 +00:00
.gitignore [web] Use typedoc to generate the documentation 2022-10-10 13:14:18 +01:00
.prettierignore [web] Add 'lint' and 'prettier' tasks 2022-02-04 12:17:13 +00:00
.prettierrc Set prettier printWidth to 100 2022-03-09 09:48:08 +00:00
.stylelintrc.json [web] Follow the stylelint migration guide 2023-03-02 22:35:57 +00:00
babel.config.js [web] Fix the use of env variables 2023-02-10 09:49:32 +00:00
cspell.json [web] Add words to cspell 2023-03-16 14:26:39 +00:00
jest.config.js [web] Use "?component" resourceQuery instead "?url" 2022-12-29 09:39:23 +00:00
Makefile [web] Changing package.json means npm install should run 2022-12-16 14:20:57 +01:00
org.opensuse.d-installer.metainfo.xml Add Cockpit Starter Kit infrastructure 2022-04-08 21:07:13 +01:00
package-lock.json [web] Use cspell from npm instead of git 2023-03-15 08:55:43 +00:00
package.json [web] Use cspell from npm instead of git 2023-03-15 08:55:43 +00:00
README.md [web] Clarify HMR limitation in the README 2023-02-15 16:47:05 +00:00
svgo.config.js [web] Add @svgr/webpack dependency 2022-12-27 22:58:24 +00:00
tsconfig.json [web] Simplify aliases definition 2023-01-19 07:51:55 +00:00
webpack.config.js [web] Use a specific manifest.json file for development 2023-02-13 15:07:46 +00:00

D-Installer Web-Based UI

This Cockpit modules offers a UI to the D-Installer service. The code is based on Cockpit's Starter Kit (b2379f7).

Development

Cockpit searches for modules in the $HOME/.local/share/cockpit directory of the logged in user, which is really handy when working on a module. To make the module available to Cockpit, you can link your build folder (dist) or just rely on the devel-install task:

    make devel-install

Bear in mind that if something goes wrong while building the application (e.g., the linter fails), the link will not be created.

While working on the code, you might want to run the webpack-dev-server to get the Hot Module Replacement enabled.

    npm run server

Unfortunately, it does not work remotely yet because it needs to connect to 'localhost'. You might workaround it by just using the browser from the VM through SSH (e.g., "ssh -X yourmachine firefox" -or chromium-).

Thus, if live reloading does not work for you, using the Webpack watcher for refreshing the build every time a file is changed still being an option through the command below. But please, do not forget that you have to reload the code in your browser manually.

    npm run watch

Whichever option you choose, you can visit the D-installer module through the following URL:

http://localhost:9090/cockpit/@localhost/d-installer/index.html.

JSDoc Documentation

This project uses TypeDoc to generate the API documentation. The jsdoc task generates the documentation to the jsout.out directory. If you need to adjust any TypeDoc option, please check the typedocOptions key in the tsconfig.js file.

npm run jsdoc
xdg-open jsdoc.out/index.html

GitHub Actions will automatically publish the result to https://d-installer-frontend.surge.sh/.

Type-Checking Support

This module started as a JavaScript-only project. We have decided to add type-checking support, but instead of converting the code to TypeScript, we prefer to use TypeScript support for JSDoc annotations.

Run the following command to check the types:

npm run check-types

Not our JavaScript code is properly documented yet, so type-checking is an opt-in feature by now. If you want a JavaScript file to be type-checked, please add a // @ts-check comment before any code.