mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 00:03:07 +00:00
Merge branch 'develop' of ssh://code.yavook.de:22022/Zaphlebeod/advent22 into develop
This commit is contained in:
commit
337d8d34ff
4 changed files with 20 additions and 0 deletions
|
@ -41,6 +41,14 @@ class RedisSettings(BaseModel):
|
|||
db: int = 0
|
||||
protocol: int = 3
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""
|
||||
Combined DAV URL.
|
||||
"""
|
||||
|
||||
return f"redis_v{self.protocol}://{self.host}:{self.port}/db_{self.db}"
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""
|
||||
|
|
|
@ -48,6 +48,7 @@ class ConfigModel(BaseModel):
|
|||
puzzle: __Puzzle
|
||||
calendar: __Calendar
|
||||
image: Image
|
||||
redis_url: str
|
||||
webdav: __WebDAV
|
||||
|
||||
|
||||
|
@ -82,6 +83,7 @@ async def get_config_model(
|
|||
"background": cal_cfg.background,
|
||||
},
|
||||
"image": cfg.image,
|
||||
"redis_url": SETTINGS.redis.url,
|
||||
"webdav": {
|
||||
"url": SETTINGS.webdav.url,
|
||||
"cache_ttl": SETTINGS.webdav.cache_ttl,
|
||||
|
|
|
@ -132,6 +132,14 @@
|
|||
|
||||
<dt>Konfigurationsdatei</dt>
|
||||
<dd>{{ config_model.webdav.config_file }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h3>Sonstige</h3>
|
||||
<dl>
|
||||
<dt>Redis</dt>
|
||||
<dd>{{ config_model.redis_url }}</dd>
|
||||
|
||||
<dt>UI-Admin</dt>
|
||||
<dd class="is-family-monospace">
|
||||
|
@ -191,6 +199,7 @@ export default class extends Vue {
|
|||
border: 0,
|
||||
fonts: [{ file: "consetetur", size: 0 }],
|
||||
},
|
||||
redis_url: "sadipscing elitr",
|
||||
webdav: {
|
||||
url: "sadipscing elitr",
|
||||
cache_ttl: 0,
|
||||
|
|
|
@ -21,6 +21,7 @@ export interface ConfigModel {
|
|||
border: number;
|
||||
fonts: { file: string; size: number }[];
|
||||
};
|
||||
redis_url: string;
|
||||
webdav: {
|
||||
url: string;
|
||||
cache_ttl: number;
|
||||
|
|
Loading…
Reference in a new issue