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