Skip to content

Commit

Permalink
Merge pull request #147 from CMSTrackerDPG/#145
Browse files Browse the repository at this point in the history
Fixed responsivness in home, show trackermaps for shifters, cleanup [closes #145, closes #146]
  • Loading branch information
nothingface0 authored May 5, 2022
2 parents 2742dae + 1ac49b8 commit c52b3f0
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 93 deletions.
8 changes: 8 additions & 0 deletions home/static/home/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
width: 100% !important;
height: 185px !important;
}

.card-deck.row {
display: flex;
}

.card {
cursor: pointer;
}
Binary file modified home/static/home/img/addReferenceRun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/cablingMap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/dailyReport.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/listCertRuns.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/mlPlayground2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/shiftleader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/trackermaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/home/img/tutorialsTwiki.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 82 additions & 92 deletions home/templates/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,119 +13,109 @@
<div class="album py-4 bg-light">
<div class="container">
{% if user.is_authenticated %}
<div class="card-deck">
<div class="card-deck row">

{% if user.has_shifter_rights %}
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'openruns:openruns' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Certification</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/certifyRun.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Certify a Run</p>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'openruns:openruns' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Certification</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/certifyRun.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Certify a Run</p>
</div>
</div>
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'listruns:list' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">List Runs</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/listCertRuns.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">List certified runs</p>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'listruns:list' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">List Runs</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/listCertRuns.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">List certified runs</p>
</div>
</div>
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'summary:summary' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Daily Shift Report</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/dailyReport.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Generate daily shift report</p>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'summary:summary' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Daily Shift Report</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/dailyReport.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Generate daily shift report</p>
</div>
</div>
{% endif %}

</div>
<div class="card-deck pt-3">
</div>
<div class="card-deck row pt-3">
{% if user.has_shift_leader_rights %}
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'shiftleader:shiftleader' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Shift Leader Report</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/shiftleader.png' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Generate shift leader report</p>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'shiftleader:shiftleader' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Shift Leader Report</h4>
</div>
</div>
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'addrefrun:addrefrun' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Add Reference Run</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/addReferenceRun.png' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Add a new reference run</p>
</div>
<img class="card-img-top" src="{% static 'home/img/shiftleader.png' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Generate shift leader report</p>
</div>
</div>
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'trackermaps:maps' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Tracker Maps</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/trackermaps.png' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Generate tracker maps</p>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'addrefrun:addrefrun' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Add Reference Run</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/addReferenceRun.png' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Add a new reference run</p>
</div>
</div>
{% endif %}
</div>
<div class="card-deck pt-3">
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'mlplayground:mlplaygroundHome' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">ML Playground</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/mlPlayground2.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Build ML models</p>
</div>
</div>
{% endif %}
</div>
<div class="card-deck row pt-3">
{% if user.has_shifter_rights %}
<div class="card h-50">
<div class="btn btn-dark" onclick="parent.open('https://twiki.cern.ch/twiki/bin/view/CMS/TrackerDQMShift')">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Tutorials & Twikis</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/tutorialsTwiki.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Watch tutorials, Read twikis</p>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="parent.open('https://twiki.cern.ch/twiki/bin/view/CMS/TrackerDQMShift')">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Tutorials & Twikis</h4>
</div>
</div>
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'cablingmap:cablingmapHome' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Cabling Map & DCS Trend</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/cablingMap.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Display cabling maps & DCS trend</p>
</div>
<img
class="card-img-top"
src="{% static 'home/img/tutorialsTwiki.jpg' %}" alt="Card image cap"
>
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">
Watch tutorials, Read twikis
</p>
</div>
</div>
<div class="card h-50">
<div class="btn btn-dark" onclick="location.href='{% url 'mlplayground:mlplaygroundHome' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">ML Playground</h4>
</div>
<img class="card-img-top embed-responsive-item img" src="{% static 'home/img/mlPlayground2.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Build ML models</p>
</div>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'cablingmap:cablingmapHome' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Cabling Map & DCS Trend</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/cablingMap.jpg' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">
Display cabling maps & DCS trend
</p>
</div>
</div>
<div class="card col-sm col-md bg-dark text-light" onclick="location.href='{% url 'trackermaps:maps' %}'">
<div class="card-header">
<h4 class="text-center font-weight-bold mt-1 mb-1">Tracker Maps</h4>
</div>
<img class="card-img-top" src="{% static 'home/img/trackermaps.png' %}" alt="Card image cap">
<div class="card-body">
<p class="card-text text-center" style="font-size: 18px">Generate tracker maps</p>
</div>
</div>
{% endif %}
</div>
</div>
{% else %}
<h4>Please <a href="{% url 'account_login' %}">login</a> to use the application.</h4>
{% endif %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/dqmhelper/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{% if not user.is_authenticated %}
{% load socialaccount %}
<li class="nav-item">
<a class="nav-link" href="/accounts/login"><span class="glyphicon glyphicon-log-in"></span> Login</a>
<a class="nav-link" href="{% url 'account_login' %}"><span class="glyphicon glyphicon-log-in"></span> Login</a>
</li>
{% else %}
<li class="nav-item">
Expand Down

0 comments on commit c52b3f0

Please sign in to comment.