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