-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
增加实例标签功能 #162
增加实例标签功能 #162
Conversation
Codecov Report
@@ Coverage Diff @@
## master #162 +/- ##
==========================================
+ Coverage 73.91% 73.95% +0.03%
==========================================
Files 62 62
Lines 6683 6727 +44
==========================================
+ Hits 4940 4975 +35
- Misses 1743 1752 +9
Continue to review full report at Codecov.
|
还没空跑起来,从代码来看是类似用户和组的体验?只要能在一个地方完成添加我觉得就挺好的。 关于属性值这块我建议不要有tag_name 这样的命名,这样的话,代码里会有这样风格的名字 some_tag.tag_name 我个人感觉 some_tag.name 就比较自然。 tag有ID和名字我觉得就够了,code_name是出于什么考虑?检索速度吗? tag的名字可以有个建议比如都是 can_ is_ 开头的,can_read 表示可以读,can_write 可以写,is_master 是主库,is_slave 是从库之类的。 |
类似用户和组,主要用于分类和筛选 名称可以在model定义为name,加个属性映射到db,主要还是避免关键字的原因 code用于代码逻辑判断,定义后不能修改,name用于前端展现,可以修改 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
很棒, 我刚刚在自己机器上跑起来了, 用起来挺友好, 和zabbix的界面很像.
我看前端的相关调整还没有完成吧, 加油👍
加油⛽️ |
tag_code调整为:can_read 支持查询,can_write 支持上线 |
相关issue:#152
python manage.py loaddata initial_data.json
初始化@LeoQuote @yyukai
关于tag_code,标签代码有没有命名规范建议?