diff options
author | Brandon Lo <lobrandon1217@gmail.com> | 2019-11-06 13:05:58 -0500 |
---|---|---|
committer | Brandon Lo <lobrandon1217@gmail.com> | 2019-11-07 11:31:22 -0500 |
commit | 1c68f210bdbe231ef2d993e9bb85e543af3470f8 (patch) | |
tree | 5ac90849828944ea8a7f2f8b411e67a0baca7f4b /src/resource_inventory | |
parent | 5a40f993b78917df9052cb5c7563416ee61cddc0 (diff) |
Allow public marked grb and configs to be shown
Change-Id: I97f4965e8522cac1ceb5c0492e9aa0a2e128d266
Signed-off-by: Brandon Lo <lobrandon1217@gmail.com>
Diffstat (limited to 'src/resource_inventory')
-rw-r--r-- | src/resource_inventory/migrations/0011_auto_20191106_2024.py | 33 | ||||
-rw-r--r-- | src/resource_inventory/models.py | 4 |
2 files changed, 37 insertions, 0 deletions
diff --git a/src/resource_inventory/migrations/0011_auto_20191106_2024.py b/src/resource_inventory/migrations/0011_auto_20191106_2024.py new file mode 100644 index 0000000..bde9f9d --- /dev/null +++ b/src/resource_inventory/migrations/0011_auto_20191106_2024.py @@ -0,0 +1,33 @@ +# Generated by Django 2.2 on 2019-11-06 20:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resource_inventory', '0010_auto_20190430_1405'), + ] + + operations = [ + migrations.AddField( + model_name='configbundle', + name='hidden', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='configbundle', + name='public', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='genericresourcebundle', + name='hidden', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='genericresourcebundle', + name='public', + field=models.BooleanField(default=False), + ), + ] diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index b9f2c44..031ccce 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -113,6 +113,8 @@ class GenericResourceBundle(models.Model): owner = models.ForeignKey(User, null=True, on_delete=models.SET_NULL) lab = models.ForeignKey(Lab, null=True, on_delete=models.SET_NULL) description = models.CharField(max_length=1000, default="") + public = models.BooleanField(default=False) + hidden = models.BooleanField(default=False) def getHosts(self): return_hosts = [] @@ -241,6 +243,8 @@ class ConfigBundle(models.Model): name = models.CharField(max_length=200, unique=True) description = models.CharField(max_length=1000, default="") bundle = models.ForeignKey(GenericResourceBundle, null=True, on_delete=models.CASCADE) + public = models.BooleanField(default=False) + hidden = models.BooleanField(default=False) def __str__(self): return self.name |