]> source.dussan.org Git - archiva.git/blob
f6381d8005c3595c207c5e41e2f4f3b49f32cbd6
[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="repositoriesMain" type="text/x-jquery-tmpl">
20     <div class="page-header">
21       <h2>${$.i18n.prop('administration.repositories')}</h2>
22     </div>
23
24       <ul id="repositories-tabs" class="tabs">
25         <li class="active">
26           <a href="#managed-repositories-content">${$.i18n.prop('managedrepositories.grid.head')}</a>
27         </li>  
28         <li>
29           <a href="#remote-repositories-content">${$.i18n.prop('remoterepositories.grid.head')}</a>
30         </li>
31       </ul>  
32       <div class="tab-content">
33         <div id="managed-repositories-content" class="active">
34             <ul id="managed-repositories-pills" class="pills">
35               <li class="active" id="managed-repositories-view-li">
36                 <a href="#managed-repositories-view">${$.i18n.prop('managedrepositories.grid.tab.title')}</a>
37               </li>
38               <li id="managed-repository-edit-li">
39                 <a href="#managed-repository-edit">${$.i18n.prop('add')}</a>
40               </li>
41             </ul>
42             <div id="managed-repositories-tabs-content" class="pill-content">
43               <div id="managed-repositories-view" class="active">
44                   <table class="bordered-table zebra-striped" id="managed-repositories-table"
45                          data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko_managed-repositoriesGrid',pageLinksId:'managed-repositoriesPagination',data:'managedRepositories'">
46                   </table>
47                   <div id="managed-repositoriesPagination"></div>
48                   <div id="managed-repositories-pom-snippet"></div>
49               </div>
50               <div id="managed-repository-edit" data-bind='template: {name:"managed-repository-edit-tmpl"}'>
51               </div>
52             </div>
53         </div>
54
55
56         <div id="remote-repositories-content">
57             <ul id="remote-repositories-pills" class="pills">
58               <li class="active" id="remote-repositories-view-li">
59                 <a href="#remote-repositories-view">${$.i18n.prop('remoterepositories.grid.tab.title')}</a>
60               </li>
61               <li id="remote-repository-edit-li">
62                 <a href="#remote-repository-edit">${$.i18n.prop('add')}</a>
63               </li>
64             </ul>
65             <div id="remote-repositories-tabs-content" class="pill-content">
66               <div id="remote-repositories-view" class="active">
67                   <table class="bordered-table zebra-striped" id="remote-repositories-table"
68                          data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko_remote-repositoriesGrid',pageLinksId:'remote-repositoriesPagination',data:'remoteRepositories'">
69                   </table>
70                   <div id="remote-repositoriesPagination"></div>
71               </div>
72               <div id="remote-repository-edit" data-bind='template: {name:"remote-repository-edit-tmpl"}'>
73               </div>
74             </div>
75         </div>
76       </div>
77 </script>
78
79 <script id='ko_managed-repositoriesGrid' type='text/x-jquery-tmpl'>
80   <thead>
81       <tr>
82         {{each(i, columnDefinition) columns}}
83           <th title="${ columnDefinition.title }">${ columnDefinition.headerText }</th>
84         {{/each}}
85         <th>Releases</th>
86         <th>Snapshots</th>
87         <th>Scan</th>
88         <th>${$.i18n.prop('edit')}</th>
89         <th>${$.i18n.prop('delete')}</th>
90         <th>${$.i18n.prop('managedrepository.pomsnippet')}</th>
91         <th title="${$.i18n.prop('managedrepository.stats')}">Stats</th>
92       </tr>
93   </thead>
94   <tbody>
95       {{each(i, row) itemsOnCurrentPage()}}
96           <tr>
97             {{each(j, columnDefinition) columns}}
98               <td>${ typeof columnDefinition.rowText == 'function' ? columnDefinition.rowText(row) : row[columnDefinition.rowText] }</td>
99             {{/each}}
100             <td>
101             {{if row.releases() == true}}
102               <img src="images/weather-clear.png" title="${$.i18n.prop('release.included')}"/>
103             {{else}}
104               <img src="images/dialog-error.png" title="${$.i18n.prop('release.notincluded')}"/>
105             {{/if}}
106             </td>
107
108             <td>
109               {{if row.snapshots() == true}}
110                 <img src="images/weather-clear.png" title="${$.i18n.prop('snapshots.included')}"/>
111               {{else}}
112                   <img src="images/dialog-error.png" title="${$.i18n.prop('snapshots.notincluded')}"/>
113               {{/if}}
114             </td>
115             <td>
116               <a href="#" data-bind="click: function(){ scanNow(row) }">
117                 <img src="images/view-refresh.png" title="${$.i18n.prop('managedrepository.scan.now')}"/>
118               </a>
119             </td>
120             <td><a href="#" data-bind="click: function(){ editManagedRepository(row) }">${$.i18n.prop('edit')}</a></td>
121             <td>
122               <a href="#" data-bind="click: function(){ removeManagedRepository(row) }">
123                 <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
124               </a>
125             </td>
126             <td><a href="#" data-bind="click: function(){ showPomSnippet(row) }">${$.i18n.prop('managedrepository.pomsnippet')}</a></td>
127             <td id="managedrepository-stats-${row.id()}">
128               <img src="images/utilities-system-monitor.png" popover-title="${$.i18n.prop('managedrepository.stats')}"
129                    data-bind="event: { mouseover: function(){ showStats(row) }, mouseout: function(){ hideStats(row) },}"
130                    id="managedrepository-stats-img-${row.id()}"/>
131             </td>
132           </tr>
133       {{/each}}
134   </tbody>
135
136 </script>
137
138 <script id="managed-repository-edit-tmpl" type='text/x-jquery-tmpl'>
139     <form id="managed-repository-edit-form">
140       <fieldset id="managed-repository-edit-fieldset">
141         <div class="clearfix">
142           <label for="name">${$.i18n.prop('id')}</label>
143           <div class="input">
144             {{if update}}
145               <span class="uneditable-input">${$data.managedRepository.id}</span>
146             {{else}}
147               <input type="text" class="xlarge required" id="id" name="id" size="50"
148                      data-bind="value: managedRepository.id,css:{'uneditable-input': update},readonly:update"/>
149             {{/if}}
150           </div>
151         </div>
152         <div class="clearfix">
153           <label for="name">${$.i18n.prop('name')}</label>
154           <div class="input">
155             <input type="text" class="xlarge required" id="name" name="name" size="50"
156                    data-bind="value: managedRepository.name"/>
157           </div>
158         </div>
159         <div class="clearfix">
160           <label for="location">${$.i18n.prop('directory')}</label>
161           <div class="input">
162             <input type="text" class="xlarge required" id="location" name="location" size="50" data-bind="value: managedRepository.location"/>
163           </div>
164         </div>
165         <div class="clearfix">
166           <label for="indexDirectory">${$.i18n.prop('index.directory')}</label>
167           <div class="input">
168             <input type="text" class="xlarge" id="indexDirectory" name="indexDirectory" size="50" data-bind="value: managedRepository.indexDirectory"/>
169           </div>
170         </div>
171         <div class="clearfix">
172           <label for="layout">${$.i18n.prop('type')}</label>
173           <div class="input">
174             <select id="layout" data-bind="options: availableLayouts,optionsText: 'label',optionsValue:'type',value: managedRepository.layout"/>
175           </div>
176         </div>
177         <div class="clearfix">
178           <label for="cronExpression">${$.i18n.prop('cronExpression')}</label>
179           <div class="input">
180             <input type="text" id="cronExpression" class="required" name="cronExpression" size="40" data-bind="value: managedRepository.cronExpression"/>
181           </div>
182         </div>
183         <div class="clearfix">
184           <label for="daysOlder">${$.i18n.prop('daysOlder')}</label>
185           <div class="input">
186             <input type="text" id="daysOlder" class="digits" name="daysOlder" size="5" data-bind="value: managedRepository.daysOlder"/>
187           </div>
188         </div>
189         <div class="clearfix">
190           <label for="retentionCount">${$.i18n.prop('retentionCount')}</label>
191           <div class="input">
192             <input type="text" id="retentionCount" name="retentionCount" size="5" data-bind="value: managedRepository.retentionCount"/>
193           </div>
194         </div>
195         <div class="clearfix">
196           <label for="releases">${$.i18n.prop('releases')}</label>
197           <div class="input">
198             <input type="checkbox" id="releases" name="releases" size="5" data-bind="checked: managedRepository.releases"/>
199           </div>
200         </div>
201         <div class="clearfix">
202           <label for="snapshots">${$.i18n.prop('snapshots')}</label>
203           <div class="input">
204             <input type="checkbox" id="snapshots" name="snapshots" size="5" data-bind="checked: managedRepository.snapshots"/>
205           </div>
206         </div>
207         <div class="clearfix">
208           <label for="blockRedeployments">${$.i18n.prop('blockRedeployments')}</label>
209           <div class="input">
210             <input type="checkbox" id="blockRedeployments" name="blockRedeployments" size="5" data-bind="checked: managedRepository.blockRedeployments"/>
211           </div>
212         </div>
213         <div class="clearfix">
214           <label for="scanned">${$.i18n.prop('scanned')}</label>
215           <div class="input">
216             <input type="checkbox" id="scanned" name="scanned" size="5" data-bind="checked: managedRepository.scanned"/>
217           </div>
218         </div>
219         <div class="clearfix">
220           <label for="deleteReleasedSnapshots">${$.i18n.prop('deleteReleasedSnapshots')}</label>
221           <div class="input">
222             <input type="checkbox" id="deleteReleasedSnapshots" name="deleteReleasedSnapshots" size="5"
223                    data-bind="checked: managedRepository.deleteReleasedSnapshots"/>
224           </div>
225         </div>
226         <div class="clearfix">
227           <label for="stageRepoNeeded">${$.i18n.prop('stageRepoNeeded')}</label>
228           <div class="input">
229             <input type="checkbox" id="stageRepoNeeded" name="stageRepoNeeded" size="5"
230                    data-bind="checked: managedRepository.stageRepoNeeded"/>
231           </div>
232         </div>
233       </fieldset>
234       <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
235       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
236     </form>
237 </script>
238
239 <script id="managed-repository-delete-warning-tmpl" type='text/x-jquery-tmpl'>
240   <div>
241     <a class="close" href="#">&#215;</a>
242     <div class="alert-message warning">
243       <p>
244         <strong>${$.i18n.prop('warning.not.undone.operation')}</strong>
245       </p>
246     </div>
247     <div>
248       <span><strong>${$.i18n.prop('managedrepository.delete.warning.message')}</strong>.</span>
249       <div>${$.i18n.prop('id')}: ${id()}</div>
250       <div>${$.i18n.prop('name')}: ${name()}</div>
251     </div>
252     <div>
253         ${$.i18n.prop('managedrepository.delete.content')}: <input type="checkbox" id="managedrepository-deletecontent">
254     </div>
255   </div>
256 </script>
257 <script id="managed-repository-location-warning-tmpl" type='text/x-jquery-tmpl'>
258   <div>
259     <a class="close" href="#">&#215;</a>
260     <div class="alert-message warning">
261       <p>
262         <strong>${$.i18n.prop('managedrepository.location.already.exists')}</strong>
263       </p>
264     </div>
265     <div>
266       <span><strong>${$.i18n.prop('managedrepository.location.already.exists.warning.message')}</strong>.</span>
267       <div>${$.i18n.prop('id')}: ${id()}</div>
268       <div>${$.i18n.prop('name')}: ${name()}</div>
269     </div>
270   </div>
271 </script>
272 <script id="managed-repository-scan-now-modal-tmpl" type='text/x-jquery-tmpl'>
273   <div>
274     ${$.i18n.prop('managedrepository.scan.all')}: <input type="checkbox" id="managed-repository-scan-now-all">
275   </div>
276 </script>
277 <script id="managed-repository-stats-tmpl" type='text/x-jquery-tmpl'>
278   <div id="managedrepository-stats-${managedRepository.id()}-popover" style="display:none">
279     <div>${$.i18n.prop('managedrepository.stats.endTime')}: ${scanEndTime()}</div>
280     <div>${$.i18n.prop('managedrepository.stats.duration')}: ${duration()}ms</div>
281     <div>${$.i18n.prop('managedrepository.stats.totalFileCount')}: ${totalFileCount()}</div>
282     <div>${$.i18n.prop('managedrepository.stats.newFileCount')}: ${newFileCount()}</div>
283   </div>
284 </script>
285 <script id="pom-snippet-tmpl" type='text/x-jquery-tmpl'>
286   <div class="page-header">
287     <h2>POM Snippet</h2></div>
288   </div>
289   <div><a href="#" onclick="$('#managed-repositories-pom-snippet').effect('blind')">${$.i18n.prop('hide')}</a></div>
290   <pre>${$data}</pre>
291 </script>
292
293 <!-- remote part -->
294
295 <script id='ko_remote-repositoriesGrid' type='text/x-jquery-tmpl'>
296   <thead>
297       <tr>
298         {{each(i, columnDefinition) columns}}
299           <th title="${ columnDefinition.title }">${ columnDefinition.headerText }</th>
300         {{/each}}
301         <th>${$.i18n.prop('edit')}</th>
302         <th>${$.i18n.prop('delete')}</th>
303         <th>${$.i18n.prop('remoterepository.downloadremoteindex')}</th>
304       </tr>
305   </thead>
306   <tbody>
307       {{each(i, row) itemsOnCurrentPage()}}
308           <tr>
309             {{each(j, columnDefinition) columns}}
310               <td>${ typeof columnDefinition.rowText == 'function' ? columnDefinition.rowText(row) : row[columnDefinition.rowText] }</td>
311             {{/each}}
312             <td>
313               <a href="#" data-bind="click: function(){ editRemoteRepository(row) }">${$.i18n.prop('edit')}</a>
314             </td>
315             <td>
316               <a href="#" data-bind="click: function(){ removeRemoteRepository(row) }">
317                 <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
318               </a>
319             </td>
320             <td>
321               <a href="#" data-bind="click: function(){ scheduleDownloadRemoteIndex(row) }">
322                 <img src="images/view-refresh.png" title="${$.i18n.prop('remoterepository.downloadremoteindex.now')}"/>
323               </a>
324             </td>
325           </tr>
326       {{/each}}
327   </tbody>
328
329 </script>
330
331
332 <script id="remote-repository-edit-tmpl" type='text/x-jquery-tmpl'>
333     <form id="remote-repository-edit-form">
334       <fieldset id="remote-repository-edit-fieldset">
335         <div class="clearfix">
336           <label for="name">${$.i18n.prop('id')}</label>
337           <div class="input">
338             {{if update}}
339               <span class="uneditable-input">${$data.remoteRepository.id}</span>
340             {{else}}
341               <input type="text" class="xlarge required" id="id" name="id" size="50"
342                      data-bind="value: remoteRepository.id,css:{'uneditable-input': update},readonly:update"/>
343             {{/if}}
344           </div>
345         </div>
346         <div class="clearfix">
347           <label for="name">${$.i18n.prop('name')}</label>
348           <div class="input">
349             <input type="text" class="xlarge required" id="name" name="name" size="50"
350                    data-bind="value: remoteRepository.name"/>
351           </div>
352         </div>
353         <div class="clearfix">
354           <label for="url">${$.i18n.prop('url')}</label>
355           <div class="input">
356             <input type="text" class="xlarge required" id="url" name="location" size="50" data-bind="value: remoteRepository.url"/>
357           </div>
358         </div>
359         <div class="clearfix">
360           <label for="userName">${$.i18n.prop('username')}</label>
361           <div class="input">
362             <input type="text" class="xlarge" id="userName" name="userName" size="50" data-bind="value: remoteRepository.indexDirectory"/>
363           </div>
364         </div>
365         <div class="clearfix">
366           <label for="password">${$.i18n.prop('password')}</label>
367            <div class="input">
368              <input type="password" class="xlarge" id="password" name="password" size="50" data-bind="value: remoteRepository.password"/>
369           </div>
370         </div>
371         <div class="clearfix">
372           <label for="timeout">${$.i18n.prop('timeout')}</label>
373           <div class="input">
374             <input type="text" id="timeout" class="digits" name="daysOlder" size="5" data-bind="value: remoteRepository.timeout"/>
375           </div>
376         </div>
377
378         <div class="clearfix">
379           <label for="layout">${$.i18n.prop('type')}</label>
380           <div class="input">
381             <select id="layout" data-bind="options: availableLayouts,optionsText: 'label',optionsValue:'type',value: remoteRepository.layout"/>
382           </div>
383         </div>
384         <div class="clearfix">
385           <label for="downloadRemoteIndex">${$.i18n.prop('downloadRemoteIndex')}</label>
386           <div class="input">
387             <input type="checkbox" id="downloadRemoteIndex" name="downloadRemoteIndex" size="5" data-bind="checked: remoteRepository.downloadRemoteIndex"/>
388           </div>
389         </div>
390
391         <div class="clearfix">
392           <label for="remoteIndexUrl">${$.i18n.prop('remoteIndexUrl')}</label>
393           <div class="input">
394             <input type="text" id="remoteIndexUrl" name="remoteIndexUrl" size="5" data-bind="value: remoteRepository.remoteIndexUrl"/>
395           </div>
396         </div>
397         <div class="clearfix">
398           <label for="cronExpression">${$.i18n.prop('cronExpression')}</label>
399           <div class="input">
400             <input type="text" id="cronExpression" name="cronExpression" size="40" data-bind="value: remoteRepository.cronExpression"/>
401           </div>
402         </div>
403         <div class="clearfix">
404           <label for="indexDirectory">${$.i18n.prop('index.directory')}</label>
405           <div class="input">
406             <input type="text" class="xlarge" id="indexDirectory" name="indexDirectory" size="50" data-bind="value: remoteRepository.indexDirectory"/>
407           </div>
408         </div>
409         <div class="clearfix">
410           <label for="remoteDownloadTimeout">${$.i18n.prop('remoteDownloadTimeout')}</label>
411           <div class="input">
412             <input type="text" id="remoteDownloadTimeout" class="digits" name="remoteDownloadTimeout" size="5"
413                    data-bind="value: remoteRepository.remoteDownloadTimeout"/>
414           </div>
415         </div>
416
417         <!-- FIXME proxy id to use -->
418
419         <div class="clearfix">
420           <label for="downloadRemoteIndexOnStartup">${$.i18n.prop('downloadRemoteIndexOnStartup')}</label>
421           <div class="input">
422             <input type="checkbox" id="downloadRemoteIndexOnStartup" name="downloadRemoteIndexOnStartup"
423                    data-bind="checked: remoteRepository.downloadRemoteIndexOnStartup"/>
424           </div>
425         </div>
426
427       </fieldset>
428       <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
429       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
430     </form>
431 </script>