Skip to content

Commit

Permalink
updating static assets, webpage content and moving to prodcution
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharad Shriram committed Jul 24, 2021
1 parent e3634f0 commit 43bd652
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 45 deletions.
6 changes: 3 additions & 3 deletions interface/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __str__(self):

## definition for storing the campus data files locations
def set_upload_path(instance, filename):
return '/'.join(['campusData', f"{ datetime.datetime.today().strftime('%Y%m%d') }", instance.campus_name, filename])
return '/'.join(['campusData', f"{ datetime.datetime.today().strftime('%Y%m%d') }", instance.campus_name.replace(' ', '_'), filename])

class campusData(models.Model):
students_csv = models.FileField(upload_to=set_upload_path, null=True)
Expand Down Expand Up @@ -136,9 +136,9 @@ def __str__(self):
## definition for storing the instantiation campus's file paths
def set_instantiation_filePath(instance, filename):
if filename != '':
return '/'.join(['instantiation', f"{ datetime.datetime.today().strftime('%Y%m%d') }", instance.inst_name.campus_name, filename])
return '/'.join(['instantiation', f"{ datetime.datetime.today().strftime('%Y%m%d') }", instance.inst_name.campus_name.replace(' ', '_'), filename])
else:
return '/'.join(['instantiation', f"{ datetime.datetime.today().strftime('%Y%m%d') }", instance.inst_name.campus_name])
return '/'.join(['instantiation', f"{ datetime.datetime.today().strftime('%Y%m%d') }", instance.inst_name.campus_name.replace(' ', '_')])

class campusInstantiation(models.Model):
STATUS_CHOICE = (
Expand Down
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.dev')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.prod')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down
20 changes: 13 additions & 7 deletions static/css/website.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body {
padding-left: 240px;
}
}

