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