Skip to content

Commit

Permalink
Minor UI fixes and changes. Increased version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
tblock79 committed Sep 28, 2024
1 parent ff0bf7b commit c91e52b
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 51 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.1-beta.13
0.4.0-alpha.1
6 changes: 3 additions & 3 deletions webgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ async def configuration(request) -> Response:
context = {
"request": request,
"mercure_version": mercure_defs.VERSION,
"page": "configuration",
"page": "homepage",
"config": config.mercure,
"os_string": os_string,
"config_edited": config_edited,
Expand Down Expand Up @@ -372,7 +372,7 @@ async def configuration_edit(request) -> Response:
context = {
"request": request,
"mercure_version": mercure_defs.VERSION,
"page": "configuration",
"page": "homepage",
"config_content": config_content,
}
context.update(get_user_information(request))
Expand Down Expand Up @@ -835,7 +835,7 @@ async def server_error(request, exc) -> Response:
app.mount("/users", users.users_app)
app.mount("/queue", queue.queue_app)
app.mount("/api", api.api_app)
app.mount("/dashboards", dashboards.dashboards_app)
app.mount("/tools", dashboards.dashboards_app)



Expand Down
6 changes: 4 additions & 2 deletions webinterface/dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ async def tasks(request):
context = {
"request": request,
"mercure_version": mercure_defs.VERSION,
"page": "tasks",
"page": "tools",
"tab": "tasks",
}
context.update(get_user_information(request))
return templates.TemplateResponse(template, context)
Expand All @@ -51,7 +52,8 @@ async def tests(request):
context = {
"request": request,
"mercure_version": mercure_defs.VERSION,
"page": "tests",
"page": "tools",
"tab": "tests",
}
context.update(get_user_information(request))
return templates.TemplateResponse(template, context)
Expand Down
1 change: 1 addition & 0 deletions webinterface/statics/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
border-bottom-right-radius: 0px;
}


.navbar.is-black .navbar-start > a.navbar-item:hover,
.navbar.is-black .navbar-item.has-dropdown:hover .navbar-link {
background-color: hsl(141, 71%, 48%);
Expand Down
19 changes: 9 additions & 10 deletions webinterface/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,20 @@
<a class="navbar-item {{highlight('homepage')}}" href="/">
Overview
</a>
<a class="navbar-item {% if page not in ['rules', 'targets','modules', 'users'] %} has-text-grey-light{%endif%}" href="/rules">
Setup
</a>
<a class="navbar-item {{highlight('queue')}}" href="/queue">
Queue
</a>
<a class="navbar-item {% if page not in ['rules', 'targets','modules', 'users'] %} has-text-grey-light{%endif%}" href="/rules">
Rules
</a>
{% if is_admin %}
<a class="navbar-item {{highlight('logs')}}" href="/logs">
Logs
</a>
<a class="navbar-item {{highlight('dashboards')}}" href="/dashboards">
<a class="navbar-item {{highlight('tools')}}" href="/tools">
Tools
</a>
{% endif %}
<a class="navbar-item {{highlight('configuration')}}" href="/configuration">
Configuration
</a>
{% endif %}
</div>
{% if logged_in %}{% if appliance_name != 'master' %}
Expand Down Expand Up @@ -100,7 +97,8 @@
{% block extra_nav %}
{% if page in ['rules','targets','modules', 'users'] %}
<section>
<div class="container tabs">
<div class="container">
<div class="tabs logtabs" style="margin-top: 40px;">
<ul>
<li class="{% if page == 'rules' %}is-active{% endif %}"><a href="/rules">Rules</a></li>
<li class="{% if page == 'targets' %}is-active{% endif %}"><a href="/targets">Targets</a></li>
Expand All @@ -110,8 +108,9 @@
{% endif %}
</ul>
</div>
</section>
{% endif %}
</div>
</section>
{% endif %}
{% endblock %}

<section class="section" style="flex: 1;">
Expand Down
5 changes: 3 additions & 2 deletions webinterface/templates/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<h1 class="title">Configuration</h1>
</div>
<div class="column">
{% if is_admin %}
<div class="buttons is-right">
<a class="button" href="/"><i class="fas fa-arrow-left"></i>&nbsp;Back</a>
{% if is_admin %}
<a class="button" href="/configuration/edit"><i class="fas fa-pencil-alt"></i>&nbsp;Edit</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
<div class="columns">
Expand Down
2 changes: 1 addition & 1 deletion webinterface/templates/dashboards/dashboards.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ul>
<!-- <li class="{% if page == 'query' %}is-active{% endif %}"><a href="query">DICOM Query</a></li> -->
{% if is_admin %}
<li class="{% if page == 'tests' %}is-active{% endif %}"><a href="tests">Self-test</a></li>
<li class="{% if tab == 'tests' %}is-active{% endif %}"><a href="tests">Self-Test</a></li>
{% endif %}
<!-- <li class="{% if page == 'tasks' %}is-active{% endif %}"><a href="tasks">Tasks</a></li> -->

Expand Down
24 changes: 12 additions & 12 deletions webinterface/templates/dashboards/tests.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "dashboards/dashboards.html" %}

