key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.53k stars 228 forks source link

Some changes, including DNS support #57

Closed lideming closed 3 years ago

lideming commented 3 years ago

Added DNS setting support

image

Now the network_detail page looks like this:

image

Trivial

By the way

npm start doesn't start the server with production mode, causing the template engine always re-compile the pug file when rendering (taking ~200 ms!). We should start the server with NODE_ENV=production. (Mention this in README?) (See: https://pugjs.org/api/express.html)


I've been using ztncui for a year. Thank you for this project! If some of these changes are unacceptable, please tell me :)

drtech981 commented 3 years ago

Feature Request : Hi, I see you have done an awesome job of implementing a ton of additional features to the ZTN-CUI base, but could you also try and add the following features ?

  1. Member Status (Online/Offline)
  2. Member Last Seen
  3. Member Physical IP
  4. Member Description
  5. Member MAC Address These features are really handy while diagnosing and troubleshooting problems, and as such would be a great addition to the controller UI.
lideming commented 3 years ago

Hi @drtech981, For member status, last seen, physical IP, MAC , I wanted to add them too. Unfortunately, these info are just not provided on the ZT controller API but ZT Central API (I guess these info are only available on ZT roots but not controllers). So it's implementable, but need to access ZT Central API, which required an API token.

Member description is easier to implement.

There are more features that I want to add:

lideming commented 3 years ago

New renaming UI:

1) Click the title on the network detail page: image


2) Edit then press Enter or focusout: image


3) The title will update when the post succeed: image

lideming commented 3 years ago

@key-networks After trying with pkg, I know why it doesn't include the jquery.min.js in the build... It seems that pkg will look into the package.json of required modules. Some assets (e.g. Bootstrap) have included the "dist" folder in the "files" list in package.json, but it's not the case of jquery...

key-networks commented 3 years ago

Good find, @lideming !

key-networks commented 3 years ago

ztncui-0.6.8-1.x86_64.rpm and ztncui_0.6.8_amd64.deb have been built based on this PR. They are available at https://s3-us-west-1.amazonaws.com/key-networks/deb/ztncui/1/x86_64/ztncui_0.6.8_amd64.deb for Debian/Ubuntu or can be installed on RedHat derivatives with: sudo yum --enablerepo=ztncui-testing install ztncui

Could somebody please test one or both and give feedback on the UI changes?

Fastidious commented 3 years ago

Will test in a short bit.

Fastidious commented 3 years ago

@key-networks, it works lovely!

key-networks commented 3 years ago

Thanks @Fastidious for testing and for your feedback!

lideming commented 3 years ago

Now we have peer status / address / latency! 😄

image

lideming commented 3 years ago

I have finished adding features into this PR.

drtech981 commented 3 years ago

Now we have peer status / address / latency! 😄

image

This looks awesome !!! Now I believe ZTN-CUI has almost all the features of ZeroTier Central UI !!

It would be great if you could also add Descriptions for networks as well as members, since it is very helpful to maintain large networks.

ali-95 commented 3 years ago

Now we have peer status / address / latency! 😄

and how to install it?

lideming commented 3 years ago

and how to install it?

Please wait for the release.

lideming commented 3 years ago

It would be great if you could also add Descriptions for networks as well as members, since it is very helpful to maintain large networks.

That should be another PR, since this PR have made too many changes.

key-networks commented 3 years ago

@lideming thank you for your excellent contributions!

key-networks commented 3 years ago

To everyone else, new packages including @lideming 's latest commits have been built and are available at https://s3-us-west-1.amazonaws.com/key-networks/deb/ztncui/1/x86_64/ztncui_0.6.9_amd64.deb for Debian/Ubuntu or can be installed on Redhat derivatives with: sudo yum --enablerepo=ztncui-testing install ztncui

Please note that these packages are provided 'as is' without an in-depth examination of the latest code - please feel free to examine the code in this PR and give your comments/feedback - these packages are provided purely for testing.

ali-95 commented 3 years ago

sudo yum --enablerepo=ztncui-testing install ztncui

I have version 0.6.8 installed how do I update it to 0.6.9 у меня установлена версия ztncui_0.6.8 как ее обновить до 0.6.9

Fastidious commented 3 years ago

@key-networks testing it in a bit.

Fastidious commented 3 years ago

@key-networks no issues. Great job!

ali-95 commented 3 years ago

sudo yum --enablerepo=ztncui-testing install ztncui

I have version 0.6.8 installed how do I update it to 0.6.9 у меня установлена версия ztncui_0.6.8 как ее обновить до 0.6.9

у меня тоже все работает, нужно было удалить старую версию и потом по новой установить 0,6,9 everything works for me too, it was necessary to remove the old version and then install 0.6,9 on the new one

Fastidious commented 3 years ago

@ali-95 weird. A simple ‘apt install file.deb’ did it for me. Went from .6.8 to .6.9.

key-networks commented 3 years ago

Thanks for your feedback, @Fastidious and @ali-95. The credit for the new work goes to @lideming. I'm hoping to have some time this weekend to review the latest code changes and look at merging into master before producing a final build as well as an updated Docker image.

kbarlee commented 3 years ago

All works well for me! The client version info is quite interesting - found a couple of boxes that didn't want to apt update to latest version automatically. Going to try out the DNS stuff in the next few days.

key-networks commented 3 years ago

Thanks for your feedback @kbarlee!

jimthedj65 commented 3 years ago

Hi, all I upgraded with 0.6.8 and all running great and looks very stable. I will now update to 0.6.9 Installed on baremetal version Linux vpp-dev-baremetal01 4.15.0-135-generic #139-Ubuntu SMP Mon Jan 18 17:38:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

sudo dpkg -i ztncui_0.6.8_amd64.deb (Reading database ... 299122 files and directories currently installed.) Preparing to unpack ztncui_0.6.8_amd64.deb ... Unpacking ztncui (0.6.8) over (0.6.4) ... Setting up ztncui (0.6.8) ... TLS key and certificate already exist

redirected to ztncui='ssh -p 5699 -f ztncuiname@xx.xx.xx.xx -L 3333:localhost:3000 -N'

Success logged in and works like a charm.

jimthedj65 commented 3 years ago

Just upgraded to 0.6.9 and absolutely love the information presented, flawless update Preparing to unpack ztncui_0.6.9_amd64.deb ... Unpacking ztncui (0.6.9) over (0.6.8) ... Setting up ztncui (0.6.9) ... TLS key and certificate already exist

Thank you for the changes, it helps a lot.

key-networks commented 3 years ago

@jimthedj65 - thanks for your feedback!

key-networks commented 3 years ago

@lideming - I've made some changes (doc updates, etc), but I don't have rights to push to your fork, so made a branch here https://github.com/key-networks/ztncui/tree/pr which incorporates the changes I want to make on top of your changes. I'm not sure how to make code changes to your PR, but want to continue with your existing PR because of the comment history. If you can tell me how I can push my commits to your repo, please let me know, otherwise maybe you can pull my commits into your fork? Thanks!

lideming commented 3 years ago

@key-networks You should have the permission to push, since this switch is enabled by default: image

I think this should work:

git push https://github.com/lideming/ztncui.git pr
key-networks commented 3 years ago

Ok, that worked - thanks for your help!

key-networks commented 3 years ago

Let me know if you have any comments on my commits.

lideming commented 3 years ago

It looks good, thanks!

key-networks commented 3 years ago

Thanks again for your excellent contributions, @lideming !