Skip to content
Snippets Groups Projects
Commit 1e98c84a authored by cazenave's avatar cazenave
Browse files

avec k8s sur ovh yann

parent c5c0e2e3
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ export class AppConfiguration {
public ensureInit(): Promise<any> {
return new Promise((r, e) => {
this.httpClient.get("http://"+environment.apiurl+"/api/setting/load").subscribe((content: AppConfiguration) => {Object.assign(this, content);r(this);}, reason => e(reason));
this.httpClient.get("http://"+environment.apiurl+"/setting/load").subscribe((content: AppConfiguration) => {Object.assign(this, content);r(this);}, reason => e(reason));
});
};
......
......@@ -37,18 +37,19 @@ export class DatasetsComponent implements OnInit {
// https://data.inrae.fr/api/search?q=*&per_page=10&type=dataset&start=16000&show_entity_ids=true&show_my_data=true
var myRequest = new Request(this.appConfig.smartapiurl+'harvest/allurls',myInit);
// var myRequest = new Request(this.appConfig.smartapiurl+'harvest/allurls',myInit);
var myRequest = new Request('https://dataverse.ird.fr/api/search?q=*&per_page=100&show_facets=true&show_my_data=true',myInit);
fetch(myRequest, myInit)
.then(response => {
response.json()
.then(data => {
this.dataresult =data;
//this.itemsdatasets = data['data']['items'];
console.log(this.dataresult);
// for (var i = 0; i < this.itemsdatasets.length; i++) {
// this.createdataset(data['data']['items'][i]);
// }
//this.dataresult =data;
this.itemsdatasets = data['data']['items'];
console.log(this.itemsdatasets);
for (var i = 0; i < this.itemsdatasets.length; i++) {
this.createdataset(data['data']['items'][i]);
}
});
});
return null;
......@@ -56,7 +57,7 @@ export class DatasetsComponent implements OnInit {
createdataset(item: any) {
console.log(item);
let data: string;
let description: string;
description = JSON.stringify(item['description']);
......@@ -69,14 +70,14 @@ data ='\
@prefix dcat: <http://www.w3.org/ns/dcat#>.\n\
@prefix dct: <http://purl.org/dc/terms/>.\n\
@prefix language: <http://id.loc.gov/vocabulary/iso639-1/>.\n\
@prefix s: <http://sandbox9.cines.fr/>.\n\
@prefix c: <http://sandbox9.cines.fr/catalog/>.\n\
@prefix s: <'+this.appConfig.fdpurl+'/>.\n\
@prefix c: <'+this.appConfig.fdpurl+'/catalog/>.\n\
\n\
s:new\n\
a dcat:Dataset, dcat:Resource;\n\
dct:description '+ description +';\n\
dct:description '+ description+ ';\n\
dct:hasVersion "1.0";\n\
dct:isPartOf c:55500bc8-b379-44ff-b41b-f41c504d56ec;\n\
dct:isPartOf c:a21f9b06-b7e7-43c0-869d-d81f09053383;\n\
dct:language language:en;\n\
dct:license <http://rdflicense.appspot.com/rdflicense/cc-by-nc-nd3.0>;\n\
dct:title '+ name +';\n\
......
......@@ -106,11 +106,11 @@ repository:\n\
data ='\
@prefix dcat: <http://www.w3.org/ns/dcat#>.\n\
@prefix dct: <http://purl.org/dc/terms/>.\n\
@prefix fdp: <http://'+environment.apiurl+'>.\n\nfdp:new \n\
@prefix fdp: <'+this.appConfig.fdpurl+'/>.\n\nfdp:new \n\
a dcat:Catalog, dcat:Resource;\n\
dct:description "'+ this.Form.value.repodescription + '";\n\
dct:hasVersion "'+ this.Form.value.repoversion + '";\n\
dct:isPartOf <http://'+environment.apiurl+'>;\n\
dct:isPartOf <'+this.appConfig.fdpurl+'>;\n\
dcat:keyword "'+this.Form.value.repotype+'";\n\
dct:title "'+ this.Form.value.reponame + '".\n'
......
......@@ -47,7 +47,7 @@ export class SettingfdpComponent implements OnInit {
"smartapiurl": "' + this.appConfig.smartapiurl + '" \n\
}'
console.log(data);
return this.http.post("http://"+environment.apiurl+"/api/setting", data,{responseType: 'text'}).subscribe( (r)=>{console.log(r)}) ;
return this.http.post("http://"+environment.apiurl+"/setting", data,{responseType: 'text'}).subscribe( (r)=>{console.log(r)}) ;
};
......
......@@ -2,6 +2,6 @@ import { ApiService } from 'src/app/api.service';
export const environment = {
production: true,
apiurl: 'sandbox9.cines.fr',
token: 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI5MjU1NjY3Yi04MmY5LTQ1Y2MtOWE4Mi1jOTE0ZThmMjI4OWYiLCJpYXQiOjE2MDE4ODcwNTQsImV4cCI6MTYwMzA5NjY1NH0.26TS5m7t3sInRgdJ6kH4ocU2sB3j9I-3uHAHU4Wt4gA'
apiurl: '51.178.69.56',
token: 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlMmJjMDBkZi1iYzE5LTRmMjMtYWQyMS00ODE1M2Q1NjY3ZTYiLCJpYXQiOjE2MDQ0ODAzNzAsImV4cCI6MTYwNTY4OTk3MH0.bYYq0M62xpfd57cc1pMp6MyEkb7V0gcW3S9YGSkRh1Y'
};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment