--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('qcg', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='allocation',
+ name='working_directory',
+ field=models.CharField(default=b'', max_length=1024, verbose_name='Katalog roboczy', blank=True),
+ preserve_default=True,
+ ),
+ ]
efficiency = models.IntegerField(u"Efektywność", blank=True, null=True) # ??
comment = models.TextField(u"Komentarz", blank=True, default='')
memory_usage = models.PositiveIntegerField(u"Użycie pamięci", blank=True, null=True)
+ working_directory = models.CharField(u"Katalog roboczy", max_length=1024, blank=True, default='')
class Meta:
verbose_name = u"Alokacja"
attrs = get_attributes(qcg_allocation, ('host_name', 'status_description', 'processes_count', 'slots_count',
'processes_group_id', 'submission_time', 'estimated_start_time',
'finish_time', 'local_submission_time', 'local_start_time',
- 'local_finish_time', 'purged', 'efficiency', 'comment', 'memory_usage'))
+ 'local_finish_time', 'purged', 'efficiency', 'comment', 'memory_usage',
+ 'working_directory'))
attrs['status'] = Allocation.STATUS_CHOICES_REVERSED[qcg_allocation.status]
#host .selectize-input {
padding-right: 32px;
}
+
+
+
+/* task details view */
+
+.working-dir {
+ margin-top: 10px;
+}
+
+@media (min-width: 768px) {
+ .working-dir {
+ position: absolute;
+ right: 15px;
+ top: 50%;
+ margin-top: -17px;
+ z-index: 1;
+ }
+}
{% extends 'qcg/base.html' %}
{% load qcg_utils staticfiles %}
+{% block extra_js %}
+ {% include 'filex/source.js.html' %}
+
+ <script>
+ var filex = filex || {};
+
+ $(function () {
+ 'use strict';
+
+ $('.working-dir').on('click', function() {
+ filex.load($(this).data('url'));
+ });
+ });
+ </script>
+{% endblock extra_js %}
+
{% block container %}
<ol class="breadcrumb">
<li><a href="{% url 'jobs' %}">Zadania</a></li>
{% display_attribute 'Lokalna data zakończenia' task.local_finish_time %}
{% display_attribute 'Efektywność' alloc.efficiency %}
{% display_attribute 'Użycie pamięci' alloc.memory_usage %}
+ {% display_attribute 'Katalog roboczy' alloc.working_directory %}
{% display_attribute 'Usunięty katalog roboczy?' task.purged %}
+
+ {% if alloc.working_directory %}
+ <button class="btn btn-default working-dir"
+ data-toggle="modal" data-target="#gridftp" data-url="{{ alloc.working_directory|cut:'gsiftp://' }}">
+ Przeglądaj katalog roboczy
+ </button>
+ {% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
+ <div id="gridftp" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
+ <h4 class="modal-title" id="modal-label">Katalog roboczy</h4>
+ </div>
+ <div class="modal-body">
+ {% include 'filex/source.html' %}
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Ok</button>
+ </div>
+ </div>
+ </div>
+ </div>
+
{% endblock %}
-Django
+Django<1.8
django-grappelli
django-bootstrap3
pkgs/django-openid-auth-0.5.1.tar.gz
-pkgs/pyqcg-0.4.tar.gz
+pkgs/pyqcg-0.5.tar.gz
pkgs/python-gridftp-1.3.4.tar.gz
python-openid
pytz