Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates incomplete workflows modal for superusers #1433 #1434

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define([
}, this);

this.shouldShowIncompleteWorkflowsModal = ko.observable(false);
this.requestingUserIsSuperuser = ko.observable(false);

this.incompleteWorkflows = ko.observableArray([]);
this.incompleteWorkflows.subscribe(incompleteWorkflows => {
Expand All @@ -35,6 +36,8 @@ define([

return workflowData;
}));

this.requestingUserIsSuperuser(respJSON['requesting_user_is_superuser']);
});

// filters out the chemical image workflow, if cloud storage is not enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
style="
background-color: white;
width: 100%;
max-width: 1000px;
max-height: 480px;
border-radius: 4px;
cursor: default;
overflow: hidden;
"
data-bind="style: {maxWidth: $data.requestingUserIsSuperuser() ? '1200px' : '1000px'}"
>
<div style="width: 100%; display: flex; justify-content: flex-end; padding: 10px 12px;">
<i
Expand All @@ -34,20 +34,25 @@
></i>
</div>
<div style="display: flex; flex-direction: column; align-items: center;">
<h2>{% trans 'You have incomplete workflows' %}</h2>
<h2>{% trans 'Incomplete Workflows' %}</h2>
<p>
{% trans 'Please either complete or delete the workflows listed below.' %}
</p>
</div>

<div style="padding: 40px 80px; display: flex; justify-content: center;">
<div style="padding: 40px 100px; display: flex; justify-content: center;">
<table class="table table-striped" style="border: 1px solid #ddd;">
<thead>
<tr style="display: flex; justify-content: space-between;">
<th style="flex-grow: 1; max-width: 200px;">
{% trans 'Created' %}
</th>
<th style="flex-grow: 2; max-width: 600px;">
<!-- ko if: requestingUserIsSuperuser() -->
<th style="flex-grow: 1; max-width: 200px;">
{% trans 'User' %}
</th>
<!-- /ko -->
<th style="flex-grow: 2; max-width: 400px;">
{% trans 'Workflow Name' %}
</th>
<th style="flex-grow: 1; max-width: 200px;">
Expand All @@ -59,7 +64,10 @@ <h2>{% trans 'You have incomplete workflows' %}</h2>
<!-- ko foreach: $data.incompleteWorkflows -->
<tr style="display: flex; justify-content: space-between;">
<td style="flex-grow: 1; max-width: 200px;" data-bind="text: $data.created"></td>
<td style="flex-grow: 2; max-width: 600px;" data-bind="text: $data.workflowname"></td>
<!-- ko if: $parent.requestingUserIsSuperuser() -->
<td style="flex-grow: 1; max-width: 200px;" data-bind="text: $data.username"></td>
<!-- /ko -->
<td style="flex-grow: 2; max-width: 400px;" data-bind="text: $data.workflowname"></td>
<td style="flex-grow: 1; max-width: 200px;">
<a
data-bind="attr: {'href': `/plugins/${$data.workflowname}?workflow-id=${$data.workflowid}`}"
Expand Down
Loading