Setup and migration UI refactor (#1190)

* Make config instance-based
* Remove config dependency in paths
* Refactor config init
* Allow startup without database
* Get system status at UI initialise
* Add setup wizard
* Cache and Metadata optional. Database mandatory
* Handle metadata not set during full import/export
* Add links
* Remove config check middleware
* Stash not mandatory
* Panic on missing mandatory config fields
* Redirect setup to main page if setup not required
* Add migration UI
* Remove unused stuff
* Move UI initialisation into App
* Don't create metadata paths on RefreshConfig
* Add folder selector for generated in setup
* Env variable to set and create config file.
Make docker images use a fixed config file.
* Set config file during setup
This commit is contained in:
WithoutPants
2021-04-12 09:31:33 +10:00
committed by GitHub
parent c38660d209
commit f6ffda7504
52 changed files with 1467 additions and 682 deletions

View File

@@ -758,6 +758,24 @@ func TestLoadInvalidXPath(t *testing.T) {
config.process(q, nil)
}
type mockGlobalConfig struct{}
func (mockGlobalConfig) GetScraperUserAgent() string {
return ""
}
func (mockGlobalConfig) GetScrapersPath() string {
return ""
}
func (mockGlobalConfig) GetScraperCDPPath() string {
return ""
}
func (mockGlobalConfig) GetScraperCertCheck() bool {
return false
}
func TestSubScrape(t *testing.T) {
retHTML := `
<div>
@@ -805,7 +823,7 @@ xPathScrapers:
return
}
globalConfig := GlobalConfig{}
globalConfig := mockGlobalConfig{}
performer, err := c.ScrapePerformerURL(ts.URL, nil, globalConfig)