Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
salt-observer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
django
salt-observer
Commits
ee2486a2
Commit
ee2486a2
authored
9 years ago
by
Tim Fechner
Committed by
Tim Fechner
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add flags to Domain model
parent
998a0a9e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
salt_observer/admin.py
+1
-1
1 addition, 1 deletion
salt_observer/admin.py
salt_observer/migrations/0010_auto_20160712_1123.py
+27
-0
27 additions, 0 deletions
salt_observer/migrations/0010_auto_20160712_1123.py
salt_observer/models.py
+3
-0
3 additions, 0 deletions
salt_observer/models.py
with
31 additions
and
1 deletion
salt_observer/admin.py
+
1
−
1
View file @
ee2486a2
...
...
@@ -31,6 +31,6 @@ admin.site.register(Network, NetworkAdmin)
class
DomainAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'
fqdn
'
,
'
minion_count
'
)
list_display
=
(
'
fqdn
'
,
'
minion_count
'
,
'
public
'
,
'
can_speak_https
'
)
filter_horizontal
=
(
'
minion
'
,)
admin
.
site
.
register
(
Domain
,
DomainAdmin
)
This diff is collapsed.
Click to expand it.
salt_observer/migrations/0010_auto_20160712_1123.py
0 → 100644
+
27
−
0
View file @
ee2486a2
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-07-12 09:23
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
salt_observer
'
,
'
0009_auto_20160712_1053
'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'
domain
'
,
name
=
'
can_speak_https
'
,
field
=
models
.
BooleanField
(
default
=
False
,
help_text
=
'
Is there a service listening on port 443
'
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'
domain
'
,
name
=
'
public
'
,
field
=
models
.
BooleanField
(
default
=
False
,
help_text
=
'
Is this domain public accessible
'
),
preserve_default
=
False
,
),
]
This diff is collapsed.
Click to expand it.
salt_observer/models.py
+
3
−
0
View file @
ee2486a2
...
...
@@ -30,6 +30,9 @@ class Domain(models.Model):
fqdn
=
models
.
CharField
(
max_length
=
255
)
minion
=
models
.
ManyToManyField
(
'
Minion
'
,
blank
=
True
)
can_speak_https
=
models
.
BooleanField
(
help_text
=
'
Is there a service listening on port 443
'
)
public
=
models
.
BooleanField
(
help_text
=
'
Is this domain public accessible
'
)
def
minion_count
(
self
):
return
len
(
self
.
minion
.
all
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment