summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/src/static/js/booking-calendar.js
diff options
context:
space:
mode:
authormaxbr <maxbr@mi.fu-berlin.de>2016-10-05 14:10:56 +0200
committermaxbr <maxbr@mi.fu-berlin.de>2016-10-05 14:20:13 +0200
commit46e1d9ab232df1c4deb672b72cd7b87081094955 (patch)
treefa44a286b9fd924c3be2afc3f9b239cc98e1a2b7 /pharos-dashboard/src/static/js/booking-calendar.js
parent6ecb8d290c106e41d0f5a446e7aa878a219224ff (diff)
Add Installer and Scenario fields to bookings
JIRA: PHAROS-272 Change-Id: I28f44bfadb1dbe3cb0caca0a8038fba988cf26f9 Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'pharos-dashboard/src/static/js/booking-calendar.js')
-rw-r--r--pharos-dashboard/src/static/js/booking-calendar.js28
1 files changed, 20 insertions, 8 deletions
diff --git a/pharos-dashboard/src/static/js/booking-calendar.js b/pharos-dashboard/src/static/js/booking-calendar.js
index 9cb0f32..f634293 100644
--- a/pharos-dashboard/src/static/js/booking-calendar.js
+++ b/pharos-dashboard/src/static/js/booking-calendar.js
@@ -1,11 +1,11 @@
/*****************************************************************************
-* Copyright (c) 2016 Max Breitenfeldt and others.
-*
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Apache License, Version 2.0
-* which accompanies this distribution, and is available at
-* http://www.apache.org/licenses/LICENSE-2.0
-*****************************************************************************/
+ * Copyright (c) 2016 Max Breitenfeldt and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *****************************************************************************/
function parseCalendarEvents(bookings) {
@@ -14,9 +14,21 @@ function parseCalendarEvents(bookings) {
// convert ISO 8601 timestring to moment, needed for timezone handling
start = moment(bookings[i]['start']);
end = moment(bookings[i]['end']);
+
+ installer = bookings[i]['installer__name'];
+ if (installer === null) {
+ installer = '';
+ }
+
+ scenario = bookings[i]['scenario__name'];
+ if (scenario === null) {
+ scenario = '';
+ }
+ title = bookings[i]['purpose'] + ' ' + installer + ' ' + scenario;
+
event = {
id: bookings[i]['id'],
- title: bookings[i]['purpose'],
+ title: title,
start: start,
end: end,
};