mirror of https://github.com/apache/archiva.git
[MRM-648] Add description field to the different types of repositories and proxies
implements UI for remote repositories. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384118 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4b2a422d58
commit
838b6e957b
|
@ -552,7 +552,8 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
||||||
|
|
||||||
|
|
||||||
RemoteRepository=function(id,name,layout,indexDirectory,url,userName,password,timeout,downloadRemoteIndex,remoteIndexUrl,
|
RemoteRepository=function(id,name,layout,indexDirectory,url,userName,password,timeout,downloadRemoteIndex,remoteIndexUrl,
|
||||||
remoteDownloadNetworkProxyId,cronExpression,remoteDownloadTimeout,downloadRemoteIndexOnStartup){
|
remoteDownloadNetworkProxyId,cronExpression,remoteDownloadTimeout,downloadRemoteIndexOnStartup,
|
||||||
|
description){
|
||||||
|
|
||||||
var self=this;
|
var self=this;
|
||||||
|
|
||||||
|
@ -589,7 +590,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
||||||
this.timeout.subscribe(function(newValue){self.modified(true)});
|
this.timeout.subscribe(function(newValue){self.modified(true)});
|
||||||
|
|
||||||
//private boolean downloadRemoteIndex = false;
|
//private boolean downloadRemoteIndex = false;
|
||||||
this.downloadRemoteIndex=ko.observable(downloadRemoteIndex);
|
this.downloadRemoteIndex=ko.observable(downloadRemoteIndex?false:downloadRemoteIndex);
|
||||||
this.downloadRemoteIndex.subscribe(function(newValue){self.modified(true)});
|
this.downloadRemoteIndex.subscribe(function(newValue){self.modified(true)});
|
||||||
|
|
||||||
//private String remoteIndexUrl = ".index";
|
//private String remoteIndexUrl = ".index";
|
||||||
|
@ -609,9 +610,12 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
||||||
this.remoteDownloadTimeout.subscribe(function(newValue){self.modified(true)});
|
this.remoteDownloadTimeout.subscribe(function(newValue){self.modified(true)});
|
||||||
|
|
||||||
//private boolean downloadRemoteIndexOnStartup = false;
|
//private boolean downloadRemoteIndexOnStartup = false;
|
||||||
this.downloadRemoteIndexOnStartup=ko.observable(downloadRemoteIndexOnStartup);
|
this.downloadRemoteIndexOnStartup=ko.observable(downloadRemoteIndexOnStartup?false:downloadRemoteIndexOnStartup);
|
||||||
this.downloadRemoteIndexOnStartup.subscribe(function(newValue){self.modified(true)});
|
this.downloadRemoteIndexOnStartup.subscribe(function(newValue){self.modified(true)});
|
||||||
|
|
||||||
|
this.description=ko.observable(description);
|
||||||
|
this.description.subscribe(function(newValue){self.modified(true)});
|
||||||
|
|
||||||
this.getTypeLabel=function(){
|
this.getTypeLabel=function(){
|
||||||
for(var i=0;i<window.managedRepositoryTypes.length;i++){
|
for(var i=0;i<window.managedRepositoryTypes.length;i++){
|
||||||
if (window.managedRepositoryTypes[i].type==self.layout()){
|
if (window.managedRepositoryTypes[i].type==self.layout()){
|
||||||
|
@ -630,7 +634,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
||||||
}
|
}
|
||||||
return new RemoteRepository(data.id,data.name,data.layout,data.indexDirectory,data.url,data.userName,data.password,
|
return new RemoteRepository(data.id,data.name,data.layout,data.indexDirectory,data.url,data.userName,data.password,
|
||||||
data.timeout,data.downloadRemoteIndex,data.remoteIndexUrl,data.remoteDownloadNetworkProxyId,
|
data.timeout,data.downloadRemoteIndex,data.remoteIndexUrl,data.remoteDownloadNetworkProxyId,
|
||||||
data.cronExpression,data.remoteDownloadTimeout,data.downloadRemoteIndexOnStartup);
|
data.cronExpression,data.remoteDownloadTimeout,data.downloadRemoteIndexOnStartup,data.description);
|
||||||
}
|
}
|
||||||
|
|
||||||
mapRemoteRepositories=function(data){
|
mapRemoteRepositories=function(data){
|
||||||
|
@ -941,6 +945,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
|
||||||
ko.applyBindings(remoteRepositoriesViewModel,mainContent.find("#remote-repositories-view").get(0));
|
ko.applyBindings(remoteRepositoriesViewModel,mainContent.find("#remote-repositories-view").get(0));
|
||||||
mainContent.find("#remote-repositories-pills #remote-repositories-view-a").tab('show')
|
mainContent.find("#remote-repositories-pills #remote-repositories-view-a").tab('show')
|
||||||
removeMediumSpinnerImg("#main-content #remote-repositories-content");
|
removeMediumSpinnerImg("#main-content #remote-repositories-content");
|
||||||
|
activatePopoverDoc();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -235,14 +235,12 @@
|
||||||
<input type="text" id="retentionCount" name="retentionCount" size="5" data-bind="value: managedRepository.retentionCount"/>
|
<input type="text" id="retentionCount" name="retentionCount" size="5" data-bind="value: managedRepository.retentionCount"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="daysOlder">${$.i18n.prop('description')}</label>
|
<label class="control-label" for="daysOlder">${$.i18n.prop('description')}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<textarea rows="3" id="description" name="description" data-bind="value: managedRepository.description"></textarea>
|
<textarea rows="3" id="description" name="description" data-bind="value: managedRepository.description"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="releases">${$.i18n.prop('releases')}</label>
|
<label class="control-label" for="releases">${$.i18n.prop('releases')}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
@ -379,6 +377,14 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<td></td>
|
<td></td>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<td>
|
||||||
|
{{if row.description()}}
|
||||||
|
<a class="btn btn-warning btn-mini popover-doc" id="remoterepo-description-help"
|
||||||
|
data-content="${row.description()}" data-title="${$.i18n.prop('description')}">
|
||||||
|
<i class="icon-question-sign icon-white"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" data-bind="click: function(){ scheduleDownloadRemoteIndex(row) }">
|
<a href="#" data-bind="click: function(){ scheduleDownloadRemoteIndex(row) }">
|
||||||
<span class="btn btn-success">
|
<span class="btn btn-success">
|
||||||
|
@ -485,7 +491,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="downloadRemoteIndexOnStartup">${$.i18n.prop('downloadRemoteIndexOnStartup')}</label>
|
<label class="control-label" for="downloadRemoteIndexOnStartup">${$.i18n.prop('downloadRemoteIndexOnStartup')}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
@ -494,6 +499,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="daysOlder">${$.i18n.prop('description')}</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea rows="3" id="description" name="description" data-bind="value: remoteRepository.description"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
|
<button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
|
||||||
<button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
|
<button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
|
||||||
|
|
Loading…
Reference in New Issue