[pve-devel] [PATCH common/widget-toolkit/manager v3] make /etc/hosts/editable via gui

Dominik Csapak d.csapak at proxmox.com
Wed Sep 12 10:24:08 CEST 2018


this series aims to make /etc/hosts view/editable via the gui
the first 2 patches of pve-common are strictly not necessary for the series,
but improve the read_network_interfaces to also read UTF-8 comments correctly

(as in if you have utf8 characters in your /etc/network/interfaces comments,
they are shown correctly now, not sure if how i did it is the right way though)

changes from v2:
* also encode utf8 where necessary
* move digest code to the api call
* lock the file in the api
* correct regex for comments (allow leading whitespace)

changes from v1:
* instead of setting binmode utf8, only decode the relevant parts
* correct 'if condition' when api call fails

pve-common:

Dominik Csapak (3):
  decode comments in /etc/network/interfaces as utf8
  INotify.pm: use run_command instead of open for calling diff
  INotify.pm: add methods for reading/writing /etc/hosts

 src/PVE/INotify.pm | 71 +++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 59 insertions(+), 12 deletions(-)

proxmox-widget-toolkit:

Dominik Csapak (1):
  add node/HostsView

 Makefile          |  1 +
 node/HostsView.js | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)
 create mode 100644 node/HostsView.js

pve-manager:

Dominik Csapak (2):
  add /node/{NODE}/hosts API Call
  make /etc/hosts editable via gui

 PVE/API2/Nodes.pm           | 74 +++++++++++++++++++++++++++++++++++++++++++++
 www/manager6/node/Config.js |  9 ++++++
 2 files changed, 83 insertions(+)

-- 
2.11.0





More information about the pve-devel mailing list