]> source.dussan.org Git - archiva.git/blob
6635d40208d6c119c84c25ade4e386e6ac7cb9f9
[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     <tr data-bind="css:{ 'modified': row.modified()}">
58         {{var val = row.source()}}
59       <td>
60         <blockquote>
61           <p>${val}</p>
62           <p>${getManagedRepository(val).name()}</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(val,targetRepoId)},}"
74                  id="proxy-connectors-grid-remoterepo-settings-edit-${val}-${targetRepoId}" href="#">
75                   ${$.i18n.prop('edit')}
76                  </a>
77               <div id="proxy-connectors-grid-remoterepo-settings-content-${val}-${targetRepoId}" style="display:none"></div>
78             </p>
79           </blockquote>
80           {{/each}}
81       </td>
82     </tr>
83   {{/each}}
84 </script>
85
86 <script id='proxy-connectors-remote-settings-popover-tmpl' type='text/x-jquery-tmpl'>
87   <div>
88     {{if proxyId()}}
89       ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyId()}
90     {{else}}
91       ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
92     {{/if}}
93     <table class="table">
94       <thead>
95         <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
96       </thead>
97       <tbody>
98         {{each policies().entry}}
99         <tr>
100           <td>${$value.key}</td>
101           <td>${$value.value}</td>
102         </tr>
103         {{/each}}
104       </tbody>
105     </table>
106   </div>
107 </script>
108
109 <script id="proxy-connector-edit-form-tmpl" type='text/x-jquery-tmpl'>
110
111     <form id="proxy-connector-edit-form" class="form-horizontal">
112       <fieldset id="remote-repository-edit-fieldset">
113         <div class="control-group">
114           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.network-proxy.id')}</label>
115           <div class="controls">
116             <select id="proxyId"
117                     data-bind="options: proxyConnectorsViewModel.networkProxies, optionsText: 'id',optionsValue:'id',
118                      value: proxyConnector.proxyId, optionsCaption: 'direct connection'"></select>
119           </div>
120         </div>
121         <div class="control-group">
122           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.managed.repository.id')}</label>
123           <div class="controls">
124             <select id="sourceRepoId"
125                     data-bind="options: proxyConnectorsViewModel.managedRepositories, optionsText: 'id',optionsValue:'id',
126                      value: proxyConnector.sourceRepoId"></select>
127           </div>
128         </div>
129         <div class="control-group">
130           <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.remote.repository.id')}</label>
131           <div class="controls">
132             <select id="targetRepoId"
133                     data-bind="options: proxyConnectorsViewModel.remoteRepositories, optionsText: 'id',optionsValue:'id',
134                      value: proxyConnector.targetRepoId"></select>
135           </div>
136         </div>
137         <div class="control-group span6">
138             <table class="table">
139               <thead>
140                 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
141               </thead>
142               <tbody data-bind="foreach: proxyConnectorsViewModel.policyInformations()">
143                   <tr>
144                     <td data-bind="text: name"></td>
145                     <td>
146                       <select data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),attr: { id: 'policy-'+id() }"></select>
147                     </td>
148                   </tr>
149               </tbody>
150             </table>
151         </div>
152         <div class="control-group span6">
153           <h4>${$.i18n.prop('proxy-connector.properties')}</h4>
154
155             <table class="table">
156               <thead>
157                 <th><input type="text" id="property-key"/></th>
158                 <th><input type="text" id="property-value"/></th>
159                 <th><a href="#" data-bind="click: function(){ addProperty() }">${$.i18n.prop('add')}</a></th>
160               </thead>
161               <tbody data-bind="foreach: proxyConnector.properties">
162                 <tr>
163                   <td data-bind="text: key"></td>
164                   <td data-bind="text: value"></td>
165                   <td><a href="#" data-bind="click: function(){deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
166                 </tr>
167               </tbody>
168             </table>
169         </div>
170
171         <div class="control-group span6">
172             <h4>${$.i18n.prop('proxy-connector.blacklist')}</h4>
173             <table class="table">
174               <thead>
175                 <th><input type="text" id="blacklist-value"/></th>
176                 <th><a href="#" data-bind="click: function(){ addBlacklistPattern() }">${$.i18n.prop('add')}</a></th>
177               </thead>
178               <tbody data-bind="foreach: proxyConnector.blackListPatterns">
179                 <tr>
180                   <td data-bind="text: $data"></td>
181                   <td><a href="#" data-bind="click: function(){removeBlacklistPattern($data)}">${$.i18n.prop('delete')}</a></td>
182                 </tr>
183               </tbody>
184             </table>
185         </div>
186
187
188           <div class="control-group span6">
189             <h4>${$.i18n.prop('proxy-connector.whitelist')}</h4>
190             <table class="table">
191               <thead>
192                 <th><input type="text" id="whitelist-value"/></th>
193                 <th><a href="#" data-bind="click: function(){ addWhitelistPattern() }">${$.i18n.prop('add')}</a></th>
194               </thead>
195               <tbody data-bind="foreach: proxyConnector.whiteListPatterns">
196                 <tr>
197                   <td data-bind="text: $data"></td>
198                   <td><a href="#" data-bind="click: function(){removeWhitelistPattern($data)}">${$.i18n.prop('delete')}</a></td>
199                 </tr>
200               </tbody>
201             </table>
202         </div>
203
204       </fieldset>
205
206       <button id="proxy-connector-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
207       {{if modified()}}
208        ${("#network-proxy-btn-save").button('reset')}
209       {{/if}}
210       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
211
212     </form>
213
214 </script>