You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

proxyConnectors.jsp 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <%--
  2. ~ Licensed to the Apache Software Foundation (ASF) under one
  3. ~ or more contributor license agreements. See the NOTICE file
  4. ~ distributed with this work for additional information
  5. ~ regarding copyright ownership. The ASF licenses this file
  6. ~ to you under the Apache License, Version 2.0 (the
  7. ~ "License"); you may not use this file except in compliance
  8. ~ with the License. You may obtain a copy of the License at
  9. ~
  10. ~ http://www.apache.org/licenses/LICENSE-2.0
  11. ~
  12. ~ Unless required by applicable law or agreed to in writing,
  13. ~ software distributed under the License is distributed on an
  14. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. ~ KIND, either express or implied. See the License for the
  16. ~ specific language governing permissions and limitations
  17. ~ under the License.
  18. --%>
  19. <%@ taglib prefix="s" uri="/struts-tags" %>
  20. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  21. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
  22. <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
  23. <%@ taglib prefix="archiva" uri="http://archiva.apache.org" %>
  24. <html>
  25. <head>
  26. <title>Administration - Proxy Connectors</title>
  27. <s:head/>
  28. </head>
  29. <body>
  30. <h1>Administration - Proxy Connectors</h1>
  31. <c:url var="iconDeleteUrl" value="/images/icons/delete.gif"/>
  32. <c:url var="iconEditUrl" value="/images/icons/edit.png"/>
  33. <c:url var="iconCreateUrl" value="/images/icons/create.png"/>
  34. <c:url var="iconUpUrl" value="/images/icons/up.gif"/>
  35. <c:url var="iconDownUrl" value="/images/icons/down.gif"/>
  36. <c:url var="iconEnable" value="/images/icons/on-symbol.png"/>
  37. <c:url var="iconDisable" value="/images/icons/off-symbol.png"/>
  38. <div id="contentArea">
  39. <s:actionerror/>
  40. <s:actionmessage/>
  41. <div style="float:right">
  42. <c:choose>
  43. <c:when test="${remoteRepoExists}">
  44. <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
  45. <s:url id="addProxyConnectorUrl" action="addProxyConnector"/>
  46. <s:a href="%{addProxyConnectorUrl}" cssClass="create">
  47. <img src="<c:url value="/images/icons/create.png" />"/>
  48. Add
  49. </s:a>
  50. </redback:ifAnyAuthorized>
  51. </c:when>
  52. <c:otherwise>
  53. <img src="<c:url value="/images/icons/create.png" />"/>
  54. Add (Disabled. No remote repositories)
  55. </c:otherwise>
  56. </c:choose>
  57. </div>
  58. <h2>Repository Proxy Connectors</h2>
  59. <c:choose>
  60. <c:when test="${empty (proxyConnectorMap)}">
  61. <strong>No Repository Proxy Connectors Defined.</strong>
  62. </c:when>
  63. <c:otherwise>
  64. <div class="admin">
  65. <c:forEach items="${proxyConnectorMap}" var="repository" varStatus="i">
  66. <div class="proxyConfig">
  67. <div class="managedRepo">
  68. <img src="<c:url value="/images/archiva-splat-32.gif"/>"/>
  69. <p class="id">${repository.key}</p>
  70. <p class="name">${repoMap[repository.key].name}</p>
  71. </div>
  72. <c:set var="numberOfRepos" value="${fn:length(repository.value)}" />
  73. <c:forEach items="${repository.value}" var="connector" varStatus="pc">
  74. <c:choose>
  75. <c:when test='${(pc.index)%2 eq 0}'>
  76. <c:set var="rowColor" value="dark" scope="page"/>
  77. </c:when>
  78. <c:otherwise>
  79. <c:set var="rowColor" value="lite" scope="page"/>
  80. </c:otherwise>
  81. </c:choose>
  82. <div class="connector ${rowColor}">
  83. <div class="controls">
  84. <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
  85. <s:url id="sortDownProxyConnectorUrl" action="sortDownProxyConnector">
  86. <s:param name="target" value="%{'${connector.targetRepoId}'}"/>
  87. <s:param name="source" value="%{'${connector.sourceRepoId}'}"/>
  88. </s:url>
  89. <s:url id="sortUpProxyConnectorUrl" action="sortUpProxyConnector">
  90. <s:param name="target" value="%{'${connector.targetRepoId}'}"/>
  91. <s:param name="source" value="%{'${connector.sourceRepoId}'}"/>
  92. </s:url>
  93. <s:url id="editProxyConnectorUrl" action="editProxyConnector">
  94. <s:param name="target" value="%{'${connector.targetRepoId}'}"/>
  95. <s:param name="source" value="%{'${connector.sourceRepoId}'}"/>
  96. </s:url>
  97. <s:url id="deleteProxyConnectorUrl" action="deleteProxyConnector" method="confirmDelete">
  98. <s:param name="source" value="%{'${connector.sourceRepoId}'}"/>
  99. <s:param name="target" value="%{'${connector.targetRepoId}'}"/>
  100. </s:url>
  101. <s:url id="enableProxyConnectorUrl" action="enableProxyConnector" method="confirmEnable">
  102. <s:param name="source" value="%{'${connector.sourceRepoId}'}"/>
  103. <s:param name="target" value="%{'${connector.targetRepoId}'}"/>
  104. </s:url>
  105. <s:url id="disableProxyConnectorUrl" action="disableProxyConnector" method="confirmDisable">
  106. <s:param name="source" value="%{'${connector.sourceRepoId}'}"/>
  107. <s:param name="target" value="%{'${connector.targetRepoId}'}"/>
  108. </s:url>
  109. <c:if test="${connector.disabled}">
  110. <s:a href="%{enableProxyConnectorUrl}" title="Enable Proxy Connector">
  111. <img src="${iconDisable}"/>
  112. </s:a>
  113. </c:if>
  114. <c:if test="${connector.disabled == false}">
  115. <s:a href="%{disableProxyConnectorUrl}" title="Disable Proxy Connector">
  116. <img src="${iconEnable}"/>
  117. </s:a>
  118. </c:if>
  119. <c:if test="${pc.count > 1}">
  120. <s:a href="%{sortUpProxyConnectorUrl}" title="Move Proxy Connector Up">
  121. <img src="${iconUpUrl}"/>
  122. </s:a>
  123. </c:if>
  124. <c:if test="${pc.count < numberOfRepos}">
  125. <s:a href="%{sortDownProxyConnectorUrl}" cssClass="down" title="Move Proxy Connector Down">
  126. <img src="${iconDownUrl}"/>
  127. </s:a>
  128. </c:if>
  129. <s:a href="%{editProxyConnectorUrl}" cssClass="edit" title="Edit Proxy Connector">
  130. <img src="${iconEditUrl}"/>
  131. </s:a>
  132. <s:a href="%{deleteProxyConnectorUrl}" cssClass="delete" title="Delete Proxy Connector">
  133. <img src="${iconDeleteUrl}"/>
  134. </s:a>
  135. </redback:ifAnyAuthorized>
  136. </div>
  137. <h4>Proxy Connector</h4>
  138. <div class="remoteRepo">
  139. <img src="<c:url value="/images/archiva-world.png"/>"/>
  140. <p class="id">${connector.targetRepoId}</p>
  141. <p class="name">${repoMap[connector.targetRepoId].name}</p>
  142. <p class="url"><a href="${repoMap[connector.targetRepoId].url}">${repoMap[connector.targetRepoId].url}</a></p>
  143. </div>
  144. <a class="expand" href="#" onclick="Effect.toggle('proxySettings_${connector.sourceRepoId}_${connector.targetRepoId}','slide'); return false;">Expand</a>
  145. <table class="settings" style="display: none;" id="proxySettings_${connector.sourceRepoId}_${connector.targetRepoId}">
  146. <tr>
  147. <th nowrap="nowrap">Network Proxy:</th>
  148. <td>
  149. <c:choose>
  150. <c:when test="${empty (connector.proxyId)}">
  151. <span class="directConnection">(Direct Connection)</span>
  152. </c:when>
  153. <c:otherwise>
  154. <s:url id="editProxyIdUrl" action="editNetworkProxy">
  155. <s:param name="proxyid" value="%{'${connector.proxyId}'}"/>
  156. </s:url>
  157. <s:a href="%{editProxyIdUrl}" cssClass="edit" title="Edit Network Proxy">
  158. ${connector.proxyId}
  159. <img src="${iconEditUrl}"/>
  160. </s:a>
  161. </c:otherwise>
  162. </c:choose>
  163. </td>
  164. </tr>
  165. <tr>
  166. <th>Policies:</th>
  167. <td nowrap="nowrap">
  168. <table class="policies">
  169. <c:forEach items="${connector.policies}" var="policies">
  170. <tr>
  171. <th>${policies.key}</th>
  172. <td>${policies.value}</td>
  173. </tr>
  174. </c:forEach>
  175. </table>
  176. </td>
  177. </tr>
  178. <c:if test="${not (empty (connector.whiteListPatterns))}">
  179. <tr>
  180. <th nowrap="nowrap">White List:</th>
  181. <td nowrap="nowrap">
  182. <c:forEach items="${connector.whiteListPatterns}" var="pattern">
  183. <p><code>"${pattern}"</code></p>
  184. </c:forEach>
  185. </td>
  186. </tr>
  187. </c:if>
  188. <c:if test="${not (empty (connector.blackListPatterns))}">
  189. <tr>
  190. <th nowrap="nowrap">Black List:</th>
  191. <td>
  192. <c:forEach items="${connector.blackListPatterns}" var="pattern">
  193. <p><code>"${pattern}"</code></p>
  194. </c:forEach>
  195. </td>
  196. </tr>
  197. </c:if>
  198. <c:if test="${not (empty (connector.properties))}">
  199. <tr>
  200. <th>Properties:</th>
  201. <td>
  202. <table class="props">
  203. <c:forEach items="${connector.properties}" var="prop">
  204. <tr>
  205. <th>${prop.key}</th>
  206. <td>${prop.value}</td>
  207. </tr>
  208. </c:forEach>
  209. </table>
  210. </td>
  211. </tr>
  212. </c:if>
  213. </table>
  214. </div> <%-- connector --%>
  215. </c:forEach>
  216. </div> <%-- proxyConfig --%>
  217. </c:forEach>
  218. </div> <%-- admin --%>
  219. </c:otherwise>
  220. </c:choose>
  221. </div>
  222. </body>
  223. </html>