Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dad
FFDS-register-front
Commits
1e98c84a
Commit
1e98c84a
authored
Nov 04, 2020
by
cazenave
Browse files
avec k8s sur ovh yann
parent
c5c0e2e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/app/AppConfiguration.ts
View file @
1e98c84a
...
...
@@ -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
));
});
};
...
...
src/app/datasets/datasets.component.ts
View file @
1e98c84a
...
...
@@ -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\
...
...
src/app/repository/repository.component.ts
View file @
1e98c84a
...
...
@@ -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
.
api
url
+
'
>.
\n\n
fdp:new
\n\
@prefix fdp: <
'
+
this
.
appConfig
.
fdp
url
+
'
/
>.
\n\n
fdp: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
.
api
url
+
'
>;
\n\
dct:isPartOf <
'
+
this
.
appConfig
.
fdp
url
+
'
>;
\n\
dcat:keyword "
'
+
this
.
Form
.
value
.
repotype
+
'
";
\n\
dct:title "
'
+
this
.
Form
.
value
.
reponame
+
'
".
\n
'
...
...
src/app/settingfdp/settingfdp.component.ts
View file @
1e98c84a
...
...
@@ -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
)})
;
};
...
...
src/environments/environment.prod.ts
View file @
1e98c84a
...
...
@@ -2,6 +2,6 @@ import { ApiService } from 'src/app/api.service';
export
const
environment
=
{
production
:
true
,
apiurl
:
'
sandbox9.cines.fr
'
,
token
:
'
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOi
I5MjU1NjY3Yi04MmY5LTQ1Y2MtOWE4Mi1jOTE0ZThmMjI4OW
YiLCJpYXQiOjE2MD
E4ODcwNTQ
sImV4cCI6MTYw
MzA5NjY1NH0.26TS5m7t3sInRgdJ6kH4ocU2sB3j9I-3uHAHU4Wt4gA
'
apiurl
:
'
51.178.69.56
'
,
token
:
'
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOi
JlMmJjMDBkZi1iYzE5LTRmMjMtYWQyMS00ODE1M2Q1NjY3ZT
YiLCJpYXQiOjE2MD
Q0ODAzNzA
sImV4cCI6MTYw
NTY4OTk3MH0.bYYq0M62xpfd57cc1pMp6MyEkb7V0gcW3S9YGSkRh1Y
'
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment