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