Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-21 08:46:28

0001 {% extends 'base.html' %}
0002 {% load swf_fmt %}
0003 
0004 {% block title %}{{ user.username }}{% endblock %}
0005 
0006 {% block content %}
0007 <style>
0008     .user-tabs { margin: 14px 0 .4rem 0; }
0009     .user-tabs a {
0010         border-bottom: 2px solid transparent;
0011         color: #3d85c6;
0012         font-weight: 600;
0013         margin-right: 1.1rem;
0014         padding-bottom: 2px;
0015         text-decoration: none;
0016     }
0017     .user-tabs a.active { border-bottom-color: #3d85c6; color: #111; }
0018     .user-tab-panel {
0019         padding: 14px 0;
0020     }
0021     .my-workflows-table {
0022         border-collapse: collapse;
0023     }
0024     .my-workflows-table th, .my-workflows-table td {
0025         padding: 6px 14px;
0026         border-bottom: 1px solid #ddd;
0027         text-align: left;
0028         white-space: nowrap;
0029     }
0030     .my-workflows-table th {
0031         border-bottom: 2px solid #999;
0032     }
0033 </style>
0034 
0035 <div>
0036     <div class="user-tabs">
0037         <a href="?tab=workflows" class="{% if active_tab == 'workflows' %}active{% endif %}">My Workflows</a>
0038         <a href="?tab=account" class="{% if active_tab == 'account' %}active{% endif %}">Account</a>
0039     </div>
0040 
0041     {% if active_tab == 'workflows' %}
0042     <div class="user-tab-panel">
0043         {% if not user.is_authenticated %}
0044         <p>Sign in to see your workflows.</p>
0045         {% else %}
0046         <p>PanDA tasks for username <strong>{{ panda_username }}</strong>, last 30 days.</p>
0047         {% if my_tasks_error %}
0048         <p class="error_fill" style="padding: 6px 10px;">PanDA task lookup failed: {{ my_tasks_error }}</p>
0049         {% elif my_tasks %}
0050         <table class="table table-striped table-bordered table-sm align-middle w-auto swf-sortable">
0051             <thead>
0052                 <tr><th>Task</th><th>JEDI ID</th><th>Status</th><th>Label</th><th>Created</th><th>Modified</th></tr>
0053             </thead>
0054             <tbody>
0055                 {% for t in my_tasks %}
0056                 <tr>
0057                     <td><a href="{% url 'monitor_app:panda_task_detail' t.jeditaskid %}">{{ t.taskname }}</a></td>
0058                     <td>{{ t.jeditaskid }}</td>
0059                     <td class="{{ t.status|state_class }}">{{ t.status }}</td>
0060                     <td>{{ t.prodsourcelabel }}</td>
0061                     <td>{{ t.creationdate|date:"Y-m-d H:i" }}</td>
0062                     <td>{{ t.modificationtime|date:"Y-m-d H:i" }}</td>
0063                 </tr>
0064                 {% endfor %}
0065             </tbody>
0066         </table>
0067         {% else %}
0068         <p>No PanDA tasks for <strong>{{ panda_username }}</strong> in the last 30 days.</p>
0069         {% endif %}
0070         <p style="margin-top: 14px;">
0071             <a href="{% url 'monitor_app:panda_tasks_list' %}?username={{ panda_username }}">All tasks for {{ panda_username }} in the PanDA tasks view</a>
0072         </p>
0073         {% endif %}
0074     </div>
0075     {% endif %}
0076 
0077     {% if active_tab == 'account' %}
0078     <div class="user-tab-panel">
0079         <h3>Account Details</h3>
0080         <p><strong>Username:</strong> {{ user.username }}</p>
0081         <p><strong>Email:</strong> {{ user.email|default:'Not set' }}</p>
0082         <p><strong>Roles:</strong>
0083             {% if user.is_superuser %}Superuser{% endif %}
0084             {% if user.is_staff and not user.is_superuser %}Staff{% endif %}
0085             {% if not user.is_superuser and not user.is_staff %}User{% endif %}
0086         </p>
0087 
0088         <h3 style="margin-top: 24px;">Change Password</h3>
0089         {% if is_tunnel %}
0090         <p><a class="btn btn-primary btn-sm" href="/prod/accounts/password_change/">Change password</a></p>
0091         <p>Password changes here apply to your epic-devcloud.org account only and do not propagate upstream.</p>
0092         {% else %}
0093         {% if messages %}
0094             <ul class="messages">
0095                 {% for message in messages %}
0096                     <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
0097                 {% endfor %}
0098             </ul>
0099         {% endif %}
0100         <form method="post" action="{% url 'monitor_app:account' %}?tab=account">
0101             {% csrf_token %}
0102             {{ form.as_p }}
0103             <button type="submit">Change Password</button>
0104         </form>
0105         {% endif %}
0106     </div>
0107     {% endif %}
0108 </div>
0109 {% endblock %}