]> source.dussan.org Git - archiva.git/blob
667d742ce6f445fcbc8463001f5c67be80100433
[archiva.git] /
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 <script id="proxyConnectorsMain" type="text/x-jquery-tmpl">
20   <div class="page-header">
21     <h2>${$.i18n.prop('proxy-connectors.list')}</h2>
22   </div>
23
24   <ul id="proxy-connectors-view-tabs" class="nav nav-tabs">
25     <li id="proxy-connectors-view-tabs-li-grid" class="active">
26       <a data-toggle="tab" href="#proxy-connectors-view" id="proxy-connectors-view-tabs-a-network-proxies-grid">${$.i18n.prop('proxy-connectors.grid.tab.title')}</a>
27     </li>
28     <li id="proxy-connectors-view-tabs-li-edit">
29       <a data-toggle="tab" href="#proxy-connectors-edit" id="proxy-connectors-view-tabs-a-edit">${$.i18n.prop('add')}</a>
30     </li>
31   </ul>
32   <div id="proxy-connectors-view-tabs-content" class="tab-content">
33     <div id="proxy-connectors-view" class="tab-pane active">
34       <table class="table table-striped table-bordered" id="proxyConnectorsTable"
35              data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-proxy-connectors-grid',pageLinksId:'proxy-connectorsPagination'">
36       </table>
37       <div id="proxy-connectorsPagination"></div>
38     </div>
39     <div id="proxy-connectors-edit" class="tab-pane"></div>
40   </div>
41
42 </script>
43
44 <script id='ko-proxy-connectors-grid' type='text/x-jquery-tmpl'>
45   <thead>
46     <tr>
47       <th title="${$.i18n.prop('proxy-connectors.grid.managedrepo.title')}">
48         ${$.i18n.prop('proxy-connectors.grid.managedrepo.grid.header')}
49       </th>
50       <th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
51         ${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
52       </th>
53     </tr>
54   </thead>
55
56   {{each(i, row) itemsOnCurrentPage()}}
57     {{var sourceId = row.source()}}
58     <tr data-bind="css:{ 'modified': row.modified()}">
59       <td>
60         <blockquote>
61           <p>${row.source()}</p>
62           <p>${row.sourceName()}</p>
63         </blockquote>
64       <td>
65           {{each(j, targetRepo) row.targetRepos()}}
66           {{var targetRepoId = targetRepo.targetRepoId()}}
67           <blockquote>
68             <p>${targetRepoId}</p>
69             <p>${getRemoteRepository(targetRepoId).name()}</p>
70             <p>${getRemoteRepository(targetRepoId).url()}</p>
71             <p>
72               <a popover-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
73                  data-bind="event: { mouseover: function(){ showSettings(sourceId,targetRepoId)},},click: function(){ editProxyConnector(row)}"
74                  id="proxy-connectors-grid-remoterepo-settings-edit-${sourceId}-${targetRepoId}" href="#">
75                   ${$.i18n.prop('edit')}
76               </a>
77                 <a href="#" data-bind="click: function(){ removeProxyConnector(row,targetRepoId) }">
78                   <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
79                 </a>
80               <div id="proxy-connectors-grid-remoterepo-settings-content-${val}-${targetRepoId}" style="display:none"></div>
81             </p>
82           </blockquote>
83           {{/each}}
84       </td>
85     </tr>
86   {{/each}}
87 </script>
88
89 <script id='proxy-connectors-remote-settings-popover-tmpl' type='text/x-jquery-tmpl'>
90   <div>
91     {{if proxyId()}}
92       ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyId()}
93     {{else}}
94       ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
95     {{/if}}
96     <table class="table">
97       <thead>
98         <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
99       </thead>
100       <tbody>
101         {{each policies().entry}}
102         <tr>
103           <td>${$value.key}</td>
104           <td>${$value.value}</td>
105         </tr>
106         {{/each}}
107       </tbody>
108     </table>
109   </div>
110 </script>
111
112 <script id="proxy-connector-edit-form-tmpl" type='text/x-jquery-tmpl'>
113
114     <form id="proxy-connector-edit-form" class="form-horizontal">
115       <fieldset id="remote-repository-edit-fieldset">
116         <div class="control-group">
117           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.network-proxy.id')}</label>
118           <div class="controls">
119             <select id="proxyId"
120                     data-bind="options: proxyConnectorsViewModel.networkProxies, optionsText: 'id',optionsValue:'id',
121                      value: proxyConnector.proxyId, optionsCaption: 'direct connection'"></select>
122           </div>
123         </div>
124         <div class="control-group">
125           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.managed.repository.id')}</label>
126           <div class="controls">
127             <select id="sourceRepoId"
128                     data-bind="options: proxyConnectorsViewModel.managedRepositories, optionsText: 'id',optionsValue:'id',
129                      value: proxyConnector.sourceRepoId"></select>
130           </div>
131         </div>
132         <div class="control-group">
133           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.remote.repository.id')}</label>
134           <div class="controls">
135             <select id="targetRepoId"
136                     data-bind="options: proxyConnectorsViewModel.remoteRepositories, optionsText: 'id',optionsValue:'id',
137                      value: proxyConnector.targetRepoId"></select>
138           </div>
139         </div>
140         <div class="control-group span6">
141             <table class="table">
142               <thead>
143                 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
144               </thead>
145               <tbody data-bind="foreach: proxyConnectorsViewModel.policyInformations()">
146                   <tr>
147                     <td data-bind="text: name"></td>
148                     <td>
149                       <select data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),attr: { id: 'policy-'+id() }"></select>
150                     </td>
151                   </tr>
152               </tbody>
153             </table>
154         </div>
155         <div class="control-group span6">
156           <h4>${$.i18n.prop('proxy-connector.properties')}</h4>
157
158             <table class="table">
159               <thead>
160                 <th><input type="text" id="property-key"/></th>
161                 <th><input type="text" id="property-value"/></th>
162                 <th><a href="#" data-bind="click: function(){ addProperty() }">${$.i18n.prop('add')}</a></th>
163               </thead>
164               <tbody data-bind="foreach: proxyConnector.properties">
165                 <tr>
166                   <td data-bind="text: key"></td>
167                   <td data-bind="text: value"></td>
168                   <td><a href="#" data-bind="click: function(){deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
169                 </tr>
170               </tbody>
171             </table>
172         </div>
173
174         <div class="control-group span6">
175             <h4>${$.i18n.prop('proxy-connector.blacklist')}</h4>
176             <table class="table">
177               <thead>
178                 <th><input type="text" id="blacklist-value"/></th>
179                 <th><a href="#" data-bind="click: function(){ addBlacklistPattern() }">${$.i18n.prop('add')}</a></th>
180               </thead>
181               <tbody data-bind="foreach: proxyConnector.blackListPatterns">
182                 <tr>
183                   <td data-bind="text: $data"></td>
184                   <td><a href="#" data-bind="click: function(){removeBlacklistPattern($data)}">${$.i18n.prop('delete')}</a></td>
185                 </tr>
186               </tbody>
187             </table>
188         </div>
189
190
191           <div class="control-group span6">
192             <h4>${$.i18n.prop('proxy-connector.whitelist')}</h4>
193             <table class="table">
194               <thead>
195                 <th><input type="text" id="whitelist-value"/></th>
196                 <th><a href="#" data-bind="click: function(){ addWhitelistPattern() }">${$.i18n.prop('add')}</a></th>
197               </thead>
198               <tbody data-bind="foreach: proxyConnector.whiteListPatterns">
199                 <tr>
200                   <td data-bind="text: $data"></td>
201                   <td><a href="#" data-bind="click: function(){removeWhitelistPattern($data)}">${$.i18n.prop('delete')}</a></td>
202                 </tr>
203               </tbody>
204             </table>
205         </div>
206
207       </fieldset>
208
209       <button id="proxy-connector-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
210       {{if modified()}}
211        ${("#network-proxy-btn-save").button('reset')}
212       {{/if}}
213       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
214
215     </form>
216
217 </script>