feat(dashboard): Embedded Linux / Yocto is marked as a preview
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m43s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m43s
The type stays selectable, but a scan of it covers only secrets, malware and SAST over patches and files; there is no recipe or image SBOM yet. The onboarding card, the target header and the type select in the target settings say so with a "Vorschau" / "Preview" badge and that one line, and so do the getting-started and repositories guides. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
1 parent
11e3b98c99
commit
860b94ec6c
5 files changed
+64
-4
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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)} }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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**.
|
||||
|
||||
@@ -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**.
|
||||
|
||||
Reference in new issue
Block a user