Remove available data providers from community-edit-form
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@51052 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
094c3e9be8
commit
512da32007
|
@ -5,85 +5,7 @@
|
|||
<p> Description: <input placeholder="description" type="text" class="uk-input uk-width-medium"/> </p>
|
||||
<p> Logo: </p>
|
||||
|
||||
<div class="js-upload uk-placeholder uk-text-center uk-width-medium">
|
||||
<div uk-form-custom>
|
||||
<span uk-icon="icon: cloud-upload"></span>
|
||||
<input type="file">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p> Available data providers: </p>
|
||||
|
||||
<ul>
|
||||
<li *ngFor="let item of res; let i = index">
|
||||
{{item.result["metadata"]["oaf:entity"]["oaf:datasource"]["officialname"]}}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var bar = document.getElementById('js-progressbar');
|
||||
|
||||
UIkit.upload('.js-upload', {
|
||||
|
||||
url: '',
|
||||
multiple: true,
|
||||
|
||||
beforeSend: function () {
|
||||
console.log('beforeSend', arguments);
|
||||
},
|
||||
beforeAll: function () {
|
||||
console.log('beforeAll', arguments);
|
||||
},
|
||||
load: function () {
|
||||
console.log('load', arguments);
|
||||
},
|
||||
error: function () {
|
||||
console.log('error', arguments);
|
||||
},
|
||||
complete: function () {
|
||||
console.log('complete', arguments);
|
||||
},
|
||||
|
||||
loadStart: function (e) {
|
||||
console.log('loadStart', arguments);
|
||||
|
||||
bar.removeAttribute('hidden');
|
||||
bar.max = e.total;
|
||||
bar.value = e.loaded;
|
||||
},
|
||||
|
||||
progress: function (e) {
|
||||
console.log('progress', arguments);
|
||||
|
||||
bar.max = e.total;
|
||||
bar.value = e.loaded;
|
||||
},
|
||||
|
||||
loadEnd: function (e) {
|
||||
console.log('loadEnd', arguments);
|
||||
|
||||
bar.max = e.total;
|
||||
bar.value = e.loaded;
|
||||
},
|
||||
|
||||
completeAll: function () {
|
||||
console.log('completeAll', arguments);
|
||||
|
||||
setTimeout(function () {
|
||||
bar.setAttribute('hidden', 'hidden');
|
||||
}, 1000);
|
||||
|
||||
alert('Upload Completed');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -20,11 +20,7 @@ export class CommunityEditFormComponent implements OnInit{
|
|||
|
||||
|
||||
ngOnInit(){
|
||||
this._helpContentService.getDataProviders().subscribe(
|
||||
res => {
|
||||
this.res = res;
|
||||
console.log(res);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public get form() {
|
||||
|
|
|
@ -385,11 +385,6 @@ export class HelpContentService {
|
|||
return Observable.throw(error.json().error || 'Server error');
|
||||
}
|
||||
|
||||
getDataProviders() {
|
||||
//return this.http.get('https://beta.services.openaire.eu/search/v2/api/datasources?format=json').map(res => <any> res.json()).map(res => res.results).do(res => {console.log(res)}).catch(this.handleError);
|
||||
return this.http.get('https://beta.services.openaire.eu/search/v2/api/datasources?format=json').map(res => <any> res.json()).map(res => res.results).do(res => {console.log(res)}).catch(this.handleError);
|
||||
}
|
||||
|
||||
getStatistics(community_pid: string) {
|
||||
return this.http.get(this._helpContentUrl + 'statistics/'+community_pid)
|
||||
.map(res => <CommunityStatistics> res.json())
|
||||
|
|
Loading…
Reference in New Issue