mirror of https://github.com/apache/archiva.git
[MRM-1574] link to display pom snippet
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233899 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b7ba2ba7ef
commit
b722a82aec
|
@ -101,5 +101,16 @@ public interface ManagedRepositoriesService
|
|||
ArchivaRepositoryStatistics getManagedRepositoryStatistics( @PathParam( "repositoryId" ) String repositoryId )
|
||||
throws ArchivaRestServiceException;
|
||||
|
||||
@Path( "getPomSnippet/{repositoryId}" )
|
||||
@GET
|
||||
@Produces( { MediaType.TEXT_PLAIN} )
|
||||
@RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
|
||||
/**
|
||||
* return a pom snippet to use this repository with entities escaped (< > )
|
||||
* @since 1.4-M3
|
||||
*/
|
||||
String getPomSnippet( @PathParam( "repositoryId" ) String repositoryId )
|
||||
throws ArchivaRestServiceException;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.core.Context;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -44,6 +46,9 @@ public abstract class AbstractRestService
|
|||
@Inject
|
||||
private List<AuditListener> auditListeners = new ArrayList<AuditListener>();
|
||||
|
||||
@Context
|
||||
protected HttpServletRequest httpServletRequest;
|
||||
|
||||
protected AuditInformation getAuditInformation()
|
||||
{
|
||||
RedbackRequestInformation redbackRequestInformation = RedbackAuthenticationThreadLocal.get();
|
||||
|
@ -61,4 +66,11 @@ public abstract class AbstractRestService
|
|||
{
|
||||
this.auditListeners = auditListeners;
|
||||
}
|
||||
|
||||
protected String getBaseUrl( HttpServletRequest req )
|
||||
{
|
||||
return req.getScheme() + "://" + req.getServerName() + ( req.getServerPort() == 80
|
||||
? ""
|
||||
: ":" + req.getServerPort() ) + req.getContextPath();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
|
|||
import org.apache.archiva.rest.api.model.ArchivaRepositoryStatistics;
|
||||
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
|
||||
import org.apache.archiva.rest.api.services.ManagedRepositoriesService;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -193,4 +194,92 @@ public class DefaultManagedRepositoriesService
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getPomSnippet( String repositoryId )
|
||||
throws ArchivaRestServiceException
|
||||
{
|
||||
return createSnippet( getManagedRepository( repositoryId ) );
|
||||
}
|
||||
|
||||
private String createSnippet( ManagedRepository repo )
|
||||
{
|
||||
StringBuilder snippet = new StringBuilder();
|
||||
snippet.append( "<project>\n" );
|
||||
snippet.append( " ...\n" );
|
||||
snippet.append( " <distributionManagement>\n" );
|
||||
|
||||
String distRepoName = "repository";
|
||||
if ( repo.isSnapshots() )
|
||||
{
|
||||
distRepoName = "snapshotRepository";
|
||||
}
|
||||
|
||||
snippet.append( " <" ).append( distRepoName ).append( ">\n" );
|
||||
snippet.append( " <id>" ).append( repo.getId() ).append( "</id>\n" );
|
||||
snippet.append( getBaseUrl( httpServletRequest ) + "repository" );
|
||||
snippet.append( "/" ).append( repo.getId() ).append( "/" ).append( "</url>\n" );
|
||||
|
||||
if ( !"default".equals( repo.getLayout() ) )
|
||||
{
|
||||
snippet.append( " <layout>" ).append( repo.getLayout() ).append( "</layout>" );
|
||||
}
|
||||
|
||||
snippet.append( " </" ).append( distRepoName ).append( ">\n" );
|
||||
snippet.append( " </distributionManagement>\n" );
|
||||
snippet.append( "\n" );
|
||||
|
||||
snippet.append( " <repositories>\n" );
|
||||
snippet.append( " <repository>\n" );
|
||||
snippet.append( " <id>" ).append( repo.getId() ).append( "</id>\n" );
|
||||
snippet.append( " <name>" ).append( repo.getName() ).append( "</name>\n" );
|
||||
|
||||
snippet.append( " <url>" );
|
||||
snippet.append( getBaseUrl( httpServletRequest ) + "repository" );
|
||||
snippet.append( "/" ).append( repo.getId() ).append( "/" );
|
||||
|
||||
snippet.append( "</url>\n" );
|
||||
|
||||
if ( !"default".equals( repo.getLayout() ) )
|
||||
{
|
||||
snippet.append( " <layout>" ).append( repo.getLayout() ).append( "</layout>\n" );
|
||||
}
|
||||
|
||||
snippet.append( " <releases>\n" );
|
||||
snippet.append( " <enabled>" ).append( Boolean.valueOf( repo.isReleases() ) ).append( "</enabled>\n" );
|
||||
snippet.append( " </releases>\n" );
|
||||
snippet.append( " <snapshots>\n" );
|
||||
snippet.append( " <enabled>" ).append( Boolean.valueOf( repo.isSnapshots() ) ).append( "</enabled>\n" );
|
||||
snippet.append( " </snapshots>\n" );
|
||||
snippet.append( " </repository>\n" );
|
||||
snippet.append( " </repositories>\n" );
|
||||
snippet.append( " <pluginRepositories>\n" );
|
||||
snippet.append( " <pluginRepository>\n" );
|
||||
snippet.append( " <id>" ).append( repo.getId() ).append( "</id>\n" );
|
||||
snippet.append( " <name>" ).append( repo.getName() ).append( "</name>\n" );
|
||||
|
||||
snippet.append( " <url>" );
|
||||
snippet.append( getBaseUrl( httpServletRequest ) + "repository" );
|
||||
snippet.append( "/" ).append( repo.getId() ).append( "/" );
|
||||
|
||||
snippet.append( "</url>\n" );
|
||||
|
||||
if ( !"default".equals( repo.getLayout() ) )
|
||||
{
|
||||
snippet.append( " <layout>" ).append( repo.getLayout() ).append( "</layout>\n" );
|
||||
}
|
||||
|
||||
snippet.append( " <releases>\n" );
|
||||
snippet.append( " <enabled>" ).append( Boolean.valueOf( repo.isReleases() ) ).append( "</enabled>\n" );
|
||||
snippet.append( " </releases>\n" );
|
||||
snippet.append( " <snapshots>\n" );
|
||||
snippet.append( " <enabled>" ).append( Boolean.valueOf( repo.isSnapshots() ) ).append( "</enabled>\n" );
|
||||
snippet.append( " </snapshots>\n" );
|
||||
snippet.append( " </pluginRepository>\n" );
|
||||
snippet.append( " </pluginRepositories>\n" );
|
||||
|
||||
snippet.append( " ...\n" );
|
||||
snippet.append( "</project>\n" );
|
||||
|
||||
return StringEscapeUtils.escapeXml( snippet.toString() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ import java.util.List;
|
|||
*/
|
||||
@Service( "searchService#rest" )
|
||||
public class DefaultSearchService
|
||||
extends AbstractRestService
|
||||
implements SearchService
|
||||
{
|
||||
|
||||
|
@ -68,9 +69,6 @@ public class DefaultSearchService
|
|||
@Inject
|
||||
private UserRepositories userRepositories;
|
||||
|
||||
@Context
|
||||
private HttpServletRequest httpServletRequest;
|
||||
|
||||
public List<Artifact> quickSearch( String queryString )
|
||||
throws ArchivaRestServiceException
|
||||
{
|
||||
|
@ -293,10 +291,5 @@ public class DefaultSearchService
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
protected String getBaseUrl( HttpServletRequest req )
|
||||
{
|
||||
return req.getScheme() + "://" + req.getServerName() + ( req.getServerPort() == 80
|
||||
? ""
|
||||
: ":" + req.getServerPort() ) + req.getContextPath();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
/*
|
||||
* jQuery UI Bootstrap
|
||||
* Portions copyright Addy Osmani, jQuery UI & Twitter Bootstrap
|
||||
* Released under MIT/GPL.
|
||||
/*!
|
||||
* jQuery UI Bootstrap (0.22)
|
||||
* http://addyosmani.github.com/jquery-ui-bootstrap
|
||||
*
|
||||
* Copyright 2012, Addy Osmani
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
*
|
||||
* Portions copyright jQuery UI & Twitter Bootstrap
|
||||
*/
|
||||
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
|
@ -69,8 +74,6 @@
|
|||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
||||
/*
|
||||
border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555;*/
|
||||
|
||||
background-color: #e6e6e6;
|
||||
background-repeat: no-repeat;
|
||||
|
@ -601,20 +604,7 @@ border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_
|
|||
}
|
||||
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only {
|
||||
/*
|
||||
width: 2.4em;
|
||||
margin-right: -.3em;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-right: .1em;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
zoom: 1;
|
||||
overflow: visible;
|
||||
*/
|
||||
} /* button elements seem to need a little more width */
|
||||
button.ui-button-icon-only { } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
|
@ -698,7 +688,6 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
}
|
||||
.ui-dialog .ui-dialog-title {
|
||||
float: left;
|
||||
/*margin: .1em 16px .1em 0; */
|
||||
color:#404040;
|
||||
font-weight:bold;
|
||||
margin-top:5px;
|
||||
|
@ -707,28 +696,36 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar-close {
|
||||
position: absolute;
|
||||
right: .3em;
|
||||
top: 50%;
|
||||
width: 19px;
|
||||
margin: -10px 0 0 0;
|
||||
padding: 1px;
|
||||
height: 18px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
line-height: 13.5px;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
filter: alpha(opacity=25);
|
||||
-khtml-opacity: 0.25;
|
||||
-moz-opacity: 0.25;
|
||||
opacity: 0.25;
|
||||
position: absolute;
|
||||
right: .3em;
|
||||
top: 50%;
|
||||
width: 19px;
|
||||
margin: -10px 0 0 0;
|
||||
padding: 1px;
|
||||
height: 18px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
line-height: 13.5px;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
filter: alpha(opacity=25);
|
||||
-khtml-opacity: 0.25;
|
||||
-moz-opacity: 0.25;
|
||||
opacity: 0.25;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar-close span {
|
||||
display: block;
|
||||
margin: 1px;
|
||||
text-indent: 9999px;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; filter: alpha(opacity=90);
|
||||
-khtml-opacity: 0.90;
|
||||
-moz-opacity: 0.90;
|
||||
opacity: 0.90; }
|
||||
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
|
||||
.ui-dialog .ui-dialog-buttonpane {
|
||||
text-align: left;
|
||||
border-width: 1px 0 0 0;
|
||||
|
@ -753,7 +750,7 @@ opacity: 0.25;
|
|||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
|
||||
.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button{
|
||||
color: #ffffff;
|
||||
color: #ffffff;
|
||||
background-color: #0064cd;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
||||
|
@ -781,9 +778,7 @@ opacity: 0.25;
|
|||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0;
|
||||
|
||||
|
||||
/*this can be removed if ui-widget-header is blue*/
|
||||
color: #ffffff;
|
||||
color: #ffffff;
|
||||
background-color: #0064cd;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
||||
|
@ -823,15 +818,18 @@ opacity: 0.25;
|
|||
border-style: solid;
|
||||
border-width: 0 0 1px;}
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; border:0px;} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav li:hover{
|
||||
text-decoration: none;
|
||||
|
||||
|
||||
.ui-tabs .ui-tabs-nav li:hover, .ui-tabs .ui-tabs-nav li a:hover{
|
||||
background:whiteSmoke;
|
||||
border-bottom:1px solid #ddd;
|
||||
padding-bottom:0px;
|
||||
color:#00438A;
|
||||
}
|
||||
|
||||
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; border-bottom:1px solid #DDD; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; padding: 0; white-space: nowrap; background:none; border:0px;
|
||||
|
||||
|
||||
.ui-tabs .ui-tabs-nav li { text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px;
|
||||
|
||||
}
|
||||
|
||||
|
@ -855,7 +853,7 @@ opacity: 0.25;
|
|||
|
||||
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 0px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 0px; outline:none;}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
|
||||
|
||||
|
@ -864,18 +862,17 @@ opacity: 0.25;
|
|||
border-bottom-color: #ffffff;
|
||||
cursor: default;
|
||||
color:gray;
|
||||
|
||||
|
||||
outline:none;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a {
|
||||
cursor: pointer;
|
||||
color:#0069D6;
|
||||
background:none;
|
||||
font-weight:normal;
|
||||
margin-bottom:-1px;
|
||||
|
||||
|
||||
} /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected:hover{
|
||||
background:#ffffff;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
|
||||
/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs-panel .ui-button{text-decoration:none;}
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
|
@ -887,6 +884,7 @@ margin-bottom:-1px;
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.16
|
||||
*
|
||||
|
@ -897,16 +895,7 @@ margin-bottom:-1px;
|
|||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px;
|
||||
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
padding: 4px 0;
|
||||
background-color: #f5f5f5;
|
||||
color: #808080;
|
||||
|
||||
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px; font-weight: bold; width: 100%; padding: 4px 0; background-color: #f5f5f5; color: #808080; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { /*top: 1px;*/ }
|
||||
|
@ -957,15 +946,15 @@ margin-bottom:-1px;
|
|||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
|
||||
.ui-datepicker th{
|
||||
|
@ -1089,8 +1078,6 @@ input[type="password"],
|
|||
textarea,
|
||||
.uneditable-input {
|
||||
display: inline-block;
|
||||
width: 210px;
|
||||
height: 18px;
|
||||
padding: 4px;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
|
@ -1102,10 +1089,11 @@ textarea,
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**Toolbar**/
|
||||
|
||||
.ui-toolbar{
|
||||
padding: 7px 14px;
|
||||
padding: 7px 14px;
|
||||
margin: 0 0 18px;
|
||||
background-color: #f5f5f5;
|
||||
background-repeat: repeat-x;
|
||||
|
@ -1162,3 +1150,171 @@ textarea,
|
|||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***Wijmo Theming**/
|
||||
|
||||
div.wijmo-wijmenu{
|
||||
padding:0 20px;
|
||||
background-color: #222;
|
||||
background-color: #222222;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
|
||||
background-image: -moz-linear-gradient(top, #333333, #222222);
|
||||
background-image: -ms-linear-gradient(top, #333333, #222222);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
|
||||
background-image: -webkit-linear-gradient(top, #333333, #222222);
|
||||
background-image: -o-linear-gradient(top, #333333, #222222);
|
||||
background-image: linear-gradient(top, #333333, #222222);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .ui-state-default{
|
||||
box-shadow: none;
|
||||
color:#BFBFBF;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .ui-state-default .wijmo-wijmenu-text{
|
||||
color:#BFBFBF;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .ui-state-hover{
|
||||
background: #444;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .ui-state-hover .wijmo-wijmenu-text{
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
div.wijmo-wijmenu .ui-widget-header h3{
|
||||
position: relative;
|
||||
margin-top:1px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu h3 a{
|
||||
color: #FFFFFF;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: 200;
|
||||
line-height: 1;
|
||||
margin-left: -20px;
|
||||
margin-top:1px;
|
||||
padding: 8px 20px 12px;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu h3 a:hover{
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: #FFFFFF;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .ui-widget-header{
|
||||
border:0px;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child{
|
||||
padding: 0.3em 0;
|
||||
}
|
||||
|
||||
div.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child{
|
||||
background: #333;
|
||||
border:0;
|
||||
margin:0;
|
||||
padding: 6px 0;
|
||||
width:160px;
|
||||
-webkit-border-radius: 0 0 6px 6px;
|
||||
-moz-border-radius: 0 0 6px 6px;
|
||||
border-radius: 0 0 6px 6px;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
div.wijmo-wijmenu .wijmo-wijmenu-item{
|
||||
margin:0;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu a.wijmo-wijmenu-link{
|
||||
margin:0;
|
||||
line-height: 19px;
|
||||
padding: 10px 10px 11px;
|
||||
border:0;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius:0;
|
||||
}
|
||||
|
||||
div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-link{
|
||||
display:block;
|
||||
float:none;
|
||||
padding: 4px 15px;
|
||||
width:auto;
|
||||
}
|
||||
|
||||
div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-text
|
||||
{
|
||||
float:none;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child .ui-state-hover {
|
||||
background: #191919;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-separator{
|
||||
padding: 5px 0;
|
||||
background-image: none;
|
||||
background-color: #222;
|
||||
border-top: 1px solid #444;
|
||||
border-bottom:0;
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .wijmo-wijmenu-item input {
|
||||
-moz-transition: none 0s ease 0s;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
border: 1px solid #111111;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
line-height: 1;
|
||||
margin: 5px 10px 0 10px;
|
||||
padding: 4px 9px;
|
||||
width:100px;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .wijmo-wijmenu-item input:hover {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.wijmo-wijmenu .wijmo-wijmenu-item input:focus {
|
||||
background-color: #FFFFFF;
|
||||
border: 0 none;
|
||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
|
||||
color: #404040;
|
||||
outline: 0 none;
|
||||
padding: 5px 10px;
|
||||
text-shadow: 0 1px 0 #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.wijmo-wijmenu .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
|
||||
.wijmo-wijmenu .ui-state-default{
|
||||
box-shadow: none;
|
||||
color:#BFBFBF;
|
||||
filter: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,15 +132,6 @@ $(function() {
|
|||
|
||||
this.availableLayouts = window.managedRepositoryTypes;
|
||||
|
||||
/*getAvailableLayouts=function(){
|
||||
var layouts = new Array(window.managedRepositoryTypes.length);
|
||||
for(var i=0;i<window.managedRepositoryTypes.length;i++){
|
||||
layouts[i]=window.managedRepositoryTypes[i].label;
|
||||
}
|
||||
$.log("layouts.length:"+layouts.length)
|
||||
return layouts;
|
||||
}*/
|
||||
|
||||
save=function(){
|
||||
var valid = $("#main-content #managed-repository-edit-form").valid();
|
||||
if (valid==false) {
|
||||
|
@ -373,6 +364,31 @@ $(function() {
|
|||
|
||||
}
|
||||
|
||||
showPomSnippet=function(managedRepository){
|
||||
|
||||
|
||||
var url = "restServices/archivaServices/managedRepositoriesService/getPomSnippet/"+managedRepository.id();
|
||||
$.ajax(url,
|
||||
{
|
||||
type: "GET",
|
||||
dataType: 'text',
|
||||
success: function(data) {
|
||||
//var snippet='<div class="page-header">';
|
||||
//snippet +="<h2>POM Snippet</h2></div>";
|
||||
//$("#managed-repositories-pom-snippet").html(snippet+"<pre>"+data+"</pre>");
|
||||
$("#managed-repositories-pom-snippet").html($("#pom-snippet-tmpl").tmpl(data));
|
||||
},
|
||||
error: function(data) {
|
||||
var res = $.parseJSON(data.responseText);
|
||||
displayRestError(res);
|
||||
},
|
||||
complete: function(){
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
calculatePopoverId=function(managedRepository){
|
||||
return "#managedrepository-stats-"+managedRepository.id() + " #managedrepository-stats-"+managedRepository.id()+"-popover";
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko_managed-repositoriesGrid',pageLinksId:'managed-repositoriesPagination',data:'managedRepositories'">
|
||||
</table>
|
||||
<div id="managed-repositoriesPagination"></div>
|
||||
<div id="managed-repositories-pom-snippet"></div>
|
||||
</div>
|
||||
<div id="managed-repository-edit" data-bind='template: {name:"managed-repository-edit-tmpl"}'>
|
||||
</div>
|
||||
|
@ -67,9 +68,10 @@
|
|||
<th>Releases</th>
|
||||
<th>Snapshots</th>
|
||||
<th>Scan</th>
|
||||
<th title="${$.i18n.prop('managedrepository.stats')}">Stats</th>
|
||||
<th>${$.i18n.prop('edit')}</th>
|
||||
<th>${$.i18n.prop('delete')}</th>
|
||||
<th>${$.i18n.prop('managedrepository.pomsnippet')}</th>
|
||||
<th title="${$.i18n.prop('managedrepository.stats')}">Stats</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -98,17 +100,18 @@
|
|||
<img src="images/view-refresh.png" title="${$.i18n.prop('managedrepository.scan.now')}"/>
|
||||
</a>
|
||||
</td>
|
||||
<td id="managedrepository-stats-${row.id()}">
|
||||
<img src="images/utilities-system-monitor.png" popover-title="${$.i18n.prop('managedrepository.stats')}"
|
||||
data-bind="event: { mouseover: function(){ showStats(row) }, mouseout: function(){ hideStats(row) },}"
|
||||
id="managedrepository-stats-img-${row.id()}"/>
|
||||
</td>
|
||||
<td><a href="#" data-bind="click: function(){ editManagedRepository(row) }">${$.i18n.prop('edit')}</a></td>
|
||||
<td>
|
||||
<a href="#" data-bind="click: function(){ removeManagedRepository(row) }">
|
||||
<img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="#" data-bind="click: function(){ showPomSnippet(row) }">${$.i18n.prop('managedrepository.pomsnippet')}</a></td>
|
||||
<td id="managedrepository-stats-${row.id()}">
|
||||
<img src="images/utilities-system-monitor.png" popover-title="${$.i18n.prop('managedrepository.stats')}"
|
||||
data-bind="event: { mouseover: function(){ showStats(row) }, mouseout: function(){ hideStats(row) },}"
|
||||
id="managedrepository-stats-img-${row.id()}"/>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
@ -261,4 +264,9 @@
|
|||
<div>${$.i18n.prop('managedrepository.stats.totalFileCount')}: ${totalFileCount()}</div>
|
||||
<div>${$.i18n.prop('managedrepository.stats.newFileCount')}: ${newFileCount()}</div>
|
||||
</div>
|
||||
</script>
|
||||
<script id="pom-snippet-tmpl" type='text/x-jquery-tmpl'>
|
||||
<div class="page-header">
|
||||
<h2>POM Snippet</h2></div>
|
||||
<pre>${$data}</pre>
|
||||
</script>
|
Loading…
Reference in New Issue