{% block title %}Self tests{% endblock %}
{% block title %}Self-Test{% endblock %}

{% block extra_head %}
<script type="text/javascript" src="{{ url_for('static', path='DataTables/datatables.min.js') }}"></script>
Expand All @@ -10,7 +10,7 @@

{% block dashboard_content %}
<main role="main">
<h1 class="title">Self-test</h1>
<h1 class="title">Self-Test</h1>
<div class="container">
<div class="columns">
<div class="column is-one-third">
Expand All @@ -20,14 +20,16 @@ <h1 class="title">Self-test</h1>
</p>
<p class="block">You may need to manually set the receiver and ui host or port. Any field left blank will be assumed to be the default for this mercure installation type. </p>
<p class="block">Setting type to "process" will additionally run a dummy processing step on the dicom series.</p>
<p class="block">Below is the list of submitted tests and the task events they produced.</p>
<p class="block">Below is the list of submitted tests and task events produced.</p>
</div>
<div class="column is-one-third">
</div>
<div class="column is-one-third">
<!-- action="/self_test" -->
<form class="box" id="test-form" hx-post="/self_test" hx-target="#test_submit_result" hx-swap="innerHTML">
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Type</label>
<label class="label">Action</label>
</div>
<div class="field-body">
<div class="field">
Expand All @@ -44,7 +46,7 @@ <h1 class="title">Self-test</h1>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Rule type</label>
<label class="label">Scope</label>
</div>
<div class="field-body">
<div class="field">
Expand All @@ -62,7 +64,7 @@ <h1 class="title">Self-test</h1>

<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Receiver location</label>
<label class="label">Receiver</label>
</div>
<div class="field-body has-addons">
<div class="field has-addons">
Expand All @@ -83,7 +85,7 @@ <h1 class="title">Self-test</h1>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">webui location</label>
<label class="label">UI</label>
</div>
<div class="field-body">
<div class="field has-addons">
Expand Down Expand Up @@ -113,7 +115,7 @@ <h1 class="title">Self-test</h1>
<div class="field">
<div class="control">
<button type="submit" class="button is-primary">
Begin test
Begin Test
</button>
</div>
</div>
Expand All @@ -134,7 +136,7 @@ <h1 class="title">Self-test</h1>

</div>
</div>
<div class="columns">
<div class="columns" style="margin-top: 20px;">
<div class="column is-one-third">
<table class="table is-narrow is-hoverable is-fullwidth jobtable" id="test-table">
<thead>
Expand Down Expand Up @@ -269,8 +271,6 @@ <h1 class="title">Self-test</h1>
// },
timeout: 3000
});


}
} );

Expand Down Expand Up @@ -323,4 +323,4 @@ <h1 class="title">Self-test</h1>
});
}
</script>
{% endblock %}
{% endblock %}
18 changes: 11 additions & 7 deletions webinterface/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h5 class="title is-5 configtitle" style="margin-top: 34px; margin-bottom: 4px !
</div>
{% endfor %}
</div>
<h5 class="title is-5 configtitle" style="margin-top: 40px; margin-bottom: 0px !important;"><i
<h5 class="title is-5 configtitle" style="margin-top: 48px; margin-bottom: 0px !important;"><i
class="fas fa-heartbeat has-text-success"></i>&nbsp;&nbsp;Server Health</h5>
<div class="columns" style="margin-top: 0px;">
<div class="column is-one-third">
Expand All @@ -36,16 +36,20 @@ <h5 class="title is-5 configtitle" style="margin-top: 40px; margin-bottom: 0px !
value="{{used_space}}" max="100"></progress>{{free_space}} / {{total_space}} GB available
</div>
</div>
{% if is_admin %}
{% if runtime != "nomad" %}
<div class="columns" style="margin-top: 20px;">
<h5 class="title is-5 configtitle" style="margin-top: 48px; margin-bottom: 0px !important;"><i
class="fas fa-toolbox has-text-success"></i>&nbsp;&nbsp;Control</h5>
<div class="columns" style="margin-top: 10px;">
<div class="column is-one-third">
<button class="button" id="servicecontrol" value="" onclick="showControlModal()"><i
{% if is_admin %}
{% if runtime != "nomad" %}
<button class="button" id="servicecontrol" value="" onclick="showControlModal()" style="margin-right: 4px;"><i
class="fas fa-wrench"></i>&nbsp;Service Control</button>
{% endif %}
{% endif %}
<a class="button" href="/configuration" id="configurationbutton" ><i
class="fas fa-sliders-h" ></i>&nbsp;Configuration</a>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion webinterface/templates/rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% block content %}
<main role="main">
<div class="container">
<h1 class="title">DICOM Rules</h1>
<h1 class="title">Filtering Rules</h1>

