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
48c841b4
Commit
48c841b4
authored
4 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
list datastets ok
parent
70ac9382
No related branches found
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.html
+5
-0
5 additions, 0 deletions
src/app/datasets/datasets.component.html
src/app/datasets/datasets.component.ts
+4
-4
4 additions, 4 deletions
src/app/datasets/datasets.component.ts
with
9 additions
and
4 deletions
src/app/datasets/datasets.component.html
+
5
−
0
View file @
48c841b4
...
...
@@ -6,5 +6,10 @@
<button
type=
"submit"
(click)=
"listdatasets()"
class=
"btn btn-primary"
>
List datasets
</button>
</div>
<p><strong>
{{dataresult}}
</strong></p>
<p><strong>
Datasets examples:
</strong></p>
<ul>
<li
*ngFor=
"let item of itemsdatasets; let i = index"
><a
href=
{{item.url}}
target=
"_blank"
>
{{item.entity_id}} {{item.name}}
</a>
<br>
{{item.description}}
</li>
</ul>
</form>
This diff is collapsed.
Click to expand it.
src/app/datasets/datasets.component.ts
+
4
−
4
View file @
48c841b4
...
...
@@ -11,8 +11,8 @@ import { Observable } from 'rxjs';
styleUrls
:
[
'
./datasets.component.scss
'
]
})
export
class
DatasetsComponent
implements
OnInit
{
result
:
Promise
<
any
>
;
dataresult
:
any
;
itemsdatasets
:
any
;
constructor
(
private
appConfig
:
AppConfiguration
,
...
...
@@ -33,15 +33,15 @@ export class DatasetsComponent implements OnInit {
var
myInit
=
{
method
:
'
GET
'
,
headers
:
myHeaders
};
var
myRequest
=
new
Request
(
'
https://data.inra.fr/api/search?q=*&type=dataset
'
,
myInit
);
var
myRequest
=
new
Request
(
'
https://data.inra.fr/api/search?q=*&type=dataset
&start=60000&show_entity_ids=true
'
,
myInit
);
fetch
(
myRequest
,
myInit
)
.
then
(
response
=>
{
response
.
json
()
.
then
(
data
=>
{
this
.
dataresult
=
'
Total des datasets trouvés:
'
+
JSON
.
stringify
(
data
[
'
data
'
][
'
total_count
'
]);
;
//
console.log(this.
dataresult
);
this
.
itemsdatasets
=
data
[
'
data
'
][
'
items
'
]
;
console
.
log
(
this
.
itemsdatasets
);
});
});
...
...
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