The requested changes are too big and content was truncated. Show full diff
1 | NO CONTENT: new file 100755 |
|
NO CONTENT: new file 100755 |
1 | NO CONTENT: new file 100755 |
|
NO CONTENT: new file 100755 |
@@ -0,0 +1,17 | |||||
|
1 | {% extends "base.html" %} | |||
|
2 | ||||
|
3 | {% block title %}Login{% endblock %} | |||
|
4 | ||||
|
5 | {% block content %} | |||
|
6 | <center> | |||
|
7 | <h4>Please login</h4> | |||
|
8 | ||||
|
9 | <div style="margin-top: 30px;"> | |||
|
10 | <form method="POST"> | |||
|
11 | {{ form.as_p }} | |||
|
12 | {% csrf_token %} | |||
|
13 | <button type="submit">Login</button> | |||
|
14 | </form> | |||
|
15 | </div> | |||
|
16 | </center> | |||
|
17 | {% endblock %} |
@@ -0,0 +1,9 | |||||
|
1 | from django.conf.urls import url | |||
|
2 | from . import views | |||
|
3 | ||||
|
4 | urlpatterns = [ | |||
|
5 | url(r'^login/$', views.login_view, name='login'), | |||
|
6 | url(r'^logout/$', views.logout_view, name='logout'), | |||
|
7 | ] | |||
|
8 | ||||
|
9 | app_name = 'login' No newline at end of file |
@@ -0,0 +1,38 | |||||
|
1 | from django.contrib.auth import authenticate | |||
|
2 | from django.contrib.auth import login, logout | |||
|
3 | from django.contrib.auth.forms import AuthenticationForm | |||
|
4 | from django.shortcuts import render, redirect | |||
|
5 | ||||
|
6 | ''' Login to updata app for ROJ staff''' | |||
|
7 | ||||
|
8 | def login_view(request): | |||
|
9 | ||||
|
10 | form = AuthenticationForm() | |||
|
11 | if request.method == "POST": | |||
|
12 | form = AuthenticationForm(data=request.POST) | |||
|
13 | ||||
|
14 | if form.is_valid(): | |||
|
15 | ||||
|
16 | username = form.cleaned_data['username'] | |||
|
17 | password = form.cleaned_data['password'] | |||
|
18 | ||||
|
19 | user = authenticate(username=username, password=password) | |||
|
20 | ||||
|
21 | if user is not None: | |||
|
22 | ||||
|
23 | if user.is_active: | |||
|
24 | login(request, user) | |||
|
25 | ||||
|
26 | return redirect('/updata') | |||
|
27 | else: | |||
|
28 | return render(request, "login/login.html" ) | |||
|
29 | else: | |||
|
30 | context = {'error_login': "error"} | |||
|
31 | return render(request, "login/login.html", context ) | |||
|
32 | ||||
|
33 | return render(request, "login/login.html", {'form': form}) | |||
|
34 | ||||
|
35 | def logout_view(request): | |||
|
36 | ||||
|
37 | logout(request) | |||
|
38 | return redirect('/') No newline at end of file |
1 | NO CONTENT: new file 100755 |
|
NO CONTENT: new file 100755 |
@@ -0,0 +1,108 | |||||
|
1 | from django import forms | |||
|
2 | import django.utils.html | |||
|
3 | import django.utils.safestring | |||
|
4 | import django.template.defaulttags | |||
|
5 | ||||
|
6 | # third party imports | |||
|
7 | import numpy | |||
|
8 | ||||
|
9 | # Madrigal imports | |||
|
10 | import madrigal.metadata | |||
|
11 | import madrigal.ui.web | |||
|
12 | ||||
|
13 | # madrigal imports | |||
|
14 | import madrigal._derive | |||
|
15 | import madrigal.metadata | |||
|
16 | import madrigal.ui.web | |||
|
17 | import madrigal.cedar | |||
|
18 | import madrigal.isprint | |||
|
19 | import madweb.forms | |||
|
20 | ||||
|
21 | import datetime, time | |||
|
22 | ||||
|
23 | def getSelection(keyword, args, kwargs): | |||
|
24 | """getSelection returns '0' if keyword not a key in either args[0] or kwargs, | |||
|
25 | otherwise the value | |||
|
26 | ||||
|
27 | args, kwargs - arguments as passed into SingleExpDefaultForm __init__ | |||
|
28 | """ | |||
|
29 | if len(args) == 0 and len(list(kwargs.keys())) == 0: | |||
|
30 | return('0') # default case when no data passed in | |||
|
31 | elif len(args) > 0: | |||
|
32 | # args[0] is data dict argument to bind data | |||
|
33 | if keyword in args[0]: | |||
|
34 | return(args[0][keyword]) | |||
|
35 | else: | |||
|
36 | return('0') | |||
|
37 | elif keyword in kwargs: | |||
|
38 | return(kwargs[keyword]) | |||
|
39 | elif 'data' in kwargs: | |||
|
40 | if keyword in kwargs['data']: | |||
|
41 | return(kwargs['data'][keyword]) | |||
|
42 | else: | |||
|
43 | return('0') | |||
|
44 | else: | |||
|
45 | return('0') | |||
|
46 | ||||
|
47 | def getExperimentList(args, kwargs, madWeb, header='Select experiment: '): | |||
|
48 | ||||
|
49 | instrumentsId= int(getSelection('instruments', args, kwargs)) | |||
|
50 | ||||
|
51 | kinstList = [int(instrumentsId)] | |||
|
52 | startDate = datetime.datetime(1950,1,1) | |||
|
53 | startDT = datetime.datetime(startDate.year, startDate.month, startDate.day, 0, 0, 0) | |||
|
54 | now = datetime.datetime.now() | |||
|
55 | endDate = datetime.datetime(now.year, 12, 31, 23, 59, 59) | |||
|
56 | endDT = datetime.datetime(endDate.year, endDate.month, endDate.day, 23, 59, 59) | |||
|
57 | experiments = madWeb.getExperimentList(kinstList,startDT, endDT, True) | |||
|
58 | expListin = [('0', header),] | |||
|
59 | for exp in experiments: | |||
|
60 | expListin.append((exp[0], exp[2])) | |||
|
61 | ||||
|
62 | # Using set | |||
|
63 | seen = set() | |||
|
64 | ||||
|
65 | # using list comprehension | |||
|
66 | expList = [(a, b) for a, b in expListin | |||
|
67 | if not (b in seen or seen.add(b))] | |||
|
68 | ||||
|
69 | return(expList) | |||
|
70 | ||||
|
71 | class UpdataForm(forms.Form): | |||
|
72 | def __init__(self, *args, **kwargs): | |||
|
73 | super(UpdataForm, self).__init__(*args, **kwargs) | |||
|
74 | madDB = madrigal.metadata.MadrigalDB() | |||
|
75 | madInstData = madrigal.metadata.MadrigalInstrumentData(madDB) | |||
|
76 | instruments = madInstData.getInstruments(0, True) | |||
|
77 | instList = [('0', "Select Instrument"), ] | |||
|
78 | for kinst, instDesc, siteID in instruments: | |||
|
79 | instList.append((str(kinst), instDesc)) | |||
|
80 | ||||
|
81 | instrumentSelection = getSelection('instruments', args, kwargs) | |||
|
82 | self.fields['instruments'] = django.forms.ChoiceField(widget = django.forms.Select(attrs={"onChange":'populateExp(this)'}), | |||
|
83 | choices=instList, | |||
|
84 | initial=instrumentSelection, | |||
|
85 | label='Instrument:') | |||
|
86 | ||||
|
87 | madWebObj = madrigal.ui.web.MadrigalWeb(madDB) | |||
|
88 | experimentSelection = getSelection('experiments', args, kwargs) | |||
|
89 | self.fields['experiments'] = django.forms.ChoiceField(choices=getExperimentList(args, kwargs, madWebObj), | |||
|
90 | initial=experimentSelection, | |||
|
91 | required=False, label='Experiment:') | |||
|
92 | ||||
|
93 | description = forms.CharField(widget=forms.Textarea(attrs={'cols': 40,'rows': 3, 'style': 'resize:none'}), label='Description') | |||
|
94 | type = forms.ChoiceField(choices=[('0', 'Public'),('1', 'Private')], initial=0,widget=forms.RadioSelect(attrs={'class': 'custom-radio'})) | |||
|
95 | file = forms.FileField(label='Select Files', widget=forms.ClearableFileInput(attrs={'multiple': True})) | |||
|
96 | ||||
|
97 | class ExpForm(forms.Form): | |||
|
98 | """SingleExpInstForm is a Form class for the instrument select field in the Single Experiment interface. | |||
|
99 | Use this because its faster to create than the full SingleExpDefaultForm | |||
|
100 | """ | |||
|
101 | def __init__(self, *args, **kwargs): | |||
|
102 | super(ExpForm, self).__init__(*args, **kwargs) | |||
|
103 | madDB = madrigal.metadata.MadrigalDB() | |||
|
104 | madWebObj = madrigal.ui.web.MadrigalWeb(madDB) | |||
|
105 | experimentSelection = getSelection('experiments', args, kwargs) | |||
|
106 | self.fields['experiments'] = django.forms.ChoiceField(choices=getExperimentList(args, kwargs, madWebObj), | |||
|
107 | initial=experimentSelection, | |||
|
108 | required=False, label='Experiment') |
1 | NO CONTENT: new file 100755 |
|
NO CONTENT: new file 100755 |
@@ -0,0 +1,9 | |||||
|
1 | <div class="row"> | |||
|
2 | {{ form.experiments.label }} | |||
|
3 | </div> | |||
|
4 | <!-- Instrument select is its own row in selections column --> | |||
|
5 | <div class="row"> | |||
|
6 | <div class="col-md-12"> | |||
|
7 | {{ form.experiments }} | |||
|
8 | </div> <!-- end span --> | |||
|
9 | </div> <!-- end row --> No newline at end of file |
@@ -0,0 +1,102 | |||||
|
1 | {% extends "base.html" %} | |||
|
2 | {% block title %}Upload Data{% endblock %} | |||
|
3 | ||||
|
4 | {% block extra_head %} | |||
|
5 | <script type="text/javascript"> | |||
|
6 | function populateExp(select) { | |||
|
7 | ||||
|
8 | var kinst = select.options[select.selectedIndex].value; | |||
|
9 | var url = "{% url 'updata:get_experiments' %}" + '?instruments=' + kinst; | |||
|
10 | // first delete all forms that are now out of date | |||
|
11 | divIndex = $(".single_form").index($("#experiments")) | |||
|
12 | $(".single_form").slice(divIndex).empty() | |||
|
13 | // second populate the categories html | |||
|
14 | $(".single_form").slice(divIndex, divIndex + 1).load(url); | |||
|
15 | } | |||
|
16 | ||||
|
17 | </script> | |||
|
18 | ||||
|
19 | <style> | |||
|
20 | .custom-radio { | |||
|
21 | list-style: none; | |||
|
22 | margin: 0; | |||
|
23 | padding: 0; | |||
|
24 | } | |||
|
25 | </style> | |||
|
26 | {% endblock %} | |||
|
27 | ||||
|
28 | {% block content %} | |||
|
29 | ||||
|
30 | <center><h4>Upload Data</h4></center> | |||
|
31 | <form method="post" enctype="multipart/form-data"> | |||
|
32 | ||||
|
33 | {% csrf_token %} | |||
|
34 | ||||
|
35 | {% block description %} | |||
|
36 | <!-- subdivide selection column for instruments to be possibly filled in by ajax - single_form 0 --> | |||
|
37 | <div class="col-md-12 single_form" id="description"> | |||
|
38 | <div class="row"> | |||
|
39 | {{ form.description.label }} | |||
|
40 | </div> | |||
|
41 | <!-- Instrument select is its own row in selections column --> | |||
|
42 | <div class="row"> | |||
|
43 | <div class="col-md-12"> | |||
|
44 | {{ form.description }} | |||
|
45 | </div> <!-- end span --> | |||
|
46 | </div> <!-- end row --> | |||
|
47 | </div> <!-- end subdivide --> | |||
|
48 | ||||
|
49 | {% endblock %} | |||
|
50 | ||||
|
51 | {% block file %} | |||
|
52 | <div class="col-md-12 single_form" style="margin-top: 15px;" id="description"> | |||
|
53 | <div class="row"> | |||
|
54 | {{ form.file.label }} | |||
|
55 | </div> | |||
|
56 | <!-- Instrument select is its own row in selections column --> | |||
|
57 | <div class="row"> | |||
|
58 | <div class="col-md-12"> | |||
|
59 | {{ form.file }} | |||
|
60 | </div> <!-- end span --> | |||
|
61 | </div> <!-- end row --> | |||
|
62 | </div> <!-- end subdivide --> | |||
|
63 | ||||
|
64 | {% endblock %} | |||
|
65 | ||||
|
66 | {% block type %} | |||
|
67 | <div class="col-md-12 single_form" style="margin-top: 15px;" id="description"> | |||
|
68 | <!-- Instrument select is its own row in selections column --> | |||
|
69 | <div class="row"> | |||
|
70 | <div class="col-md-12"> | |||
|
71 | {{ form.type }} | |||
|
72 | </div> <!-- end span --> | |||
|
73 | </div> <!-- end row --> | |||
|
74 | </div> <!-- end subdivide --> | |||
|
75 | ||||
|
76 | {% endblock %} | |||
|
77 | ||||
|
78 | {% block instruments %} | |||
|
79 | <!-- subdivide selection column for instruments to be possibly filled in by ajax - single_form 0 --> | |||
|
80 | <div class="col-md-12 single_form" style="margin-top: 15px;" id="instruments"> | |||
|
81 | ||||
|
82 | {% if form.instruments %} | |||
|
83 | {% include "madweb/instruments.html" %} | |||
|
84 | {% endif %} | |||
|
85 | ||||
|
86 | </div> <!-- end subdivide --> | |||
|
87 | {% endblock %} | |||
|
88 | ||||
|
89 | {% block experiments %} | |||
|
90 | <!-- subdivide selection column for experiments to be possibly filled in by ajax - single_form 0 --> | |||
|
91 | <div class="col-md-12 single_form" style="margin-top: 15px;" id="experiments"> | |||
|
92 | ||||
|
93 | {% if form.experiments %} | |||
|
94 | {% include "updata/experiments.html" %} | |||
|
95 | {% endif %} | |||
|
96 | ||||
|
97 | </div> <!-- end subdivide --> | |||
|
98 | {% endblock %} | |||
|
99 | <button style="margin-top: 15px;" type="submit">Load</button> | |||
|
100 | ||||
|
101 | </form> | |||
|
102 | {% endblock %} No newline at end of file |
@@ -0,0 +1,9 | |||||
|
1 | from django.conf.urls import url | |||
|
2 | from . import views | |||
|
3 | ||||
|
4 | urlpatterns = [ | |||
|
5 | url(r'^$',views.index, name='updata_index'), | |||
|
6 | url(r'^getExperiments/?$', views.get_experiments, name='get_experiments'), | |||
|
7 | ] | |||
|
8 | ||||
|
9 | app_name = 'updata' No newline at end of file |
@@ -0,0 +1,83 | |||||
|
1 | ||||
|
2 | from django.contrib.auth.decorators import login_required | |||
|
3 | from django.shortcuts import render | |||
|
4 | from .forms import UpdataForm, ExpForm | |||
|
5 | from django.core.files.storage import FileSystemStorage | |||
|
6 | from django.contrib import messages | |||
|
7 | ||||
|
8 | import os | |||
|
9 | ||||
|
10 | # madrigal imports | |||
|
11 | import madrigal.metadata | |||
|
12 | import madrigal.ui.web | |||
|
13 | import madrigal.admin | |||
|
14 | ||||
|
15 | @login_required | |||
|
16 | def index(request): | |||
|
17 | ''' | |||
|
18 | Uploading experiments data view. Allows user to upload experiment files | |||
|
19 | ||||
|
20 | ''' | |||
|
21 | dbAdminObj = madrigal.admin.MadrigalDBAdmin() | |||
|
22 | madDB = madrigal.metadata.MadrigalDB() | |||
|
23 | madWebObj = madrigal.ui.web.MadrigalWeb(madDB) | |||
|
24 | siteName, siteList = madWebObj.getSiteInfo() | |||
|
25 | ||||
|
26 | if request.method == 'POST': | |||
|
27 | form = UpdataForm(request.POST, request.FILES) | |||
|
28 | files = request.FILES.getlist('file') | |||
|
29 | ||||
|
30 | if form.is_valid(): | |||
|
31 | try: | |||
|
32 | description = form.cleaned_data['description'] | |||
|
33 | instCode = int(form.cleaned_data['instruments']) | |||
|
34 | expId = form.cleaned_data['experiments'] | |||
|
35 | perm = int(form.cleaned_data['type']) | |||
|
36 | ||||
|
37 | #saving file | |||
|
38 | for f in files: | |||
|
39 | fs = FileSystemStorage(location='/tmp') | |||
|
40 | fs.save(f.name, f) | |||
|
41 | madExp = madrigal.metadata.MadrigalExperiment() | |||
|
42 | filepath = os.path.join('/tmp', f.name) | |||
|
43 | expTitle = madExp.getExpNameByExpId(expId) | |||
|
44 | ||||
|
45 | dbAdminObj.createMadrigalExperiment(filepath,expTitle, perm, description, instCode) | |||
|
46 | ||||
|
47 | ||||
|
48 | madInstParams = madrigal.metadata.MadrigalInstrumentParameters() | |||
|
49 | madInstKindats = madrigal.metadata.MadrigalInstrumentKindats() | |||
|
50 | ||||
|
51 | print('*** Updating local metadata ***') | |||
|
52 | dbAdminObj.__updateLocalMetadata__() | |||
|
53 | print('*** Rebuilding instParmTab.txt ***') | |||
|
54 | madInstParams.rebuildInstParmTable() | |||
|
55 | print('*** Rebuilding instKindatTab.txt ***') | |||
|
56 | madInstKindats.rebuildInstKindatTable() | |||
|
57 | messages.success( | |||
|
58 | request, 'Experimento(s) creado(s) exitosamente') | |||
|
59 | form = UpdataForm() | |||
|
60 | ||||
|
61 | except Exception as e: | |||
|
62 | messages.error( | |||
|
63 | request, str(e)) | |||
|
64 | else: | |||
|
65 | form = UpdataForm() | |||
|
66 | ||||
|
67 | return render(request, 'updata/index.html', { | |||
|
68 | 'form': form, | |||
|
69 | 'site_name': siteName, | |||
|
70 | 'site_list': siteList, | |||
|
71 | }) | |||
|
72 | ||||
|
73 | ||||
|
74 | def get_experiments(request): | |||
|
75 | """get_experiments is a Ajax call that returns the experiments select html to support the | |||
|
76 | updata UI. Called when a user modifies the intruments select field. | |||
|
77 | ||||
|
78 | Inputs: | |||
|
79 | request | |||
|
80 | """ | |||
|
81 | form = ExpForm(request.GET) | |||
|
82 | ||||
|
83 | return render(request, 'updata/experiments.html', {'form': form}) |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
@@ -0,0 +1,50 | |||||
|
1 | <div class="row" style="margin-bottom: 20px"> | |||
|
2 | Select parameter: <br> | |||
|
3 | {{ form.param_list1d.label }} | |||
|
4 | {{ form.param_list1d }} | |||
|
5 | {% if form.param_list2d %} | |||
|
6 | {{ form.param_list2d.label }} | |||
|
7 | {{ form.param_list2d }} | |||
|
8 | {% endif %} | |||
|
9 | ||||
|
10 | </div> | |||
|
11 | ||||
|
12 | <script> | |||
|
13 | $('#id_param_list2d').bind('change', function (e) { | |||
|
14 | var expID = '{{ expID }}'; | |||
|
15 | var param = $(this).val(); | |||
|
16 | var url = '{% url 'plot' %}' + '?expID=' + expID + '¶m2d=' + param; | |||
|
17 | console.log(url) | |||
|
18 | // first delete all forms that are now out of date | |||
|
19 | divIndex = $(".single_form").index($( "#file_plot" )) | |||
|
20 | $(".single_form").slice(divIndex).empty() | |||
|
21 | // second populate the file_plot html if '0' not selected | |||
|
22 | if (param != '0') { | |||
|
23 | $(".single_form").slice(divIndex,divIndex+1).html("<img src=\"static/loader.gif\" class=\"load_center\"/>").load(url); | |||
|
24 | } | |||
|
25 | }) | |||
|
26 | $('#id_param_list1d').bind('change', function (e) { | |||
|
27 | var expID = '{{ expID }}'; | |||
|
28 | var param = $(this).val(); | |||
|
29 | var url = '{% url 'plot' %}' + '?expID=' + expID + '¶m1d=' + param; | |||
|
30 | console.log(url) | |||
|
31 | // first delete all forms that are now out of date | |||
|
32 | divIndex = $(".single_form").index($( "#file_plot" )) | |||
|
33 | $(".single_form").slice(divIndex).empty() | |||
|
34 | // second populate the file_plot html if '0' not selected | |||
|
35 | if (param != '0') { | |||
|
36 | $(".single_form").slice(divIndex,divIndex+1).html("<img src=\"static/loader.gif\" class =\"load_center\"/>").load(url); | |||
|
37 | } | |||
|
38 | }) | |||
|
39 | </script> | |||
|
40 | <style> | |||
|
41 | .load_center { | |||
|
42 | display: block; | |||
|
43 | margin-left: auto; | |||
|
44 | margin-right: auto; | |||
|
45 | margin-top: 100px; | |||
|
46 | margin-bottom: 100px; | |||
|
47 | width: 4%; | |||
|
48 | align-items: center; | |||
|
49 | } | |||
|
50 | </style> No newline at end of file |
@@ -1,132 +1,138 | |||||
1 | """ |
|
1 | """ | |
2 | Django settings for djangoMad project. |
|
2 | Django settings for djangoMad project. | |
3 |
|
3 | |||
4 | For more information on this file, see |
|
4 | For more information on this file, see | |
5 | https://docs.djangoproject.com/en/1.7/topics/settings/ |
|
5 | https://docs.djangoproject.com/en/1.7/topics/settings/ | |
6 |
|
6 | |||
7 | For the full list of settings and their values, see |
|
7 | For the full list of settings and their values, see | |
8 | https://docs.djangoproject.com/en/1.7/ref/settings/ |
|
8 | https://docs.djangoproject.com/en/1.7/ref/settings/ | |
9 | """ |
|
9 | """ | |
10 |
|
10 | |||
11 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
|
11 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) | |
12 | import os |
|
12 | import os | |
13 | BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
|
13 | BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | |
14 |
|
14 | |||
15 |
|
||||
16 |
|
||||
17 | # Quick-start development settings - unsuitable for production |
|
15 | # Quick-start development settings - unsuitable for production | |
18 | # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ |
|
16 | # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ | |
19 |
|
17 | |||
20 | # SECURITY WARNING: keep the secret key used in production secret! |
|
18 | # SECURITY WARNING: keep the secret key used in production secret! | |
21 | SECRET_KEY = '!wa!749ow0!%7t7tr6fr^fvkqyd7yc#mmvpfedr+f2pb!4r)wd' |
|
19 | SECRET_KEY = '^c1l3d35+q28^66d2pc1qlu(k$wmw^*gg3rfitz^s)t=9eu1ui' | |
22 |
|
20 | |||
23 | # SECURITY WARNING: don't run with debug turned on in production! |
|
21 | # SECURITY WARNING: don't run with debug turned on in production! | |
24 | DEBUG = True |
|
22 | DEBUG = True | |
25 |
|
23 | |||
26 |
|
24 | |||
27 | ALLOWED_HOSTS = ['localhost:8000', '127.0.0.1', 'localhost'] |
|
25 | ALLOWED_HOSTS = ['localhost:8000', '127.0.0.1', 'localhost'] | |
28 |
|
26 | |||
29 | ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),) |
|
27 | ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),) | |
30 |
|
28 | |||
31 | EMAIL_HOST = 'hyperion.haystack.mit.edu' |
|
29 | EMAIL_HOST = 'hyperion.haystack.mit.edu' | |
32 |
|
30 | |||
33 | SEND_BROKEN_LINK_EMAILS = True |
|
31 | SEND_BROKEN_LINK_EMAILS = True | |
34 |
|
32 | |||
35 | MANAGERS = (('Bill Rideout', 'brideout@haystack.mit.edu'),) |
|
33 | MANAGERS = (('Bill Rideout', 'brideout@haystack.mit.edu'),) | |
36 |
|
34 | |||
37 |
|
35 | |||
38 | # Application definition |
|
36 | # Application definition | |
39 |
|
37 | |||
40 | INSTALLED_APPS = ( |
|
38 | INSTALLED_APPS = ( | |
41 |
|
|
39 | 'django.contrib.admin', | |
42 | 'django.contrib.auth', |
|
40 | 'django.contrib.auth', | |
43 | 'django.contrib.contenttypes', |
|
41 | 'django.contrib.contenttypes', | |
44 | 'django.contrib.sessions', |
|
42 | 'django.contrib.sessions', | |
45 | 'django.contrib.messages', |
|
43 | 'django.contrib.messages', | |
46 | 'django.contrib.staticfiles', |
|
44 | 'django.contrib.staticfiles', | |
47 | 'madweb', |
|
45 | 'madweb', | |
48 | 'django_bootstrap_calendar', |
|
46 | 'django_bootstrap_calendar', | |
49 | 'bootstrap3' |
|
47 | 'bootstrap3', | |
|
48 | 'apps.login', | |||
|
49 | 'apps.updata', | |||
50 | ) |
|
50 | ) | |
51 |
|
51 | |||
52 |
MIDDLEWARE |
|
52 | MIDDLEWARE = [ | |
53 |
'django. |
|
53 | 'django.middleware.security.SecurityMiddleware', | |
54 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
|||
55 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
54 | 'django.contrib.sessions.middleware.SessionMiddleware', | |
56 | 'django.middleware.common.CommonMiddleware', |
|
55 | 'django.middleware.common.CommonMiddleware', | |
57 | 'django.middleware.csrf.CsrfViewMiddleware', |
|
56 | 'django.middleware.csrf.CsrfViewMiddleware', | |
58 |
'django.contrib.auth.middleware. |
|
57 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | |
|
58 | 'django.contrib.messages.middleware.MessageMiddleware', | |||
59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', | |
60 | ) |
|
60 | ] | |
61 |
|
61 | |||
62 | ROOT_URLCONF = 'djangoMad.urls' |
|
62 | ROOT_URLCONF = 'djangoMad.urls' | |
63 |
|
63 | |||
64 | WSGI_APPLICATION = 'djangoMad.wsgi.application' |
|
64 | WSGI_APPLICATION = 'djangoMad.wsgi.application' | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | TEMPLATES = [ |
|
67 | TEMPLATES = [ | |
68 | { |
|
68 | { | |
69 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
|
69 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', | |
70 | 'DIRS': [ |
|
70 | 'DIRS': [ | |
71 | os.path.join(BASE_DIR, "templates"), |
|
71 | os.path.join(BASE_DIR, "templates"), | |
72 | ], |
|
72 | ], | |
73 | 'APP_DIRS': True, |
|
73 | 'APP_DIRS': True, | |
74 | 'OPTIONS': { |
|
74 | 'OPTIONS': { | |
75 | 'context_processors': [ |
|
75 | 'context_processors': [ | |
76 | 'django.contrib.auth.context_processors.auth', |
|
76 | 'django.contrib.auth.context_processors.auth', | |
77 | 'django.template.context_processors.debug', |
|
77 | 'django.template.context_processors.debug', | |
78 | 'django.template.context_processors.i18n', |
|
78 | 'django.template.context_processors.i18n', | |
79 | 'django.template.context_processors.media', |
|
79 | 'django.template.context_processors.media', | |
80 | 'django.template.context_processors.static', |
|
80 | 'django.template.context_processors.static', | |
81 | 'django.template.context_processors.tz', |
|
81 | 'django.template.context_processors.tz', | |
82 | 'django.contrib.messages.context_processors.messages', |
|
82 | 'django.contrib.messages.context_processors.messages', | |
|
83 | 'django.template.context_processors.request', | |||
83 | ], |
|
84 | ], | |
84 | }, |
|
85 | }, | |
85 | }, |
|
86 | }, | |
86 | ] |
|
87 | ] | |
87 |
|
88 | |||
88 |
|
89 | |||
89 | # Database |
|
90 | # Database | |
90 | # https://docs.djangoproject.com/en/1.7/ref/settings/#databases |
|
91 | # https://docs.djangoproject.com/en/1.7/ref/settings/#databases | |
91 |
|
92 | |||
92 | DATABASES = { |
|
93 | DATABASES = { | |
|
94 | 'default': { | |||
|
95 | 'ENGINE': 'django.db.backends.sqlite3', | |||
|
96 | 'NAME': 'madrigal.sqlite', | |||
|
97 | } | |||
93 | } |
|
98 | } | |
94 |
|
99 | |||
|
100 | ||||
95 | # Internationalization |
|
101 | # Internationalization | |
96 | # https://docs.djangoproject.com/en/1.7/topics/i18n/ |
|
102 | # https://docs.djangoproject.com/en/1.7/topics/i18n/ | |
97 |
|
103 | |||
98 | LANGUAGE_CODE = 'en-us' |
|
104 | LANGUAGE_CODE = 'en-us' | |
99 |
|
105 | |||
100 | TIME_ZONE = 'UTC' |
|
106 | TIME_ZONE = 'UTC' | |
101 |
|
107 | |||
102 | USE_I18N = True |
|
108 | USE_I18N = True | |
103 |
|
109 | |||
104 | USE_L10N = True |
|
110 | USE_L10N = True | |
105 |
|
111 | |||
106 | USE_TZ = True |
|
112 | USE_TZ = True | |
107 |
|
113 | |||
108 |
|
114 | |||
109 | # Absolute filesystem path to the directory that will hold user-uploaded files. |
|
115 | # Absolute filesystem path to the directory that will hold user-uploaded files. | |
110 | # Example: "/home/media/media.lawrence.com/media/" |
|
116 | # Example: "/home/media/media.lawrence.com/media/" | |
111 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') |
|
117 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | |
112 |
|
118 | |||
113 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
119 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | |
114 | # trailing slash. |
|
120 | # trailing slash. | |
115 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
121 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" | |
116 | MEDIA_URL = '/media/' |
|
122 | MEDIA_URL = '/media/' | |
117 |
|
123 | |||
118 | # Absolute path to the directory static files should be collected to. |
|
124 | # Absolute path to the directory static files should be collected to. | |
119 | # Don't put anything in this directory yourself; store your static files |
|
125 | # Don't put anything in this directory yourself; store your static files | |
120 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
126 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. | |
121 | # Example: "/home/media/media.lawrence.com/static/" |
|
127 | # Example: "/home/media/media.lawrence.com/static/" | |
122 | # STATIC_ROOT = os.path.join(BASE_DIR, 'static') |
|
128 | # STATIC_ROOT = os.path.join(BASE_DIR, 'static') | |
123 |
|
129 | |||
124 | # URL prefix for static files. |
|
130 | # URL prefix for static files. | |
125 | # Example: "http://media.lawrence.com/static/" |
|
131 | # Example: "http://media.lawrence.com/static/" | |
126 | STATIC_URL = '/static/' |
|
132 | STATIC_URL = '/static/' | |
127 |
|
133 | |||
128 | BOOTSTRAP3 = { |
|
134 | BOOTSTRAP3 = { | |
129 | # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags) |
|
135 | # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags) | |
130 | 'jquery_url': '/static/jquery.min.js', |
|
136 | 'jquery_url': '/static/jquery.min.js', | |
131 | 'include_jquery': True, |
|
137 | 'include_jquery': True, | |
132 | } |
|
138 | } |
@@ -1,8 +1,11 | |||||
1 | from django.conf.urls import include, url |
|
1 | from django.conf.urls import include, url | |
2 | from django.contrib import admin |
|
2 | from django.contrib import admin | |
3 | import madweb.views |
|
3 | import madweb.views | |
4 |
|
4 | |||
5 | urlpatterns = [ |
|
5 | urlpatterns = [ | |
6 | url(r'^', include('madweb.urls')), |
|
6 | url(r'^', include('madweb.urls')), | |
7 | url(r'^$', madweb.views.index), |
|
7 | url(r'^$', madweb.views.index), | |
|
8 | url(r'^updata/', include('apps.updata.urls', namespace="updata")), | |||
|
9 | url(r'^accounts/', include('apps.login.urls', namespace="login")), | |||
|
10 | url(r'^admin/', admin.site.urls), | |||
8 | ] |
|
11 | ] |
@@ -1,18 +1,18 | |||||
1 | """ |
|
1 | """ | |
2 | WSGI config for djangoMad project. |
|
2 | WSGI config for djangoMad project. | |
3 |
|
3 | |||
4 | It exposes the WSGI callable as a module-level variable named ``application``. |
|
4 | It exposes the WSGI callable as a module-level variable named ``application``. | |
5 |
|
5 | |||
6 | For more information on this file, see |
|
6 | For more information on this file, see | |
7 | https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ |
|
7 | https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ | |
8 | """ |
|
8 | """ | |
9 |
|
9 | |||
10 | import os, os.path |
|
10 | import os, os.path | |
11 | import madrigal.metadata |
|
11 | import madrigal.metadata | |
12 |
|
12 | |||
13 | madDB = madrigal.metadata.MadrigalDB() |
|
13 | madDB = madrigal.metadata.MadrigalDB() | |
14 | os.environ['PYTHON_EGG_CACHE'] = os.path.join(madDB.getMadroot(), 'eggs') |
|
14 | os.environ['PYTHON_EGG_CACHE'] = os.path.join(madDB.getMadroot(), 'eggs') | |
15 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoMad.settings |
|
15 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoMad.settings") | |
16 |
|
16 | |||
17 | from django.core.wsgi import get_wsgi_application |
|
17 | from django.core.wsgi import get_wsgi_application | |
18 | application = get_wsgi_application() |
|
18 | application = get_wsgi_application() |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
@@ -1,59 +1,67 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
|
2 | |||
3 | {% comment %} |
|
3 | {% comment %} | |
4 | Written by Bill Rideout brideout@haystack.mit.edu |
|
4 | Written by Bill Rideout brideout@haystack.mit.edu | |
5 |
|
5 | |||
6 | Base template for Madrigal show experiment web interface |
|
6 | Base template for Madrigal show experiment web interface | |
7 |
|
7 | |||
8 | $Id: show_experiment.html 7310 2021-03-02 14:31:06Z brideout $ |
|
8 | $Id: show_experiment.html 7310 2021-03-02 14:31:06Z brideout $ | |
9 | {% endcomment %} |
|
9 | {% endcomment %} | |
10 |
|
10 | |||
11 | {% block title %}Show Madrigal experiment{% endblock %} |
|
11 | {% block title %}Show Madrigal experiment{% endblock %} | |
12 |
|
12 | |||
13 | {% block extra_head %} |
|
13 | {% block extra_head %} | |
14 | <script> |
|
14 | <script> | |
15 |
|
15 | |||
16 | function changeFile (select) { |
|
16 | function changeFile (select) { | |
17 | var basename = select.options[select.selectedIndex].value; |
|
17 | var basename = select.options[select.selectedIndex].value; | |
18 | {% if form.exp_id %} |
|
18 | {% if form.exp_id %} | |
19 | var url = '{% url 'change_files' %}' + '?experiment_list={{ form.exp_id.label }}&file_list=' + basename; |
|
19 | var url = '{% url 'change_files' %}' + '?experiment_list={{ form.exp_id.label }}&file_list=' + basename; | |
20 | {% else %} |
|
20 | {% else %} | |
21 | var exp_id = $("#id_experiment_list")[0].options[$("#id_experiment_list")[0].selectedIndex].value; |
|
21 | var exp_id = $("#id_experiment_list")[0].options[$("#id_experiment_list")[0].selectedIndex].value; | |
22 | var url = '{% url 'change_files' %}' + '?experiment_list=' + exp_id + '&file_list=' + basename; |
|
22 | var url = '{% url 'change_files' %}' + '?experiment_list=' + exp_id + '&file_list=' + basename; | |
23 | {% endif %} |
|
23 | {% endif %} | |
24 | // first delete all forms that are now out of date |
|
24 | // first delete all forms that are now out of date | |
25 | divIndex = $(".single_form").index($( "#file_buttons" )) |
|
25 | divIndex = $(".single_form").index($( "#file_buttons" )) | |
26 | $(".single_form").slice(divIndex).empty() |
|
26 | $(".single_form").slice(divIndex).empty() | |
27 | // second populate the file_list html if '0' not selected |
|
27 | // second populate the file_list html if '0' not selected | |
28 | if (basename != '0') { |
|
28 | if (basename != '0') { | |
29 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
29 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
30 | } |
|
30 | } | |
31 | } |
|
31 | } | |
32 |
|
32 | |||
33 | {% include "madweb/fileDownload.js" %} |
|
33 | {% include "madweb/fileDownload.js" %} | |
34 |
|
34 | |||
35 | </script> |
|
35 | </script> | |
36 | {% endblock %} |
|
36 | {% endblock %} | |
37 |
|
37 | |||
38 | {% block content %} |
|
38 | {% block content %} | |
39 | <center><h4> {{ form.exp_desc.label }} </h4></center> |
|
39 | <center><h4> {{ form.exp_desc.label }} </h4></center> | |
40 |
|
40 | |||
41 | {% include "madweb/file_list.html" %} |
|
41 | {% include "madweb/file_list.html" %} | |
42 |
|
42 | |||
43 | <!-- file select div --> |
|
43 | <!-- file select div --> | |
44 | <div class="col-md-12 single_form" id="file_buttons"> |
|
44 | <div class="col-md-12 single_form" id="file_buttons"> | |
45 | {% if form.file_buttons %} |
|
45 | {% if form.file_buttons %} | |
46 | {% include "madweb/file_buttons.html" %} |
|
46 | {% include "madweb/file_buttons.html" %} | |
47 | {% endif %} |
|
47 | {% endif %} | |
48 | </div> <!-- end subdivide --> |
|
48 | </div> <!-- end subdivide --> | |
49 | <div> </div> |
|
49 | <div> </div> | |
50 |
|
50 | |||
51 | <!-- file select div --> |
|
51 | <!-- file select div --> | |
52 | <div class="col-md-12 single_form" id="file_data"> |
|
52 | <div class="col-md-12 single_form" id="file_data"> | |
53 | {% if form.show_plots %} |
|
53 | {% if form.show_plots %} | |
54 | {% include "madweb/show_plots.html" %} |
|
54 | {% include "madweb/show_plots.html" %} | |
55 | {% elif form.plot_list %} |
|
55 | {% elif form.plot_list %} | |
56 | {% include "madweb/show_plots.html" %} |
|
56 | {% include "madweb/show_plots.html" %} | |
57 | {% endif %} |
|
57 | {% endif %} | |
58 | </div> <!-- end subdivide --> |
|
58 | </div> <!-- end subdivide --> | |
59 | {% endblock %} No newline at end of file |
|
59 | ||
|
60 | <!-- file select div --> | |||
|
61 | <div class="col-md-12 single_form" id="file_plot"> | |||
|
62 | {% if form.show_plots %} | |||
|
63 | {% include "madweb/parameter_selection.html" %} | |||
|
64 | {% endif %} | |||
|
65 | </div> <!-- end subdivide --> | |||
|
66 | ||||
|
67 | {% endblock %} No newline at end of file |
@@ -1,259 +1,268 | |||||
1 | {% extends "base_single.html" %} |
|
1 | {% extends "base_single.html" %} | |
2 |
|
2 | |||
3 | {% comment %} |
|
3 | {% comment %} | |
4 | Written by Bill Rideout brideout@haystack.mit.edu |
|
4 | Written by Bill Rideout brideout@haystack.mit.edu | |
5 |
|
5 | |||
6 | Final template for Madrigal single experiment web interface |
|
6 | Final template for Madrigal single experiment web interface | |
7 |
|
7 | |||
8 | $Id: single.html 7290 2021-01-13 21:07:21Z brideout $ |
|
8 | $Id: single.html 7290 2021-01-13 21:07:21Z brideout $ | |
9 | {% endcomment %} |
|
9 | {% endcomment %} | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | {% block ajax_js %} |
|
12 | {% block ajax_js %} | |
13 | <script type="text/javascript"> |
|
13 | <script type="text/javascript"> | |
14 |
|
14 | |||
15 |
|
15 | |||
16 | {% if years %} |
|
16 | {% if years %} | |
17 | $( document ).ready(function() { |
|
17 | $( document ).ready(function() { | |
18 | createCalendar(); |
|
18 | createCalendar(); | |
19 | }); |
|
19 | }); | |
20 | {% endif %} |
|
20 | {% endif %} | |
21 |
|
21 | |||
22 | var redirectLookup = { |
|
22 | var redirectLookup = { | |
23 | "0": function() { return ""; }, |
|
23 | "0": function() { return ""; }, | |
24 | {% for redirect in redirect_list %} |
|
24 | {% for redirect in redirect_list %} | |
25 | "{{ redirect.0 }}": function() { return "{{ redirect.1|safe }}"; }, |
|
25 | "{{ redirect.0 }}": function() { return "{{ redirect.1|safe }}"; }, | |
26 | {% endfor %} |
|
26 | {% endfor %} | |
27 | }; |
|
27 | }; | |
28 |
|
28 | |||
29 | function populateCat (checkbox) { |
|
29 | function populateCat (checkbox) { | |
30 | var is_global = 0; |
|
30 | var is_global = 0; | |
31 | if (checkbox.checked) { |
|
31 | if (checkbox.checked) { | |
32 | is_global = 1; |
|
32 | is_global = 1; | |
33 | } |
|
33 | } | |
34 | var url = '{% url 'get_categories' %}' + '?isGlobal=' + is_global; |
|
34 | var url = '{% url 'get_categories' %}' + '?isGlobal=' + is_global; | |
35 | // first delete all forms that are now out of date |
|
35 | // first delete all forms that are now out of date | |
36 | divIndex = $(".single_form").index($( "#categories" )) |
|
36 | divIndex = $(".single_form").index($( "#categories" )) | |
37 | $(".single_form").slice(divIndex).empty() |
|
37 | $(".single_form").slice(divIndex).empty() | |
38 | // second populate the categories html |
|
38 | // second populate the categories html | |
39 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
39 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 | function populateInst (select) { |
|
42 | function populateInst (select) { | |
43 | var is_global = 0; |
|
43 | var is_global = 0; | |
44 | if ($("#id_isGlobal")[0].checked) { |
|
44 | if ($("#id_isGlobal")[0].checked) { | |
45 | is_global = 1; |
|
45 | is_global = 1; | |
46 | } |
|
46 | } | |
47 | var category = select.options[select.selectedIndex].value; |
|
47 | var category = select.options[select.selectedIndex].value; | |
48 | var url = '{% url 'get_instruments' %}' + '?isGlobal=' + is_global + '&categories=' + category; |
|
48 | var url = '{% url 'get_instruments' %}' + '?isGlobal=' + is_global + '&categories=' + category; | |
49 | // first delete all forms that are now out of date |
|
49 | // first delete all forms that are now out of date | |
50 | divIndex = $(".single_form").index($( "#instruments" )) |
|
50 | divIndex = $(".single_form").index($( "#instruments" )) | |
51 | $(".single_form").slice(divIndex).empty() |
|
51 | $(".single_form").slice(divIndex).empty() | |
52 | // second populate the instruments html if '0' not selected |
|
52 | // second populate the instruments html if '0' not selected | |
53 | if (category != '0') { |
|
53 | if (category != '0') { | |
54 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
54 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
55 | } |
|
55 | } | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | function populateYear (select) { |
|
58 | function populateYear (select) { | |
59 | var is_global = 0; |
|
59 | var is_global = 0; | |
60 | if ($("#id_isGlobal")[0].checked) { |
|
60 | if ($("#id_isGlobal")[0].checked) { | |
61 | is_global = 1; |
|
61 | is_global = 1; | |
62 | } |
|
62 | } | |
63 | // this method may redirect if instrument is not local |
|
63 | // this method may redirect if instrument is not local | |
64 | var kinst = select.options[select.selectedIndex].value; |
|
64 | var kinst = select.options[select.selectedIndex].value; | |
65 | var redirectUrl = redirectLookup[kinst](); |
|
65 | var redirectUrl = redirectLookup[kinst](); | |
66 | if (redirectUrl.length > 0) { |
|
66 | if (redirectUrl.length > 0) { | |
67 | // redirect |
|
67 | // redirect | |
68 | alert('Because this data is not local, you will be redirected to ' + redirectUrl); |
|
68 | alert('Because this data is not local, you will be redirected to ' + redirectUrl); | |
69 | window.location.href = redirectUrl; |
|
69 | window.location.href = redirectUrl; | |
70 | } else { |
|
70 | } else { | |
71 | var url = '{% url 'get_years' %}' + '?isGlobal=' + is_global + '&instruments=' + kinst; |
|
71 | var url = '{% url 'get_years' %}' + '?isGlobal=' + is_global + '&instruments=' + kinst; | |
72 | // first delete all forms that are now out of date |
|
72 | // first delete all forms that are now out of date | |
73 | divIndex = $(".single_form").index($( "#years" )) |
|
73 | divIndex = $(".single_form").index($( "#years" )) | |
74 | $(".single_form").slice(divIndex).empty() |
|
74 | $(".single_form").slice(divIndex).empty() | |
75 | // second populate the years html if '0' not selected |
|
75 | // second populate the years html if '0' not selected | |
76 | if (kinst != '0') { |
|
76 | if (kinst != '0') { | |
77 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
77 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
78 | } |
|
78 | } | |
79 | } |
|
79 | } | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | function populateMonth (select) { |
|
82 | function populateMonth (select) { | |
83 | var year = select.options[select.selectedIndex].value; |
|
83 | var year = select.options[select.selectedIndex].value; | |
84 | var kinst = $("#id_instruments")[0].options[$("#id_instruments")[0].selectedIndex].value; |
|
84 | var kinst = $("#id_instruments")[0].options[$("#id_instruments")[0].selectedIndex].value; | |
85 | var is_global = 0; |
|
85 | var is_global = 0; | |
86 | if ($("#id_isGlobal")[0].checked) { |
|
86 | if ($("#id_isGlobal")[0].checked) { | |
87 | is_global = 1; |
|
87 | is_global = 1; | |
88 | } |
|
88 | } | |
89 |
|
89 | |||
90 | var url = '{% url 'get_months' %}' + '?isGlobal=' + is_global + '&instruments=' + kinst + '&years=' + year; |
|
90 | var url = '{% url 'get_months' %}' + '?isGlobal=' + is_global + '&instruments=' + kinst + '&years=' + year; | |
91 | // first delete all forms that are now out of date |
|
91 | // first delete all forms that are now out of date | |
92 | divIndex = $(".single_form").index($( "#months" )) |
|
92 | divIndex = $(".single_form").index($( "#months" )) | |
93 | $(".single_form").slice(divIndex).empty() |
|
93 | $(".single_form").slice(divIndex).empty() | |
94 | // second populate the years html if '0' not selected |
|
94 | // second populate the years html if '0' not selected | |
95 | if (kinst != '0') { |
|
95 | if (kinst != '0') { | |
96 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
96 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
97 | } |
|
97 | } | |
98 | } |
|
98 | } | |
99 |
|
99 | |||
100 | function populateCalendar (select) { |
|
100 | function populateCalendar (select) { | |
101 | var year = $("#id_years")[0].options[$("#id_years")[0].selectedIndex].value; |
|
101 | var year = $("#id_years")[0].options[$("#id_years")[0].selectedIndex].value; | |
102 | var month = select.options[select.selectedIndex].value; |
|
102 | var month = select.options[select.selectedIndex].value; | |
103 | var kinst = $("#id_instruments")[0].options[$("#id_instruments")[0].selectedIndex].value; |
|
103 | var kinst = $("#id_instruments")[0].options[$("#id_instruments")[0].selectedIndex].value; | |
104 | var is_global = 0; |
|
104 | var is_global = 0; | |
105 | if ($("#id_isGlobal")[0].checked) { |
|
105 | if ($("#id_isGlobal")[0].checked) { | |
106 | is_global = 1; |
|
106 | is_global = 1; | |
107 | } |
|
107 | } | |
108 | var url = '{% url 'get_calendar' %}' + '?isGlobal=' + is_global + '&instruments=' + kinst + '&years=' + year + '&months=' + month; |
|
108 | var url = '{% url 'get_calendar' %}' + '?isGlobal=' + is_global + '&instruments=' + kinst + '&years=' + year + '&months=' + month; | |
109 | // first delete all forms that are now out of date |
|
109 | // first delete all forms that are now out of date | |
110 | divIndex = $(".single_form").index($( "#calendar" )) |
|
110 | divIndex = $(".single_form").index($( "#calendar" )) | |
111 | $(".single_form").slice(divIndex).empty() |
|
111 | $(".single_form").slice(divIndex).empty() | |
112 | // second populate the calendar html if '0' not selected |
|
112 | // second populate the calendar html if '0' not selected | |
113 | if (year != '0') { |
|
113 | if (year != '0') { | |
114 | $(".single_form").slice(divIndex,divIndex+1).load(url, function() { |
|
114 | $(".single_form").slice(divIndex,divIndex+1).load(url, function() { | |
115 | createCalendar(); |
|
115 | createCalendar(); | |
116 | }); |
|
116 | }); | |
117 | } |
|
117 | } | |
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | function populateFile (select) { |
|
120 | function populateFile (select) { | |
121 | var expId = select.options[select.selectedIndex].value; |
|
121 | var expId = select.options[select.selectedIndex].value; | |
122 | var url = '{% url 'get_files' %}' + '?experiment_list=' + expId; |
|
122 | var url = '{% url 'get_files' %}' + '?experiment_list=' + expId; | |
123 | // first delete all forms that are now out of date |
|
123 | // first delete all forms that are now out of date | |
124 | divIndex = $(".single_form").index($( "#file_select" )) |
|
124 | divIndex = $(".single_form").index($( "#file_select" )) | |
125 | $(".single_form").slice(divIndex).empty() |
|
125 | $(".single_form").slice(divIndex).empty() | |
126 | // second populate the file_list html if '0' not selected |
|
126 | // second populate the file_list html if '0' not selected | |
127 | if (expId != '0') { |
|
127 | if (expId != '0') { | |
128 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
128 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
129 | } |
|
129 | } | |
130 | } |
|
130 | } | |
131 |
|
131 | |||
132 | function changeFile (select) { |
|
132 | function changeFile (select) { | |
133 | var basename = select.options[select.selectedIndex].value; |
|
133 | var basename = select.options[select.selectedIndex].value; | |
134 | {% if form.exp_id %} |
|
134 | {% if form.exp_id %} | |
135 | var url = '{% url 'change_files' %}' + '?experiment_list={{ form.exp_id.label }}&file_list=' + basename; |
|
135 | var url = '{% url 'change_files' %}' + '?experiment_list={{ form.exp_id.label }}&file_list=' + basename; | |
136 | {% else %} |
|
136 | {% else %} | |
137 | var exp_id = $("#id_experiment_list")[0].options[$("#id_experiment_list")[0].selectedIndex].value; |
|
137 | var exp_id = $("#id_experiment_list")[0].options[$("#id_experiment_list")[0].selectedIndex].value; | |
138 | var url = '{% url 'change_files' %}' + '?experiment_list=' + exp_id + '&file_list=' + basename; |
|
138 | var url = '{% url 'change_files' %}' + '?experiment_list=' + exp_id + '&file_list=' + basename; | |
139 | {% endif %} |
|
139 | {% endif %} | |
140 | // first delete all forms that are now out of date |
|
140 | // first delete all forms that are now out of date | |
141 | divIndex = $(".single_form").index($( "#file_buttons" )) |
|
141 | divIndex = $(".single_form").index($( "#file_buttons" )) | |
142 | $(".single_form").slice(divIndex).empty() |
|
142 | $(".single_form").slice(divIndex).empty() | |
143 | // second populate the file_list html if '0' not selected |
|
143 | // second populate the file_list html if '0' not selected | |
144 | if (basename != '0') { |
|
144 | if (basename != '0') { | |
145 | $(".single_form").slice(divIndex,divIndex+1).load(url); |
|
145 | $(".single_form").slice(divIndex,divIndex+1).load(url); | |
146 | } |
|
146 | } | |
147 | } |
|
147 | } | |
148 |
|
148 | |||
149 | {% include "madweb/fileDownload.js" %} |
|
149 | {% include "madweb/fileDownload.js" %} | |
150 |
|
150 | |||
151 | </script> |
|
151 | </script> | |
152 | {% endblock %} |
|
152 | {% endblock %} | |
153 |
|
153 | |||
154 |
|
154 | |||
155 | {% block isGlobal %} |
|
155 | {% block isGlobal %} | |
156 | <div class="col-md-12 single_form" id="isGlobal"> |
|
156 | <div class="col-md-12 single_form" id="isGlobal"> | |
157 | {{ form.isGlobal.label }} {{ form.isGlobal }} |
|
157 | {{ form.isGlobal.label }} {{ form.isGlobal }} | |
158 | </div> <!-- end subdivide --> |
|
158 | </div> <!-- end subdivide --> | |
159 | {% endblock %} |
|
159 | {% endblock %} | |
160 |
|
160 | |||
161 | {% block categories %} |
|
161 | {% block categories %} | |
162 | <!-- subdivide selection column for categories to be possibly filled in by ajax - single_form 0 --> |
|
162 | <!-- subdivide selection column for categories to be possibly filled in by ajax - single_form 0 --> | |
163 | <div class="col-md-12 single_form" id="categories"> |
|
163 | <div class="col-md-12 single_form" id="categories"> | |
164 |
|
164 | |||
165 | {% if form.categories %} |
|
165 | {% if form.categories %} | |
166 | {% include "madweb/categories.html" %} |
|
166 | {% include "madweb/categories.html" %} | |
167 | {% endif %} |
|
167 | {% endif %} | |
168 |
|
168 | |||
169 | </div> <!-- end subdivide --> |
|
169 | </div> <!-- end subdivide --> | |
170 | {% endblock %} |
|
170 | {% endblock %} | |
171 |
|
171 | |||
172 |
|
172 | |||
173 | {% block instruments %} |
|
173 | {% block instruments %} | |
174 | <!-- subdivide selection column for instruments to be possibly filled in by ajax - single_form 0 --> |
|
174 | <!-- subdivide selection column for instruments to be possibly filled in by ajax - single_form 0 --> | |
175 | <div class="col-md-12 single_form" id="instruments"> |
|
175 | <div class="col-md-12 single_form" id="instruments"> | |
176 |
|
176 | |||
177 | {% if form.instruments %} |
|
177 | {% if form.instruments %} | |
178 | {% include "madweb/instruments.html" %} |
|
178 | {% include "madweb/instruments.html" %} | |
179 | {% endif %} |
|
179 | {% endif %} | |
180 |
|
180 | |||
181 | </div> <!-- end subdivide --> |
|
181 | </div> <!-- end subdivide --> | |
182 | {% endblock %} |
|
182 | {% endblock %} | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | {% block years %} |
|
185 | {% block years %} | |
186 | <!-- subdivide selection column for year to be possibly filled in by ajax - single_form 1 --> |
|
186 | <!-- subdivide selection column for year to be possibly filled in by ajax - single_form 1 --> | |
187 | <div class="col-md-12 single_form" id="years"> |
|
187 | <div class="col-md-12 single_form" id="years"> | |
188 |
|
188 | |||
189 | {% if form.years %} |
|
189 | {% if form.years %} | |
190 | {% include "madweb/years.html" %} |
|
190 | {% include "madweb/years.html" %} | |
191 | {% endif %} |
|
191 | {% endif %} | |
192 |
|
192 | |||
193 | </div> <!-- end subdivide --> |
|
193 | </div> <!-- end subdivide --> | |
194 | {% endblock %} |
|
194 | {% endblock %} | |
195 |
|
195 | |||
196 |
|
196 | |||
197 | {% block months %} |
|
197 | {% block months %} | |
198 | <!-- subdivide selection column for month to be possibly filled in by ajax - single_form 1 --> |
|
198 | <!-- subdivide selection column for month to be possibly filled in by ajax - single_form 1 --> | |
199 | <div class="col-md-12 single_form" id="months"> |
|
199 | <div class="col-md-12 single_form" id="months"> | |
200 |
|
200 | |||
201 | {% if form.months %} |
|
201 | {% if form.months %} | |
202 | {% include "madweb/months.html" %} |
|
202 | {% include "madweb/months.html" %} | |
203 | {% endif %} |
|
203 | {% endif %} | |
204 |
|
204 | |||
205 | </div> <!-- end subdivide --> |
|
205 | </div> <!-- end subdivide --> | |
206 | {% endblock %} |
|
206 | {% endblock %} | |
207 |
|
207 | |||
208 |
|
208 | |||
209 | {% block calendar %} |
|
209 | {% block calendar %} | |
210 | <!-- subdivide selection column for calendar to be possibly filled in by ajax - single_form 2 --> |
|
210 | <!-- subdivide selection column for calendar to be possibly filled in by ajax - single_form 2 --> | |
211 | <div class="col-md-12 single_form" id="calendar"> |
|
211 | <div class="col-md-12 single_form" id="calendar"> | |
212 |
|
212 | |||
213 | {% if form.days %} |
|
213 | {% if form.days %} | |
214 | {% include "madweb/calendar.html" %} |
|
214 | {% include "madweb/calendar.html" %} | |
215 | {% endif %} |
|
215 | {% endif %} | |
216 |
|
216 | |||
217 | </div> <!-- end subdivide --> |
|
217 | </div> <!-- end subdivide --> | |
218 | {% endblock %} |
|
218 | {% endblock %} | |
219 |
|
219 | |||
220 | {% block experiment_select %} |
|
220 | {% block experiment_select %} | |
221 | <!-- this select only appears if there are multiple experiments in the day --> |
|
221 | <!-- this select only appears if there are multiple experiments in the day --> | |
222 | <div class="col-md-12 single_form" id="experiment_select"> |
|
222 | <div class="col-md-12 single_form" id="experiment_select"> | |
223 | {% if form.experiment_list %} |
|
223 | {% if form.experiment_list %} | |
224 | {% include "madweb/exp_list.html" %} |
|
224 | {% include "madweb/exp_list.html" %} | |
225 | {% endif %} |
|
225 | {% endif %} | |
226 | </div> <!-- end subdivide --> |
|
226 | </div> <!-- end subdivide --> | |
227 | {% endblock %} |
|
227 | {% endblock %} | |
228 |
|
228 | |||
229 | {% block file_select %} |
|
229 | {% block file_select %} | |
230 | <!-- file select div --> |
|
230 | <!-- file select div --> | |
231 | <div class="col-md-12 single_form" id="file_select"> |
|
231 | <div class="col-md-12 single_form" id="file_select"> | |
232 | {% if form.file_list|length > 1 %} |
|
232 | {% if form.file_list|length > 1 %} | |
233 | {% include "madweb/file_list.html" %} |
|
233 | {% include "madweb/file_list.html" %} | |
234 | {% elif form.days and not form.experiment_list %} |
|
234 | {% elif form.days and not form.experiment_list %} | |
235 | <center><p> This experiment has no Madrigal CEDAR format Hdf5 files. Showing only plots and auxillary files instead.</p></center> |
|
235 | <center><p> This experiment has no Madrigal CEDAR format Hdf5 files. Showing only plots and auxillary files instead.</p></center> | |
236 | {% include "madweb/show_plots.html" %} |
|
236 | {% include "madweb/show_plots.html" %} | |
237 | {% endif %} |
|
237 | {% endif %} | |
238 | </div> <!-- end subdivide --> |
|
238 | </div> <!-- end subdivide --> | |
239 | {% endblock %} |
|
239 | {% endblock %} | |
240 |
|
240 | |||
241 | {% block file_buttons %} |
|
241 | {% block file_buttons %} | |
242 | <!-- file select div --> |
|
242 | <!-- file select div --> | |
243 | <div class="col-md-12 single_form" id="file_buttons"> |
|
243 | <div class="col-md-12 single_form" id="file_buttons"> | |
244 | {% if form.file_buttons %} |
|
244 | {% if form.file_buttons %} | |
245 | {% include "madweb/file_buttons.html" %} |
|
245 | {% include "madweb/file_buttons.html" %} | |
246 | {% endif %} |
|
246 | {% endif %} | |
247 | </div> <!-- end subdivide --> |
|
247 | </div> <!-- end subdivide --> | |
248 | <div> </div> |
|
248 | <div> </div> | |
249 | {% endblock %} |
|
249 | {% endblock %} | |
250 |
|
250 | |||
251 | {% block file_data %} |
|
251 | {% block file_data %} | |
252 | <!-- file select div --> |
|
252 | <!-- file select div --> | |
253 | <div class="col-md-12 single_form" id="file_data"> |
|
253 | <div class="col-md-12 single_form" id="file_data"> | |
254 | {% if form.show_plots %} |
|
254 | {% if form.show_plots %} | |
255 | {% include "madweb/show_plots.html" %} |
|
255 | {% include "madweb/show_plots.html" %} | |
256 | {% endif %} |
|
256 | {% endif %} | |
257 | </div> <!-- end subdivide --> |
|
257 | </div> <!-- end subdivide --> | |
258 | {% endblock %} |
|
258 | {% endblock %} | |
259 |
|
259 | |||
|
260 | {% block file_plot %} | |||
|
261 | <!-- file select div --> | |||
|
262 | <div class="col-md-12 single_form" id="file_plot"> | |||
|
263 | {% if form.show_plots %} | |||
|
264 | {% include "madweb/parameter_selection.html" %} | |||
|
265 | {% endif %} | |||
|
266 | </div> <!-- end subdivide --> | |||
|
267 | {% endblock %} | |||
|
268 |
@@ -1,239 +1,242 | |||||
1 | ''' |
|
1 | ''' | |
2 | Created on Jul 16, 2013 |
|
2 | Created on Jul 16, 2013 | |
3 |
|
3 | |||
4 | @author: Jose Antonio Sal y Rosas Celi |
|
4 | @author: Jose Antonio Sal y Rosas Celi | |
5 | @contact: arturo.jasyrc@gmail.com |
|
5 | @contact: arturo.jasyrc@gmail.com | |
6 |
|
6 | |||
7 | As imported and slightly modified by Bill Rideout Jan 20, 2015 |
|
7 | As imported and slightly modified by Bill Rideout Jan 20, 2015 | |
8 |
|
8 | |||
9 | $Id: urls.py 7246 2020-10-12 14:54:26Z brideout $ |
|
9 | $Id: urls.py 7246 2020-10-12 14:54:26Z brideout $ | |
10 | ''' |
|
10 | ''' | |
11 |
|
11 | |||
12 | from django.conf.urls import url |
|
12 | from django.conf.urls import url | |
13 | from . import views |
|
13 | from . import views | |
14 |
|
14 | |||
15 | urlpatterns = [ url(r'^$', |
|
15 | urlpatterns = [ url(r'^$', | |
16 | views.index, |
|
16 | views.index, | |
17 | name='index'), |
|
17 | name='index'), | |
18 | url(r'^index.html/?$', |
|
18 | url(r'^index.html/?$', | |
19 | views.index, |
|
19 | views.index, | |
20 | name='index'), |
|
20 | name='index'), | |
21 | url(r'^single/?$', |
|
21 | url(r'^single/?$', | |
22 | views.check_registration(views.view_single), |
|
22 | views.check_registration(views.view_single), | |
23 | name='view_single'), |
|
23 | name='view_single'), | |
24 | url(r'^register/?$', |
|
24 | url(r'^register/?$', | |
25 | views.view_registration, |
|
25 | views.view_registration, | |
26 | name='view_registration'), |
|
26 | name='view_registration'), | |
27 | url(r'^getCategories/?$', |
|
27 | url(r'^getCategories/?$', | |
28 | views.get_categories, |
|
28 | views.get_categories, | |
29 | name='get_categories'), |
|
29 | name='get_categories'), | |
30 | url(r'^getInstruments/?$', |
|
30 | url(r'^getInstruments/?$', | |
31 | views.get_instruments, |
|
31 | views.get_instruments, | |
32 | name='get_instruments'), |
|
32 | name='get_instruments'), | |
33 | url(r'^getYears/?$', |
|
33 | url(r'^getYears/?$', | |
34 | views.get_years, |
|
34 | views.get_years, | |
35 | name='get_years'), |
|
35 | name='get_years'), | |
36 | url(r'^getMonths/?$', |
|
36 | url(r'^getMonths/?$', | |
37 | views.get_months, |
|
37 | views.get_months, | |
38 | name='get_months'), |
|
38 | name='get_months'), | |
39 | url(r'^getCalendar/?$', |
|
39 | url(r'^getCalendar/?$', | |
40 | views.get_calendar, |
|
40 | views.get_calendar, | |
41 | name='get_calendar'), |
|
41 | name='get_calendar'), | |
42 | url(r'^populateCalendarExperiment/?$', |
|
42 | url(r'^populateCalendarExperiment/?$', | |
43 | views.populate_calendar_experiment, |
|
43 | views.populate_calendar_experiment, | |
44 | name='populate_calendar_experiment'), |
|
44 | name='populate_calendar_experiment'), | |
45 | url(r'^getFiles/?$', |
|
45 | url(r'^getFiles/?$', | |
46 | views.get_files, |
|
46 | views.get_files, | |
47 | name='get_files'), |
|
47 | name='get_files'), | |
48 | url(r'^changeFiles/?$', |
|
48 | url(r'^changeFiles/?$', | |
49 | views.change_files, |
|
49 | views.change_files, | |
50 | name='change_files'), |
|
50 | name='change_files'), | |
51 | url(r'^showPlots/?$', |
|
51 | url(r'^showPlots/?$', | |
52 | views.show_plots, |
|
52 | views.show_plots, | |
53 | name='show_plots'), |
|
53 | name='show_plots'), | |
|
54 | url(r'^view_plot/?$', | |||
|
55 | views.view_plot, | |||
|
56 | name='plot'), | |||
54 | url(r'^downloadAsIs/?$', |
|
57 | url(r'^downloadAsIs/?$', | |
55 | views.download_as_is, |
|
58 | views.download_as_is, | |
56 | name='download_as_is'), |
|
59 | name='download_as_is'), | |
57 | url(r'^downloadFileAsIs/?$', |
|
60 | url(r'^downloadFileAsIs/?$', | |
58 | views.download_file_as_is, |
|
61 | views.download_file_as_is, | |
59 | name='download_file_as_is'), |
|
62 | name='download_file_as_is'), | |
60 | url(r'^printAsIs/?$', |
|
63 | url(r'^printAsIs/?$', | |
61 | views.print_as_is, |
|
64 | views.print_as_is, | |
62 | name='print_as_is'), |
|
65 | name='print_as_is'), | |
63 | url(r'^listRecords/?$', |
|
66 | url(r'^listRecords/?$', | |
64 | views.list_records, |
|
67 | views.list_records, | |
65 | name='list_records'), |
|
68 | name='list_records'), | |
66 | url(r'^showInfo/?$', |
|
69 | url(r'^showInfo/?$', | |
67 | views.show_info, |
|
70 | views.show_info, | |
68 | name='show_info'), |
|
71 | name='show_info'), | |
69 | url(r'^showDoi/?$', |
|
72 | url(r'^showDoi/?$', | |
70 | views.show_doi, |
|
73 | views.show_doi, | |
71 | name='show_doi'), |
|
74 | name='show_doi'), | |
72 | url(r'^getAdvanced/?$', |
|
75 | url(r'^getAdvanced/?$', | |
73 | views.get_advanced, |
|
76 | views.get_advanced, | |
74 | name='get_advanced'), |
|
77 | name='get_advanced'), | |
75 | url(r'^advancedDownload/?$', |
|
78 | url(r'^advancedDownload/?$', | |
76 | views.advanced_download, |
|
79 | views.advanced_download, | |
77 | name='advanced_download'), |
|
80 | name='advanced_download'), | |
78 | url(r'^advancedPrint/?$', |
|
81 | url(r'^advancedPrint/?$', | |
79 | views.advanced_print, |
|
82 | views.advanced_print, | |
80 | name='advanced_print'), |
|
83 | name='advanced_print'), | |
81 | url(r'^list/?$', |
|
84 | url(r'^list/?$', | |
82 | views.check_registration(views.view_list), |
|
85 | views.check_registration(views.view_list), | |
83 | name='view_list'), |
|
86 | name='view_list'), | |
84 | url(r'^downloadAsIsScript/?$', |
|
87 | url(r'^downloadAsIsScript/?$', | |
85 | views.download_as_is_script, |
|
88 | views.download_as_is_script, | |
86 | name='download_as_is_script'), |
|
89 | name='download_as_is_script'), | |
87 | url(r'^generateDownloadFilesScript/?$', |
|
90 | url(r'^generateDownloadFilesScript/?$', | |
88 | views.generate_download_files_script, |
|
91 | views.generate_download_files_script, | |
89 | name='generate_download_files_script'), |
|
92 | name='generate_download_files_script'), | |
90 | url(r'^downloadAdvancedScript/?$', |
|
93 | url(r'^downloadAdvancedScript/?$', | |
91 | views.download_advanced_script, |
|
94 | views.download_advanced_script, | |
92 | name='download_advanced_script'), |
|
95 | name='download_advanced_script'), | |
93 | url(r'^generateDownloadAdvancedScript/?$', |
|
96 | url(r'^generateDownloadAdvancedScript/?$', | |
94 | views.generate_download_advanced_script, |
|
97 | views.generate_download_advanced_script, | |
95 | name='generate_download_advanced_script'), |
|
98 | name='generate_download_advanced_script'), | |
96 | url(r'^generateParmsScript/?$', |
|
99 | url(r'^generateParmsScript/?$', | |
97 | views.generate_parms_script, |
|
100 | views.generate_parms_script, | |
98 | name='generate_parms_script'), |
|
101 | name='generate_parms_script'), | |
99 | url(r'^generateParmsFiltersScript/?$', |
|
102 | url(r'^generateParmsFiltersScript/?$', | |
100 | views.generate_parms_filters_script, |
|
103 | views.generate_parms_filters_script, | |
101 | name='generate_parms_filters_script'), |
|
104 | name='generate_parms_filters_script'), | |
102 | url(r'^listExperiments/?$', |
|
105 | url(r'^listExperiments/?$', | |
103 | views.list_experiments, |
|
106 | views.list_experiments, | |
104 | name='list_experiments'), |
|
107 | name='list_experiments'), | |
105 | url(r'^viewRecordPlot/?$', |
|
108 | url(r'^viewRecordPlot/?$', | |
106 | views.view_record_plot, |
|
109 | views.view_record_plot, | |
107 | name='view_record_plot'), |
|
110 | name='view_record_plot'), | |
108 | url(r'^viewRecordImage/?$', |
|
111 | url(r'^viewRecordImage/?$', | |
109 | views.view_record_image, |
|
112 | views.view_record_image, | |
110 | name='view_record_image'), |
|
113 | name='view_record_image'), | |
111 | url(r'^showExperiment/?$', |
|
114 | url(r'^showExperiment/?$', | |
112 | views.check_registration(views.show_experiment), |
|
115 | views.check_registration(views.show_experiment), | |
113 | name='show_experiment'), |
|
116 | name='show_experiment'), | |
114 | url(r'^madExperiment.cgi/*$', |
|
117 | url(r'^madExperiment.cgi/*$', | |
115 | views.check_registration(views.show_experiment_v2), |
|
118 | views.check_registration(views.show_experiment_v2), | |
116 | name='show_experiment_v2'), |
|
119 | name='show_experiment_v2'), | |
117 | url(r'^chooseScript/?$', |
|
120 | url(r'^chooseScript/?$', | |
118 | views.check_registration(views.choose_script), |
|
121 | views.check_registration(views.choose_script), | |
119 | name='choose_script'), |
|
122 | name='choose_script'), | |
120 | url(r'^ftp/$', |
|
123 | url(r'^ftp/$', | |
121 | views.check_registration(views.ftp), |
|
124 | views.check_registration(views.ftp), | |
122 | name='ftp'), |
|
125 | name='ftp'), | |
123 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/$', |
|
126 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/$', | |
124 | views.ftp_instrument, |
|
127 | views.ftp_instrument, | |
125 | name='ftp_instrument'), |
|
128 | name='ftp_instrument'), | |
126 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/$', |
|
129 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/$', | |
127 | views.ftp_year, |
|
130 | views.ftp_year, | |
128 | name='ftp_year'), |
|
131 | name='ftp_year'), | |
129 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/kindat/(\d+)/$', |
|
132 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/kindat/(\d+)/$', | |
130 | views.ftp_kindat, |
|
133 | views.ftp_kindat, | |
131 | name='ftp_kindat'), |
|
134 | name='ftp_kindat'), | |
132 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/kindat/(\d+)/format/([^/]+)/$', |
|
135 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/kindat/(\d+)/format/([^/]+)/$', | |
133 | views.ftp_files, |
|
136 | views.ftp_files, | |
134 | name='ftp_files'), |
|
137 | name='ftp_files'), | |
135 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/kindat/(\d+)/format/([^/]+)/fullFilename/([^/]+)/$', |
|
138 | url(r'^ftp/fullname/([^/]+)/email/([^/]+)/affiliation/([^/]+)/kinst/(\d+)/year/(\d+)/kindat/(\d+)/format/([^/]+)/fullFilename/([^/]+)/$', | |
136 | views.ftp_download, |
|
139 | views.ftp_download, | |
137 | name='ftp_download'), |
|
140 | name='ftp_download'), | |
138 | url(r'ftpMultipleDownload/$', |
|
141 | url(r'ftpMultipleDownload/$', | |
139 | views.ftp_multiple_download, |
|
142 | views.ftp_multiple_download, | |
140 | name='ftp_multiple_download'), |
|
143 | name='ftp_multiple_download'), | |
141 | url(r'^instMetadata/?$', |
|
144 | url(r'^instMetadata/?$', | |
142 | views.instrument_metadata, |
|
145 | views.instrument_metadata, | |
143 | name='instrument_metadata'), |
|
146 | name='instrument_metadata'), | |
144 | url(r'^siteMetadata/?$', |
|
147 | url(r'^siteMetadata/?$', | |
145 | views.site_metadata, |
|
148 | views.site_metadata, | |
146 | name='site_metadata'), |
|
149 | name='site_metadata'), | |
147 | url(r'^parameterMetadata/?$', |
|
150 | url(r'^parameterMetadata/?$', | |
148 | views.parameter_metadata, |
|
151 | views.parameter_metadata, | |
149 | name='parameter_metadata'), |
|
152 | name='parameter_metadata'), | |
150 | url(r'^kindatMetadata/?$', |
|
153 | url(r'^kindatMetadata/?$', | |
151 | views.kindat_metadata, |
|
154 | views.kindat_metadata, | |
152 | name='kindat_metadata'), |
|
155 | name='kindat_metadata'), | |
153 | url(r'^madCalculator/?$', |
|
156 | url(r'^madCalculator/?$', | |
154 | views.madrigal_calculator, |
|
157 | views.madrigal_calculator, | |
155 | name='madrigal_calculator'), |
|
158 | name='madrigal_calculator'), | |
156 | url(r'^madCalculatorOutput/?$', |
|
159 | url(r'^madCalculatorOutput/?$', | |
157 | views.madrigal_calculator_output, |
|
160 | views.madrigal_calculator_output, | |
158 | name='madrigal_calculator_output'), |
|
161 | name='madrigal_calculator_output'), | |
159 | url(r'^getMetadata/*$', |
|
162 | url(r'^getMetadata/*$', | |
160 | views.get_metadata, |
|
163 | views.get_metadata, | |
161 | name='get_metadata'), |
|
164 | name='get_metadata'), | |
162 | url(r'^looker/?$', |
|
165 | url(r'^looker/?$', | |
163 | views.looker_main, |
|
166 | views.looker_main, | |
164 | name='looker_main'), |
|
167 | name='looker_main'), | |
165 | url(r'^lookerForm/?$', |
|
168 | url(r'^lookerForm/?$', | |
166 | views.looker_form, |
|
169 | views.looker_form, | |
167 | name='looker_form'), |
|
170 | name='looker_form'), | |
168 | url(r'^lookerOutput/?$', |
|
171 | url(r'^lookerOutput/?$', | |
169 | views.looker_output, |
|
172 | views.looker_output, | |
170 | name='looker_output'), |
|
173 | name='looker_output'), | |
171 | url(r'^getVersionService.py/*$', |
|
174 | url(r'^getVersionService.py/*$', | |
172 | views.get_version_service, |
|
175 | views.get_version_service, | |
173 | name='get_version_service'), |
|
176 | name='get_version_service'), | |
174 | url(r'^getInstrumentsService.py/*$', |
|
177 | url(r'^getInstrumentsService.py/*$', | |
175 | views.get_instruments_service, |
|
178 | views.get_instruments_service, | |
176 | name='get_instruments_service'), |
|
179 | name='get_instruments_service'), | |
177 | url(r'^getExperimentsService.py/*$', |
|
180 | url(r'^getExperimentsService.py/*$', | |
178 | views.get_experiments_service, |
|
181 | views.get_experiments_service, | |
179 | name='get_experiments_service'), |
|
182 | name='get_experiments_service'), | |
180 | url(r'^getExperimentFilesService.py/*$', |
|
183 | url(r'^getExperimentFilesService.py/*$', | |
181 | views.get_experiment_files_service, |
|
184 | views.get_experiment_files_service, | |
182 | name='get_experiment_files_service'), |
|
185 | name='get_experiment_files_service'), | |
183 | url(r'^getParametersService.py/*$', |
|
186 | url(r'^getParametersService.py/*$', | |
184 | views.get_parameters_service, |
|
187 | views.get_parameters_service, | |
185 | name='get_parameters_service'), |
|
188 | name='get_parameters_service'), | |
186 | url(r'^isprintService.py/*$', |
|
189 | url(r'^isprintService.py/*$', | |
187 | views.isprint_service, |
|
190 | views.isprint_service, | |
188 | name='isprint_service'), |
|
191 | name='isprint_service'), | |
189 | url(r'^getMadfile.cgi/*$', |
|
192 | url(r'^getMadfile.cgi/*$', | |
190 | views.get_madfile_service, |
|
193 | views.get_madfile_service, | |
191 | name='get_madfile_service'), |
|
194 | name='get_madfile_service'), | |
192 | url(r'^madCalculatorService.py/*$', |
|
195 | url(r'^madCalculatorService.py/*$', | |
193 | views.mad_calculator_service, |
|
196 | views.mad_calculator_service, | |
194 | name='mad_calculator_service'), |
|
197 | name='mad_calculator_service'), | |
195 | url(r'^madTimeCalculatorService.py/*$', |
|
198 | url(r'^madTimeCalculatorService.py/*$', | |
196 | views.mad_time_calculator_service, |
|
199 | views.mad_time_calculator_service, | |
197 | name='mad_time_calculator_service'), |
|
200 | name='mad_time_calculator_service'), | |
198 | url(r'^madCalculator2Service.py/*$', |
|
201 | url(r'^madCalculator2Service.py/*$', | |
199 | views.mad_calculator2_service, |
|
202 | views.mad_calculator2_service, | |
200 | name='mad_calculator2_service'), |
|
203 | name='mad_calculator2_service'), | |
201 | url(r'^madCalculator2Service.py', |
|
204 | url(r'^madCalculator2Service.py', | |
202 | views.mad_calculator2_service, |
|
205 | views.mad_calculator2_service, | |
203 | name='mad_calculator2_service'), |
|
206 | name='mad_calculator2_service'), | |
204 | url(r'^madCalculator3Service.py/*$', |
|
207 | url(r'^madCalculator3Service.py/*$', | |
205 | views.mad_calculator3_service, |
|
208 | views.mad_calculator3_service, | |
206 | name='mad_calculator3_service'), |
|
209 | name='mad_calculator3_service'), | |
207 | url(r'^madCalculator3Service.py', |
|
210 | url(r'^madCalculator3Service.py', | |
208 | views.mad_calculator3_service, |
|
211 | views.mad_calculator3_service, | |
209 | name='mad_calculator3_service'), |
|
212 | name='mad_calculator3_service'), | |
210 | url(r'^geodeticToRadarService.py', |
|
213 | url(r'^geodeticToRadarService.py', | |
211 | views.geodetic_to_radar_service, |
|
214 | views.geodetic_to_radar_service, | |
212 | name='geodetic_to_radar_service'), |
|
215 | name='geodetic_to_radar_service'), | |
213 | url(r'^radarToGeodeticService.py', |
|
216 | url(r'^radarToGeodeticService.py', | |
214 | views.radar_to_geodetic_service, |
|
217 | views.radar_to_geodetic_service, | |
215 | name='radar_to_geodetic_service'), |
|
218 | name='radar_to_geodetic_service'), | |
216 | url(r'^listFileTimesService.py', |
|
219 | url(r'^listFileTimesService.py', | |
217 | views.list_file_times_service, |
|
220 | views.list_file_times_service, | |
218 | name='list_file_times_service'), |
|
221 | name='list_file_times_service'), | |
219 | url(r'^downloadWebFileService.py', |
|
222 | url(r'^downloadWebFileService.py', | |
220 | views.download_web_file_service, |
|
223 | views.download_web_file_service, | |
221 | name='download_web_file_service'), |
|
224 | name='download_web_file_service'), | |
222 | url(r'^traceMagneticFieldService.py', |
|
225 | url(r'^traceMagneticFieldService.py', | |
223 | views.trace_magnetic_field_service, |
|
226 | views.trace_magnetic_field_service, | |
224 | name='trace_magnetic_field_service'), |
|
227 | name='trace_magnetic_field_service'), | |
225 | url(r'^globalFileSearchService.py', |
|
228 | url(r'^globalFileSearchService.py', | |
226 | views.global_file_search_service, |
|
229 | views.global_file_search_service, | |
227 | name='global_file_search_service'), |
|
230 | name='global_file_search_service'), | |
228 | url(r'^getUrlListFromGroupIdService.py', |
|
231 | url(r'^getUrlListFromGroupIdService.py', | |
229 | views.get_url_list_from_group_id_service, |
|
232 | views.get_url_list_from_group_id_service, | |
230 | name='get_url_list_from_group_id_service'), |
|
233 | name='get_url_list_from_group_id_service'), | |
231 | url(r'^setGroupIdFromUrlListService.py', |
|
234 | url(r'^setGroupIdFromUrlListService.py', | |
232 | views.set_group_id_from_url_list_service, |
|
235 | views.set_group_id_from_url_list_service, | |
233 | name='set_group_id_from_url_list_service'), |
|
236 | name='set_group_id_from_url_list_service'), | |
234 | url(r'docs/name/(.+)$', |
|
237 | url(r'docs/name/(.+)$', | |
235 | views.docs, |
|
238 | views.docs, | |
236 | name='docs'), |
|
239 | name='docs'), | |
237 |
|
240 | |||
238 | ] |
|
241 | ] | |
239 |
|
242 |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
@@ -1,118 +1,120 | |||||
1 | {% load bootstrap3 %} |
|
1 | {% load bootstrap3 %} | |
2 |
|
2 | |||
3 | {% comment %} |
|
3 | {% comment %} | |
4 | Written by Bill Rideout brideout@haystack.mit.edu |
|
4 | Written by Bill Rideout brideout@haystack.mit.edu | |
5 |
|
5 | |||
6 | Base template for Madrigal single experiment web interface |
|
6 | Base template for Madrigal single experiment web interface | |
7 |
|
7 | |||
8 | $Id: base_single.html 7320 2021-03-04 21:23:07Z brideout $ |
|
8 | $Id: base_single.html 7320 2021-03-04 21:23:07Z brideout $ | |
9 | {% endcomment %} |
|
9 | {% endcomment %} | |
10 |
|
10 | |||
11 | {# Load CSS and JavaScript #} |
|
11 | {# Load CSS and JavaScript #} | |
12 | {% bootstrap_css %} |
|
12 | {% bootstrap_css %} | |
13 | {% bootstrap_javascript %} |
|
13 | {% bootstrap_javascript %} | |
14 | {% load static %} |
|
14 | {% load static %} | |
15 |
|
15 | |||
16 | <link rel="stylesheet" href="{% static "bootstrap_calendar/css/bootstrap_calendar.css" %}" type="text/css" /> |
|
16 | <link rel="stylesheet" href="{% static "bootstrap_calendar/css/bootstrap_calendar.css" %}" type="text/css" /> | |
17 | <script type="text/javascript" src="{% static "bootstrap_calendar/js/bootstrap_calendar.js" %}"></script> |
|
17 | <script type="text/javascript" src="{% static "bootstrap_calendar/js/bootstrap_calendar.js" %}"></script> | |
18 |
|
18 | |||
19 | <!DOCTYPE html> |
|
19 | <!DOCTYPE html> | |
20 | <html> |
|
20 | <html> | |
21 | <head> |
|
21 | <head> | |
22 | <meta charset="UTF-8"> |
|
22 | <meta charset="UTF-8"> | |
23 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
23 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
24 | <link rel="shortcut icon" type="image/png" href="/static/favicon.ico"/> |
|
24 | <link rel="shortcut icon" type="image/png" href="/static/favicon.ico"/> | |
|
25 | <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> | |||
25 | <title>{% block title %}Madrigal Database{% endblock %}</title> |
|
26 | <title>{% block title %}Madrigal Database{% endblock %}</title> | |
26 | <style type="text/css"> |
|
27 | <style type="text/css"> | |
27 | html body { |
|
28 | html body { | |
28 | background-color: {{bg_color}}; |
|
29 | background-color: {{bg_color}}; | |
29 | } |
|
30 | } | |
30 | .breadcrumb > li + li:before { |
|
31 | .breadcrumb > li + li:before { | |
31 | content: none; |
|
32 | content: none; | |
32 | } |
|
33 | } | |
33 | </style> |
|
34 | </style> | |
34 | {% block extra_head %}{% endblock %} |
|
35 | {% block extra_head %}{% endblock %} | |
35 | {% block ajax_js %}{% endblock %} |
|
36 | {% block ajax_js %}{% endblock %} | |
36 | </head> |
|
37 | </head> | |
37 | <body> |
|
38 | <body> | |
38 | <div class="loader" style="display:none"></div> |
|
39 | <div class="loader" style="display:none"></div> | |
39 | <div class="container-fluid"> |
|
40 | <div class="container-fluid"> | |
40 | {% include "navbar.html" %} |
|
41 | {% include "navbar.html" %} | |
41 |
|
42 | |||
42 | <center><h4>Select single Madrigal experiment</h4></center> |
|
43 | <center><h4>Select single Madrigal experiment</h4></center> | |
43 |
|
44 | |||
44 | <div class="row"> |
|
45 | <div class="row"> | |
45 | <div class="col-sm-12"> |
|
46 | <div class="col-sm-12"> | |
46 | {% bootstrap_messages %} |
|
47 | {% bootstrap_messages %} | |
47 | </div> |
|
48 | </div> | |
48 | </div> |
|
49 | </div> | |
49 |
|
50 | |||
50 | {% if form.errors %} |
|
51 | {% if form.errors %} | |
51 | <div class="row"> |
|
52 | <div class="row"> | |
52 | <div class="col-sm-12"> |
|
53 | <div class="col-sm-12"> | |
53 | <p style="color: red;"> |
|
54 | <p style="color: red;"> | |
54 | Please correct the error{{ form.errors|pluralize }} below. |
|
55 | Please correct the error{{ form.errors|pluralize }} below. | |
55 | {{ form.errors }} |
|
56 | {{ form.errors }} | |
56 | </p> |
|
57 | </p> | |
57 | </div> |
|
58 | </div> | |
58 | </div> |
|
59 | </div> | |
59 | {% endif %} |
|
60 | {% endif %} | |
60 |
|
61 | |||
61 | <div class="row"> |
|
62 | <div class="row"> | |
62 |
|
63 | |||
63 | <div class="col-sm-3"> |
|
64 | <div class="col-sm-3"> | |
64 | {% block isGlobal %}{% endblock %} |
|
65 | {% block isGlobal %}{% endblock %} | |
65 | {% block categories %}{% endblock %} |
|
66 | {% block categories %}{% endblock %} | |
66 | {% block instruments %}{% endblock %} |
|
67 | {% block instruments %}{% endblock %} | |
67 | {% block years %}{% endblock %} |
|
68 | {% block years %}{% endblock %} | |
68 | {% block months %}{% endblock %} |
|
69 | {% block months %}{% endblock %} | |
69 | {% block calendar %}{% endblock %} |
|
70 | {% block calendar %}{% endblock %} | |
70 | </div> |
|
71 | </div> | |
71 |
|
72 | |||
72 | <div class="col-sm-9"> |
|
73 | <div class="col-sm-9"> | |
73 | {% block experiment_select %}{% endblock %} |
|
74 | {% block experiment_select %}{% endblock %} | |
74 | {% block file_select %}{% endblock %} |
|
75 | {% block file_select %}{% endblock %} | |
75 | {% block file_buttons %}{% endblock %} |
|
76 | {% block file_buttons %}{% endblock %} | |
76 | {% block file_data %}{% endblock %} |
|
77 | {% block file_data %}{% endblock %} | |
|
78 | {% block file_plot %}{% endblock %} | |||
77 | </div> |
|
79 | </div> | |
78 |
|
80 | |||
79 | </div> |
|
81 | </div> | |
80 | <p></p> |
|
82 | <p></p> | |
81 |
|
83 | |||
82 | {% comment %} |
|
84 | {% comment %} | |
83 |
|
85 | |||
84 | <div class="row"> |
|
86 | <div class="row"> | |
85 | <div class="col-sm-12">{% block download %}{% endblock %}</div> |
|
87 | <div class="col-sm-12">{% block download %}{% endblock %}</div> | |
86 | </div> |
|
88 | </div> | |
87 | <p></p> |
|
89 | <p></p> | |
88 |
|
90 | |||
89 | <div class="row"> |
|
91 | <div class="row"> | |
90 | <div class="col-sm-12">{% block information %}{% endblock %}</div> |
|
92 | <div class="col-sm-12">{% block information %}{% endblock %}</div> | |
91 | </div>{% endcomment %} |
|
93 | </div>{% endcomment %} | |
92 |
|
94 | |||
93 | <p><hr></p> |
|
95 | <p><hr></p> | |
94 |
|
96 | |||
95 | <footer class="row"> |
|
97 | <footer class="row"> | |
96 | <div class="col-sm-6"> |
|
98 | <div class="col-sm-6"> | |
97 | <p>Madrigal database</p> |
|
99 | <p>Madrigal database</p> | |
98 | </div> |
|
100 | </div> | |
99 | <div class="col-sm-6" style="text-align:right"> |
|
101 | <div class="col-sm-6" style="text-align:right"> | |
100 | <p> |
|
102 | <p> | |
101 | </p> |
|
103 | </p> | |
102 | </div> |
|
104 | </div> | |
103 | </footer> |
|
105 | </footer> | |
104 |
|
106 | |||
105 | </div> <!-- container-fluid --> |
|
107 | </div> <!-- container-fluid --> | |
106 |
|
108 | |||
107 | <script> |
|
109 | <script> | |
108 | $('[data-toggle="tooltip"]').tooltip(); |
|
110 | $('[data-toggle="tooltip"]').tooltip(); | |
109 | $('[data-toggle="tooltip"]').on('show.bs.tooltip', function() { |
|
111 | $('[data-toggle="tooltip"]').on('show.bs.tooltip', function() { | |
110 | // Only one tooltip should ever be open at a time |
|
112 | // Only one tooltip should ever be open at a time | |
111 | $('.tooltip').not(this).hide(); |
|
113 | $('.tooltip').not(this).hide(); | |
112 | }); |
|
114 | }); | |
113 | $('.my-dropdown').dropdown(); |
|
115 | $('.my-dropdown').dropdown(); | |
114 | $('.my-dropdown').tooltip(); |
|
116 | $('.my-dropdown').tooltip(); | |
115 | </script> |
|
117 | </script> | |
116 |
|
118 | |||
117 | </body> |
|
119 | </body> | |
118 | </html> No newline at end of file |
|
120 | </html> |
@@ -1,130 +1,131 | |||||
1 | {% comment %} |
|
1 | {% comment %} | |
2 | Written by Bill Rideout brideout@haystack.mit.edu |
|
2 | Written by Bill Rideout brideout@haystack.mit.edu | |
3 |
|
3 | |||
4 | Generic navbar code shared by all Madrigal pages |
|
4 | Generic navbar code shared by all Madrigal pages | |
5 |
|
5 | |||
6 | $Id: navbar.html 6641 2018-11-06 18:02:21Z brideout $ |
|
6 | $Id: navbar.html 6641 2018-11-06 18:02:21Z brideout $ | |
7 | {% endcomment %} |
|
7 | {% endcomment %} | |
8 | <style> |
|
8 | <style> | |
9 | /* --- Style --- This CSS for a custom color navbar for Madrigal was generated using url http://work.smarchal.com/twbscolor/css/e74c3cc0392becf0f1ffbbbc0 */ |
|
9 | /* --- Style --- This CSS for a custom color navbar for Madrigal was generated using url http://work.smarchal.com/twbscolor/css/e74c3cc0392becf0f1ffbbbc0 */ | |
10 | .navbar-default { |
|
10 | .navbar-default { | |
11 | background-color: #21A7EB; |
|
11 | background-color: #21A7EB; | |
12 | border-color: #2182EB; |
|
12 | border-color: #2182EB; | |
13 | } |
|
13 | } | |
14 | .navbar-default .navbar-brand { |
|
14 | .navbar-default .navbar-brand { | |
15 | color: #ecf0f1; |
|
15 | color: #ecf0f1; | |
16 | } |
|
16 | } | |
17 | .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { |
|
17 | .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { | |
18 | color: #ffbbbc; |
|
18 | color: #ffbbbc; | |
19 | } |
|
19 | } | |
20 | .navbar-default .navbar-text { |
|
20 | .navbar-default .navbar-text { | |
21 | color: #ecf0f1; |
|
21 | color: #ecf0f1; | |
22 | } |
|
22 | } | |
23 | .navbar-default .navbar-nav > li > a { |
|
23 | .navbar-default .navbar-nav > li > a { | |
24 | color: #ecf0f1; |
|
24 | color: #ecf0f1; | |
25 | } |
|
25 | } | |
26 | .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { |
|
26 | .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { | |
27 | color: #ffbbbc; |
|
27 | color: #ffbbbc; | |
28 | } |
|
28 | } | |
29 | .navbar-default .navbar-nav > li > .dropdown-menu { |
|
29 | .navbar-default .navbar-nav > li > .dropdown-menu { | |
30 | background-color: #21A7EB; |
|
30 | background-color: #21A7EB; | |
31 | } |
|
31 | } | |
32 | .navbar-default .navbar-nav > li > .dropdown-menu > li > a { |
|
32 | .navbar-default .navbar-nav > li > .dropdown-menu > li > a { | |
33 | color: #ecf0f1; |
|
33 | color: #ecf0f1; | |
34 | } |
|
34 | } | |
35 | .navbar-default .navbar-nav > li > .dropdown-menu > li > a:hover, |
|
35 | .navbar-default .navbar-nav > li > .dropdown-menu > li > a:hover, | |
36 | .navbar-default .navbar-nav > li > .dropdown-menu > li > a:focus { |
|
36 | .navbar-default .navbar-nav > li > .dropdown-menu > li > a:focus { | |
37 | color: #ffbbbc; |
|
37 | color: #ffbbbc; | |
38 | background-color: #2182EB; |
|
38 | background-color: #2182EB; | |
39 | } |
|
39 | } | |
40 | .navbar-default .navbar-nav > li > .dropdown-menu > li > .divider { |
|
40 | .navbar-default .navbar-nav > li > .dropdown-menu > li > .divider { | |
41 | background-color: #21A7EB; |
|
41 | background-color: #21A7EB; | |
42 | } |
|
42 | } | |
43 | .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { |
|
43 | .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { | |
44 | color: #ffbbbc; |
|
44 | color: #ffbbbc; | |
45 | background-color: #2182EB; |
|
45 | background-color: #2182EB; | |
46 | } |
|
46 | } | |
47 | .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { |
|
47 | .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { | |
48 | color: #ffbbbc; |
|
48 | color: #ffbbbc; | |
49 | background-color: #2182EB; |
|
49 | background-color: #2182EB; | |
50 | } |
|
50 | } | |
51 | .navbar-default .navbar-toggle { |
|
51 | .navbar-default .navbar-toggle { | |
52 | border-color: #2182EB; |
|
52 | border-color: #2182EB; | |
53 | } |
|
53 | } | |
54 | .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { |
|
54 | .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { | |
55 | background-color: #2182EB; |
|
55 | background-color: #2182EB; | |
56 | } |
|
56 | } | |
57 | .navbar-default .navbar-toggle .icon-bar { |
|
57 | .navbar-default .navbar-toggle .icon-bar { | |
58 | background-color: #ecf0f1; |
|
58 | background-color: #ecf0f1; | |
59 | } |
|
59 | } | |
60 | .navbar-default .navbar-collapse, |
|
60 | .navbar-default .navbar-collapse, | |
61 | .navbar-default .navbar-form { |
|
61 | .navbar-default .navbar-form { | |
62 | border-color: #ecf0f1; |
|
62 | border-color: #ecf0f1; | |
63 | } |
|
63 | } | |
64 | .navbar-default .navbar-link { |
|
64 | .navbar-default .navbar-link { | |
65 | color: #ecf0f1; |
|
65 | color: #ecf0f1; | |
66 | } |
|
66 | } | |
67 | .navbar-default .navbar-link:hover { |
|
67 | .navbar-default .navbar-link:hover { | |
68 | color: #ffbbbc; |
|
68 | color: #ffbbbc; | |
69 | } |
|
69 | } | |
70 |
|
70 | |||
71 | @media (max-width: 767px) { |
|
71 | @media (max-width: 767px) { | |
72 | .navbar-default .navbar-nav .open .dropdown-menu > li > a { |
|
72 | .navbar-default .navbar-nav .open .dropdown-menu > li > a { | |
73 | color: #ecf0f1; |
|
73 | color: #ecf0f1; | |
74 | } |
|
74 | } | |
75 | .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { |
|
75 | .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { | |
76 | color: #ffbbbc; |
|
76 | color: #ffbbbc; | |
77 | } |
|
77 | } | |
78 | .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { |
|
78 | .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { | |
79 | color: #ffbbbc; |
|
79 | color: #ffbbbc; | |
80 | background-color: #2182EB; |
|
80 | background-color: #2182EB; | |
81 | } |
|
81 | } | |
82 | } |
|
82 | } | |
83 | </style> |
|
83 | </style> | |
84 | <nav class="navbar navbar-default" role="navigation"> |
|
84 | <nav class="navbar navbar-default" role="navigation"> | |
85 | <div class="navbar-header"> |
|
85 | <div class="navbar-header"> | |
86 | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse"> |
|
86 | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse"> | |
87 | <span class="sr-only">Toggle navigation</span> |
|
87 | <span class="sr-only">Toggle navigation</span> | |
88 | <span class="glyphicon glyphicon-arrow-down"></span> |
|
88 | <span class="glyphicon glyphicon-arrow-down"></span> | |
89 | MENU |
|
89 | MENU | |
90 | </button> |
|
90 | </button> | |
91 | </div> |
|
91 | </div> | |
92 | <div class="collapse navbar-collapse" id="collapse"> |
|
92 | <div class="collapse navbar-collapse" id="collapse"> | |
93 | <ul class="nav navbar-nav"> |
|
93 | <ul class="nav navbar-nav"> | |
94 | <li {{ home_active|safe }}><a href="{% url 'index' %}" data-toggle="tooltip" data-original-title="Click here to return to the home page of the {{ site_name }} Madrigal site." data-placement="bottom">{{ site_name }} Home</a></li> |
|
94 | <li {{ home_active|safe }}><a href="{% url 'index' %}" data-toggle="tooltip" data-original-title="Click here to return to the home page of the {{ site_name }} Madrigal site." data-placement="bottom">{{ site_name }} Home</a></li> | |
95 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Use this dropdown menu to access all data anywhere on any Madrigal site. See the tooltips for each choice for more information." data-placement="right">Access data<span class="caret"></span></a> |
|
95 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Use this dropdown menu to access all data anywhere on any Madrigal site. See the tooltips for each choice for more information." data-placement="right">Access data<span class="caret"></span></a> | |
96 | <ul class="dropdown-menu"> |
|
96 | <ul class="dropdown-menu"> | |
97 | <li {{ list_active|safe }}><a href="{% url 'view_list' %}" data-toggle="tooltip" data-original-title="List a range of experiments on any Madrigal site that you can then choose from, and then access its data" data-placement="right">List experiments</a></li> |
|
97 | <li {{ list_active|safe }}><a href="{% url 'view_list' %}" data-toggle="tooltip" data-original-title="List a range of experiments on any Madrigal site that you can then choose from, and then access its data" data-placement="right">List experiments</a></li> | |
98 | <li {{ single_active|safe }}><a href="{% url 'view_single' %}" data-toggle="tooltip" data-original-title="Navigate to a single experiment on any Madrigal site, and access that experiment's data" data-placement="right">Select single experiment</a></li> |
|
98 | <li {{ single_active|safe }}><a href="{% url 'view_single' %}" data-toggle="tooltip" data-original-title="Navigate to a single experiment on any Madrigal site, and access that experiment's data" data-placement="right">Select single experiment</a></li> | |
99 | <li {{ script_active|safe }}><a href="{% url 'choose_script' %}" data-toggle="tooltip" data-original-title="Use this link to create a command that will download data from a range of experiments at once" data-placement="right">Create a command to download multiple exps</a></li> |
|
99 | <li {{ script_active|safe }}><a href="{% url 'choose_script' %}" data-toggle="tooltip" data-original-title="Use this link to create a command that will download data from a range of experiments at once" data-placement="right">Create a command to download multiple exps</a></li> | |
100 | <li {{ ftp_active|safe }}><a href="{% url 'ftp' %}" data-toggle="tooltip" data-original-title="Simple ftp-like UI" data-placement="right">FTP-like access</a></li> |
|
100 | <li {{ ftp_active|safe }}><a href="{% url 'ftp' %}" data-toggle="tooltip" data-original-title="Simple ftp-like UI" data-placement="right">FTP-like access</a></li> | |
101 | </ul> |
|
101 | </ul> | |
102 | </li> |
|
102 | </li> | |
103 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Use this dropdown menu to access all Madrigal metadata. See the tooltips for each choice for more information." data-placement="right">Access metadata<span class="caret"></span></a> |
|
103 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Use this dropdown menu to access all Madrigal metadata. See the tooltips for each choice for more information." data-placement="right">Access metadata<span class="caret"></span></a> | |
104 | <ul class="dropdown-menu"> |
|
104 | <ul class="dropdown-menu"> | |
105 | <li {{ site_active|safe }}><a href="{% url 'site_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual Madrigal sites." data-placement="right">Madrigal site metadata</a></li> |
|
105 | <li {{ site_active|safe }}><a href="{% url 'site_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual Madrigal sites." data-placement="right">Madrigal site metadata</a></li> | |
106 | <li {{ inst_active|safe }}><a href="{% url 'instrument_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual Madrigal instruments." data-placement="right">Instrument metadata</a></li> |
|
106 | <li {{ inst_active|safe }}><a href="{% url 'instrument_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual Madrigal instruments." data-placement="right">Instrument metadata</a></li> | |
107 | <li {{ parm_active|safe }}><a href="{% url 'parameter_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual CEDAR parameters." data-placement="right">CEDAR Parameters</a></li> |
|
107 | <li {{ parm_active|safe }}><a href="{% url 'parameter_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual CEDAR parameters." data-placement="right">CEDAR Parameters</a></li> | |
108 | <li {{ kindat_active|safe }}><a href="{% url 'kindat_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual Madrigal kind of data file codes (also called kindats). Each Madrigal file has a single kind of data code." data-placement="right">Kind of data metadata</a></li> |
|
108 | <li {{ kindat_active|safe }}><a href="{% url 'kindat_metadata' %}" data-toggle="tooltip" data-original-title="List all metadata related to individual Madrigal kind of data file codes (also called kindats). Each Madrigal file has a single kind of data code." data-placement="right">Kind of data metadata</a></li> | |
109 | <li {{ filter_active|safe }}><a href="{% url 'docs' 'filter_desc.html' %}" data-toggle="tooltip" data-original-title="Describe use of filters in Madrigal." data-placement="right">Filter string metadata</a></li> |
|
109 | <li {{ filter_active|safe }}><a href="{% url 'docs' 'filter_desc.html' %}" data-toggle="tooltip" data-original-title="Describe use of filters in Madrigal." data-placement="right">Filter string metadata</a></li> | |
110 | </ul> |
|
110 | </ul> | |
111 | </li> |
|
111 | </li> | |
112 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Click here to access modeling tools associated with Madrigal." data-placement="right">Run models<span class="caret"></span></a> |
|
112 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Click here to access modeling tools associated with Madrigal." data-placement="right">Run models<span class="caret"></span></a> | |
113 | <ul class="dropdown-menu"> |
|
113 | <ul class="dropdown-menu"> | |
114 | <li {{ madCalculator_active|safe }}><a href="{% url 'madrigal_calculator' %}" data-toggle="tooltip" data-original-title="Calculate any Madrigal parameter for a given time and range of lat, lon, and alt." data-placement="right">Run Madrigal derivation engine</a></li> |
|
114 | <li {{ madCalculator_active|safe }}><a href="{% url 'madrigal_calculator' %}" data-toggle="tooltip" data-original-title="Calculate any Madrigal parameter for a given time and range of lat, lon, and alt." data-placement="right">Run Madrigal derivation engine</a></li> | |
115 | <li {{ looker_active|safe }}><a href="{% url 'looker_main' %}" data-toggle="tooltip" data-original-title="Simple Geodetic and Geomagnetic (IGRF) coordinate transformations (aka looker)." data-placement="right">Looker</a></li> |
|
115 | <li {{ looker_active|safe }}><a href="{% url 'looker_main' %}" data-toggle="tooltip" data-original-title="Simple Geodetic and Geomagnetic (IGRF) coordinate transformations (aka looker)." data-placement="right">Looker</a></li> | |
116 | <li><a href="http://models.haystack.mit.edu/models/" data-toggle="tooltip" data-original-title="Run ISR empirical models developed from historical ISR data by Shunrong Zhang." data-placement="right">ISR empirical models</a></li> |
|
116 | <li><a href="http://models.haystack.mit.edu/models/" data-toggle="tooltip" data-original-title="Run ISR empirical models developed from historical ISR data by Shunrong Zhang." data-placement="right">ISR empirical models</a></li> | |
117 | </ul> |
|
117 | </ul> | |
118 | </li> |
|
118 | </li> | |
119 | <li {{ doc_active|safe }}><a href="docs/name/madContents.html" data-toggle="tooltip" data-original-title="Click here to see Madrigal documentation on the web interface, using scripts to automate data access, Madrigal administration, and information for Madrigal developers." data-placement="bottom">Documentation</a></li> |
|
119 | <li {{ doc_active|safe }}><a href="docs/name/madContents.html" data-toggle="tooltip" data-original-title="Click here to see Madrigal documentation on the web interface, using scripts to automate data access, Madrigal administration, and information for Madrigal developers." data-placement="bottom">Documentation</a></li> | |
120 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Use this dropdown menu to navigate to another Madrigal site." data-placement="left">Other Madrigal sites<span class="caret"></span></a> |
|
120 | <li class="dropdown"><a href="#" data-toggle="dropdown" class="my-dropdown" title="Use this dropdown menu to navigate to another Madrigal site." data-placement="left">Other Madrigal sites<span class="caret"></span></a> | |
121 | <ul class="dropdown-menu"> |
|
121 | <ul class="dropdown-menu"> | |
122 | {% for siteName, siteUrl in site_list %} |
|
122 | {% for siteName, siteUrl in site_list %} | |
123 | <li><a href="{{ siteUrl }}" data-toggle="tooltip" data-original-title="Navigate to Madrigal site at {{ siteName }}" data-placement="left">{{ siteName }}</a></li> |
|
123 | <li><a href="{{ siteUrl }}" data-toggle="tooltip" data-original-title="Navigate to Madrigal site at {{ siteName }}" data-placement="left">{{ siteName }}</a></li> | |
124 | {% endfor %} |
|
124 | {% endfor %} | |
125 | </ul> |
|
125 | </ul> | |
126 | </li> |
|
126 | </li> | |
127 |
<li><a href="http://cedar.openmadrigal.org/openmadrigal" data-toggle="tooltip" data-original-title="Click here to go to OpenMadrigal, where you can download API's in python, Matlab, and IDL to run Madrigal scripts, and access Madrigal's source code." data-placement="bottom">OpenMadrigal</a></li> |
|
127 | <li><a href="http://cedar.openmadrigal.org/openmadrigal" data-toggle="tooltip" data-original-title="Click here to go to OpenMadrigal, where you can download API's in python, Matlab, and IDL to run Madrigal scripts, and access Madrigal's source code." data-placement="bottom">OpenMadrigal</a></li> | |
|
128 | <li><a href="{% url 'updata:updata_index' %}" data-toggle="tooltip" data-original-title="Click here to upload data to Madrigal database." data-placement="bottom">Upload Madrigal Data</a></li> | |||
128 | </ul> |
|
129 | </ul> | |
129 | </div> |
|
130 | </div> | |
130 | </nav> No newline at end of file |
|
131 | </nav> |
General Comments 0
You need to be logged in to leave comments.
Login now