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
55030dce
Commit
55030dce
authored
4 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
list datastets ok
parent
48c841b4
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.html
+3
-4
3 additions, 4 deletions
src/app/datasets/datasets.component.html
src/app/datasets/datasets.component.ts
+8
-16
8 additions, 16 deletions
src/app/datasets/datasets.component.ts
with
11 additions
and
20 deletions
src/app/datasets/datasets.component.html
+
3
−
4
View file @
55030dce
<h3>
Here list of datasets directly from the openapi GET
</h3>
<h3>
where you can choose what to publish in FDP
</h3>
<h3>
Here list of datasets directly from the repository api
</h3>
<form>
<div>
<button
type=
"submit"
(click)=
"listdatasets()"
class=
"btn btn-primary"
>
List datasets
</button>
</div>
<p><strong>
{{dataresult}}
</strong></p>
<p><strong>
Datasets examples
:
</strong></p>
<p><strong>
Total datasets found:
{{dataresult}}
</strong></p>
<p><strong>
Examples of datasets found
:
</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>
...
...
This diff is collapsed.
Click to expand it.
src/app/datasets/datasets.component.ts
+
8
−
16
View file @
55030dce
...
...
@@ -2,14 +2,15 @@ import { Component, OnInit } from '@angular/core';
import
{
HttpClient
,
HttpHeaders
}
from
'
@angular/common/http
'
;
import
{
AppConfiguration
}
from
'
../AppConfiguration
'
;
import
{
FileSaverService
}
from
'
ngx-filesaver
'
;
import
{
resolve
}
from
'
url
'
;
import
{
Observable
}
from
'
rxjs
'
;
@
Component
({
selector
:
'
app-datasets
'
,
templateUrl
:
'
./datasets.component.html
'
,
styleUrls
:
[
'
./datasets.component.scss
'
]
})
export
class
DatasetsComponent
implements
OnInit
{
dataresult
:
any
;
itemsdatasets
:
any
;
...
...
@@ -24,10 +25,7 @@ export class DatasetsComponent implements OnInit {
}
listdatasets
()
{
var
myHeaders
=
new
Headers
();
myHeaders
.
append
(
"
Content-Type
"
,
"
Application/json
"
);
...
...
@@ -39,18 +37,12 @@ export class DatasetsComponent implements OnInit {
.
then
(
response
=>
{
response
.
json
()
.
then
(
data
=>
{
this
.
dataresult
=
'
Total des datasets trouvés:
'
+
JSON
.
stringify
(
data
[
'
data
'
][
'
total_count
'
]);
this
.
itemsdatasets
=
data
[
'
data
'
][
'
items
'
];
console
.
log
(
this
.
itemsdatasets
);
});
});
this
.
dataresult
=
JSON
.
stringify
(
data
[
'
data
'
][
'
total_count
'
]);
this
.
itemsdatasets
=
data
[
'
data
'
][
'
items
'
];
});
});
return
null
;
}
}
...
...
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