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