<div class="field">
<div class="control has-icons-left">
Expand Down
3 changes: 1 addition & 2 deletions webinterface/templates/targets.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ <h1 class="title">Routing Targets</h1>
<p class="card-header-title card-toggle">
<span class="icon has-tooltip-left has-tooltip-success" data-tooltip="{{get_target_handler(target).display_name}} Target"><i class="fas {{get_target_handler(target).icon}} fa-lg"></i></span>
&nbsp;&nbsp;{{ target_name }}<span style="margin-left:auto; font-weight: 200;"> {{target.short_description}}
&nbsp;<i class="has-text-grey fa {% if target.direction=='pull' %}fa-download{%elif target.direction=='push'%}fa-upload{%elif target.direction=='both'%}fa-server{%endif%}"></i>

{% if target.direction=='pull' %}&nbsp;<i class="has-text-grey fas fa-download"></i>{%elif target.direction=='push'%}&nbsp;<i class="has-text-grey fas fa-upload"></i>{%elif target.direction=='both'%}&nbsp;<i class="has-text-grey fas fa-server"></i>{%endif%}
</span>
</p>
<a class="card-header-icon card-toggle">
Expand Down
20 changes: 10 additions & 10 deletions webinterface/templates/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ <h1 class="title">Users</h1>
</span>
</div>
</div>
{% for user_name, user in users.items() %}
<div class="card entitycard" data-name="{{user_name}} {{user.email}}">
{% for user_name, user_item in users.items() %}
<div class="card entitycard" data-name="{{user_name}} {{user_item.email}}">
<header class="card-header has-background-light">
<p class="card-header-title card-toggle">
<span class="icon"><i class="fas {% if user.is_admin=="True" %}fa-user-shield{% else %}fa-user{% endif %} fa-lg"></i></span>&nbsp;&nbsp;{{ user_name }}
<span class="icon"><i class="fas {% if user_item.is_admin=="True" %}fa-user-shield{% else %}fa-user{% endif %} fa-lg"></i></span>&nbsp;&nbsp;{{ user_name }}
</p>
<a class="card-header-icon card-toggle">
<i class="fa fa-angle-down"></i>
Expand All @@ -30,14 +30,14 @@ <h1 class="title">Users</h1>
<col width="150">
<tr>
<td>E-Mail:</td>
<td>{{ user.email }}</td>
<td>{{ user_item.email }}</td>
</tr>
<tr>
<td>Administrator:</td>
<td>{{ user.is_admin }}</td>
<td>{{ user_item.is_admin }}</td>
</tr>
{% if (user.permissions is defined) and (user.permissions != '') %}
{% set permlist = user.permissions.split(',') %}
{% if (user_item.permissions is defined) and (user_item.permissions != '') %}
{% set permlist = user_item.permissions.split(',') %}
<tr>
<td>Permissions:</td>
<td>{% for perm in permlist %}<span class="tag is-dark">{{ perm }}</span> {% endfor %}</td>
Expand All @@ -46,9 +46,9 @@ <h1 class="title">Users</h1>
</table>
<div class="buttons is-right">
{% if is_admin %}
<a class="button is-success" href="/users/edit/{{x}}"><i class="fas fa-pen"></i>&nbsp;Edit</a>
<button class="button is-danger" id="confirm-me" value="{{x}}"
onclick="confirmDelete(this.value)" {% if user==x %}disabled
<a class="button is-success" href="/users/edit/{{user_name}}"><i class="fas fa-pen"></i>&nbsp;Edit</a>
<button class="button is-danger" id="confirm-me" value="{{user_name}}"
onclick="confirmDelete(this.value)" {% if user==user_name %}disabled
title="Cannot delete own account" {% endif %}><i class="fas fa-trash-alt"></i>&nbsp;Delete
</button>
{% endif %}
Expand Down

0 comments on commit c91e52b

Please sign in to comment.