Skip to content

Commit

Permalink
Differentiate pre-production sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalse committed Dec 28, 2022
1 parent 877ee1d commit 6f4e422
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
4 changes: 4 additions & 0 deletions djnro/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,7 @@ footer.auth {
input[readonly].input {
color: rgba(51, 51, 51, 0.5);
}

dd.preproduction {
color: rgb(230, 93, 0);
}
Binary file added djnro/static/img/edupin-preprod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions djnro/static/js/home-page-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
var map;
var bounds;
var image;
var imagePreProd;
var infoWindow;
var cityImg;
var countryImg;
var styles;
var markersUrl;
var pinImg;
var pinImgPreProd;

function initialize() {
image = new google.maps.MarkerImage(pinImg,
Expand All @@ -20,6 +22,12 @@
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);
imagePreProd = new google.maps.MarkerImage(pinImgPreProd,
new google.maps.Size(50, 80),
new google.maps.Point(0, 0),
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);

var styleArray = [ {
featureType : "all",
Expand Down Expand Up @@ -126,12 +134,10 @@
marker,
'click',
function() {
infoWindow.setContent ( "<div><h4>"
infoWindow.setContent ( "<div" + (jsonMarker.stage == 1 ? '' : ' class="preproduction"') + "><h4>"
+ jsonMarker.inst
+ "</h4>"
+

"<div class='tabbable'>"
+ "<div class='tabbable'>"
+ "<ul class='nav nav-tabs'>"
+ "<li class='active'><a href='#tab1' data-toggle='tab'>Info</a></li>"
+ "<li><a href='#tab2' data-toggle='tab'>More...</a></li>"
Expand All @@ -153,7 +159,9 @@
+ "&nbsp;</dd>"
+ "<dt>Number of APs</dt><dd>"
+ jsonMarker.AP_no
+ "&nbsp;</dd></dl>"
+ "&nbsp;</dd>"
+ (jsonMarker.stage == 1 ? '' : '<dt class="preproduction">Stage</dt><dd class="preproduction">Testing/Preproduction</dd>')
+ "</dl>"
+ "</div>"
+ "<div class='tab-pane' id='tab2'>"
+ "<dl class='dl-horizontal'>"
Expand Down Expand Up @@ -203,7 +211,7 @@
'map' : map,
'title' : title,
'address' : address,
'icon' : image,
'icon' : markerObj.stage == 1 ? image : imagePreProd,
});
return marker
}
Expand Down Expand Up @@ -350,6 +358,7 @@
image = '';
infoWindow;
pinImg = mapDiv.data("pin");
pinImgPreProd = mapDiv.data("pin-preprod");
pinGrpImg = mapDiv.data("group-pin");
addr = {};
styles = [{
Expand Down
2 changes: 1 addition & 1 deletion djnro/templates/front/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% block bodyclass %}home{% endblock %}
{% block content %}
<div id="map_wrapper">
<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>
<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>
</div>
<div class="squares">
<div class="container">
Expand Down
1 change: 1 addition & 0 deletions edumanage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2043,6 +2043,7 @@ def cache_key(inst_key):
point['wired_no'] = u"%s" % (sl.wired_no)
point['SSID'] = u"%s" % (sl.SSID)
point['key'] = u"%s" % sl.pk
point['stage'] = u"%s" % (sl.stage)
points[cache_key].append(point)

points_ret.extend(points[cache_key])
Expand Down

0 comments on commit 6f4e422

Please sign in to comment.