aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2019-10-10 07:49:08 -0700
committerGitHub <noreply@github.com>2019-10-10 07:49:08 -0700
commit4e07f8361ddc5677b35b94170b6b1e61b2543b01 (patch)
treef9d90d4ca3df97ccf1595dc3f93d7c3df35d6bd2
parentd7360d5899d7a4cc701634fbb6e3b6d5606dc04b (diff)
parentbd518ebdd758b8dbeefcee8a49ec156ff9ff981e (diff)
Merge pull request #105 from montjoie/2019.9-visibility-fix
lava-master: patch: Add fix for visibility issue
-rw-r--r--lava-master/lava-patch/0001-scheduler.jobs.show-fix-missing-value-after-2019.09.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/lava-master/lava-patch/0001-scheduler.jobs.show-fix-missing-value-after-2019.09.patch b/lava-master/lava-patch/0001-scheduler.jobs.show-fix-missing-value-after-2019.09.patch
new file mode 100644
index 0000000..093996d
--- /dev/null
+++ b/lava-master/lava-patch/0001-scheduler.jobs.show-fix-missing-value-after-2019.09.patch
@@ -0,0 +1,25 @@
+diff --git a/lava_scheduler_app/api/jobs.py b/lava_scheduler_app/api/jobs.py
+index 7c9e2cd52..5aba8d88b 100644
+--- a/lava_scheduler_app/api/jobs.py
++++ b/lava_scheduler_app/api/jobs.py
+@@ -395,6 +395,12 @@ class SchedulerJobsAPI(ExposedV2API):
+ device_type = None
+ if job.requested_device_type is not None:
+ device_type = job.requested_device_type.name
++ if job.is_public:
++ visibility = "Public"
++ else:
++ visibility = "Private (%s)" % ", ".join(
++ [g.name for g in job.viewing_groups.all()]
++ )
+
+ return {
+ "id": job.display_id,
+@@ -410,6 +416,7 @@ class SchedulerJobsAPI(ExposedV2API):
+ "start_time": job.start_time,
+ "end_time": job.end_time,
+ "tags": [t.name for t in job.tags.all()],
++ "visibility": visibility,
+ "failure_comment": job.failure_comment,
+ }
+