revert storage, remove tracing.service and bring back common

This commit is contained in:
Willy Kloucek
2021-12-17 16:30:57 +01:00
parent a77c8ac8dd
commit 7abcf96ea8
114 changed files with 824 additions and 882 deletions

View File

@@ -26,9 +26,9 @@ func AccountsCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Accounts.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Accounts.Commons = cfg.Commons
}
return nil
},

View File

@@ -18,9 +18,9 @@ func GLAuthCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.GLAuth.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.GLAuth.Commons = cfg.Commons
}
return nil
},

View File

@@ -18,9 +18,9 @@ func GraphCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Graph.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Graph.Commons = cfg.Commons
}
return nil
},

View File

@@ -18,9 +18,9 @@ func GraphExplorerCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Graph.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Graph.Commons = cfg.Commons
}
return nil
},

View File

@@ -21,9 +21,9 @@ func IDPCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.IDP.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.IDP.Commons = cfg.Commons
}
return nil
},

View File

@@ -18,9 +18,9 @@ func OCSCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.OCS.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.OCS.Commons = cfg.Commons
}
return nil
},

View File

@@ -21,9 +21,9 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Proxy.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Proxy.Commons = cfg.Commons
}
return nil
},

View File

@@ -21,9 +21,9 @@ func SettingsCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Settings.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Settings.Commons = cfg.Commons
}
return nil
},

View File

@@ -21,9 +21,9 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Thumbnails.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Thumbnails.Commons = cfg.Commons
}
return nil
},

View File

@@ -2,6 +2,7 @@ package command
import (
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/urfave/cli/v2"
)
@@ -10,16 +11,16 @@ func ParseStorageCommon(ctx *cli.Context, cfg *config.Config) error {
return err
}
//if cfg.Storage.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
// cfg.Storage.Log = &shared.Log{
// Level: cfg.Commons.Log.Level,
// Pretty: cfg.Commons.Log.Pretty,
// Color: cfg.Commons.Log.Color,
// File: cfg.Commons.Log.File,
// }
//} else if cfg.Storage.Log == nil && cfg.Commons == nil {
// cfg.Storage.Log = &shared.Log{}
//}
if cfg.Storage.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
cfg.Storage.Log = &shared.Log{
Level: cfg.Commons.Log.Level,
Pretty: cfg.Commons.Log.Pretty,
Color: cfg.Commons.Log.Color,
File: cfg.Commons.Log.File,
}
} else if cfg.Storage.Log == nil && cfg.Commons == nil {
cfg.Storage.Log = &shared.Log{}
}
return nil
}

View File

@@ -18,9 +18,9 @@ func WebCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.Web.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.Web.Commons = cfg.Commons
}
return nil
},

View File

@@ -22,9 +22,9 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
return err
}
//if cfg.Commons != nil {
// cfg.WebDAV.Commons = cfg.Commons
//}
if cfg.Commons != nil {
cfg.WebDAV.Commons = cfg.Commons
}
return nil
},