airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [airavata-sandbox] 06/08: Created landing page for User Dashboard, updated Request Model
Date Thu, 14 Dec 2017 01:51:28 GMT
This is an automated email from the ASF dual-hosted git repository.

smarru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-sandbox.git

commit 83b3c0331b7936831691faea2f25344262d26bc7
Author: Prasandeep Singh <prasan.ubhi@gmail.com>
AuthorDate: Mon Dec 4 19:58:59 2017 -0500

    Created landing page for User Dashboard, updated Request Model
---
 .../migrations/0007_auto_20171205_0024.py          |  70 +++++++++++++++++++++
 .../migrations/0007_auto_20171205_0024.pyc         | Bin 0 -> 1834 bytes
 .../migrations/0008_auto_20171205_0028.py          |  35 +++++++++++
 .../migrations/0008_auto_20171205_0028.pyc         | Bin 0 -> 1224 bytes
 .../migrations/0009_auto_20171205_0029.py          |  35 +++++++++++
 .../migrations/0009_auto_20171205_0029.pyc         | Bin 0 -> 1258 bytes
 .../ResourceAllocationManager/dashboard/models.py  |  22 +++----
 .../ResourceAllocationManager/dashboard/models.pyc | Bin 2052 -> 2142 bytes
 .../dashboard/templates/dashboard/base.html        |   1 -
 .../dashboard/templates/dashboard/detail.html      |   1 -
 .../dashboard/templates/dashboard/index.html       |  47 ++++++++------
 .../ResourceAllocationManager/dashboard/views.py   |  52 ---------------
 .../ResourceAllocationManager/dashboard/views.pyc  | Bin 4554 -> 4554 bytes
 .../django/ResourceAllocationManager/db.sqlite3    | Bin 52224 -> 52224 bytes
 14 files changed, 180 insertions(+), 83 deletions(-)

diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0007_auto_20171205_0024.py
b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0007_auto_20171205_0024.py
new file mode 100644
index 0000000..66e300e
--- /dev/null
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0007_auto_20171205_0024.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10 on 2017-12-05 00:24
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('dashboard', '0006_request_request_date'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='request',
+            name='allocation_type',
+            field=models.CharField(blank=True, max_length=100),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='applications_to_be_used',
+            field=models.CharField(blank=True, max_length=100),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='disk_usage_range_per_job',
+            field=models.BigIntegerField(blank=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='document',
+            field=models.FileField(blank=True, upload_to=b''),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='field_of_science',
+            field=models.CharField(blank=True, max_length=50),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='keywords',
+            field=models.CharField(blank=True, max_length=100),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='max_memory_per_cpu',
+            field=models.BigIntegerField(blank=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='num_cpus_per_job',
+            field=models.BigIntegerField(blank=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='request_reviewed_and_funded_by',
+            field=models.CharField(blank=True, max_length=100),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='specific_resource_selection',
+            field=models.CharField(blank=True, max_length=100),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='typical_su_per_job',
+            field=models.BigIntegerField(blank=True),
+        ),
+    ]
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0007_auto_20171205_0024.pyc
b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0007_auto_20171205_0024.pyc
new file mode 100644
index 0000000..0b57df8
Binary files /dev/null and b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0007_auto_20171205_0024.pyc
differ
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0008_auto_20171205_0028.py
b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0008_auto_20171205_0028.py
new file mode 100644
index 0000000..2f2fca1
--- /dev/null
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0008_auto_20171205_0028.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10 on 2017-12-05 00:28
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('dashboard', '0007_auto_20171205_0024'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='request',
+            name='disk_usage_range_per_job',
+            field=models.BigIntegerField(null=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='max_memory_per_cpu',
+            field=models.BigIntegerField(null=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='num_cpus_per_job',
+            field=models.BigIntegerField(null=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='typical_su_per_job',
+            field=models.BigIntegerField(null=True),
+        ),
+    ]
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0008_auto_20171205_0028.pyc
b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0008_auto_20171205_0028.pyc
new file mode 100644
index 0000000..6c59ccd
Binary files /dev/null and b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0008_auto_20171205_0028.pyc
differ
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0009_auto_20171205_0029.py
b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0009_auto_20171205_0029.py
new file mode 100644
index 0000000..fdc92b2
--- /dev/null
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0009_auto_20171205_0029.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10 on 2017-12-05 00:29
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('dashboard', '0008_auto_20171205_0028'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='request',
+            name='disk_usage_range_per_job',
+            field=models.BigIntegerField(blank=True, null=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='max_memory_per_cpu',
+            field=models.BigIntegerField(blank=True, null=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='num_cpus_per_job',
+            field=models.BigIntegerField(blank=True, null=True),
+        ),
+        migrations.AlterField(
+            model_name='request',
+            name='typical_su_per_job',
+            field=models.BigIntegerField(blank=True, null=True),
+        ),
+    ]
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0009_auto_20171205_0029.pyc
b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0009_auto_20171205_0029.pyc
new file mode 100644
index 0000000..1551e24
Binary files /dev/null and b/allocation-manager/django/ResourceAllocationManager/dashboard/migrations/0009_auto_20171205_0029.pyc
differ
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/models.py b/allocation-manager/django/ResourceAllocationManager/dashboard/models.py
index d8b9ec8..7d28ed1 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/models.py
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/models.py
@@ -9,19 +9,19 @@ class Request(models.Model):
     request_title = models.CharField(max_length=250)
     request_description = models.CharField(max_length=500)
     request_status = models.CharField(max_length=20)
-    allocation_type = models.CharField(max_length=100)
-    applications_to_be_used = models.CharField(max_length=100)
-    disk_usage_range_per_job = models.BigIntegerField()
-    document = models.FileField()
-    field_of_science = models.CharField(max_length=50)
-    keywords = models.CharField(max_length=100)
-    max_memory_per_cpu = models.BigIntegerField()
-    num_cpus_per_job = models.BigIntegerField()
-    request_reviewed_and_funded_by = models.CharField(max_length=100)
+    allocation_type = models.CharField(blank=True,max_length=100)
+    applications_to_be_used = models.CharField(blank=True,max_length=100)
+    disk_usage_range_per_job = models.BigIntegerField(blank=True,null=True)
+    document = models.FileField(blank=True)
+    field_of_science = models.CharField(blank=True,max_length=50)
+    keywords = models.CharField(blank=True,max_length=100)
+    max_memory_per_cpu = models.BigIntegerField(blank=True,null=True)
+    num_cpus_per_job = models.BigIntegerField(blank=True,null=True)
+    request_reviewed_and_funded_by = models.CharField(blank=True,max_length=100)
     request_date = models.DateTimeField(blank=True, null=True)
     service_units = models.BigIntegerField()
-    specific_resource_selection = models.CharField(max_length=100)
-    typical_su_per_job = models.BigIntegerField()
+    specific_resource_selection = models.CharField(blank=True,max_length=100)
+    typical_su_per_job = models.BigIntegerField(blank=True,null=True)
 
     def get_absolute_url(self):
         return reverse('dashboard/detail.html', kwargs={'pk': self.pk})
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/models.pyc b/allocation-manager/django/ResourceAllocationManager/dashboard/models.pyc
index 3c552d2..7987bd4 100644
Binary files a/allocation-manager/django/ResourceAllocationManager/dashboard/models.pyc and
b/allocation-manager/django/ResourceAllocationManager/dashboard/models.pyc differ
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/base.html
b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/base.html
index 779bc55..768f112 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/base.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/base.html
@@ -10,7 +10,6 @@
     <link href="https://fonts.googleapis.com/css?family=Spectral+SC" rel="stylesheet">
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.7.5/css/bootstrap-select.min.css">
     <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.4.5/css/fileinput.min.css"
media="all" rel="stylesheet" type="text/css" />
-
     <link rel="stylesheet" type="text/css" href="{% static 'dashboard/style.css' %}"/>
     <script
       src="https://code.jquery.com/jquery-3.2.1.min.js"
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/detail.html
b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/detail.html
index 34478ee..9859092 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/detail.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/detail.html
@@ -2,7 +2,6 @@
 {% block title %} Request Details{% endblock %}
 
 {% block body %}
-{#    <!--<img src="{{ album.album_logo.url }}">-->#}
 
     <h1>{{ request.request_title }}</h1>
     <h3>{{ request.request_description }} </h3>
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
index 4a3f0bd..88e25c4 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
@@ -1,24 +1,35 @@
 {% extends 'dashboard/base.html' %}
-{% block title %} Allcation Manager - Home{% endblock %}
+{% block title %} Allocation Manager - Home{% endblock %}
 {% block body %}
     {% if all_requests %}
-        <h3>Here are all my requests</h3>
-    <!-- Details-->
-    <ul>
-        {% for request in all_requests %}
-         <li>
-             <a href="{% url 'dashboard:detail' request.id %}">{{ request.request_title
}}</a>
-             <!-- Delete -->
-            <form action="{% url 'dashboard:request-delete' request.id %}" method="post"
style="display: inline">
-                {% csrf_token %}
-                <input type="hidden" name="request_id" value="{{ request.id }}">
-                <button type="submit" class="btn btn-default btn-sm">
-                    <span class="glyphicon glyphicon-trash"></span>
-                </button>
-            </form>
-         </li>
-        {% endfor %}
-    </ul>
+        <h3 style="margin-left: 7%">My Requests</h3>
+        <!-- All Requests-->
+        <div class="container">
+          <table class="table table-hover table-bordered table-striped table-responsive">
+            <thead class="thead-inverse">
+              <tr style="background-color: #337ab7;color:white">
+                <th>Request-ID</th>
+                <th>Request Title</th>
+                <th>Request Description</th>
+                <th>Allocation Requested</th>
+                <th>Allocation Status</th>
+              </tr>
+            </thead>
+            <tbody>
+                {% for request in all_requests %}
+                  <tr>
+                    <td>{{ request.id }}</td>
+                    <td>{{ request.request_title }}</td>
+                    <td>{{ request.request_description }}</td>
+                    <td>10</td>
+                    <td>Pending</td>
+                  </tr>
+                {% endfor %}
+            </tbody>
+          </table>
+        </div>
+
+
     {%  else %}
         <h3>You don't have any requests</h3>
     {% endif %}
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/views.py b/allocation-manager/django/ResourceAllocationManager/dashboard/views.py
index 5139e55..706a7f0 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/views.py
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/views.py
@@ -72,55 +72,3 @@ class UserFormView(View):
                     return redirect('dashboard:index')
         return render(request, self.template_name, {'form': form})
 
-
-
-
-
-# # from django.http import Http404
-# # from django.http import HttpResponse
-# # from django.template import loader
-# from django.shortcuts import render, get_object_or_404
-# from .models import Album, Song
-#
-# def index(request):
-#     all_albums = Album.objects.all()
-#     context = {'all_albums': all_albums}
-#     return render(request, 'dashboard/index.html', context)
-#
-#
-#
-#     # html = ''
-#     # all_albums = Album.objects.all()
-#     # for album in all_albums:
-#     #     url = '/dashboard/' + str(album.id) + '/'
-#     #     html += '<a href="' + url + '">' + album.album_title + '</a><br>'
-#     # return HttpResponse(html)
-#
-# def detail(request, album_id):
-#     album = get_object_or_404(Album, pk=album_id)
-#     # try:
-#     #     album = Album.objects.get(pk=album_id)
-#     # except Album.DoesNotExist:
-#     #     raise Http404("Album does not exists")
-#     return render(request, 'dashboard/detail.html', {'album':album} )
-#     # return HttpResponse("<h2>This will contain detaails for " +str(album_id) +
"</h2>")
-#
-#
-# def favourite(request, album_id):
-#     album = get_object_or_404(Album, pk=album_id)
-#     try:
-#         selected_song = album.song_set.get(pk=request.POST['song'])
-#     except (KeyError, Song.DoesNotExist):
-#         return render(request, 'dashboard/detail.html', {
-#             'album' : album,
-#             'error_message' : "You did not select a valid song",
-#         })
-#     else:
-#         selected_song.is_favourite = True
-#         selected_song.save()
-#         return render(request, 'dashboard/detail.html', {'album': album})
-
-#
-#
-#
-#
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc b/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc
index ca69975..4f74faa 100644
Binary files a/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc and
b/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc differ
diff --git a/allocation-manager/django/ResourceAllocationManager/db.sqlite3 b/allocation-manager/django/ResourceAllocationManager/db.sqlite3
index 871c8b6..f3033e4 100644
Binary files a/allocation-manager/django/ResourceAllocationManager/db.sqlite3 and b/allocation-manager/django/ResourceAllocationManager/db.sqlite3
differ

-- 
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <commits@airavata.apache.org>.

Mime
View raw message