Skip to content

Commit 6f4e422

Browse files
committed
Differentiate pre-production sites
1 parent 877ee1d commit 6f4e422

5 files changed

Lines changed: 21 additions & 7 deletions

File tree

djnro/static/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,7 @@ footer.auth {
139139
input[readonly].input {
140140
color: rgba(51, 51, 51, 0.5);
141141
}
142+
143+
dd.preproduction {
144+
color: rgb(230, 93, 0);
145+
}
4.77 KB
Loading

djnro/static/js/home-page-map.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
var map;
66
var bounds;
77
var image;
8+
var imagePreProd;
89
var infoWindow;
910
var cityImg;
1011
var countryImg;
1112
var styles;
1213
var markersUrl;
1314
var pinImg;
15+
var pinImgPreProd;
1416

1517
function initialize() {
1618
image = new google.maps.MarkerImage(pinImg,
@@ -20,6 +22,12 @@
2022
new google.maps.Point(12, 40),
2123
new google.maps.Size(25, 40)
2224
);
25+
imagePreProd = new google.maps.MarkerImage(pinImgPreProd,
26+
new google.maps.Size(50, 80),
27+
new google.maps.Point(0, 0),
28+
new google.maps.Point(12, 40),
29+
new google.maps.Size(25, 40)
30+
);
2331

2432
var styleArray = [ {
2533
featureType : "all",
@@ -126,12 +134,10 @@
126134
marker,
127135
'click',
128136
function() {
129-
infoWindow.setContent ( "<div><h4>"
137+
infoWindow.setContent ( "<div" + (jsonMarker.stage == 1 ? '' : ' class="preproduction"') + "><h4>"
130138
+ jsonMarker.inst
131139
+ "</h4>"
132-
+
133-
134-
"<div class='tabbable'>"
140+
+ "<div class='tabbable'>"
135141
+ "<ul class='nav nav-tabs'>"
136142
+ "<li class='active'><a href='#tab1' data-toggle='tab'>Info</a></li>"
137143
+ "<li><a href='#tab2' data-toggle='tab'>More...</a></li>"
@@ -153,7 +159,9 @@
153159
+ "&nbsp;</dd>"
154160
+ "<dt>Number of APs</dt><dd>"
155161
+ jsonMarker.AP_no
156-
+ "&nbsp;</dd></dl>"
162+
+ "&nbsp;</dd>"
163+
+ (jsonMarker.stage == 1 ? '' : '<dt class="preproduction">Stage</dt><dd class="preproduction">Testing/Preproduction</dd>')
164+
+ "</dl>"
157165
+ "</div>"
158166
+ "<div class='tab-pane' id='tab2'>"
159167
+ "<dl class='dl-horizontal'>"
@@ -203,7 +211,7 @@
203211
'map' : map,
204212
'title' : title,
205213
'address' : address,
206-
'icon' : image,
214+
'icon' : markerObj.stage == 1 ? image : imagePreProd,
207215
});
208216
return marker
209217
}
@@ -350,6 +358,7 @@
350358
image = '';
351359
infoWindow;
352360
pinImg = mapDiv.data("pin");
361+
pinImgPreProd = mapDiv.data("pin-preprod");
353362
pinGrpImg = mapDiv.data("group-pin");
354363
addr = {};
355364
styles = [{

djnro/templates/front/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{% block bodyclass %}home{% endblock %}
99
{% block content %}
1010
<div id="map_wrapper">
11-
<div id="map_canvas" style="width:100%; height:600px; overflow: hidden;" data-map-center-lat="{{MAP_CENTER.0}}" data-map-center-lng="{{MAP_CENTER.1}}" data-group-pin="{% static 'img/edugroup.png' %}" data-pin="{% static 'img/edupin.png' %}" data-city="{% static 'img/city.png' %}" data-country="{% static 'img/country.png' %}" data-markers="{% url 'get-all-services' %}"></div>
11+
<div id="map_canvas" style="width:100%; height:600px; overflow: hidden;" data-map-center-lat="{{MAP_CENTER.0}}" data-map-center-lng="{{MAP_CENTER.1}}" data-group-pin="{% static 'img/edugroup.png' %}" data-pin="{% static 'img/edupin.png' %}" data-pin-preprod="{% static 'img/edupin-preprod.png' %}" data-city="{% static 'img/city.png' %}" data-country="{% static 'img/country.png' %}" data-markers="{% url 'get-all-services' %}"></div>
1212
</div>
1313
<div class="squares">
1414
<div class="container">

edumanage/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,7 @@ def cache_key(inst_key):
20432043
point['wired_no'] = u"%s" % (sl.wired_no)
20442044
point['SSID'] = u"%s" % (sl.SSID)
20452045
point['key'] = u"%s" % sl.pk
2046+
point['stage'] = u"%s" % (sl.stage)
20462047
points[cache_key].append(point)
20472048

20482049
points_ret.extend(points[cache_key])

0 commit comments

Comments
 (0)