Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
ng6
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
54
Issues
54
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
genotoul-bioinfo
ng6
Commits
d16c5cf1
Commit
d16c5cf1
authored
Apr 03, 2020
by
Celine Noirot
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev'
Merge branch Master with dev See merge request
!105
parents
88acab04
384a7de2
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
367 additions
and
439 deletions
+367
-439
ui/nG6/felogin.html
ui/nG6/felogin.html
+1
-1
ui/nG6/pi1/project_view.tpl
ui/nG6/pi1/project_view.tpl
+33
-38
ui/nG6/res/js/tx_nG6_pi1.js
ui/nG6/res/js/tx_nG6_pi1.js
+328
-397
workflows/addproject/__init__.py
workflows/addproject/__init__.py
+5
-3
No files found.
ui/nG6/felogin.html
View file @
d16c5cf1
...
...
@@ -53,8 +53,8 @@
<!-- ###LOGIN_FORM### -->
<form
action=
"###ACTION_URI###"
target=
"_top"
method=
"post"
onsubmit=
"###ON_SUBMIT###"
class=
"form-horizontal"
>
<fieldset>
<legend>
###LEGEND###
</legend>
<p>
###STATUS_MESSAGE###
</p>
<div
class=
"form-group"
>
<label
class=
"col-sm-offset-1 col-sm-4 control-label"
for=
"user"
>
###USERNAME_LABEL###
</label>
<div
class=
"col-sm-6"
>
...
...
ui/nG6/pi1/project_view.tpl
View file @
d16c5cf1
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
...
...
@@ -40,30 +40,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
elseif
$single_project_display
}
<div
class=
"sub-content sc-top"
>
<input
type=
"hidden"
id=
"is_project_admin"
value=
"
{
$projects
[
key
(
$projects
)].
is_admin
}
"
/>
<div
class=
"ng6-content-header-left project"
>
<h2>
Projet
<small>
{
$projects
[
key
(
$projects
)].
name
}
</small></h2>
<div><p>
Current space:
<b><span
id=
"current_space_id"
>
{
$projects
[
key
(
$projects
)].
space_id
}
</span></b></p></div>
<div><p>
{
$space_purge_msg
}
</p></div>
{
if
$projects
[
key
(
$projects
)].
is_admin
}
<div
id=
"change_space_id_warning"
><p><i>
Warning, migrating a project from one space to another will update both the files location and the retention limits.
</i></p></div>
<div
id=
"change_space_id_form"
></div>
<div
id=
"wf_id"
></div>
<div
id=
"change_space_id_status"
></div>
<div
id=
"change_space_id_footer"
align=
"right"
></div>
<div
id=
"migration_form"
></div>
{/
if
}
</div>
<div
class=
"ng6-content-header-right"
>
{
assign
var
=
"manag_values"
value
=
"{$managment_purged_data[$projects[key($projects)].id]}"
}
{
$projects
[
key
(
$projects
)].
description
}
<br
/>
<br
/>
<strong>
{
$manag_values.nb_runs
}
</strong>
run(s) and
<strong>
{
$manag_values.nb_analyses
}
</strong>
analyse(s) have been done on the project
{
$projects
[
key
(
$projects
)].
name
}
.
<strong>
{
$manag_values.nb_analyses
}
</strong>
analyse(s) have been done on the project
{
$projects
[
key
(
$projects
)].
name
}
.
<br
/>
{
assign
var
=
"project_size"
value
=
"<span id='size' class='tx-nG6-mini-wait'></span>"
}
Raw data and analysis results use
<strong>
{
$project_size
}
</strong>
on the hard drive for the whole project.
<br
/>
<!-- New data added to this project will be kept<b>
{
$retention_policy
}
</b>. <br /> -->
<br><label>
Data overview
</label><br>
<table
class=
"table table-striped table-bordered dataTable"
id=
"manag_purged_data_table"
>
<thead>
<tr>
...
...
@@ -92,7 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tbody>
</table>
</div>
<div
style=
"clear:both"
></div>
</div>
...
...
@@ -107,7 +103,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
assign
var
=
"comment_tab"
value
=
"project_comments"
}
<li><a
href=
"#
{
$comment_tab
}
"
data-toggle=
"tab"
>
Comments
</a></li>
</ul>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"runs"
>
{* Find out if the current user is super user of a run *}
...
...
@@ -122,7 +118,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
assign
var
=
"is_project_admin"
value
=
$projects
[
key
(
$projects
)].
is_admin
}
{
include
file
=
'run_table.tpl'
}
</div>
<div
class=
"tab-pane fade"
id=
"analyses"
>
{* Find out if an analysis table should be displayed *}
{
assign
var
=
"display_analysis_result"
value
=
false
}
...
...
@@ -136,7 +132,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
assign
var
=
"is_admin"
value
=
$projects
[
key
(
$projects
)].
is_admin
}
{
include
file
=
'analysis_table.tpl'
}
</div>
{
if
$login_user
}
<div
class=
"tab-pane fade"
id=
"users"
>
<input
type=
"hidden"
id=
"current_project_id"
value=
"
{
$projects
[
key
(
$projects
)].
id
}
"
/>
...
...
@@ -164,22 +160,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tr>
</thead>
{
assign
var
=
current_user_values
value
=
""
}
<tbody>
<tbody>
{
foreach
from
=
$project_users
key
=
c_user_id
item
=
user_values
}
{* highlight user personnal line *}
{
assign
var
=
"emphasis"
value
=
""
}
{
if
$user_values.id
==
$user_id
}
{
assign
var
=
current_user_values
value
=
$user_values
}
{
assign
var
=
"emphasis"
value
=
"tx-nG6-pi1-line-emphasis"
}
{/
if
}
<tr
id=
"tr_user_
{
$user_values.id
}
"
class=
"
{
$emphasis
}
"
>
{
if
(
$user_values.cruser_id
==
$user_id
)
||
$projects
[
key
(
$projects
)].
is_admin
||
$projects
[
key
(
$projects
)].
is_manager
||
(
$user_values.id
==
$user_id
)
||
(
$user_values.id
==
$user_id
)
||
$is_ng6_admin
}
<td><center><input
type=
"checkbox"
id=
"chk_user_
{
$user_values.id
}
"
value=
"user_
{
$user_values.id
}
"
/></center>
{* If the current user is superadmin, it is allowed to update anyone's password. *}
...
...
@@ -193,19 +189,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
else
}
<td></td>
{/
if
}
<td>
{
$user_values.username
}
</td>
<td>
{
$user_values.lastlogin
}
</td>
<td>
{
$user_values.cruser_name
}
</td>
{
if
$user_values.id
==
$user_id
||
$user_values.cruser_id
==
$user_id
}
<td
class=
"editable"
>
<td
class=
"editable"
>
<span
class=
"editable"
data-type=
"text"
data-pk=
"
{
$user_id
}
"
data-url=
"index.php?eID=tx_nG6&type=update_db_field&table=fe_users&field=last_name"
data-original-title=
"Last name"
>
{
$user_values.last_name
}
</span>
</td>
<td
class=
"editable"
>
<td
class=
"editable"
>
<span
class=
"editable"
data-type=
"text"
data-pk=
"
{
$user_id
}
"
data-url=
"index.php?eID=tx_nG6&type=update_db_field&table=fe_users&field=first_name"
data-original-title=
"First name"
>
{
$user_values.first_name
}
</span>
</td>
<td
class=
"editable"
>
<td
class=
"editable"
>
<span
class=
"editable"
data-type=
"text"
data-pk=
"
{
$user_id
}
"
data-url=
"index.php?eID=tx_nG6&type=update_db_field&table=fe_users&field=email"
data-original-title=
"Email"
>
{
$user_values.email
}
</span>
</td>
{
else
}
...
...
@@ -213,14 +209,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td>
{
$user_values.first_name
}
</td>
<td>
{
$user_values.email
}
</td>
{/
if
}
<td>
{
if
$user_values.right_id
==
'2'
&&
!
$projects
[
key
(
$projects
)].
is_admin
}
<select
class=
"form-control"
id=
"cbb_right_level_
{
$user_values.id
}
"
name=
"right_level"
disabled
>
<option
value=
"2"
selected=
"selected"
>
Administrator
</option>
</select>
{
else
}
{
if
(
$projects
[
key
(
$projects
)].
is_admin
&&
$user_values.id
!=
$user_id
)
{
if
(
$projects
[
key
(
$projects
)].
is_admin
&&
$user_values.id
!=
$user_id
)
||
(
$projects
[
key
(
$projects
)].
is_manager
&&
$user_values.id
!=
$user_id
&&
$user_values.right_id
!=
'2'
)
}
{
assign
var
=
"disabled"
value
=
""
}
{
else
}
...
...
@@ -230,23 +226,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
if
$projects
[
key
(
$projects
)].
is_admin
}
<option
value=
"2"
selected=
"selected"
>
Administrator
</option>
{/
if
}
{
if
$user_values.right_id
==
'1'
}
<option
value=
"1"
selected=
"selected"
>
Manager
</option>
{
else
}
<option
value=
"1"
>
Manager
</option>
{/
if
}
{
if
$user_values.right_id
==
'0'
}
<option
value=
"0"
selected=
"selected"
>
Member
</option>
{
else
}
<option
value=
"0"
>
Member
</option>
{/
if
}
</select>
{/
if
}
{/
if
}
</td>
</tr>
</tr>
{/
foreach
}
</tbody>
{
assign
var
=
"disabled"
value
=
""
}
...
...
@@ -256,17 +252,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
elseif
$current_user_values.id
==
$user_id
}
{
assign
var
=
"disabled"
value
=
"disabled"
}
{
if
$current_user_values.right_id
==
'0'
}
{
assign
var
=
"nou_selection_btn"
value
=
""
}
{/
if
}
{
assign
var
=
"multipleu_selection_btn"
value
=
""
}
{/
if
}
<tfoot>
<tr>
<th
align=
"left"
colspan=
"8"
>
With selection :
With selection :
<div
class=
"btn-group"
>
<button
id=
"add_user"
type=
"button"
class=
"btn
{
$nou_selection_btn
}
btn-sm btn-default"
{
$disabled
}
><i
class=
"glyphicon glyphicon-plus"
></i>
add user
</button>
<button
id=
"del_user"
type=
"button"
class=
"btn
{
$multipleu_selection_btn
}
btn-sm btn-default"
{
$disabled
}
><i
class=
"glyphicon glyphicon-minus"
></i>
delete user
</button>
...
...
@@ -278,12 +274,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</table>
</div>
{/
if
}
{
include
file
=
'comments.tpl'
comments
=
$comments
tab_id
=
$comment_tab
add_new_comment
=
$projects
[
key
(
$projects
)].
is_admin
user_id
=
$user_id
}
</div>
</div>
{* If multiple projects have to be displayed *}
{
else
}
{* Find out if the current user is super user of a project *}
...
...
@@ -299,7 +295,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div
class=
"sub-content sc-top"
>
<div
class=
"ng6-content-header-left project"
>
<h2>
Projects list
<small>
you can access
</small></h2>
</div>
<div
class=
"ng6-content-header-right"
>
{
if
$is_ng6_superadmin
}
...
...
@@ -319,4 +315,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/
if
}
{
include
file
=
'../template/modals.tpl'
}
ui/nG6/res/js/tx_nG6_pi1.js
View file @
d16c5cf1
This diff is collapsed.
Click to expand it.
workflows/addproject/__init__.py
View file @
d16c5cf1
...
...
@@ -16,9 +16,8 @@
#
from
jflow.workflow
import
Workflow
from
ng6.project
import
Project
from
ng6.config_reader
import
NG6ConfigReader
from
workflows.types
import
ng6adminlogin
,
uniqproject
,
ng6space
class
AddProject
(
Workflow
):
...
...
@@ -27,10 +26,13 @@ class AddProject (Workflow):
return
"Add a brand new project"
def
define_parameters
(
self
,
function
=
"process"
):
ng6conf
=
NG6ConfigReader
()
space_choices
=
ng6conf
.
get_available_spaces
()
self
.
add_parameter
(
"admin_login"
,
"The login of a ng6 administrator"
,
required
=
True
,
type
=
ng6adminlogin
)
self
.
add_parameter
(
"project_name"
,
"Give a name to your project (has to be unique)"
,
flag
=
"--name"
,
required
=
True
,
type
=
uniqproject
)
self
.
add_parameter
(
"project_description"
,
"Give a description to your project"
,
flag
=
"--description"
,
required
=
True
)
self
.
add_parameter
(
"space"
,
"Where to store data"
,
flag
=
"--space"
,
default
=
"
default"
,
type
=
ng6space
)
self
.
add_parameter
(
"space"
,
"Where to store data"
,
flag
=
"--space"
,
default
=
"
shortterm"
,
type
=
ng6space
,
choices
=
space_choices
)
def
process
(
self
):
project
=
Project
(
self
.
project_name
,
self
.
project_description
,
self
.
admin_login
,
None
,
self
.
space
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment