Giter Site home page Giter Site logo

opensuse / cockpit-wicked Goto Github PK

View Code? Open in Web Editor NEW
10.0 15.0 6.0 1.8 MB

Cockpit module to configure the network using Wicked.

Home Page: https://yast.opensuse.org/blog/2020-11-25/presenting-cockpit-wicked

License: GNU General Public License v2.0

Shell 0.29% Makefile 2.23% JavaScript 95.46% SCSS 1.09% HTML 0.35% Python 0.58%

cockpit-wicked's Introduction

Cockpit Wicked

tests codecov

Cockpit user interface for wicked.

Interfaces List Screenshot

Current Status

Although it is in a very early stage of development, it already supports a set of basic uses cases:

  • Browse interfaces and configurations.
  • Configure basic IPv4/IPv6 settings.
  • Set up wireless devices (only WEP and WPA-PSK are supported by now).
  • Set up bridges, bonding and VLAN devices (experimental).
  • Manage routes (work in progress).
  • Set basic DNS settings (policy, static name servers and search list).

However, many features are still missing:

  • Complete support for wireless devices.
  • Support for advanced devices, like TUN/TAP or Infiniband.
  • Handle IP forwarding configuration.
  • Devices renaming.
  • Other goodies like displaying Wicked's logs or device statistics, as the NetworkManager module already does.

Installing

make install compiles and installs the package in /usr/share/cockpit/. The convenience targets srpm and rpm build the source and binary rpms, respectively. Both of these make use of the dist-gzip target, which is used to generate the distribution tarball. In production mode, source files are automatically minified and compressed. Set NODE_ENV=production if you want to duplicate this behavior.

For development, you usually want to run your module straight out of the git tree. To do that, link that to the location were cockpit-bridge looks for packages:

make devel-install

After changing the code and running make again, reload the Cockpit page in your browser.

You can also use watch mode to automatically update the webpack on every code change with

npm run watch

or

make watch

Development

If you are interested in contributing to the development, you might be interested in checking the DEVELOPMENT.md file. It contains some interesting information about the module is organized.

Acknowledgments

cockpit-wicked's People

Contributors

adammajer avatar alkastner avatar belphegor-belbel avatar bmustiata avatar cockpituous avatar croissanne avatar deneb-alpha avatar dgdavid avatar dperpeet avatar elchevive avatar imobachgs avatar javierllorente avatar kkoukiou avatar larskarlitski avatar lslezak avatar ltfavas avatar martinpitt avatar marusak avatar mvollmer avatar nykseli avatar sabbaka avatar skazi0 avatar teclator avatar victorhck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cockpit-wicked's Issues

Read/write routing information

Routes are being ignored by the WickedAdapter at this point. We need to make them work by:

  • Getting routing information from Wicked (and /etc/sysconfig/network/routes file if needed).
  • Writing routes to /etc/sysconfig/network/ifcfg-* files.

Enable/Disable IP forwarding

Wicked exports the current value of this setting for IPv4 and IPv6. However, we should modify sysctl configuration to enable/disable such a feature.

Write a nice README file

The README file was OK for a PoC. But now that the module is able to do some stuff, we should update the README with some information about the current status, screenshots, how to contribute, etc.

Crash when adding a route

Adding/editing a route causes the module to crash. The route is indeed created, but the interface just crashes.

Do not render not seleted tabs

In the current UI, we have two tabs: Interfaces and Routing. The Interfaces is the one loaded by default.

The problem is that everything is being rendered (although not displayed) at the time to mount the Tabs, which is something that we might, at least, discuss.

Do we want to load/render routes before the user click on the Routing tab?

Change forms layout

Change the forms layout to be more like the rest of Cockpit plugins (with the label at the left of the fields).

Interfaces list does not collapse items properly

The interfaces list provides the ability to expand/collapse each interface to show/hide their details. It is also able to keep the state of expanded/collapsed items after performing any action that changes the list, such as adding a new interface.

However, it is collapsing all other items except the requested by the user, which is clearly a misbehavior.

Improve Master/Slaves interface handling

When a interface is a bridge port or bonding slave it is still listed in the main table and is error prone. We should hide enslaved interfaces and we probably should show them only in the master details.

IP configuration improvements

We have merged the support to specify IP settings (see #22). However, we might introduce a few improvements:

  • Filter out 'DHCPv6' and 'DHCPv4' from the protocol selector.
  • Improve how the configuration is displayed in the interface summary. For instance, replace dhcp by DHCP (or Automatic (DHCP). If the configuration is static, show the configured IP address.
  • Selecting static in the Boot Protocol should force the user to introduce, at least, an IP address.

Additionally, now we need to write IP settings to the ifcfg files (see #19).

Removes routes without an associated interfaces

While testing version 2, I found that the last route without an associated interface is not being removed. It is happened only with the last one because the fact that routes can be removed in bulk, but the real problem is that the /etc/sysconfig/network/routes files is not being updated when there are no more routes linked to an interface.

Quite related to 855b80d

ifcfg-* files are completely rewritten

When you change an interface configuration, the ifcfg-* gets completely overwritten. The problem is that only the values that the module know about are written. So comments and any other unknown key is just removed from the file.

Rethink/Improve how to deal with routes

Follow up of #18

Although the Routing tab is working now following the apply changes immediately Cockpit's approach (i.e., no Save Changes button/action), we consider changes introduced in #41 as a workaround or even starting point for a discussion.

Thus, we must rethink how to deal with routes from both sides: the user interface and the code organization to make it possible.

Change interface status in background

Setting up an interface, especially if the configuration is wrong, may take a while. For that reason, when the configuration of an interface is changed, the operation should take place in background.

Wicked's D-Bus interface notifies status changes. The idea is to listen for those changes and notify them to the React application to change the current status.

Include action progress in the state

While working in #53, I realize that maybe the state should keep the information about if any main action is being performed or not. I mean, something like

{
  checkingService: false,
  loadingInterfaces: true,
  loadingRoutes: false,
  ...
}

and update them accordingly in the reducer. This would allow, for example, to easily display more information about what is going on.

@lslezak, @imobachgs, @teclator, what do you think guys?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.