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