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