fixed folder issue
This commit is contained in:
@@ -483,6 +483,8 @@ func (r *syncJob) client(kind string) (dynamic.ResourceInterface, error) {
|
||||
switch kind {
|
||||
case dashboard.GROUP, dashboard.DASHBOARD_RESOURCE, "Dashboard":
|
||||
return r.dashboards, nil
|
||||
case folders.GROUP, folders.RESOURCE, "Folder":
|
||||
return r.folders.Client(), nil
|
||||
}
|
||||
return nil, fmt.Errorf("unsupported resource: %s", kind)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ func NewFolderManager(repo repository.Repository, client dynamic.ResourceInterfa
|
||||
}
|
||||
}
|
||||
|
||||
func (fm *FolderManager) Client() dynamic.ResourceInterface {
|
||||
return fm.client
|
||||
}
|
||||
|
||||
// EnsureFoldersExist creates the folder structure in the cluster.
|
||||
func (fm *FolderManager) EnsureFolderPathExist(ctx context.Context, filePath string) (parent string, err error) {
|
||||
if filePath == "" || filePath == "/" || filePath == "." || filePath == "./" {
|
||||
|
||||
Reference in New Issue
Block a user