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
lutece
lutece-build-plugin-releaser
Commits
9ec67a71
Commit
9ec67a71
authored
Apr 06, 2020
by
oughdi
Browse files
Add RBAC control for adding sites permission
parent
5629d898
Changes
1
Hide whitespace changes
Inline
Side-by-side
webapp/WEB-INF/templates/admin/plugins/releaser/manage_clusters.html
View file @
9ec67a71
<
#include
"
releaser_util.html
"
/>
<
@
tform
class=
'form-inline pull-right'
name=
'manage_cluster'
action=
'jsp/admin/plugins/releaser/ManageClusters.jsp'
>
<button
class=
"floating-button"
name=
"view_createCluster"
type=
"submit"
title=
"#i18n{releaser.manage_clusters.buttonAdd}"
>
<i
class=
"fa fa-plus"
></i>
</button>
</
@
tform>
<
#if
!
is_application_account
>
<button
class=
"floating-button btn-release-site btn-release-site-bg"
title=
"Releaser un composant"
data-toggle=
"modal"
data-target=
"#modalReleaseComponentGITHUB"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden hidden-xs"
>
Releaser un composant
</span>
</button>
<
#else
>
<a
class=
"floating-button btn-release-site btn-release-site-bg"
href=
"jsp/admin/plugins/releaser/ManageComponent.jsp"
title=
"Modifier"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden hidden-xs"
>
Releaser un composant
</span>
</a>
</
#
if>
<div
class=
"app-wrapper app-cluster"
>
<
@
messages
infos=
infos
/>
<
@
messages
errors=
errors
/>
<
#if
errors
??
&&
site
??
>
<
#list
errors
as
error
>
<
#if
error.message =
=
"
AUTHENTICATION_ERROR
"
>
<script>
$
(
function
(){
var
pathElem
=
"
#modalRelease${site.getRepoType().name()!} .release-id
"
;
$
(
pathElem
).
val
(
$
{
site
.
id
});
$
(
"
#modalRelease${site.getRepoType().name()!}
"
).
modal
();
});
</script>
</
#
if>
</
#
list>
</
#
if>
<
#list
cluster_list
as
cluster
>
<a
name=
"cluster${cluster.id}"
></a>
<!-- widget-app -->
<div
class=
"box box-widget widget-app collapsed-box"
>
<div
class=
"info-box"
>
<span
class=
"info-box-icon bg-green"
><i
class=
"fa fa-cubes"
></i></span>
<div
class=
"info-box-content"
>
<div
class=
"col-xs-12 col-sm-11 col-md-11"
>
<span
class=
"hidden"
></span>
<h4>
${cluster.name}
<span
class=
"info-box-number hidden-xs"
><
#if
cluster.sites
?
size
&
gt
;
0
>
${cluster.sites?size} sites
<
#else
>
<span
class=
"text-warning"
><i
class=
"fa fa-warning"
></i>
Aucun site ajout
é
</span>
</
#
if></span>
<
@
tform
class=
'form-inline'
name=
'manage_site'
action=
'jsp/admin/plugins/releaser/ManageClusters.jsp'
>
<input
type=
"hidden"
name=
"id"
value=
"${cluster.id}"
>
<a
class=
"btn btn-danger btn-xs"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?action=confirmRemoveCluster&id=${cluster.id}"
title=
"Supprimer"
>
<i
class=
"fa fa-trash fa-fw"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Supprimer
</span>
</a>
<a
class=
"btn btn-primary btn-xs"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?view=modifyCluster&id=${cluster.id}"
title=
"Modifier"
>
<i
class=
"fa fa-pencil fa-fw"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Modifier
</span>
</a>
<button
type=
"submit"
class=
"btn btn-success btn-xs"
name=
"view_createSite"
title=
"#i18n{releaser.manage_sites.buttonAdd}"
>
<i
class=
"fa fa-plus fa-fw"
></i>
<span
class=
"sr-only"
>
#i18n{releaser.manage_sites.buttonAdd}
</span>
</button>
</
@
tform>
</h4>
</div>
<div
class=
"hidden-xs"
>
<
#if
cluster.sites
?
size
&
gt
;
0
>
<button
type=
"button"
class=
"btn btn-default collaspe pull-right"
data-widget=
"collapse"
>
<i
class=
"fa fa-plus"
></i>
</button>
</
#
if>
</div>
</div>
</div>
<div
class=
"box-body"
>
<h2
class=
"hidden"
>
<strong>
${cluster.description}
</strong>
<small>
Liste des sites du cluster
</small></h2>
<ul
class=
"nav nav-stacked clearfix"
>
<
#if
cluster.sites
?
size
&
gt
;
0
>
<
#list
cluster.sites
as
site
>
<li
class=
"info-padding"
>
<div
class=
"row"
>
<div
class=
"col-xs-8 col-sm-8"
>
<h4
title=
"repository : ${site.scmUrl}"
>
${site.name}
<span
class=
"label label-info label-app pull-right hidden-xs"
title=
"Artifact ID : ${site.artifactId}"
>
<i
class=
"fa fa-cube fa-fw"
></i>
${site.artifactId}
</span>
</h4>
<small><span
class=
"hidden-xs"
>
${site.description}
</span>
[
<a
href=
"${site.scmUrl}"
>
${site.scmUrl}
</a>
]
</small>
</div>
<div
class=
"col-xs-4 col-sm-4"
>
<
#if
!
is_application_account
>
<button
class=
"button border-green btn-release-site"
data-id-site=
"${site.id}"
data-repo-type=
"${site.getRepoType().name()!}"
title=
"Releaser"
data-toggle=
"modal"
data-target=
"#modalRelease${site.getRepoType().name()!}"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden-xs"
><
#if
!
site.theme
>
Releaser
<
#else
>
Releaser le theme
</
#
if></span>
</button>
<
#else
>
<a
class=
"button border-blue"
href=
"jsp/admin/plugins/releaser/ManageSiteRelease.jsp?id_site=${site.id}"
title=
"Modifier"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden-xs"
><
#if
!
site.theme
>
Releaser
<
#else
>
Releaser le theme
</
#
if></span>
</a>
</
#
if>
<
#if
site.permissions.modifySitePermission
>
<a
class=
"button border-blue"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?view=modifySite&id=${site.id}"
title=
"Modifier"
>
<i
class=
"fa fa-pencil"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Modifier
</span>
</a>
</
#
if>
<
#if
site.permissions.deleteSitePermission
>
<a
class=
"button border-red"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?action=confirmRemoveSite&id=${site.id}"
title=
"Supprimer"
>
<i
class=
"fa fa-trash"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Supprimer
</span>
</a>
</
#
if>
</div>
</div>
</li>
</
#
list>
<
#else
>
<p><span
class=
"text-warning"
><i
class=
"fa fa-warning"
></i>
Aucun site ajout
é
</span></p>
</
#
if>
</ul>
</div>
</div>
</
#
list>
</div>
<
@
modalAuth
modId=
"modalReleaseSVN"
type=
repo_type_svn
formActionUrl=
"jsp/admin/plugins/releaser/ManageClusters.jsp"
formSubmitName=
"action_releaseSite"
/>
<
@
modalAuth
modId=
"modalReleaseGITLAB"
type=
repo_type_gitlab
formActionUrl=
"jsp/admin/plugins/releaser/ManageClusters.jsp"
formSubmitName=
"action_releaseSite"
/>
<
@
modalAuth
modId=
"modalReleaseGITHUB"
type=
repo_type_github
formActionUrl=
"jsp/admin/plugins/releaser/ManageClusters.jsp"
formSubmitName=
"action_releaseComponent"
/>
<
@
modalAuth
modId=
"modalReleaseComponentGITHUB"
type=
repo_type_github
formActionUrl=
"jsp/admin/plugins/releaser/ManageComponent.jsp"
formSubmitName=
"view_manageComponent"
/>
<
@
paginationAdmin
paginator=
paginator
combo=
1
/>
<script>
$
(
function
()
{
$
(
"
.btn-release-site
"
).
click
(
function
(
e
){
var
pathElem
=
"
#modalRelease
"
+
$
(
this
).
data
(
'
repo-type
'
)
+
"
.release-id
"
;
$
(
pathElem
).
val
(
$
(
this
).
data
(
'
id-site
'
));
});
$
(
"
.btn
"
).
tooltip
();
$
(
"
.button
"
).
tooltip
();
$
(
"
.floating-button
"
).
tooltip
();
});
</script>
\ No newline at end of file
<
#include
"
releaser_util.html
"
/>
<
@
tform
class=
'form-inline pull-right'
name=
'manage_cluster'
action=
'jsp/admin/plugins/releaser/ManageClusters.jsp'
>
<button
class=
"floating-button"
name=
"view_createCluster"
type=
"submit"
title=
"#i18n{releaser.manage_clusters.buttonAdd}"
>
<i
class=
"fa fa-plus"
></i>
</button>
</
@
tform>
<
#if
!
is_application_account
>
<button
class=
"floating-button btn-release-site btn-release-site-bg"
title=
"Releaser un composant"
data-toggle=
"modal"
data-target=
"#modalReleaseComponentGITHUB"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden hidden-xs"
>
Releaser un composant
</span>
</button>
<
#else
>
<a
class=
"floating-button btn-release-site btn-release-site-bg"
href=
"jsp/admin/plugins/releaser/ManageComponent.jsp"
title=
"Modifier"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden hidden-xs"
>
Releaser un composant
</span>
</a>
</
#
if>
<div
class=
"app-wrapper app-cluster"
>
<
@
messages
infos=
infos
/>
<
@
messages
errors=
errors
/>
<
#if
errors
??
&&
site
??
>
<
#list
errors
as
error
>
<
#if
error.message =
=
"
AUTHENTICATION_ERROR
"
>
<script>
$
(
function
(){
var
pathElem
=
"
#modalRelease${site.getRepoType().name()!} .release-id
"
;
$
(
pathElem
).
val
(
$
{
site
.
id
});
$
(
"
#modalRelease${site.getRepoType().name()!}
"
).
modal
();
});
</script>
</
#
if>
</
#
list>
</
#
if>
<
#list
cluster_list
as
cluster
>
<a
name=
"cluster${cluster.id}"
></a>
<!-- widget-app -->
<div
class=
"box box-widget widget-app collapsed-box"
>
<div
class=
"info-box"
>
<span
class=
"info-box-icon bg-green"
><i
class=
"fa fa-cubes"
></i></span>
<div
class=
"info-box-content"
>
<div
class=
"col-xs-12 col-sm-11 col-md-11"
>
<span
class=
"hidden"
></span>
<h4>
${cluster.name}
<span
class=
"info-box-number hidden-xs"
><
#if
cluster.sites
?
size
&
gt
;
0
>
${cluster.sites?size} sites
<
#else
>
<span
class=
"text-warning"
><i
class=
"fa fa-warning"
></i>
Aucun site ajout
é
</span>
</
#
if></span>
<
@
tform
class=
'form-inline'
name=
'manage_site'
action=
'jsp/admin/plugins/releaser/ManageClusters.jsp'
>
<input
type=
"hidden"
name=
"id"
value=
"${cluster.id}"
>
<a
class=
"btn btn-danger btn-xs"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?action=confirmRemoveCluster&id=${cluster.id}"
title=
"Supprimer"
>
<i
class=
"fa fa-trash fa-fw"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Supprimer
</span>
</a>
<a
class=
"btn btn-primary btn-xs"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?view=modifyCluster&id=${cluster.id}"
title=
"Modifier"
>
<i
class=
"fa fa-pencil fa-fw"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Modifier
</span>
</a>
<
#if
cluster.sites
[0].
permissions.addSitePermission
>
<button
type=
"submit"
class=
"btn btn-success btn-xs"
name=
"view_createSite"
title=
"#i18n{releaser.manage_sites.buttonAdd}"
>
<i
class=
"fa fa-plus fa-fw"
></i>
<span
class=
"sr-only"
>
#i18n{releaser.manage_sites.buttonAdd}
</span>
</button>
</
#
if>
</
@
tform>
</h4>
</div>
<div
class=
"hidden-xs"
>
<
#if
cluster.sites
?
size
&
gt
;
0
>
<button
type=
"button"
class=
"btn btn-default collaspe pull-right"
data-widget=
"collapse"
>
<i
class=
"fa fa-plus"
></i>
</button>
</
#
if>
</div>
</div>
</div>
<div
class=
"box-body"
>
<h2
class=
"hidden"
>
<strong>
${cluster.description}
</strong>
<small>
Liste des sites du cluster
</small></h2>
<ul
class=
"nav nav-stacked clearfix"
>
<
#if
cluster.sites
?
size
&
gt
;
0
>
<
#list
cluster.sites
as
site
>
<li
class=
"info-padding"
>
<div
class=
"row"
>
<div
class=
"col-xs-8 col-sm-8"
>
<h4
title=
"repository : ${site.scmUrl}"
>
${site.name}
<span
class=
"label label-info label-app pull-right hidden-xs"
title=
"Artifact ID : ${site.artifactId}"
>
<i
class=
"fa fa-cube fa-fw"
></i>
${site.artifactId}
</span>
</h4>
<small><span
class=
"hidden-xs"
>
${site.description}
</span>
[
<a
href=
"${site.scmUrl}"
>
${site.scmUrl}
</a>
]
</small>
</div>
<div
class=
"col-xs-4 col-sm-4"
>
<
#if
!
is_application_account
>
<button
class=
"button border-green btn-release-site"
data-id-site=
"${site.id}"
data-repo-type=
"${site.getRepoType().name()!}"
title=
"Releaser"
data-toggle=
"modal"
data-target=
"#modalRelease${site.getRepoType().name()!}"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden-xs"
><
#if
!
site.theme
>
Releaser
<
#else
>
Releaser le theme
</
#
if></span>
</button>
<
#else
>
<a
class=
"button border-blue"
href=
"jsp/admin/plugins/releaser/ManageSiteRelease.jsp?id_site=${site.id}"
title=
"Modifier"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
<span
class=
"hidden-xs"
><
#if
!
site.theme
>
Releaser
<
#else
>
Releaser le theme
</
#
if></span>
</a>
</
#
if>
<
#if
site.permissions.modifySitePermission
>
<a
class=
"button border-blue"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?view=modifySite&id=${site.id}"
title=
"Modifier"
>
<i
class=
"fa fa-pencil"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Modifier
</span>
</a>
</
#
if>
<
#if
site.permissions.deleteSitePermission
>
<a
class=
"button border-red"
href=
"jsp/admin/plugins/releaser/ManageClusters.jsp?action=confirmRemoveSite&id=${site.id}"
title=
"Supprimer"
>
<i
class=
"fa fa-trash"
aria-hidden=
"true"
></i>
<span
class=
"sr-only"
>
Supprimer
</span>
</a>
</
#
if>
</div>
</div>
</li>
</
#
list>
<
#else
>
<p><span
class=
"text-warning"
><i
class=
"fa fa-warning"
></i>
Aucun site ajout
é
</span></p>
</
#
if>
</ul>
</div>
</div>
</
#
list>
</div>
<
@
modalAuth
modId=
"modalReleaseSVN"
type=
repo_type_svn
formActionUrl=
"jsp/admin/plugins/releaser/ManageClusters.jsp"
formSubmitName=
"action_releaseSite"
/>
<
@
modalAuth
modId=
"modalReleaseGITLAB"
type=
repo_type_gitlab
formActionUrl=
"jsp/admin/plugins/releaser/ManageClusters.jsp"
formSubmitName=
"action_releaseSite"
/>
<
@
modalAuth
modId=
"modalReleaseGITHUB"
type=
repo_type_github
formActionUrl=
"jsp/admin/plugins/releaser/ManageClusters.jsp"
formSubmitName=
"action_releaseComponent"
/>
<
@
modalAuth
modId=
"modalReleaseComponentGITHUB"
type=
repo_type_github
formActionUrl=
"jsp/admin/plugins/releaser/ManageComponent.jsp"
formSubmitName=
"view_manageComponent"
/>
<
@
paginationAdmin
paginator=
paginator
combo=
1
/>
<script>
$
(
function
()
{
$
(
"
.btn-release-site
"
).
click
(
function
(
e
){
var
pathElem
=
"
#modalRelease
"
+
$
(
this
).
data
(
'
repo-type
'
)
+
"
.release-id
"
;
$
(
pathElem
).
val
(
$
(
this
).
data
(
'
id-site
'
));
});
$
(
"
.btn
"
).
tooltip
();
$
(
"
.button
"
).
tooltip
();
$
(
"
.floating-button
"
).
tooltip
();
});
</script>
\ No newline at end of file
...
...
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