Comments (8)
I agree that it would be nice to be able to change the node tags in the UI. Currently if you have the tags defined under your flow rules as your screenshot shows, you can use an API call to the controller to set the tags.
This is an example of what I've used:
curl -X POST 127.0.0.1:9993/api/network/xxxxxxxxxxxxxxxx/member/xxxxxxxxxx -H "X-ZT1-AUTH:xxxxxxxxxxxxxxxxxxxxxxxx" -d '{ "tags": [[1000,7],[1001,0]]}'
The value after X-ZT1-AUTH is the API token of the ZT controller.
Reference for the controller API is here: https://my.zerotier.com/central-api.html#member-member-post
from zero-ui.
@timothyle97 Yes, and zero-ui Flow rule currently does not support cap and tag, it will be ignored, there may be small bugs.
e.g.
tag department
id 1000
enum 100 sales
;
cap super
id 1000
accept;
;
from zero-ui.
@chenall If I'm not mistaken the tags are implemented by the ZT controller, not Zero-UI. I believe if the tags are set on the network and the members via the API, any flow rules referencing the tags should work even though the preview shows the tags are empty.
@dec0dOS I've found another project which acts as a command line interface to set the tags on the network and members for ZTNCUI: https://github.com/Fusion/ztncli
from zero-ui.
It's indeed a bug in zero-ui's flow rule editor which will ignore tags and caps, I've already fixed it but I haven't do a thoroughly test.
zero-ui/frontend/src/components/NetworkRules/NetworkRules.jsx
Lines 54 to 62 in ee6a84e
tags and caps should be object instead of array, the rule compiler uses them as objects to store parse result with names as keys.
from zero-ui.
Hello, @snachx, thanks for sharing!
Please reach out to me if it works as expected for you.
from zero-ui.
@dec0dOS hello, you can check the detail of the rule compiler
zero-ui/frontend/src/external/RuleCompiler.js
Lines 1042 to 1047 in ee6a84e
zero-ui/frontend/src/external/RuleCompiler.js
Lines 1120 to 1124 in ee6a84e
the compile method uses caps and tags different from rules
rules have no names, they will be parsed and pushed to the rules array
both of tags and caps have names, and their names will be keys in the result objects
if we pass arrays as tags and caps, the spread syntax ...tags ...caps can't handle the result returned by the compile method.
I tried to init tags and caps as empty object and change the setFlowData method, it works as expected.
from zero-ui.
Also, even if the bug is fixed, the ui interface to set member's group and capabilities still needs to be developed, I've checked MemberSettings.jsx, there's no such support yet. I intend to implement this feature, but don't have time to do it yet.
from zero-ui.
Pull request #41 has been merged to the main branch. This feature will be available with the new release.
Special gratitude goes to @snachx for finding the bug and developing the UI for tags and caps.
from zero-ui.
Related Issues (20)
- bug: why must https HOT 1
- feat: add changes log
- feat: DNS and search domain pushed to clients HOT 5
- dev: migrate to cron package from croner HOT 1
- bug: zerotier 1.12.0 compatibility HOT 32
- feat: deb/rpm/flatpak/snap HOT 1
- dev: fix eslint and typescript errors
- bug: Capabilities does not work HOT 8
- dev: remove workaround for deleting the member HOT 4
- dev: migrate from express to hono/fastify HOT 3
- feat: implement rate-limiting for authorization HOT 6
- bug: The new version does not open 4000 ports ? HOT 11
- dev: improve release workflow
- dev: migrate from callbacks to promises on backend
- feat: keyboard shortcuts for zero-ui HOT 2
- feat: Idle Session Timeout for increased security
- bug: only ZU_DEFAULT_USERNAME=admin works HOT 6
- bug: Unable to start from sources HOT 1
- linux mint versin 1.14 client still showing version 1.12.2 in ZeroTier Central web page HOT 1
- feat: QR code to join network
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zero-ui.