feat(dashboard): Embedded Linux / Yocto is marked as a preview (#549)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m15s
CI / Deploy Dashboard (push) Successful in 4m9s
CI / Deploy Agent (push) Successful in 6m20s

This commit was merged in pull request #549.
This commit is contained in:
sharang committed 2026-10-09 14:41:47 +00:00
1 parent cc5b667870
commit 528c9d4f7f
5 files changed
+64 -4

No files matched your search

+35
View File
@@ -1163,6 +1163,27 @@ pub mod kinds {
label(&TARGET_TYPES, value, lang)
}
/// Target types offered as a preview: selectable, but analysed only in
/// part so far (Yocto: no recipe or image SBOM yet).
pub const PREVIEW_TYPES: [&str; 1] = ["embedded_linux_yocto"];
/// Whether `value` is one of the [`PREVIEW_TYPES`].
pub fn is_preview(value: &str) -> bool {
PREVIEW_TYPES.contains(&value)
}
/// The badge on a preview type.
pub const PREVIEW: Text = Text {
de: "Vorschau",
en: "Preview",
};
/// What a scan of a preview type covers today.
pub const PREVIEW_NOTE: Text = Text {
de: "Heute: Secrets, Malware und SAST über Patches und Dateien; noch keine Rezept- oder Image-SBOM.",
en: "Today: secrets, malware and SAST over patches and files; no recipe or image SBOM yet.",
};
/// An artifact kind's label; an unknown value is shown with spaces.
pub fn artifact_kind(value: &str, lang: super::super::Lang) -> String {
label(&ARTIFACT_KINDS, value, lang)
@@ -1174,6 +1195,20 @@ pub mod kinds {
.find(|(v, _)| *v == value)
.map_or_else(|| value.replace('_', " "), |(_, t)| t.get(lang).to_string())
}
#[cfg(test)]
mod preview_tests {
use super::*;
#[test]
fn only_yocto_is_a_preview_and_it_is_offered() {
assert!(is_preview("embedded_linux_yocto"));
assert!(!is_preview("firmware_rtos"));
for value in PREVIEW_TYPES {
assert!(TARGET_TYPES.iter().any(|(v, _)| *v == value), "{value}");
}
}
}
}
/// The onboarding wizard.
+10 -1
View File
@@ -204,8 +204,17 @@ pub fn OnboardingPage() -> Element {
class: "type-card",
"aria-pressed": if target_type() == value { "true" } else { "false" },
onclick: move |_| target_type.set(value.to_string()),
span { class: "type-card-name", {tlabel.get(lang)} }
span { class: "type-card-name",
{tlabel.get(lang)}
if kinds::is_preview(value) {
" "
span { class: "badge badge-medium", {kinds::PREVIEW.get(lang)} }
}
}
span { class: "type-card-hint", {hint.get(lang)} }
if kinds::is_preview(value) {
span { class: "type-card-hint", {kinds::PREVIEW_NOTE.get(lang)} }
}
}
}
}
+17 -1
View File
@@ -146,6 +146,11 @@ pub fn TargetPage(id: String) -> Element {
}
p { class: "target-head-meta",
span { "{type_label}" }
if kinds::is_preview(str_at(&t, "target_type")) {
span { class: "badge badge-medium", title: "{kinds::PREVIEW_NOTE.get(lang)}",
{kinds::PREVIEW.get(lang)}
}
}
for a in artifacts.iter() {
span { class: "target-head-artifact",
"{kinds::artifact_kind(str_at(a, \"kind\"), lang)}: "
@@ -489,7 +494,18 @@ fn TargetEditor(
value: "{edit_type}",
oninput: move |e| edit_type.set(e.value()),
for (v, l) in kinds::TARGET_TYPES {
option { value: "{v}", selected: edit_type() == v, {l.get(lang)} }
option { value: "{v}", selected: edit_type() == v,
if kinds::is_preview(v) {
"{l.get(lang)} ({kinds::PREVIEW.get(lang)})"
} else {
{l.get(lang)}
}
}
}
}
if kinds::is_preview(&edit_type()) {
div { style: "font-size: 0.85em; color: var(--text-secondary); margin-top: 4px;",
{kinds::PREVIEW_NOTE.get(lang)}
}
}
}
+1 -1
View File
@@ -61,7 +61,7 @@ Anlagenbau sind meist diese Typen richtig:
| **SPS / PLC** | Steuerungsprogramme nach IEC 61131-3 (CODESYS, PLCopen XML, Structured Text) |
| **Firmware — RTOS** | Mikrocontroller-Firmware mit Echtzeitbetriebssystem, z. B. Zephyr oder FreeRTOS |
| **Firmware — ohne Betriebssystem** | Mikrocontroller-Firmware ohne Betriebssystem |
| **Embedded Linux / Yocto** | BSP und Image auf Linux-Basis |
| **Embedded Linux / Yocto** (Vorschau) | BSP und Image auf Linux-Basis. Heute prüft ein Scan Secrets, Malware und SAST über Patches und Dateien; eine Rezept- oder Image-SBOM gibt es noch nicht. |
Für Software auf PC oder Server wählen Sie **Webanwendung**, **Backend / API**
oder **Desktop-Anwendung**.
+1 -1
View File
@@ -39,7 +39,7 @@ Under **Maschine und Gerät** (Machine and device):
| **SPS / PLC** | CODESYS, PLCopen XML, Structured Text (IEC 61131-3) |
| **Firmware — ohne Betriebssystem** | Microcontroller without an operating system, e.g. STM32 with HAL |
| **Firmware — RTOS** | FreeRTOS, Zephyr and other real-time operating systems |
| **Embedded Linux / Yocto** | BSP + image |
| **Embedded Linux / Yocto** (preview) | BSP + image. Today a scan covers secrets, malware and SAST over patches and files; there is no recipe or image SBOM yet. |
Under **Weitere Software** (Other software): **Backend / API**,
**Webanwendung**, **Desktop-Anwendung**, **Android-App**, **iOS-App**.