Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial break cockpt #1061

Merged
merged 9 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions web/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
],
"globals": {
"require": false,
"module": false,
"COCKPIT_TARGET_URL": "readonly"
"module": false
}
}
200 changes: 0 additions & 200 deletions web/Makefile

This file was deleted.

27 changes: 2 additions & 25 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This Cockpit modules offers a UI to the [Agama service](file:../service). The co

## Development

TODO: update when new way is clear how to do
There are basically two ways how to develop the Agama fronted. You can
override the original Cockpit plugins with your own code in your `$HOME` directory
or you can run a development server which works as a proxy and sends the Cockpit
Expand All @@ -16,33 +17,9 @@ The advantage of using the development server is that you can use the
feature for automatically updating the code and stylesheet in the browser
without reloading the page.

### Overriding the Cockpit Plugin

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
```

Then you can visit the Agama module through the following URL:

http://localhost:9090/cockpit/@localhost/agama/index.html.

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

To automatically rebuild the sources after any change you can run

```
npm run watch
```

*But do not forget that you have to reload the code in your browser manually after each change!*

### Using a development server

TODO: update when new way is clear how to do
To start the [webpack-dev-server](https://github.com/webpack/webpack-dev-server)
use this command:

Expand Down
1 change: 0 additions & 1 deletion web/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ module.exports = {

// A set of global variables that need to be available in all test environments
globals: {
COCKPIT_TARGET_URL: "https://localhost:9090",
},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
Expand Down
129 changes: 0 additions & 129 deletions web/src/DevServerWrapper.jsx

This file was deleted.

Loading
Loading