Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
62827323
Commit
62827323
authored
Dec 20, 2018
by
Gerald Salin
Browse files
Merge branch 'user_management' into 'master'
User management See merge request
!15
parents
e223c65f
7162812c
Changes
10
Hide whitespace changes
Inline
Side-by-side
application.properties.example
View file @
62827323
...
...
@@ -28,6 +28,8 @@ server_socket_host = 127.0.0.1
# on which socket port should run the web server
server_socket_port = 8080
#server_socket_port = 8083
# protocol used to access web server (http|https)
server_socket_protocol = https
# date format
date_format = %d/%m/%Y
# data retention time (in years)
...
...
src/jflow/config_reader.py
View file @
62827323
...
...
@@ -112,9 +112,9 @@ class JFlowConfigReader(object):
def
get_socket_options
(
self
):
try
:
return
[
self
.
reader
.
get
(
"global"
,
"server_socket_host"
),
int
(
self
.
reader
.
get
(
"global"
,
"server_socket_port"
))]
return
[
self
.
reader
.
get
(
"global"
,
"server_socket_host"
),
int
(
self
.
reader
.
get
(
"global"
,
"server_socket_port"
))
,
self
.
reader
.
get
(
"global"
,
"server_socket_protocol"
)
]
except
:
return
[
"127.0.0.1"
,
8080
]
return
[
"127.0.0.1"
,
8080
,
"http"
]
def
get_ssl_files
(
self
):
try
:
...
...
src/jflow/server.py
View file @
62827323
...
...
@@ -530,7 +530,7 @@ class JFlowServer (object):
socket_opt
=
self
.
jflow_config_reader
.
get_socket_options
()
if
not
os
.
path
.
isdir
(
path
):
return
{
'url'
:
'http
://'
+
socket_opt
[
0
]
+
':'
+
str
(
socket_opt
[
1
])
+
'/'
+
path
.
replace
(
work_dir
,
web_path
),
'url'
:
socket_opt
[
2
]
+
'
://'
+
socket_opt
[
0
]
+
':'
+
str
(
socket_opt
[
1
])
+
'/'
+
path
.
replace
(
work_dir
,
web_path
),
'size'
:
get_octet_string_representation
(
os
.
path
.
getsize
(
os
.
path
.
abspath
(
path
))),
'extension'
:
os
.
path
.
splitext
(
path
)[
1
]
}
...
...
src/ng6/config_reader.py
View file @
62827323
...
...
@@ -159,12 +159,13 @@ class NG6ConfigReader(object):
def
get_server_parameters
(
self
):
"""
return the server parameters
@return: server_socket_host, server_socket_port
@return: server_socket_host, server_socket_port
, server_socket_protocol
"""
# try:
server_params
=
[]
server_params
.
append
(
self
.
reader
.
get
(
'global'
,
'server_socket_host'
))
server_params
.
append
(
self
.
reader
.
get
(
'global'
,
'server_socket_port'
))
server_params
.
append
(
self
.
reader
.
get
(
"global"
,
'server_socket_protocol'
))
return
server_params
# except :
# raise Error("Failed when parsing the config file !")
...
...
ui/nG6/class.tx_nG6_eid.php
View file @
62827323
...
...
@@ -61,7 +61,7 @@ class tx_nG6_eid {
//error_log("tx_nG6_eid ".$type." \n ", 3, "/work/tmp/mes-erreurs.log");
// If the type of data requested is project
if
(
$type
==
'project'
)
{
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'id'
));
$project_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'
object_
id'
));
// Select all runs linked to the project
$project_runs
=
tx_nG6_db
::
get_user_project_runs
(
$user_id
,
$project_id
,
'tx_nG6_run.date DESC'
);
// for each run
...
...
@@ -79,7 +79,7 @@ class tx_nG6_eid {
// If the type of data requested is run
}
else
if
(
$type
==
'run'
){
$run_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'id'
));
$run_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'
object_
id'
));
// Select all analysis linked to the run and the run information
$run_analysis
=
tx_nG6_db
::
get_user_run_analysis
(
$user_id
,
$run_id
,
'tx_nG6_analyze.name'
);
$run_info
=
tx_nG6_db
::
select_run
(
$run_id
);
...
...
@@ -639,7 +639,7 @@ class tx_nG6_eid {
$group_name
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'title'
));
$location
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'location'
));
$organism
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'organism'
));
$user_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'id'
));
$user_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'
user_
id'
));
$password
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'password'
));
$cruser_id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'creator'
));
$send_an_email
=
filter_var
(
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'send_an_email'
)),
FILTER_VALIDATE_BOOLEAN
);
...
...
@@ -681,7 +681,7 @@ class tx_nG6_eid {
print
$nb_updated
;
}
else
if
(
$type
==
'get_user_group'
){
$id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'id'
));
$id
=
trim
(
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
_GP
(
'
user_
id'
));
print
json_encode
(
tx_nG6_db
::
get_group_informations
(
tx_nG6_db
::
get_user_usergroup
(
$id
)));
}
elseif
(
$type
==
'runs_table'
)
{
...
...
ui/felogin.html
→
ui/
nG6/
felogin.html
View file @
62827323
File moved
ui/nG6/pi1/analyzes/BasicAnalyse.tpl
0 → 100644
View file @
62827323
{*
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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*}
{
extends
file
=
'AnalysisTemplate.tpl'
}
{
block
name
=
description_update
}
<br/>
<div
style=
"float:right;"
>
{
if
$is_project_admin
}
<button
id=
"add_file"
type=
"button"
class=
"btn btn-sm btn-primary"
><i
class=
"glyphicon glyphicon-plus"
></i>
add files
</button>
{/
if
}
</div>
{/
block
}
{* No result tab*}
{
block
name
=
nav_menu_results
}{/
block
}
{
block
name
=
tab_content_results
}{/
block
}
\ No newline at end of file
ui/nG6/res/js/tx_nG6_pi1.js
View file @
62827323
...
...
@@ -394,7 +394,7 @@ $(function () {
console
.
log
(
"
update_pwd
"
+
update_pwd
);
// get title laboratory and organism from ajax query
$
.
ajax
({
url
:
"
index.php?eID=tx_nG6&type=get_user_group&id=
"
+
user_id
,
url
:
"
index.php?eID=tx_nG6&type=get_user_group&
user_
id=
"
+
user_id
,
dataType
:
'
json
'
,
success
:
function
(
data
)
{
update_user_call_back
(
data
,
first_name
);
...
...
ui/nG6/res/js/tx_nG6_pi5.js
View file @
62827323
...
...
@@ -398,7 +398,7 @@ $(function () {
run_description
:
"
Run ###SPAN_NAME### (###SPAN_SPECIES###) - (###SPAN_DATE###) produced ###SPAN_NB_SEQ### reads
"
,
analyse_description
:
"
Analyse ###SPAN_NAME###
"
,
user_id
:
$
(
"
#user_id
"
).
val
(),
id
:
n
.
attr
(
"
id
"
).
split
(
"
_
"
)[
1
],
object_
id
:
n
.
attr
(
"
id
"
).
split
(
"
_
"
)[
1
],
type
:
n
.
attr
(
"
id
"
).
split
(
"
_
"
)[
0
]
};
}
...
...
workflows/components/subsetAssignation.py
View file @
62827323
...
...
@@ -16,6 +16,7 @@
#
import
os
,
sys
import
logging
from
subprocess
import
Popen
,
PIPE
from
jflow.utils
import
get_argument_pattern
...
...
@@ -96,7 +97,7 @@ class SubsetAssignation (Analysis):
self
.
use_index
=
"true"
if
not
os
.
path
.
exists
(
self
.
databank
+
".00.idx"
)
:
self
.
use_index
=
"false"
sys
.
stderr
.
write
(
"[WARNING] "
+
self
.
__class__
.
__name__
+
"
work
s
more quickly with megablast index
.
\n
"
)
logging
.
getLogger
(
"SubsetAssignation"
).
warn
(
"would
work more quickly with megablast index"
)
if
group_prefix
==
None
:
self
.
add_parameter_list
(
"group_prefixes"
,
"group_prefix"
,
default
=
list
(
map
(
os
.
path
.
basename
,
self
.
get_outputs
(
'{basename_woext}'
,
self
.
sequence_files
))))
...
...
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