added mem_request
This commit is contained in:
@@ -209,6 +209,7 @@ func applyEnvOverrides(cfg *Config) {
|
|||||||
envStr("FELHOM_WEB_LISTEN", &cfg.Web.Listen)
|
envStr("FELHOM_WEB_LISTEN", &cfg.Web.Listen)
|
||||||
envStr("FELHOM_WEB_PASSWORD_HASH", &cfg.Web.PasswordHash)
|
envStr("FELHOM_WEB_PASSWORD_HASH", &cfg.Web.PasswordHash)
|
||||||
envStr("FELHOM_PATHS_STACKS_DIR", &cfg.Paths.StacksDir)
|
envStr("FELHOM_PATHS_STACKS_DIR", &cfg.Paths.StacksDir)
|
||||||
|
envStr("FELHOM_PATHS_HDD_PATH", &cfg.Paths.HDDPath)
|
||||||
envStr("FELHOM_LOGGING_LEVEL", &cfg.Logging.Level)
|
envStr("FELHOM_LOGGING_LEVEL", &cfg.Logging.Level)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ type Metadata struct {
|
|||||||
|
|
||||||
// ResourceHints describe what the app needs.
|
// ResourceHints describe what the app needs.
|
||||||
type ResourceHints struct {
|
type ResourceHints struct {
|
||||||
RAM string `yaml:"ram" json:"ram"`
|
MemRequest string `yaml:"mem_request" json:"mem_request"`
|
||||||
MemLimit string `yaml:"mem_limit" json:"mem_limit"`
|
MemLimit string `yaml:"mem_limit" json:"mem_limit"`
|
||||||
PiCompatible bool `yaml:"pi_compatible" json:"pi_compatible"`
|
PiCompatible bool `yaml:"pi_compatible" json:"pi_compatible"`
|
||||||
NeedsHDD bool `yaml:"needs_hdd" json:"needs_hdd"`
|
NeedsHDD bool `yaml:"needs_hdd" json:"needs_hdd"`
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ const stacksTmpl = `
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<div class="stack-meta-badges">
|
<div class="stack-meta-badges">
|
||||||
{{if .Meta.Resources.RAM}}<span class="meta-badge">{{.Meta.Resources.RAM}}</span>{{end}}
|
{{if .Meta.Resources.MemRequest}}<span class="meta-badge">{{.Meta.Resources.MemRequest}}</span>{{end}}
|
||||||
{{if .Meta.Resources.PiCompatible}}<span class="meta-badge meta-badge-ok">Pi kompatibilis</span>{{end}}
|
{{if .Meta.Resources.PiCompatible}}<span class="meta-badge meta-badge-ok">Pi kompatibilis</span>{{end}}
|
||||||
{{if .Meta.Resources.NeedsHDD}}<span class="meta-badge">HDD szükséges</span>{{end}}
|
{{if .Meta.Resources.NeedsHDD}}<span class="meta-badge">HDD szükséges</span>{{end}}
|
||||||
</div>
|
</div>
|
||||||
@@ -263,7 +263,7 @@ const deployTmpl = `
|
|||||||
<h3>{{.Meta.DisplayName}}</h3>
|
<h3>{{.Meta.DisplayName}}</h3>
|
||||||
{{if .Meta.Description}}<p>{{.Meta.Description}}</p>{{end}}
|
{{if .Meta.Description}}<p>{{.Meta.Description}}</p>{{end}}
|
||||||
<div class="stack-meta-badges">
|
<div class="stack-meta-badges">
|
||||||
{{if .Meta.Resources.RAM}}<span class="meta-badge">{{.Meta.Resources.RAM}}</span>{{end}}
|
{{if .Meta.Resources.MemRequest}}<span class="meta-badge">{{.Meta.Resources.MemRequest}}</span>{{end}}
|
||||||
{{if .Meta.Resources.PiCompatible}}<span class="meta-badge meta-badge-ok">Pi kompatibilis</span>{{end}}
|
{{if .Meta.Resources.PiCompatible}}<span class="meta-badge meta-badge-ok">Pi kompatibilis</span>{{end}}
|
||||||
{{if .Meta.Resources.NeedsHDD}}<span class="meta-badge">HDD szükséges</span>{{end}}
|
{{if .Meta.Resources.NeedsHDD}}<span class="meta-badge">HDD szükséges</span>{{end}}
|
||||||
</div>
|
</div>
|
||||||
@@ -692,7 +692,7 @@ h3 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: .4rem;
|
margin-bottom: .5rem;
|
||||||
}
|
}
|
||||||
.system-info-label {
|
.system-info-label {
|
||||||
font-size: .8rem;
|
font-size: .8rem;
|
||||||
@@ -708,19 +708,50 @@ h3 {
|
|||||||
}
|
}
|
||||||
.system-bar {
|
.system-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 6px;
|
height: 10px;
|
||||||
background: var(--bg-primary);
|
border-radius: 5px;
|
||||||
border-radius: 3px;
|
position: relative;
|
||||||
overflow: hidden;
|
background: linear-gradient(to right,
|
||||||
|
rgba(35, 134, 54, 0.10) 0%, rgba(35, 134, 54, 0.10) 70%,
|
||||||
|
rgba(210, 153, 34, 0.18) 70%, rgba(210, 153, 34, 0.18) 85%,
|
||||||
|
rgba(218, 54, 51, 0.18) 85%, rgba(218, 54, 51, 0.18) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
.system-bar::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 70%;
|
||||||
|
top: -1px;
|
||||||
|
bottom: -1px;
|
||||||
|
width: 2px;
|
||||||
|
background: var(--yellow);
|
||||||
|
border-radius: 1px;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.system-bar::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 85%;
|
||||||
|
top: -1px;
|
||||||
|
bottom: -1px;
|
||||||
|
width: 2px;
|
||||||
|
background: var(--red);
|
||||||
|
border-radius: 1px;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.system-bar-fill {
|
.system-bar-fill {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 3px;
|
border-radius: 5px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
transition: width 0.3s ease;
|
transition: width 0.3s ease;
|
||||||
|
min-width: 3px;
|
||||||
}
|
}
|
||||||
.system-bar-green { background: var(--green); }
|
.system-bar-green { background: var(--green); box-shadow: 0 0 6px rgba(35, 134, 54, 0.4); }
|
||||||
.system-bar-yellow { background: var(--yellow); }
|
.system-bar-yellow { background: var(--yellow); box-shadow: 0 0 6px rgba(210, 153, 34, 0.4); }
|
||||||
.system-bar-red { background: var(--red); }
|
.system-bar-red { background: var(--red); box-shadow: 0 0 6px rgba(218, 54, 51, 0.4); }
|
||||||
|
|
||||||
/* Stack list (dashboard) */
|
/* Stack list (dashboard) */
|
||||||
.stack-list {
|
.stack-list {
|
||||||
|
|||||||
Reference in New Issue
Block a user