Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Merge requests
!351
CE-2076
: Convert useHost to common
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
CE-2076
: Convert useHost to common
CE-2076-convert-useHost
into
develop
Overview
5
Commits
3
Pipelines
4
Changes
1
Merged
Alexander Madsen
requested to merge
CE-2076-convert-useHost
into
develop
1 year ago
Overview
5
Commits
3
Pipelines
4
Changes
1
Expand
Ticket:
CE-2076
Convert useHost hook to common and remove from SwaggerApi file
1
0
Merge request reports
Viewing commit
5b921593
Prev
Next
Show latest version
1 file
+
0
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
5b921593
Remove useHost from SwaggerApi file
· 5b921593
Alexander Madsen
authored
1 year ago
src/api/SwaggerApi.js
+
0
−
9
Options
@@ -356,15 +356,6 @@ export function unpackHost(host) {
return
{
...
host
};
}
export
function
useHost
(
id
,
onError
)
{
const
api
=
useContext
(
apiContext
);
const
method
=
useCallAndUnpack
(
api
.
apis
.
Hosts
.
findHostById
,
unpackHost
);
const
boundMethod
=
useCallback
(
method
.
bind
(
null
,
{
host_csentry_id
:
id
}),
[
id
]);
return
useAsync
({
fcn
:
boundMethod
,
onError
:
onError
});
}
export
function
unpackCSEntryHost
(
host
)
{
return
{
...
host
};
}
Loading