/* Sidebar */
.sidebar {
position: fixed;
Expand All @@ -18,7 +18,7 @@ body {
width: 240px;
z-index: 600;
}

@media (max-width: 991.98px) {
.sidebar {
width: 100%;
Expand All @@ -28,7 +28,7 @@ body {
border-radius: 5px;
box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
}

.sidebar-sticky {
position: relative;
top: 0;
Expand All @@ -37,12 +37,12 @@ body {
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.foobottom {
position: fixed;
bottom: 0px;
text-align: left;
padding-top: 30px;
padding-top: 30px;

}
/* .bottom {
Expand All @@ -52,14 +52,20 @@ body {
height: 12.5%;
bottom: 0px;
text-align: center;
padding-top: 30px;
padding-top: 30px;
} */
.logo{
/* float:right; */
width: 100px;
height: 100px;
}

.logo-stretch{
/* float:right; */
width: 250px;
height: 50px;
}

.table-responsive {
max-height:500px;
}
}
Binary file modified static/images/logos/cni.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 removed static/images/logos/dst.jpeg
Binary file not shown.
Binary file added static/images/logos/dst.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 static/images/logos/iisc.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 18 additions & 16 deletions templates/interface/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@ <h2>Support and Sponsors</h2>
<div class="col-lg-8 col-md-12 mb-4 mb-md-0">
<p>
This project was done under the Campus Rakshak initiative supported by the Department of Science and Technology, Government of India and Centre for Networked Intelligence at the Indian Institute of Science, Bangalore

</p>
</div>
<div class="row p-4">
<div class="col-1 col-md">
<a href="https://cni.iisc.ac.in" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="CNI-IISc, Bangalore" src="{% static 'images/logos/cni.jpg' %}">
</a>
</div>
<div class="col-1 col-md">
<a href="https://iisc.ac.in" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="IISc, Bangalore" src="{% static 'images/logos/iisc.jpg' %}">
</a>
</div>
<div class="col-2 col-md">
<a href="https://dst.gov.in/" target="_blank" class="link-secondary">
<img class="img-responsive logo-stretch" alt="DST, Gov. of India" src="{% static 'images/logos/dst.png' %}">
</a>
</div>
</div>
<!--Grid column-->

<!--Grid column-->
<div class="col-2 col-md">
<a href="https://iisc.ac.in" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="IISc, Bangalore" src="{% static 'images/logos/iisc.jpg' %}">
</a>
</div>
<div class="col-2 col-md">
<a href="https://dst.gov.in/" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="DST, Gov. of India" src="{% static 'images/logos/dst.jpeg' %}">
</a>
</div>

<!--Grid column-->

</div>
<!--Grid row-->
Expand Down
17 changes: 12 additions & 5 deletions templates/interface/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,33 @@
{% block content %}


<h2>What is campussim?</h2>
<h2>What is Campus Rakshak Simulator?</h2>
<p>
CampusSim is an agent-based simulator that models the disease's spread via various interaction spaces on the campus. It generates an interaction graph between agents and interaction spaces. Agents are assigned different interactions spaces such as classrooms, hostels, messes, and cafeterias. CampusSim is a parsimonious model that enables a fast and concise simulation of the epidemic spread. The simulator models intervention strategies (case isolation, hostel quarantine, etc.) and users can also define their own, custom interventions to simulate. The simulator is a derivative based out of the IISc-TIFR City-Scale simulator.
Campus Rakshak Simulator is an agent-based simulator that models the disease's spread via various interaction spaces on the campus. It generates an interaction graph between agents and interaction spaces. Agents are assigned different interactions spaces such as classrooms, hostels, messes, and cafeterias. Campus Rakshak Simulator is a parsimonious model that enables a fast and concise simulation of the epidemic spread. The simulator models intervention strategies (case isolation, hostel quarantine, etc.) and users can also define their own, custom interventions to simulate. The simulator is a derivative based out of the IISc-TIFR City-Scale simulator.
</p>

<a href="{% url 'login' %}" role="button" class="btn btn-default btn-lg">Sign-in</a>
<a href="{% url 'register' %}" role="button" class="btn btn-success btn-lg">Sign-up for Campussim</a>

<br>
<br>
<hr>
<p>
This project was done under the Campus Rakshak initiative supported by the Department of Science and Technology, Government of India and Centre for Networked Intelligence at the Indian Institute of Science, Bangalore
</p>
<div class="row p-4">
<div class="col-1 col-md">
<a href="https://cni.iisc.ac.in" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="CNI-IISc, Bangalore" src="{% static 'images/logos/cni.jpg' %}">
</a>
</div>
<div class="col-1 col-md">
<a href="https://iisc.ac.in" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="IISc, Bangalore" src="{% static 'images/logos/iisc.jpg' %}">
</a>
</div>
<div class="col-1 col-md">
<div class="col-4 col-md">
<a href="https://dst.gov.in/" target="_blank" class="link-secondary">
<img class="img-responsive logo" alt="DST, Gov. of India" src="{% static 'images/logos/dst.jpeg' %}">
<img class="img-responsive logo-stretch" alt="DST, Gov. of India" src="{% static 'images/logos/dst.png' %}">
</a>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/interface/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</a>
<a href="{% url 'createSimulation' %}" class="list-group-item list-group-item-action py-2 ripple">
<i class="fas fa-calculator fa-fw me-3"></i>
<span>Create Simualtion</span>
<span>Create Simulation</span>
</a>
<a href="{% url 'visualizeMultiSimulations' %}" class="list-group-item list-group-item-action py-2 ripple">
<i class="fas fa-chart-line fa-fw me-3"></i>
Expand All @@ -45,7 +45,7 @@
<!--Footer-->
<div class="foobottom list-group list-group-flush mx-2 mt-3 ">
<a class="list-group-item list-group-item-action py-2 ripple" href="{% url 'about' %}">
<span>About Campussim</span>
<span>About the simulator</span>
</a>
<a class="list-group-item list-group-item-action py-2 ripple" href="http://rakshak.ihub-drishti.ai/" target="_blank">
<span>About Campus Rakshak</span>
Expand Down
16 changes: 5 additions & 11 deletions templates/interface/user_activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ <h5>Your Activity Log</h5>
<th>Name</th>
<th>Type</th>
<th>Date Created</th>
<th>Status</th>
<th>View</th>
<th>Action</th>
<th>Remove</th>
</tr>
{% for job in campuses %}
<tr>
<td>{{job}}</td>
<td>Campus Data</td>
<td>Instantiated Campus</td>
<td>{{job.created_on}}</td>
<td>{{job.status}}</td>
<td></td>
<td></td>
<td><a class="btn btn-sm btn-danger" href="{% url 'delCampusData' job.pk %}">Remove</a></td>
Expand All @@ -50,6 +52,7 @@ <h5>Your Activity Log</h5>
<td>{{job}}</td>
<td>Simulations</td>
<td>{{job.created_on}}</td>
<td>{{job.status}}</td>
<td><a href="{% url 'viewSimulation' job.pk %}">View Parameters</a>

{% if job.status == 'Complete' %}
Expand All @@ -60,22 +63,13 @@ <h5>Your Activity Log</h5>
<td><a class="btn btn-sm btn-danger" href="{% url 'deleteSimulation' job.pk %}">Remove</a></td>
</tr>
{% endfor %}
{% for job in instantiations %}
<tr>
<td>{{job}}</td>
<td>Campus instantiation</td>
<td>{{job.created_on}}</td>
<td></td>
<td></td>
<td><a class="btn btn-sm btn-danger" href="{% url 'deleteCampus' job.pk %}">Remove</a></td>
</tr>
{% endfor %}
{% for job in interventions %}
<tr>
<td>{{job}}</td>
<td>Custom Intervention</td>
<td>{{job.created_on}}</td>
<td></td>
<td></td>
<td><a class="btn btn-sm btn-warning" href="{% url 'updateIntervention' job.pk %}" disabled>Update</a></td>
<td><a class="btn btn-sm btn-danger" href="{% url 'deleteIntervention' job.pk %}">Remove</a></td>
</tr>
Expand Down

0 comments on commit 43bd652

Please sign in to comment.