Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
genotoul-bioinfo
ng6
Commits
ba4da55f
Commit
ba4da55f
authored
Oct 01, 2018
by
Gerald Salin
Browse files
#79
parent
364483c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
ui/nG6/pi6/administration_view.tpl
View file @
ba4da55f
...
...
@@ -356,6 +356,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<br
/>
<div
class=
"tx-nG6-wait"
id=
"data_table_obsolete_wait"
>
Please wait while processing ...
</span></div>
<div
class=
"alert alert-danger"
id=
"data_table_obsolete_error"
style=
"display:none"
></div>
<div
id=
"obsolete_list"
>
<div>
<p>
...
...
ui/nG6/pi6/class.tx_nG6_pi6.php
View file @
ba4da55f
...
...
@@ -167,7 +167,10 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$replace
=
array
(
"analyze_id"
,
$analysis_id
,
$project_id
);
$analyses_info
[]
=
'<a href="'
.
str_replace
(
$search
,
$replace
,
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
"plugin."
][
"tx_nG6_pi6."
][
"run_link_url"
])
.
'">'
.
$analysis_id
.
'</a>'
;
}
if
(
!
$GLOBALS
[
'TSFE'
]
->
fe_user
->
user
[
'uid'
]){
http_response_code
(
401
);
return
"Nobody seems to be authenticated."
;
}
#Add purge demand to get id
$purge_demand_id
=
tx_nG6_db
::
add_purge_demand
(
$GLOBALS
[
'TSFE'
]
->
fe_user
->
user
[
'uid'
],
$project_id
,
$p
[
$project_id
][
"total_purgeable_size"
],
$all_purgeable_runs
,
$all_purgeable_analysis
,
$purge_user_id_to
);
#Build corresponding string array
...
...
@@ -183,6 +186,8 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$to
=
$purge_email_to
;
$subject
=
'[nG6 purge] No '
.
$purge_demand_id
.
' - Project '
.
$p
[
$project_id
][
"project_name"
];
$headers
[]
=
'From: '
.
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
"plugin."
][
"tx_nG6_pi6."
][
"email_from"
];
//$headers[] = 'From: gerald.salin@inra.fr';
$headers
[]
=
'Errors-To: '
.
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
"plugin."
][
"tx_nG6_pi6."
][
"email_copy"
];
$headers
[]
=
'X-Mailer: PHP/'
.
phpversion
();
$headers
[]
=
'MIME-Version: 1.0'
;
$headers
[]
=
'Content-type: text/html; charset=utf-8'
;
...
...
@@ -207,6 +212,7 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$subject
=
'[nG6 purge / reminder] No '
.
$res_demand
[
"demand_id"
]
.
' - Project '
.
$res_project
[
"name"
];
$headers
[]
=
'From: '
.
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
"plugin."
][
"tx_nG6_pi6."
][
"email_from"
];
$headers
[]
=
'Errors-To: '
.
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
"plugin."
][
"tx_nG6_pi6."
][
"email_copy"
];
$headers
[]
=
'X-Mailer: PHP/'
.
phpversion
();
$headers
[]
=
'MIME-Version: 1.0'
;
$headers
[]
=
'Content-type: text/html; charset=utf-8'
;
...
...
ui/nG6/res/js/tx_nG6_pi6.js
View file @
ba4da55f
...
...
@@ -383,16 +383,21 @@ $(function () {
url
:
"
index.php?eID=tx_nG6&type=purge_managment_mail&project=
"
+
all_project
.
join
(
'
,
'
)
+
"
&user_id=
"
+
$
(
'
input[id=user_id]
'
).
val
(),
dataType
:
'
json
'
,
success
:
function
(
val
,
status
,
xhr
)
{
refresh_project_obsolete
(
purge_table
[
"
obsolete
"
]);
refresh_project_obsolete
(
purge_table
[
"
obsolete
"
]);
refresh_purge_demand
(
purge_table
[
"
demand
"
]);
$
(
"
#purge_demand_error
"
).
hide
()
},
error
:
function
(
returnval
){
//TODO Afficher alerte en cas d'erreur de mail
$
(
'
#data_table_obsolete_wait
'
).
hide
();
$
(
"
#purge_demand_error
"
).
html
(
"
<div class='tx-nG6-pi6-error'>Error mail sending.</div>
"
);
$
(
"
#purge_demand_error
"
).
show
();
$
(
'
#obsolete_list
'
).
show
();
alert
(
returnval
.
status
)
//TODO Afficher alerte en cas d'erreur de mail
var
message
=
'
nG6 was unable to perform your action.
'
;
if
(
returnval
.
status
==
401
){
message
=
'
it seems your session expired. Please re-authenticate!
'
;
}
$
(
'
#data_table_obsolete_wait
'
).
hide
();
$
(
"
#data_table_obsolete_error
"
).
html
(
"
<div class='tx-nG6-pi6-error'>Error :
"
+
message
+
"
</div>
"
);
$
(
"
#data_table_obsolete_error
"
).
show
();
$
(
'
#obsolete_list
'
).
show
();
}
});
...
...
@@ -592,7 +597,7 @@ $(function () {
error
:
function
(
val
)
{
//TO PRINT ERROR
$
(
'
#purge_demand_error
'
).
html
(
'
Error while extend date
'
+
val
);
$
(
'
#purge_demand_error
'
).
html
(
'
Error while extend
ing
date
'
+
val
);
$
(
'
#purge_demand_error
'
).
show
();
$
(
"
#ng6modal
"
).
modal
(
'
hide
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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