238 lines
8.4 KiB
HTML
238 lines
8.4 KiB
HTML
{% extends "base.html" %}
|
|
{% load tags %}
|
|
|
|
{% load staticfiles %}
|
|
|
|
{% block title %} - Ground Station {{ station.name }}{% endblock %}
|
|
|
|
{% block css %}
|
|
<link rel="stylesheet" href="{% static 'lib/mapbox-gl/dist/mapbox-gl.css' %}">
|
|
{% endblock css %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h2 id="station-info"
|
|
data-name="{{ station.name }}"
|
|
data-id="{{ station.id }}"
|
|
data-lng="{{ station.lng }}"
|
|
data-lat="{{ station.lat }}"
|
|
data-online="{{ station.online|yesno:"true,false" }}"
|
|
data-active="{{ station.active|yesno:"true,false" }}"
|
|
data-schedule="{{ can_schedule|yesno:"true,false" }}"
|
|
data-new-obs="{% url 'base:observation_new' %}">
|
|
{{ station.id }} - {{ station.name }}
|
|
</h2>
|
|
</div>
|
|
<div class="col-md-6 text-right">
|
|
<h2>
|
|
{% if request.user == station.owner %}
|
|
<button class="btn btn-primary" data-toggle="modal" data-target="#StationModal">
|
|
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
|
|
Edit
|
|
</button>
|
|
<a class="btn btn-danger" id="station-delete" href="{% url 'base:station_delete' id=station.id %}">
|
|
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
|
Delete
|
|
</a>
|
|
{% endif %}
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="front-line">
|
|
<span class="label label-default">Owner</span>
|
|
<span class="front-data">
|
|
<a href="{% url 'users:view_user' username=station.owner.username %}">
|
|
{{ station.owner.displayname }}
|
|
</a>
|
|
</span>
|
|
</div>
|
|
{% if station.qthlocator %}
|
|
<div class="front-line">
|
|
<span class="label label-default">QTH Locator</span>
|
|
<span class="front-data">
|
|
{{ station.qthlocator }}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
{% if station.location %}
|
|
<div class="front-line">
|
|
<span class="label label-default">Location</span>
|
|
<span class="front-data">
|
|
{{ station.location }}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
<div class="front-line">
|
|
<span class="label label-default">Coordinates</span>
|
|
<span class="front-data">
|
|
{{ station.lat|floatformat:-3 }}°, {{ station.lng|floatformat:-3 }}°
|
|
</span>
|
|
</div>
|
|
<div class="front-line">
|
|
<span class="label label-default">Altitude</span>
|
|
<span class="front-data">
|
|
{{ station.alt }} m
|
|
</span>
|
|
</div>
|
|
<div class="front-line">
|
|
<span class="label label-default">Min Horizon</span>
|
|
<span class="front-data">
|
|
{{ station.horizon }}°
|
|
</span>
|
|
</div>
|
|
{% if station.rig %}
|
|
<div class="front-line">
|
|
<span class="label label-default">Rig</span>
|
|
<span class="front-data">
|
|
{{ station.rig|default:"-" }}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
{% if station.antenna %}
|
|
<div class="font-line station-antennas">
|
|
<span class="label label-default">Antennas</span>
|
|
<span class="front-data">
|
|
{% for antenna in station.antenna.all %}
|
|
<span class="label label-info" data-toggle="tooltip" data-placement="bottom"
|
|
title="{{ antenna.frequency|frq }} - {{ antenna.frequency_max|frq }}">
|
|
{{ antenna.band}} {{ antenna.get_antenna_type_display }}
|
|
</span>
|
|
{% endfor %}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
{% if station.success_rate %}
|
|
<div class="front-line">
|
|
<span class="label label-default">Success Rate</span>
|
|
<span class="front-data">
|
|
<div class="progress" title="{{ station.success_rate }}%">
|
|
<div class="gs progress-bar progress-bar-success" data-success-rate="{{ station.success_rate }}">
|
|
<span class="sr-only">{{ station.success_rate }}% Complete (success)</span>
|
|
</div>
|
|
<div class="gs progress-bar progress-bar-danger" data-percentagerest="{{ station.success_rate|percentagerest }}">
|
|
<span class="sr-only">{{ station.success_rate|percentagerest }}% Complete (danger)</span>
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
{% if station.observations_count %}
|
|
<div class="front-line">
|
|
<span class="label label-default">Observations</span>
|
|
<span class="front-data">{{ station.observations_count }}
|
|
<div class="pull-right">
|
|
<a href="{% url 'base:observations_list' %}?station={{ station.id }}">
|
|
<button type="button" class="btn btn-xs btn-info">
|
|
View all
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
<div class="front-line">
|
|
<span class="label label-default">Creation Date</span>
|
|
<span class="front-data"
|
|
title="{{ station.created|date:"c" }}">
|
|
{{ station.created|timesince }} ago
|
|
</span>
|
|
</div>
|
|
<div class="front-line">
|
|
{% if station.online %}
|
|
<span class="label label-success">Online</span>
|
|
{% else %}
|
|
<span class="label label-danger">Offline</span>
|
|
{% endif %}
|
|
<span class="front-data"
|
|
title="{{ station.last_seen|date:"c" }}">
|
|
{% if station.last_seen %}
|
|
Last seen {{ station.last_seen|timesince }} ago
|
|
{% else %}
|
|
Never seen
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div id="map-station" data-mapboxid="{{ mapbox_id }}" data-mapboxtoken="{{ mapbox_token }}"></div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<img src="{{ station.get_image }}"
|
|
class="station-view-image"
|
|
alt="{{ station.name }}"
|
|
title="{{ station.name }}">
|
|
</div>
|
|
</div>
|
|
|
|
{% if station.description %}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<span>{{ station.description }}</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h3>
|
|
Pass predictions
|
|
<form id="antenna-filter" class="form-inline pull-right" method="get" action="{% url 'base:station_view' id=station.id %}#satellites">
|
|
<div class="form-group">
|
|
<div class="btn-group" data-toggle="buttons">
|
|
<label class="btn btn-default btn-sm {% if unsupported_frequencies == '1' %}active{% endif %}" aria-expanded="true" aria-controls="unsupported_frequencies">
|
|
<input type="checkbox" name="unsupported_frequencies" {% if unsupported_frequencies == '1' %}checked{% endif %} autocomplete="off">
|
|
<span class="glyphicon glyphicon-filter" aria-hidden="true"></span> Include unsupported satellites
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</h3>
|
|
<table class="table table-hover table-responsive">
|
|
<thead>
|
|
<th>Name</th>
|
|
<th>Timeframe</th>
|
|
<th>⤉Rise°</th>
|
|
<th>⇴Max°</th>
|
|
<th>⤈Set°</th>
|
|
<th>Polar</th>
|
|
<th></th>
|
|
</thead>
|
|
<tbody id="pass_predictions" station-online="{{ station.online }}" station-active="{{ station.active }}" can_schedule="{{ can_schedule }}">
|
|
<tr id="loading-image">
|
|
<td colspan=7>
|
|
<div class="spinner">
|
|
<div class="bounce1"></div>
|
|
<div class="bounce2"></div>
|
|
<div class="bounce3"></div>
|
|
</div>
|
|
Loading Pass Predictions
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% if request.user == station.owner %}
|
|
<!-- Station Modal -->
|
|
{% include 'includes/station_edit.html' %}
|
|
{% endif %}
|
|
{% include 'includes/satellite.html' %}
|
|
{% include 'includes/legend.html' %}
|
|
{% endblock content %}
|
|
|
|
{% block javascript %}
|
|
<script src="{% static 'lib/urijs/src/URI.min.js' %}"></script>
|
|
<script src="{% static 'lib/mapbox-gl/dist/mapbox-gl.js' %}"></script>
|
|
<script src="{% static 'lib/moment/min/moment.min.js' %}"></script>
|
|
<script src="{% static 'js/polar.js' %}"></script>
|
|
<script src="{% static 'js/station_view.js' %}"></script>
|
|
<script src="{% static 'js/gridsquare.js' %}"></script>
|
|
<script src="{% static 'js/satellite.js' %}"></script>
|
|
{% endblock javascript %}
|