]> source.dussan.org Git - archiva.git/blob
557c3c8a4789d90c32f5d3d5aac34aa3e19d220a
[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/html">
20   <div class="page-header">
21     <h2><img src="images/preferences-system-network-proxy-32-32.png"/>${$.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     <li id="proxy-connectors-view-tabs-li-edit-order">
32       <a data-toggle="tab" href="#proxy-connectors-edit-order" id="proxy-connectors-view-tabs-a-edit-order">${$.i18n.prop('proxy-connectors.grid.tab.edit.order')}</a>
33     </li>
34   </ul>
35   <div id="proxy-connectors-view-tabs-content" class="tab-content">
36     <div id="proxy-connectors-view" class="tab-pane active">
37       <div id="proxy-connectors-bulk-save-btn" data-bind='template:{name:"proxy-connectors-bulk-save-tmpl"}'></div>
38       <table class="table table-striped table-bordered" id="proxyConnectorsTable"
39              data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-proxy-connectors-grid',pageLinksId:'proxy-connectorsPagination'">
40       </table>
41       <div id="proxy-connectorsPagination"></div>
42     </div>
43     <div id="proxy-connectors-edit" class="tab-pane"></div>
44     <div id="proxy-connector-edit-order" class="tab-pane span8">
45       <div id="proxy-connector-edit-order-managed-repository-div" data-bind='template:{name:"proxy-connector-edit-order-managed-repository-tmpl"}'></div>
46       <div id="proxy-connector-edit-order-div"
47          data-bind="sortable: { template: 'proxy-connector-edit-order-tmpl', data: proxyConnectors,afterMove: proxyConnectorMoved}">
48       </div>
49     </div>
50   </div>
51
52 </script>
53
54 <script id='ko-proxy-connectors-grid' type='text/html'>
55     <thead>
56       <tr>
57         <th title="${$.i18n.prop('proxy-connectors.grid.managedrepo.title')}">
58           ${$.i18n.prop('proxy-connectors.grid.managedrepo.grid.header')}
59         </th>
60         <th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
61           ${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
62         </th>
63         <th>${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}</th>
64         <th>${$.i18n.prop('edit')}</th>
65         <th>${$.i18n.prop('delete')}</th>
66         <th>${$.i18n.prop('save')}</th>
67         <th>${$.i18n.prop('proxy-connectors.grid.header.order')}</th>
68       </tr>
69     </thead>
70     <tbody>
71     {{each(i, row) itemsOnCurrentPage()}}
72     <tr data-bind="css:{ 'modified': row.modified()}">
73       <td>${row.sourceRepoId()}</td>
74       <td>${row.targetRepoId()}</td>
75       <td>
76           <img src="images/utilities-system-monitor-22-22.png" id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}"
77                data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
78                data-bind="event: { mouseover: function(){ showSettings(row)},}">
79           <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
80                style="display:none"></div>
81       </td>
82       <td>
83         <a data-bind="click: function(){ editProxyConnector(row)}" href="#">
84           <span class="btn btn-primary">
85             <i class="icon-pencil icon-white"/>
86           </span>
87         </a>
88       </td>
89       <td>
90         <a href="#" data-bind="click: function(){ deleteProxyConnector(row)}">
91           <span class="btn btn-danger">
92             <i class="icon-trash icon-white"/>
93           </span>
94         </a>
95       </td>
96       <td>
97         {{if row.modified()}}
98           <a href="#" class="btn btn-warning" data-bind="click: function(){ updateProxyConnector(row)}">
99               ${$.i18n.prop('save')}
100           </a>
101         {{/if}}
102       </td>
103       <td>
104         {{if orderChangeAware(row)}}
105           <a href="#" data-bind="click: function(){ displayOrderEdit(row)}">
106             <span class="btn btn-info">
107               <i class="icon-resize-vertical icon-white"/>
108                ${$.i18n.prop('proxy-connectors.order.edit')}
109             </span>
110
111           </a>
112           <span class="badge badge-info">${row.order()}</span>
113         {{/if}}
114       </td>
115     </tr>
116     {{/each}}
117     </tbody>
118     <div id="proxy-connectors-grid-remoterepo-settings-content-${val}-${targetRepoId}" style="display:none"></div>
119 </script>
120
121 <script id='proxy-connectors-remote-settings-popover-tmpl' type='text/html'>
122   <div>
123     {{if proxyId}}
124       ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyConnector.proxyId}
125     {{else}}
126       ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
127     {{/if}}
128     <table class="table">
129       <thead>
130         <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
131       </thead>
132       <tbody>
133         {{each(i, entry) proxyConnector.policiesEntries}}
134         {{var name = proxyConnectorsViewModel.findPolicyInformationName(entry.key)}}
135         <tr>
136           <td>${name}</td>
137           <td>${entry.value}</td>
138         </tr>
139         {{/each}}
140       </tbody>
141     </table>
142   </div>
143 </script>
144
145 <script id="proxy-connector-edit-form-tmpl" type='text/html'>
146
147     <form id="proxy-connector-edit-form" class="well form-horizontal">
148       <fieldset id="remote-repository-edit-fieldset">
149         <div class="control-group">
150           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.network-proxy.id')}</label>
151           <div class="controls">
152             <select id="proxyId"
153                     data-bind="options: proxyConnectorsViewModel.networkProxies, optionsText: 'id',optionsValue:'id',
154                      value: proxyConnector.proxyId, optionsCaption: 'direct connection'"></select>
155           </div>
156         </div>
157         <div class="control-group">
158           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.managed.repository.id')}</label>
159           <div class="controls">
160               <select id="sourceRepoId"
161                       data-bind="options: proxyConnectorsViewModel.managedRepositories, optionsText: 'id',optionsValue:'id',
162                       value: proxyConnector.sourceRepoId,attr: {disabled: isUpdate() }"></select>
163           </div>
164         </div>
165         <div class="control-group">
166           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.remote.repository.id')}</label>
167           <div class="controls">
168             <select id="targetRepoId"
169                     data-bind="options: proxyConnectorsViewModel.remoteRepositories, optionsText: 'id',optionsValue:'id',
170                      value: proxyConnector.targetRepoId,attr: {disabled: isUpdate() }"></select>
171           </div>
172         </div>
173         <div class="row">
174           <div class="control-group span6">
175             <table class="table">
176               <thead>
177                 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
178               </thead>
179               <tbody data-bind="foreach: proxyConnectorsViewModel.policyInformations()">
180                   <tr>
181                     <td data-bind="text: name"></td>
182                     <td>
183                       <select data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),
184                               attr: { id: 'policy-'+id() },event: { change: function(){ changePolicyOption(id())},}">
185                       </select>
186                     </td>
187                   </tr>
188               </tbody>
189             </table>
190           </div>
191         </div>
192         <div class="row">
193           <div class="control-group span6">
194             <h4>${$.i18n.prop('proxy-connector.properties')}</h4>
195             <table class="table">
196               <thead>
197                 <th><input type="text" id="property-key"/></th>
198                 <th><input type="text" id="property-value"/></th>
199                 <th><a href="#" data-bind="click: function(){ addProperty() }">${$.i18n.prop('add')}</a></th>
200               </thead>
201               <tbody data-bind="foreach: proxyConnector.propertiesEntries">
202                 <tr>
203                   <td data-bind="text: key"></td>
204                   <td data-bind="text: value"></td>
205                   <td><a href="#" data-bind="click: function(){ $parent.deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
206                 </tr>
207               </tbody>
208             </table>
209           </div>
210         </div>
211         <div class="row">
212           <div class="control-group span6">
213             <h4>${$.i18n.prop('proxy-connector.blacklist')}</h4>
214             <table class="table">
215               <thead>
216                 <th><input type="text" id="blacklist-value"/></th>
217                 <th><a href="#" data-bind="click: function(){ addBlacklistPattern() }">${$.i18n.prop('add')}</a></th>
218               </thead>
219               <tbody data-bind="foreach: proxyConnector.blackListPatterns">
220                 <tr>
221                   <td data-bind="text: $data"></td>
222                   <td><a href="#" data-bind="click: function(){removeBlacklistPattern($data)}">${$.i18n.prop('delete')}</a></td>
223                 </tr>
224               </tbody>
225             </table>
226           </div>
227         </div>
228         <div class="row">
229           <div class="control-group span6">
230             <h4>${$.i18n.prop('proxy-connector.whitelist')}</h4>
231             <table class="table">
232               <thead>
233                 <th><input type="text" id="whitelist-value"/></th>
234                 <th><a href="#" data-bind="click: function(){ addWhitelistPattern() }">${$.i18n.prop('add')}</a></th>
235               </thead>
236               <tbody data-bind="foreach: proxyConnector.whiteListPatterns">
237                 <tr>
238                   <td data-bind="text: $data"></td>
239                   <td><a href="#" data-bind="click: function(){removeWhitelistPattern($data)}">${$.i18n.prop('delete')}</a></td>
240                 </tr>
241               </tbody>
242             </table>
243           </div>
244         </div>
245       </fieldset>
246
247       <button id="proxy-connector-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
248       {{if modified()}}
249        ${("#network-proxy-btn-save").button('reset')}
250       {{/if}}
251       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
252
253     </form>
254
255 </script>
256 <script id="proxy-connectors-bulk-save-tmpl" type='text/html'>
257   {{if bulkSave()}}
258     <a data-bind="click: updateModifiedProxyConnectors" class="btn btn-danger" href="#">${$.i18n.prop('save.all')}</a>
259   {{/if}}
260 </script>
261
262 <script id="proxy-connector-edit-order-tmpl" type='text/html'>
263   <div class="well draggable-item network-proxy-remote-item">
264     {{var remoteRepository=$parent.findRemoteRepository(targetRepoId)}}
265     <div class="row-fluid">
266       <div class="span1">
267         <img src="images/system-software-update-32-32.png"/>
268           <br/>
269           <img src="images/utilities-system-monitor-22-22.png"
270                id="proxy-connectors-order-remoterepo-settings-edit-${sourceRepoId()}-${targetRepoId()}"
271                data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
272                data-bind="event: { mouseover: function(){ displaySettings(sourceRepoId(),targetRepoId())},}">
273           <div id="proxy-connectors-order-remoterepo-settings-content-${sourceRepoId()}-${targetRepoId()}"
274                style="display:none"></div>
275       </div>
276       <div class="span6 pull-left">
277         <blockquote>
278             ${targetRepoId}
279             <br/>
280             ${remoteRepository.name()}&nbsp;(<a href="${remoteRepository.url()}" target="_blank">${remoteRepository.url()}</a>)
281         </blockquote>
282       </div>
283       <div class="span2">
284         <span class="badge badge-info">${order}</span>
285       </div>
286     </div>
287   </div>
288 </script>
289
290 <script id="proxy-connector-edit-order-managed-repository-tmpl" type="text/html">
291   <div class="well row-fluid">
292     <div class="span1">
293       <img src="images/applications-internet-32-32.png"/>
294     </div>
295     <div class="span6">
296       <blockquote>
297         ${managedRepository.id}
298         <br/>
299         ${managedRepository.name}
300       </blockquote>
301     </div>
302     <div class="span2">
303       {{if proxyConnectorsViewModel.bulkSave()}}
304         <p>
305           <a data-bind="click: function(){updateModifiedProxyConnectors()}"
306              href="#" class="btn btn-warning">${$.i18n.prop('save.all')}</a></p>
307       {{/if}}
308     </div>
309   </div>
310 </script>
311
312 <script id="proxy-connector-delete-warning-tmpl" type='text/html'>
313     <div>
314       <span class="label label-warning">${$.i18n.prop('warning.not.undone.operation')}</span>
315     </div>
316 </script>
317