-
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
Rgr #239
Rgr #239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
=========================================
- Coverage 83.11% 83.1% -0.01%
=========================================
Files 65 65
Lines 8141 8231 +90
=========================================
+ Hits 6766 6840 +74
- Misses 1375 1391 +16
Continue to review full report at Codecov.
|
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.
这几个修改后还缺数据迁移的脚本,这块我周末处理,这周末合并发版吧
sql/models.py
Outdated
class InstanceTag(models.Model): | ||
"""实例标签配置""" | ||
tag_code = models.CharField('标签代码', max_length=20, unique=True) | ||
tag_name = models.CharField('标签名称', max_length=20, unique=True) | ||
active = models.BooleanField('激活状态', default=True) | ||
create_time = models.DateTimeField('创建时间', auto_now_add=True) | ||
instances = models.ManyToManyField(Instance,through='InstanceTagRelations',through_fields=('instance_tag','instance')) |
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.
关系表中已经使用外键,这个关联是为了处理什么?
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.
可以使用自带的mtm 查询
sql/templates/groupmgmt.html
Outdated
formatter: function (value, row, index) { | ||
switch (row.object_type) { | ||
case 0: | ||
return "<a href=\"/admin/sql/users/" + row.object_id + "/change/\">" + value + "</a>"; | ||
return "<a href=\"/admin/sql/users/" + row.object_id + "/change/\">" + row.object_id__username + "</a>"; |
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.
这个描述显示中文名display
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.
好的 我修改下
sql/resource_group.py
Outdated
'create_time') | ||
rows = [row for row in rows] | ||
if object_type == '0': | ||
rows_obj = rows_objusers |
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.
搜索可以加在每个对象获取的地方,参考上面
这个功能这次发布过了再合吧,先合几个bug修复,不要关pr! |
你已经很久没有回复这个issue了,如果没有进一步的信息的话, 会作为不活跃issue关闭, 感谢你对本项目的贡献。 |
实例标签使用系统自己manytomany
用户和实例添加页面新增资源组关联操作,便于维护
拆分资源关联表为2张
将标签和实例改为关联表