Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFDS-register-front
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dad
FFDS-register-front
Commits
912ca956
Commit
912ca956
authored
4 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
else
parent
22b1004f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/datasets/datasets.component.ts
+8
-3
8 additions, 3 deletions
src/app/datasets/datasets.component.ts
src/app/repository/repository.component.ts
+7
-2
7 additions, 2 deletions
src/app/repository/repository.component.ts
with
15 additions
and
5 deletions
src/app/datasets/datasets.component.ts
+
8
−
3
View file @
912ca956
...
...
@@ -30,8 +30,13 @@ export class DatasetsComponent implements OnInit {
var
myHeaders
=
new
Headers
();
myHeaders
.
append
(
"
Content-Type
"
,
"
Application/json
"
);
var
myInit
=
{
method
:
'
GET
'
,
headers
:
myHeaders
};
//appler smart havester pour récuprer l'api à lancer
var
myRequest
=
new
Request
(
'
https://data.inra.fr/api/search?q=*&type=dataset&start=60000&show_entity_ids=true
'
,
myInit
);
// http://smart-harvester.eu/openapi/inrae/datasetlist
var
myRequest
=
new
Request
(
'
https://data.inrae.fr/api/search?q=*&per_page=10&type=dataset&start=0&show_entity_ids=true&show_my_data=true
'
,
myInit
);
fetch
(
myRequest
,
myInit
)
.
then
(
response
=>
{
...
...
@@ -40,7 +45,7 @@ export class DatasetsComponent implements OnInit {
this
.
dataresult
=
JSON
.
stringify
(
data
[
'
data
'
][
'
total_count
'
]);
this
.
itemsdatasets
=
data
[
'
data
'
][
'
items
'
];
for
(
var
i
=
0
;
i
<
this
.
itemsdatasets
.
length
;
i
++
)
{
this
.
createdataset
(
data
[
'
data
'
][
'
items
'
][
i
]);
this
.
createdataset
(
data
[
'
data
'
][
'
items
'
][
i
]);
}
});
});
...
...
@@ -69,7 +74,7 @@ s:new\n\
a dcat:Dataset, dcat:Resource;
\n\
dct:description
'
+
description
+
'
;
\n\
dct:hasVersion "1.0";
\n\
dct:isPartOf c:
186e50ee-339d-4bae-818f-969977f6e57a
;
\n\
dct:isPartOf c:
d01757b2-178f-44f0-a4b0-c13d15fd307d
;
\n\
dct:language language:en;
\n\
dct:license <http://rdflicense.appspot.com/rdflicense/cc-by-nc-nd3.0>;
\n\
dct:title
'
+
name
+
'
;
\n\
...
...
This diff is collapsed.
Click to expand it.
src/app/repository/repository.component.ts
+
7
−
2
View file @
912ca956
...
...
@@ -18,6 +18,7 @@ export class RepositoryComponent implements OnInit {
public
fileName
:
string
;
public
importFile
:
File
;
public
resultat
:
any
;
Form
=
new
FormGroup
({
repotype
:
new
FormControl
(),
...
...
@@ -73,6 +74,7 @@ repository:\n\
let
map
=
new
Map
();
let
fileReader
=
new
FileReader
();
fileReader
.
onload
=
(
event
)
=>
{
text
=
fileReader
.
result
as
string
;
...
...
@@ -120,10 +122,13 @@ repository:\n\
})
};
return
this
.
http
this
.
resultat
=
this
.
http
.
post
(
this
.
appConfig
.
fdpurl
+
"
/catalog
"
,
data
,
httpOptions
)
.
subscribe
(
(
r
)
=>
{
console
.
log
(
'
got r
'
,
r
)})
;
.
subscribe
(
(
r
)
=>
{
console
.
log
(
'
reponse:
'
,
r
)})
;
console
.
log
(
"
resultat:
"
+
JSON
.
stringify
(
this
.
resultat
));
return
JSON
.
stringify
(
this
.
resultat
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment