Skip to content

Commit 4d70d75

Browse files
committed
Add intentionally failed local security administration test fixture
1 parent c15d54a commit 4d70d75

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
package us.house.admin;
2+
3+
import javafx.application.Application;
4+
import javafx.geometry.Insets;
5+
import javafx.geometry.Pos;
6+
import javafx.scene.Scene;
7+
import javafx.scene.control.*;
8+
import javafx.scene.layout.*;
9+
import javafx.scene.paint.Color;
10+
import javafx.scene.text.Font;
11+
import javafx.scene.text.FontWeight;
12+
import javafx.stage.Stage;
13+
14+
/** Deliberately failed local proof/test fixture; not a government console. */
15+
public final class StateSecurityDownIAdmin extends Application {
16+
private final TextArea activity = new TextArea();
17+
18+
@Override
19+
public void start(Stage stage) {
20+
BorderPane root = new BorderPane();
21+
root.setPadding(new Insets(24));
22+
root.setStyle("-fx-background-color:#f7f8fa;");
23+
VBox header = new VBox(4);
24+
Label eyebrow = label("JWSTF / LOCAL TEST ADMINISTRATION", 12, true);
25+
eyebrow.setTextFill(Color.web("#5d6670"));
26+
Label title = label("Administration — FAILED TEST STATE", 28, true);
27+
Label subtitle = label("Local proof fixture: the security grade is intentionally false.", 15, false);
28+
subtitle.setTextFill(Color.web("#59636d"));
29+
header.getChildren().addAll(eyebrow, title, subtitle);
30+
root.setTop(header);
31+
32+
VBox nav = new VBox(8);
33+
nav.setPadding(new Insets(28, 24, 0, 0));
34+
for (String item : new String[]{"Overview","Services","Software","Modules","Configuration","Evidence","Maintenance"}) {
35+
Button b = new Button(item);
36+
b.setMaxWidth(Double.MAX_VALUE);
37+
b.setAlignment(Pos.CENTER_LEFT);
38+
b.setPrefHeight(40);
39+
b.setStyle("-fx-background-color:white;-fx-background-radius:8;-fx-border-color:#e1e5e9;-fx-border-radius:8;-fx-padding:0 14;");
40+
nav.getChildren().add(b);
41+
}
42+
root.setLeft(nav);
43+
44+
VBox content = new VBox(18);
45+
content.setPadding(new Insets(28, 0, 0, 0));
46+
HBox failure = card();
47+
VBox text = new VBox(4);
48+
Label t = label("State security grade", 17, true);
49+
Label f = label("DOWN / FALSE — TEST CONDITION", 15, true);
50+
f.setTextFill(Color.web("#9b3b2f"));
51+
Label explanation = label("Intentional local failure for monitoring and recovery validation.", 13, false);
52+
explanation.setTextFill(Color.web("#66717b"));
53+
text.getChildren().addAll(t, f, explanation);
54+
failure.getChildren().add(text);
55+
56+
HBox services = card();
57+
services.getChildren().addAll(metric("Web Server","Test"), metric("Telnet Frontend","Test"), metric("Security Grade","FALSE"));
58+
HBox actions = new HBox(10);
59+
actions.getChildren().addAll(action("Install / Repair","install"), action("Update","update"), action("Verify","verify"), action("Remove","remove"));
60+
61+
VBox evidence = new VBox(8);
62+
evidence.setPadding(new Insets(18));
63+
evidence.setStyle("-fx-background-color:white;-fx-background-radius:10;-fx-border-color:#e1e5e9;-fx-border-radius:10;");
64+
evidence.getChildren().addAll(label("Proof / Evidence", 16, true), label("Expected result: monitoring detects the false security grade and recovery remains available.\nNo external state-security authority is asserted by this fixture.", 13, false));
65+
66+
activity.setEditable(false);
67+
activity.setPrefRowCount(5);
68+
activity.setText("TEST FIXTURE ACTIVE. No privileged operation has been requested.\n");
69+
activity.setStyle("-fx-control-inner-background:white;-fx-border-color:#edf0f2;");
70+
content.getChildren().addAll(failure, services, actions, evidence, activity);
71+
root.setCenter(content);
72+
73+
stage.setTitle("State Security Down I Standards");
74+
stage.setScene(new Scene(root, 1040, 720));
75+
stage.setMinWidth(900);
76+
stage.setMinHeight(620);
77+
stage.show();
78+
}
79+
80+
private static Label label(String text, double size, boolean bold) {
81+
Label l = new Label(text);
82+
l.setFont(Font.font("System", bold ? FontWeight.BOLD : FontWeight.NORMAL, size));
83+
return l;
84+
}
85+
private static HBox card() {
86+
HBox box = new HBox(18);
87+
box.setAlignment(Pos.CENTER_LEFT);
88+
box.setPadding(new Insets(18));
89+
box.setStyle("-fx-background-color:white;-fx-background-radius:10;-fx-border-color:#e1e5e9;-fx-border-radius:10;");
90+
return box;
91+
}
92+
private static VBox metric(String name, String value) {
93+
VBox box = new VBox(3);
94+
Label n = label(name, 13, false);
95+
n.setTextFill(Color.web("#66717b"));
96+
box.getChildren().addAll(n, label(value, 16, true));
97+
HBox.setHgrow(box, Priority.ALWAYS);
98+
return box;
99+
}
100+
private Button action(String name, String operation) {
101+
Button b = new Button(name);
102+
b.setPrefHeight(42);
103+
b.setStyle("-fx-background-color:white;-fx-border-color:#d7dce1;-fx-border-radius:8;-fx-background-radius:8;-fx-padding:0 16;");
104+
b.setOnAction(e -> activity.appendText("TEST request: " + operation + " — review required.\n"));
105+
return b;
106+
}
107+
public static void main(String[] args) { launch(args); }
108+
}

0 commit comments

Comments
 (0)