summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'pharos-dashboard/dashboard')
-rw-r--r--pharos-dashboard/dashboard/fixtures/dashboard.json18
-rw-r--r--pharos-dashboard/dashboard/models.py4
-rw-r--r--pharos-dashboard/dashboard/views.py2
3 files changed, 4 insertions, 20 deletions
diff --git a/pharos-dashboard/dashboard/fixtures/dashboard.json b/pharos-dashboard/dashboard/fixtures/dashboard.json
index d90e99b..f0ac3b2 100644
--- a/pharos-dashboard/dashboard/fixtures/dashboard.json
+++ b/pharos-dashboard/dashboard/fixtures/dashboard.json
@@ -4,7 +4,6 @@
"pk": 1,
"fields": {
"name": "Linux Foundation POD 1",
- "slavename": "lf-pod1",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Lf+Lab"
}
@@ -14,7 +13,6 @@
"pk": 2,
"fields": {
"name": "Linux Foundation POD 2",
- "slavename": "lf-pod2",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Lf+Lab"
}
@@ -24,7 +22,6 @@
"pk": 3,
"fields": {
"name": "Ericsson POD 2",
- "slavename": "ericsson-pod2",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Ericsson+Hosting+and+Request+Process"
}
@@ -34,7 +31,6 @@
"pk": 4,
"fields": {
"name": "Intel POD 2",
- "slavename": "intel-pod2",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Intel+Pod2"
}
@@ -44,7 +40,6 @@
"pk": 5,
"fields": {
"name": "Intel POD 5",
- "slavename": "intel-pod5",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Intel+Pod5"
}
@@ -54,7 +49,6 @@
"pk": 6,
"fields": {
"name": "Intel POD 6",
- "slavename": "intel-pod6",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Intel+Pod6"
}
@@ -64,7 +58,6 @@
"pk": 7,
"fields": {
"name": "Intel POD 8",
- "slavename": "intel-pod8",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Intel+Pod8"
}
@@ -74,7 +67,6 @@
"pk": 8,
"fields": {
"name": "Huawei POD 1",
- "slavename": "huawei-pod1",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Huawei+Hosting"
}
@@ -84,7 +76,6 @@
"pk": 9,
"fields": {
"name": "Intel POD 3",
- "slavename": "intel-pod3",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Intel+Pod3"
}
@@ -94,7 +85,6 @@
"pk": 10,
"fields": {
"name": "Dell POD 1",
- "slavename": "dell-pod1",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Dell+Hosting"
}
@@ -104,7 +94,6 @@
"pk": 11,
"fields": {
"name": "Dell POD 2",
- "slavename": "dell-pod2",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Dell+Hosting"
}
@@ -114,7 +103,6 @@
"pk": 12,
"fields": {
"name": "Orange POD 2",
- "slavename": "orange-pod2",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Opnfv-orange-pod2"
}
@@ -124,7 +112,6 @@
"pk": 13,
"fields": {
"name": "Arm POD 1",
- "slavename": "arm-build1",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Enea-pharos-lab"
}
@@ -134,7 +121,6 @@
"pk": 14,
"fields": {
"name": "Ericsson POD 1",
- "slavename": "ericsson-pod1",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Ericsson+Hosting+and+Request+Process"
}
@@ -144,7 +130,6 @@
"pk": 15,
"fields": {
"name": "Huawei POD 2",
- "slavename": "huawei-pod2",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Huawei+Hosting"
}
@@ -154,7 +139,6 @@
"pk": 16,
"fields": {
"name": "Huawei POD 3",
- "slavename": "huawei-pod3",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Huawei+Hosting"
}
@@ -164,7 +148,6 @@
"pk": 17,
"fields": {
"name": "Huawei POD 4",
- "slavename": "huawei-pod4",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Huawei+Hosting"
}
@@ -174,7 +157,6 @@
"pk": 18,
"fields": {
"name": "Intel POD 9",
- "slavename": "intel-pod9",
"description": "Some description",
"url": "https://wiki.opnfv.org/display/pharos/Intel+Pod9"
}
diff --git a/pharos-dashboard/dashboard/models.py b/pharos-dashboard/dashboard/models.py
index 02073e6..971af6a 100644
--- a/pharos-dashboard/dashboard/models.py
+++ b/pharos-dashboard/dashboard/models.py
@@ -10,8 +10,8 @@ class Resource(models.Model):
name = models.CharField(max_length=100, unique=True)
description = models.CharField(max_length=300, blank=True, null=True)
url = models.CharField(max_length=100, blank=True, null=True)
- owners = models.ManyToManyField(User)
- slave = models.ForeignKey(JenkinsSlave, on_delete=models.DO_NOTHING)
+ owner = models.ForeignKey(User)
+ slave = models.ForeignKey(JenkinsSlave, on_delete=models.DO_NOTHING, null=True)
class Meta:
db_table = 'resource'
diff --git a/pharos-dashboard/dashboard/views.py b/pharos-dashboard/dashboard/views.py
index 6af2c1a..56b3a51 100644
--- a/pharos-dashboard/dashboard/views.py
+++ b/pharos-dashboard/dashboard/views.py
@@ -1,4 +1,6 @@
from datetime import timedelta
+
+from django.contrib.auth.models import User
from django.utils import timezone
from django.views.generic import TemplateView