mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(edge/updates): sync changes from EE [EE-4288] (#7726)
This commit is contained in:
parent
4fee359247
commit
82e9e2a895
80 changed files with 1099 additions and 1892 deletions
|
@ -30,32 +30,3 @@ func hasEndpointPredicate(endpointService dataservices.EndpointService, endpoint
|
|||
|
||||
return false, nil
|
||||
}
|
||||
|
||||
type endpointRelationsConfig struct {
|
||||
endpoints []portainer.Endpoint
|
||||
endpointGroups []portainer.EndpointGroup
|
||||
edgeGroups []portainer.EdgeGroup
|
||||
}
|
||||
|
||||
func fetchEndpointRelationsConfig(dataStore dataservices.DataStore) (*endpointRelationsConfig, error) {
|
||||
endpoints, err := dataStore.Endpoint().Endpoints()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to retrieve environments from database: %w", err)
|
||||
}
|
||||
|
||||
endpointGroups, err := dataStore.EndpointGroup().EndpointGroups()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to retrieve environment groups from database: %w", err)
|
||||
}
|
||||
|
||||
edgeGroups, err := dataStore.EdgeGroup().EdgeGroups()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to retrieve edge groups from database: %w", err)
|
||||
}
|
||||
|
||||
return &endpointRelationsConfig{
|
||||
endpoints: endpoints,
|
||||
endpointGroups: endpointGroups,
|
||||
edgeGroups: edgeGroups,
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue