Compare commits
127 Commits
master
...
voting-sta
Author | SHA1 | Date |
---|---|---|
|
b64719b1d9 | |
|
35c90882c0 | |
|
b644f8b500 | |
|
6c43201113 | |
|
1fa38ddb5f | |
|
c7c6f26db1 | |
|
ff4ad81cca | |
|
43af4b016d | |
|
eda570c863 | |
|
8ac466e73a | |
|
dab9ca1ed1 | |
|
b21051f321 | |
|
72d5e8aca1 | |
|
36e1f6ea20 | |
|
f813c11edd | |
|
b8001163b7 | |
|
d2c9893ccf | |
|
c90be520fe | |
|
9825b3409b | |
|
3766478ffa | |
|
7d2eedfc1e | |
|
61c65594f5 | |
|
fc21a215d3 | |
|
1fb96c8630 | |
|
c80aa8efc1 | |
|
f2dc2ec6d8 | |
|
ab7c12b3f6 | |
|
b7d8c887ec | |
|
725589ddfc | |
|
f2a26b7145 | |
|
b0c4fff11a | |
|
c24c6bbbd5 | |
|
4720d66115 | |
|
541a6666fc | |
|
c08fbdfa76 | |
|
c97910644f | |
|
213ab2a4ea | |
|
357fab2d96 | |
|
49f8e597a3 | |
|
ccdb3b4b01 | |
|
ac2fc3a83d | |
|
6d01be0d13 | |
|
b76bd76854 | |
|
7eb5aec1d1 | |
|
81dcdf6f25 | |
|
df6e40e385 | |
|
7fc0af2b1f | |
|
47f68acae4 | |
|
630588ca5b | |
|
53fc701444 | |
|
14d6759803 | |
|
25781f40f7 | |
|
1bf5861808 | |
|
01874f7d1c | |
|
7f39badaf7 | |
|
259b4c2ae5 | |
|
f3ec49acc7 | |
|
5398d5adc3 | |
|
b8cc12dfc1 | |
|
8140dcd516 | |
|
c767d8af58 | |
|
37002a7f1e | |
|
b4661d0fed | |
|
a9d96e59b2 | |
|
4fac4bbb8c | |
|
6d807cdd4d | |
|
4d72d6083e | |
|
da614c13ab | |
|
4b31e87d07 | |
|
2d72822405 | |
|
9828832553 | |
|
d9272c9f94 | |
|
9c52eff109 | |
|
6359f74a7b | |
|
fea0e8880f | |
|
843d50c276 | |
|
5c4b5a2150 | |
|
687c2c6d7e | |
|
311d1e8e8e | |
|
87420a9d7d | |
|
5169c935bf | |
|
097aad4e7b | |
|
64a9356dc2 | |
|
230dfe6d3f | |
|
c8e747285c | |
|
16a3102ca4 | |
|
20d2b3e68c | |
|
6ec0d4a668 | |
|
3347a6c42d | |
|
8c0e7f57bb | |
|
64ccaff508 | |
|
298dd5bf6e | |
|
bb4cc5b087 | |
|
91e41af7a0 | |
|
414452db84 | |
|
c4177cf487 | |
|
003720839c | |
|
6020ed3ab8 | |
|
68caeee114 | |
|
c30ea072f2 | |
|
7a167639db | |
|
01604d1acb | |
|
89bac8d346 | |
|
dfc5bf4b24 | |
|
1815863746 | |
|
0d8e522e93 | |
|
4324bdeecd | |
|
d4d2d2f5b6 | |
|
e75317efa9 | |
|
5971e8c16e | |
|
de835a8c13 | |
|
109135ae1b | |
|
7734ba8c91 | |
|
8546a347ca | |
|
65bc8bc160 | |
|
36d94b41ab | |
|
87e8ad9470 | |
|
717c2e6e65 | |
|
51b9f9decd | |
|
05871a2ea7 | |
|
070b851203 | |
|
4aa6c25c0f | |
|
84555f0639 | |
|
42bc35cbe8 | |
|
f9d7b4b1ce | |
|
25eefc4b16 | |
|
a12685d757 |
|
@ -1,16 +1,20 @@
|
|||
.gradle
|
||||
.idea
|
||||
build
|
||||
bin
|
||||
.settings
|
||||
.classpath
|
||||
.project
|
||||
out
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
**/*.swp
|
||||
*.prefs
|
||||
*.project
|
||||
*.classpath
|
||||
bulletin-board-server/local-instances/meerkat.db
|
||||
/SQLiteDBTest.db
|
||||
/Wombat Code And Documentation Conventions
|
||||
/bulletin-board-server/trace.db/h2datasource.trace.db
|
||||
/bulletin-board-server/SQLiteDBTest.db
|
||||
.gradle
|
||||
.idea
|
||||
build
|
||||
bin
|
||||
.settings
|
||||
.classpath
|
||||
.project
|
||||
out
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
**/*.swp
|
||||
*.prefs
|
||||
*.project
|
||||
*.classpath
|
||||
bulletin-board-server/local-instances/meerkat.db
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
|
||||
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
||||
import ch.qos.logback.classic.filter.ThresholdFilter
|
||||
import ch.qos.logback.core.ConsoleAppender
|
||||
import ch.qos.logback.core.util.Duration
|
||||
import static ch.qos.logback.classic.Level.*
|
||||
|
||||
if (System.getProperty("log.debug") != null) {
|
||||
println "Logback configuration debugging enabled"
|
||||
|
||||
statusListener(OnConsoleStatusListener)
|
||||
}
|
||||
|
||||
def LOG_LEVEL = toLevel(System.getProperty("log.level"), INFO)
|
||||
|
||||
def haveBeagle = System.getProperty("log.beagle") != null
|
||||
def logOps = System.getProperty("log.ops") != null
|
||||
|
||||
appender("CONSOLE", ConsoleAppender) {
|
||||
|
||||
filter(ThresholdFilter) {
|
||||
level = toLevel(System.getProperty("log.level"), TRACE)
|
||||
}
|
||||
|
||||
encoder(PatternLayoutEncoder) {
|
||||
pattern = "%d{HH:mm:ss.SSS} [%thread %file:%line] %-5level %logger{0} - %msg%n"
|
||||
}
|
||||
}
|
||||
|
||||
def appenders = [ "CONSOLE" ]
|
||||
|
||||
if (haveBeagle) {
|
||||
appender("SOCKET", SocketAppender) {
|
||||
includeCallerData = true
|
||||
remoteHost = "localhost"
|
||||
port = 4321
|
||||
reconnectionDelay = new Duration(10000)
|
||||
}
|
||||
|
||||
appenders += ["SOCKET"]
|
||||
}
|
||||
|
||||
root(LOG_LEVEL, appenders)
|
||||
|
||||
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 371 B |
After Width: | Height: | Size: 407 B |
After Width: | Height: | Size: 384 B |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 996 B |
After Width: | Height: | Size: 930 B |
|
@ -0,0 +1,194 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="753.0"
|
||||
xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.search.addVoter.AddVoterController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="251.0" minWidth="10.0" prefWidth="118.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="467.0" minWidth="10.0" prefWidth="194.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="470.0" minWidth="10.0" prefWidth="458.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints maxHeight="195.0" minHeight="10.0" prefHeight="178.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="119.0" minHeight="10.0" prefHeight="72.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="3" GridPane.rowIndex="5">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="58.0" minHeight="10.0" prefHeight="41.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="85.0" minHeight="10.0" prefHeight="84.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="16.0" minHeight="9.0" prefHeight="12.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="28.0" minHeight="10.0" prefHeight="25.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="9.0" minHeight="4.0" prefHeight="4.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<TextArea prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="92.0" minWidth="10.0" prefWidth="84.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="10.0" prefWidth="110.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<bottom>
|
||||
<Label prefHeight="17.0" prefWidth="77.0" text="ID number" BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<Label text="Eligible to vote" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
|
||||
<center>
|
||||
<Label text="Status" BorderPane.alignment="CENTER">
|
||||
<padding>
|
||||
<Insets right="45.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3">
|
||||
<center>
|
||||
<Label text="Channel" BorderPane.alignment="CENTER">
|
||||
<padding>
|
||||
<Insets right="35.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<ComboBox prefWidth="150.0" promptText="No" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<ComboBox prefWidth="150.0" promptText="Provisional" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<ComboBox prefWidth="150.0" promptText="IDC Maths" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<BorderPane minHeight="40.0" prefHeight="40.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<TextField text="434575845" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="5">
|
||||
<center>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/profile.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<GridPane GridPane.columnIndex="4" GridPane.rowIndex="5">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="70.0" minHeight="10.0" prefHeight="48.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="130.0" minHeight="10.0" prefHeight="125.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="149.0" minWidth="10.0" prefWidth="26.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="408.0" minWidth="10.0" prefWidth="403.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="119.0" minWidth="10.0" prefWidth="27.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="6.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="112.0" minHeight="10.0" prefHeight="84.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="35.0" minHeight="0.0" prefHeight="35.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<TextArea prefHeight="89.0" prefWidth="406.0" text="Update reason (optional)" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="342.0" minWidth="10.0" prefWidth="304.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="226.0" minWidth="10.0" prefWidth="158.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" text="Cancel" onMousePressed="#RemoveAddVoterPanel" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="52.0" text="Save" BorderPane.alignment="CENTER" />
|
||||
</left>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="4" GridPane.rowIndex="6">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="323.0" minWidth="10.0" prefWidth="295.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="224.0" minWidth="10.0" prefWidth="167.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="140.0" minWidth="10.0" prefWidth="138.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="67.0" minWidth="10.0" prefWidth="29.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
|
||||
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="140.0" text="Ready To Vote" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane alignment="center" hgap="10" vgap="10" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.PollingStationDashboardController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<AnchorPane prefHeight="585.0" prefWidth="829.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<Pane layoutX="24.0" layoutY="14.0" prefHeight="102.0" prefWidth="714.0">
|
||||
<children>
|
||||
<BorderPane prefHeight="102.0" prefWidth="714.0">
|
||||
<right>
|
||||
<Button fx:id="SearchButton" mnemonicParsing="false" onMousePressed="#SearchTrigered" prefHeight="50.0" prefWidth="112.0" text="Search" BorderPane.alignment="CENTER" />
|
||||
</right>
|
||||
<bottom>
|
||||
<Separator prefWidth="200.0" BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
<left>
|
||||
<ImageView fitHeight="65.0" fitWidth="66.0" BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/barcode.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</left>
|
||||
<center>
|
||||
<TextField fx:id="SearchValue" prefHeight="56.0" prefWidth="536.0" BorderPane.alignment="CENTER" text="IDNumber: 123123123, FilterName2: value2 ..." />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</Pane>
|
||||
<Pane layoutX="8.0" prefHeight="26.0" prefWidth="755.0">
|
||||
<children>
|
||||
<BorderPane layoutX="12.0" prefHeight="26.0" prefWidth="743.0">
|
||||
<bottom>
|
||||
<Separator prefWidth="200.0" BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</Pane>
|
||||
<BorderPane layoutX="12.0" layoutY="531.0" prefHeight="26.0" prefWidth="755.0">
|
||||
<bottom>
|
||||
<Separator prefWidth="200.0" BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
<BorderPane layoutX="-8.0" layoutY="32.0" prefHeight="517.0" prefWidth="22.0">
|
||||
<right>
|
||||
<Separator orientation="VERTICAL" prefHeight="200.0" BorderPane.alignment="CENTER" />
|
||||
</right>
|
||||
</BorderPane>
|
||||
<BorderPane layoutX="756.0" layoutY="31.0" prefHeight="517.0" prefWidth="22.0">
|
||||
<right>
|
||||
<Separator orientation="VERTICAL" prefHeight="200.0" BorderPane.alignment="CENTER" />
|
||||
</right>
|
||||
</BorderPane>
|
||||
<Pane fx:id="StatusLog" layoutX="788.0" layoutY="12.0" onMousePressed="#OnStatusLogPressed" prefHeight="544.0" prefWidth="42.0">
|
||||
<children>
|
||||
<Button fx:id="StatusLogButton" layoutX="-251.0" layoutY="250.0" mnemonicParsing="false" onMousePressed="#OnStatusLogPressed" prefHeight="43.0" prefWidth="545.0" rotate="-90.0" text="Status Log" />
|
||||
</children>
|
||||
</Pane>
|
||||
<Pane fx:id="Settings" layoutX="20" layoutY="557.0" onMousePressed="#OnSettingsPressed" prefHeight="34.0" prefWidth="830.0">
|
||||
<children>
|
||||
<Button fx:id="SettingsButton" mnemonicParsing="false" onMousePressed="#OnSettingsPressed" prefHeight="34.0" prefWidth="790.0" text="Settings" />
|
||||
</children>
|
||||
</Pane>
|
||||
<Pane fx:id="AddEditPane" layoutX="17.0" layoutY="120.0" prefHeight="428.0" prefWidth="749.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane fx:id="SettingsGridPane" prefHeight="70.0" prefWidth="850.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.settings.settingsController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="177.0" minWidth="10.0" prefWidth="177.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="172.0" minWidth="10.0" prefWidth="144.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="216.0" minWidth="10.0" prefWidth="200.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="165.0" minWidth="10.0" prefWidth="136.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="202.0" minHeight="0.0" prefHeight="54.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="561.0" minHeight="10.0" prefHeight="561.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="53.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="125.0" minWidth="10.0" prefWidth="117.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<right>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/bullets.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</right>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Label text="Manage voting booths" BorderPane.alignment="CENTER" />
|
||||
</left>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="57.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="128.0" minWidth="10.0" prefWidth="113.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Label text="Manage Polls workers" BorderPane.alignment="CENTER" />
|
||||
</left>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<right>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../../../pictures/women.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="79.0" minWidth="10.0" prefWidth="60.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="120.0" minWidth="10.0" prefWidth="110.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Label text="Manage provisional votes" BorderPane.alignment="CENTER" />
|
||||
</left>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<right>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../../../pictures/settings.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="3" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="76.0" minWidth="10.0" prefWidth="54.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="108.0" minWidth="10.0" prefWidth="108.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Label text="Close polling station" BorderPane.alignment="CENTER" />
|
||||
</left>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<right>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../../../pictures/exit.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane fx:id="StatusLogGridPane" prefHeight="615.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.statusLog.StatusLogController">
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label text="Status Log" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
<left>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/blacktriangle.png" />
|
||||
</image>
|
||||
<BorderPane.margin>
|
||||
<Insets left="10.0" />
|
||||
</BorderPane.margin>
|
||||
</ImageView>
|
||||
</left>
|
||||
</BorderPane>
|
||||
<Accordion GridPane.rowIndex="1">
|
||||
<panes>
|
||||
<TitledPane animated="false" text="Voters In Progress">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="486.0" prefWidth="400.0" />
|
||||
<ScrollPane prefHeight="488.0" prefWidth="400.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</TitledPane>
|
||||
<TitledPane animated="false" text="Pending Upload">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ScrollPane prefHeight="485.0" prefWidth="400.0">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0" />
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</TitledPane>
|
||||
<TitledPane animated="false" text="Completed">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ScrollPane prefHeight="486.0" prefWidth="400.0">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0" />
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</TitledPane>
|
||||
</panes>
|
||||
</Accordion>
|
||||
</children>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="202.0" minHeight="0.0" prefHeight="54.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="561.0" minHeight="10.0" prefHeight="561.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
</GridPane>
|
|
@ -0,0 +1,183 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane fx:id="SubmitVoterPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="753.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="polling_station_dashboard.search.submitVoter.SubmitVoterController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="251.0" minWidth="10.0" prefWidth="118.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="467.0" minWidth="10.0" prefWidth="194.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="470.0" minWidth="10.0" prefWidth="458.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints maxHeight="195.0" minHeight="10.0" prefHeight="178.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="119.0" minHeight="10.0" prefHeight="72.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="3" GridPane.rowIndex="5">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="58.0" minHeight="10.0" prefHeight="41.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="85.0" minHeight="10.0" prefHeight="84.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="16.0" minHeight="9.0" prefHeight="12.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="28.0" minHeight="10.0" prefHeight="25.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="9.0" minHeight="4.0" prefHeight="4.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label prefHeight="29.0" prefWidth="188.0" text="Name" GridPane.rowIndex="1" />
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="92.0" minWidth="10.0" prefWidth="84.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="10.0" prefWidth="110.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<bottom>
|
||||
<Label prefHeight="17.0" prefWidth="77.0" text="ID number" BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<Label text="Eligible to vote" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
|
||||
<center>
|
||||
<Label text="Status" BorderPane.alignment="CENTER">
|
||||
<padding>
|
||||
<Insets right="45.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3">
|
||||
<center>
|
||||
<Label text="Channel" BorderPane.alignment="CENTER">
|
||||
<padding>
|
||||
<Insets right="35.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<Label fx:id="IDNumberValue" prefHeight="29.0" prefWidth="107.0" text="234234234" GridPane.columnIndex="1" />
|
||||
<Label fx:id="EligibleToVoteValue" prefHeight="23.0" prefWidth="107.0" text="YES" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<padding>
|
||||
<Insets left="3.0" />
|
||||
</padding></Label>
|
||||
<Label fx:id="StatusValue" prefHeight="38.0" prefWidth="107.0" text="Has Not Voted" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<Label fx:id="ChannelValue" prefHeight="60.0" prefWidth="107.0" text="IDC Maths" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="5">
|
||||
<center>
|
||||
<ImageView BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/profile.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<GridPane GridPane.columnIndex="4" GridPane.rowIndex="5">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="70.0" minHeight="10.0" prefHeight="48.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="130.0" minHeight="10.0" prefHeight="125.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="342.0" minWidth="10.0" prefWidth="304.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="226.0" minWidth="10.0" prefWidth="158.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" onMousePressed="#RemoveSubmitVoterPanel" text="Cancel" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<left>
|
||||
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="52.0" text="Save" BorderPane.alignment="CENTER" />
|
||||
</left>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="4" GridPane.rowIndex="6">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="323.0" minWidth="10.0" prefWidth="295.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="224.0" minWidth="10.0" prefWidth="167.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.columnIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="140.0" minWidth="10.0" prefWidth="138.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="67.0" minWidth="10.0" prefWidth="29.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1" />
|
||||
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="140.0" text="Ready To Vote" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="6">
|
||||
<top>
|
||||
<Button mnemonicParsing="false" text="Lodge appeal" BorderPane.alignment="CENTER" />
|
||||
</top>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane alignment="center" hgap="10" prefHeight="267.0" prefWidth="541.0" vgap="10" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="set_up_complete.SetUpCompleteController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<AnchorPane prefHeight="348.0" prefWidth="547.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<GridPane prefHeight="288.0" prefWidth="547.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="143.0" minHeight="10.0" prefHeight="143.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label text="This is the name of the Election" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="134.0" minWidth="10.0" prefWidth="88.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="445.0" minWidth="10.0" prefWidth="372.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="179.0" minWidth="10.0" prefWidth="85.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Separator prefWidth="200.0" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="177.0" minWidth="10.0" prefWidth="98.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="267.0" minWidth="10.0" prefWidth="267.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<top>
|
||||
<Label prefHeight="30.0" prefWidth="267.0" text="Polling Station Setup Is Complete " BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="17.5" />
|
||||
</font>
|
||||
</Label>
|
||||
</top>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<Label text="Go to polling station dashboard" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#GoToPollingStationDashboard" onMousePressed="#GoToPollingStationDashboard" text="Ok" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane alignment="center" hgap="10" vgap="10" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<AnchorPane prefHeight="348.0" prefWidth="547.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<GridPane layoutX="-4.0" layoutY="-14.0" prefHeight="358.0" prefWidth="558.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<AnchorPane GridPane.columnIndex="1">
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<ImageView fx:id="LoadingGif" BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/loadingGif.gif" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<center>
|
||||
<Label prefHeight="17.0" prefWidth="573.0" text="Initializing Polling Station" BorderPane.alignment="CENTER">
|
||||
<padding>
|
||||
<Insets left="220.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="Meerkat Logo" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1,154 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Created By Vladimir Eliezer Tokarev !-->
|
||||
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
|
||||
<GridPane alignment="center" hgap="10" vgap="10" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uploading_to_bulletin_board.UploadingToBulletinBoardController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<AnchorPane prefHeight="348.0" prefWidth="547.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<GridPane layoutX="-4.0" layoutY="-14.0" prefHeight="358.0" prefWidth="558.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="177.0" minHeight="10.0" prefHeight="78.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="213.0" minHeight="10.0" prefHeight="75.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="175.0" minHeight="10.0" prefHeight="175.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="36.0" minHeight="10.0" prefHeight="25.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0">
|
||||
<bottom>
|
||||
<Label prefHeight="17.0" prefWidth="214.0" text=" Election Parameters being loaded...." BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
<GridPane prefHeight="42.0" prefWidth="566.0" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="116.0" minWidth="10.0" prefWidth="68.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="455.0" minWidth="10.0" prefWidth="422.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="181.0" minWidth="10.0" prefWidth="65.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="41.0" prefWidth="428.0" GridPane.columnIndex="1">
|
||||
<center>
|
||||
<Separator prefHeight="2.0" prefWidth="446.0" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane prefHeight="7.0" prefWidth="558.0" GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="291.0" minWidth="10.0" prefWidth="269.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="180.0" minWidth="10.0" prefWidth="103.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<top>
|
||||
<Label text="Station Fingerprit:" BorderPane.alignment="CENTER" />
|
||||
</top>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<GridPane BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="32.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="497.0" minWidth="10.0" prefWidth="497.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="429.0" minWidth="10.0" prefWidth="32.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="25.0" minHeight="8.0" prefHeight="8.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="72.0" minHeight="10.0" prefHeight="72.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="24.0" minHeight="9.0" prefHeight="10.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #a9a9a9;" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<center>
|
||||
<Label prefHeight="36.0" prefWidth="486.0" style="-fx-background-color: #a9a9a9;" text="43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8" BorderPane.alignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font></Label>
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="183.0" minWidth="10.0" prefWidth="161.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="340.0" minWidth="10.0" prefWidth="246.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="179.0" minWidth="10.0" prefWidth="151.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="54.0" minHeight="10.0" prefHeight="28.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="89.0" minHeight="10.0" prefHeight="89.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1">
|
||||
<top>
|
||||
<Label text="Waiting for Verification" BorderPane.alignment="CENTER" />
|
||||
</top>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<top>
|
||||
<ImageView fx:id="LoadingGif" BorderPane.alignment="CENTER">
|
||||
<image>
|
||||
<Image url="@/images/VerticalLoading.gif" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</top>
|
||||
</BorderPane>
|
||||
<BorderPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||
<center>
|
||||
<Button mnemonicParsing="false" onMouseClicked="#Override" onMousePressed="#Override" text="Override" BorderPane.alignment="CENTER" />
|
||||
</center>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</GridPane>
|
|
@ -0,0 +1 @@
|
|||
signed-messages/* -text
|
|
@ -0,0 +1,6 @@
|
|||
Certs and private keys for testing generated using OpenSSL
|
||||
|
||||
.crt and .pem files are in PEM format
|
||||
.der files are in binary DER format
|
||||
|
||||
files that have a name of the form *-with-password-xxxx.pem are encrypted with the password xxxx
|
|
@ -0,0 +1,8 @@
|
|||
-----BEGIN EC PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: AES-256-CBC,243D718A0D80C59590E582A26E87A49C
|
||||
|
||||
RG6ITUTIdbJdWYX57oMn3tTCzHJSTjXAIZLjoVxy/v4UFYjluaFhGonIlbH1q2pP
|
||||
ueu29Q3eT6144ypB8ARUJ1x0kRX1OL9zNHgdF9ulrCf9/nhGyC2nL+tHZ0YPbxoQ
|
||||
+6yCQcRWvjUXLVzPEUnwMuHXJDpaXES8X0R4CISQKIA=
|
||||
-----END EC PRIVATE KEY-----
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQge8JqCoaLoZq61aQki5Xm
|
||||
GppcfAAkhHDGNQw/wLof5LmhRANCAAQJD1kW6BsNkRY9tslaugpOJOaoKX4uBz4S
|
||||
Q96lPaPWkatNVgQchwNeB/hdjZwNuwE7A7XAwr69HFmhXRhsM005
|
||||
-----END PRIVATE KEY-----
|
|
@ -0,0 +1,4 @@
|
|||
-----BEGIN PUBLIC KEY-----
|
||||
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugbDZEWPbbJWroKTiTmqCl+Lgc+
|
||||
EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+vRxZoV0YbDNNOQ==
|
||||
-----END PUBLIC KEY-----
|
|
@ -0,0 +1,19 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDFjCCArygAwIBAgICEAAwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MTM1NFoXDTI1MTEwODE2MTM1
|
||||
NFowbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDExEzARBgNVBAgMClNvbWUt
|
||||
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugb
|
||||
DZEWPbbJWroKTiTmqCl+Lgc+EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+
|
||||
vRxZoV0YbDNNOaOCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLamS8o2
|
||||
hFNd0vWy/irEBNWVNwFXMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||
A0gAMEUCIQD6QbhNNmB3AVVqhmXuiLA7WF6raShw6n0g/VloVGQebQIgEvxYclpO
|
||||
MMynt5wH6X65rtn4Q1EGaDMvNbFweCDsldk=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,9 @@
|
|||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIIBOjCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx
|
||||
ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||
BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMTBW
|
||||
MBAGByqGSM49AgEGBSuBBAAKA0IABAkPWRboGw2RFj22yVq6Ck4k5qgpfi4HPhJD
|
||||
3qU9o9aRq01WBByHA14H+F2NnA27ATsDtcDCvr0cWaFdGGwzTTmgADAKBggqhkjO
|
||||
PQQDAgNIADBFAiEA8gmIhALr7O5M1QLReGH3jheildTIr1mDWl14WyMf9U4CIF23
|
||||
mInyo4VqNHLzxMLg5Cn3Oddokng3OXa63y4nTfv+
|
||||
-----END CERTIFICATE REQUEST-----
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgYpBEO+XWm/n6VPeMVK76
|
||||
mrZkDTpiwLsDykG7M4fU5RKhRANCAAR71/kVGyA3hdxcLBBT3NPQF6R3LholmLRN
|
||||
qhnvHqzJWuy7ev+Xbuxtt9AN0ajyeFDy8Oe1bUSidnLyQi+nXC0f
|
||||
-----END PRIVATE KEY-----
|
|
@ -0,0 +1,4 @@
|
|||
-----BEGIN PUBLIC KEY-----
|
||||
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsgN4XcXCwQU9zT0Bekdy4aJZi0
|
||||
TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1EonZy8kIvp1wtHw==
|
||||
-----END PUBLIC KEY-----
|
|
@ -0,0 +1,19 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz
|
||||
M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt
|
||||
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg
|
||||
N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E
|
||||
onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj
|
||||
DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||
A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e
|
||||
n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,9 @@
|
|||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIIBOzCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx
|
||||
ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||
BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMjBW
|
||||
MBAGByqGSM49AgEGBSuBBAAKA0IABHvX+RUbIDeF3FwsEFPc09AXpHcuGiWYtE2q
|
||||
Ge8erMla7Lt6/5du7G230A3RqPJ4UPLw57VtRKJ2cvJCL6dcLR+gADAKBggqhkjO
|
||||
PQQDAgNJADBGAiEA6Ls/ojRaZT+u4YeOBYcPbRcJE3jSTe1Sm/lR7fDyEhMCIQCk
|
||||
UOca+e2b8+CqM3CURBv6TqUMmZ3HeMRvEAxFPqOWSw==
|
||||
-----END CERTIFICATE REQUEST-----
|
|
@ -0,0 +1,8 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIBGjCBw6ADAgECAgEBMAkGByqGSM49BAEwEDEOMAwGA1UEAxMFY2VydDEwHhcN
|
||||
MTUxMTI4MTEwNDAwWhcNMTYxMTI4MTEwNDAwWjAQMQ4wDAYDVQQDEwVjZXJ0MTBZ
|
||||
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABLiyFMVWQtFi4fCjOGLDwQcdjyr48Y8j
|
||||
P+eLEIGMYKKv8bqL3Vchs0iOPoyGH6jxYj2/ShnLSIEuIMPfVgV9kxSjDzANMAsG
|
||||
A1UdDwQEAwIHgDAJBgcqhkjOPQQBA0cAMEQCIH7R0AWO0AYiHOs+QsHEpWiebFc1
|
||||
cyxCKJGkf8KA1KJrAiArCia7PWl0KzaqA0RQC4J0BKp4rZo1PCqKI8DirKQf/Q==
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,19 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDFjCCArygAwIBAgICEAAwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MTM1NFoXDTI1MTEwODE2MTM1
|
||||
NFowbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDExEzARBgNVBAgMClNvbWUt
|
||||
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugb
|
||||
DZEWPbbJWroKTiTmqCl+Lgc+EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+
|
||||
vRxZoV0YbDNNOaOCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLamS8o2
|
||||
hFNd0vWy/irEBNWVNwFXMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||
A0gAMEUCIQD6QbhNNmB3AVVqhmXuiLA7WF6raShw6n0g/VloVGQebQIgEvxYclpO
|
||||
MMynt5wH6X65rtn4Q1EGaDMvNbFweCDsldk=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,19 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr
|
||||
YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl
|
||||
MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN
|
||||
ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz
|
||||
M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt
|
||||
U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV
|
||||
BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg
|
||||
N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E
|
||||
onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj
|
||||
DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp
|
||||
MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg
|
||||
N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp
|
||||
YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp
|
||||
LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr
|
||||
BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC
|
||||
A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e
|
||||
n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,2 @@
|
|||
V 251108161354Z 1000 unknown /CN=Polling Station 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting
|
||||
V 251108162033Z 1001 unknown /CN=Polling Station 2/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting
|
|
@ -0,0 +1 @@
|
|||
unique_subject = no
|
|
@ -0,0 +1 @@
|
|||
unique_subject = no
|
|
@ -0,0 +1 @@
|
|||
V 251108161354Z 1000 unknown /CN=Polling Station 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting
|
|
@ -0,0 +1 @@
|
|||
1002
|
|
@ -0,0 +1 @@
|
|||
1001
|
|
@ -0,0 +1 @@
|
|||
1000
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgJvMhOfcQfdK/42QlBbri
|
||||
IYXLM/gVHq/yppOykDqB3s6hRANCAAQoShAtCGW5c9pk/4/sKN1qjCgDKngqJpba
|
||||
kku6cIDqXDr+aHsl+/KdSHd46OI3fEynl+/Pc85wRsaY6Z7b1PdS
|
||||
-----END PRIVATE KEY-----
|
|
@ -0,0 +1,21 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDfDCCAyGgAwIBAgICEAAwCgYIKoZIzj0EAwIwgbAxCzAJBgNVBAYTAklMMRMw
|
||||
EQYDVQQIDApTb21lLVN0YXRlMREwDwYDVQQHDAhIZXJ6bGl5YTEUMBIGA1UECgwL
|
||||
SURDIEhlcmxpeWExHzAdBgNVBAsMFk1lZXJrYXQgVm90aW5nIFByb2plY3QxGDAW
|
||||
BgNVBAMMD1Rlc3RpbmcgUm9vdCBDQTEoMCYGCSqGSIb3DQEJARYZdGVzdGluZy1j
|
||||
YUBmYWN0Y2VudGVyLm9yZzAeFw0xNTExMTExNjA4MDJaFw0yNTExMDgxNjA4MDJa
|
||||
MIGCMSkwJwYDVQQDDCBNZWVya2F0IFZvdGluZyBJbnRlcm1lZGlhdGUgQ0EgMTET
|
||||
MBEGA1UECAwKU29tZS1TdGF0ZTELMAkGA1UEBhMCSUwxFTATBgNVBAoMDElEQyBI
|
||||
ZXJ6bGl5YTEcMBoGA1UECwwTTWVlcmthdCBWb3RpbmcgVGVhbTBWMBAGByqGSM49
|
||||
AgEGBSuBBAAKA0IABChKEC0IZblz2mT/j+wo3WqMKAMqeComltqSS7pwgOpcOv5o
|
||||
eyX78p1Id3jo4jd8TKeX789zznBGxpjpntvU91KjggFYMIIBVDAPBgNVHRMBAf8E
|
||||
BTADAQH/MB0GA1UdDgQWBBQXsr9HO+Xk+jzbph6PU2dgfb7XKTAfBgNVHSMEGDAW
|
||||
gBSJD9L1fLmX4A9CBoLsYXn3OPy1ojALBgNVHQ8EBAMCAaYwEwYDVR0lBAwwCgYI
|
||||
KwYBBQUHAwEwPgYDVR0fBDcwNTAzoDGgL4YtaHR0cDovL2NybC5mYWN0Y2VudGVy
|
||||
Lm9yZy9tZWVya2F0LXJvb3QtY2EuY3JsMCsGA1UdEQQkMCKCIE1lZXJrYXQgVm90
|
||||
aW5nIEludGVybWVkaWF0ZSBDQSAxMHIGCCsGAQUFBwEBBGYwZDA5BggrBgEFBQcw
|
||||
AoYtaHR0cDovL3BraS5mYWN0Y2VudGVyLm9yZy9tZWVya2F0LXJvb3QtY2EuY3J0
|
||||
MCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5mYWN0Y2VudGVyLm9yZy8wCgYIKoZI
|
||||
zj0EAwIDSQAwRgIhALEMHq2ssC9rLXiG8v6NcZetwwxdu3B3LW9s0KeGoNIEAiEA
|
||||
skA56tMnhiZe38msyanRyRrAHyBI2fGs6GP3UBrg2P8=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,10 @@
|
|||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIIBTTCB9QIBADCBlTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx
|
||||
ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExHDAaBgNV
|
||||
BAsME01lZXJrYXQgVm90aW5nIFRlYW0xKTAnBgNVBAMMIE1lZXJrYXQgVm90aW5n
|
||||
IEludGVybWVkaWF0ZSBDQSAxMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEKEoQLQhl
|
||||
uXPaZP+P7CjdaowoAyp4KiaW2pJLunCA6lw6/mh7JfvynUh3eOjiN3xMp5fvz3PO
|
||||
cEbGmOme29T3UqAAMAoGCCqGSM49BAMCA0cAMEQCIFlyJO5NFqnMUu5hOlQa872E
|
||||
yy0V3zkqeN6Aly+LtEQqAiAfHwbi1lkJOZT2tOX8gfJzcac2jKmbgIhmITNq7uma
|
||||
Wg==
|
||||
-----END CERTIFICATE REQUEST-----
|
|
@ -0,0 +1,46 @@
|
|||
[ ca ]
|
||||
default_ca = myca
|
||||
|
||||
[ crl_ext ]
|
||||
issuerAltName=issuer:copy
|
||||
authorityKeyIdentifier=keyid:always
|
||||
|
||||
[ myca ]
|
||||
dir = ./
|
||||
new_certs_dir = $dir
|
||||
unique_subject = no
|
||||
certificate = $dir/intermediate-ca-1.crt
|
||||
database = $dir/certindex
|
||||
private_key = $dir/intermediate-ca-1-private-key.pem
|
||||
serial = $dir/certserial
|
||||
default_days = 3650
|
||||
default_md = sha256
|
||||
policy = myca_policy
|
||||
x509_extensions = myca_extensions
|
||||
crlnumber = $dir/crlnumber
|
||||
default_crl_days = 3650
|
||||
|
||||
[ myca_policy ]
|
||||
commonName = supplied
|
||||
stateOrProvinceName = optional
|
||||
countryName = optional
|
||||
emailAddress = optional
|
||||
organizationName = supplied
|
||||
organizationalUnitName = optional
|
||||
|
||||
[ myca_extensions ]
|
||||
basicConstraints = critical,CA:FALSE
|
||||
keyUsage = critical,any
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always,issuer
|
||||
keyUsage = digitalSignature,keyEncipherment
|
||||
extendedKeyUsage = serverAuth
|
||||
crlDistributionPoints = @crl_section
|
||||
authorityInfoAccess = @ocsp_section
|
||||
|
||||
[crl_section]
|
||||
URI.0 = http://crl.factcenter.org/meerkat-intermediate1.crl
|
||||
|
||||
[ocsp_section]
|
||||
caIssuers;URI.0 = http://pki.factcenter.org/meerkat-intermediate-ca.crt
|
||||
OCSP;URI.0 = http://ocsp.factcenter.org/
|
|
@ -0,0 +1,21 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDfDCCAyGgAwIBAgICEAAwCgYIKoZIzj0EAwIwgbAxCzAJBgNVBAYTAklMMRMw
|
||||
EQYDVQQIDApTb21lLVN0YXRlMREwDwYDVQQHDAhIZXJ6bGl5YTEUMBIGA1UECgwL
|
||||
SURDIEhlcmxpeWExHzAdBgNVBAsMFk1lZXJrYXQgVm90aW5nIFByb2plY3QxGDAW
|
||||
BgNVBAMMD1Rlc3RpbmcgUm9vdCBDQTEoMCYGCSqGSIb3DQEJARYZdGVzdGluZy1j
|
||||
YUBmYWN0Y2VudGVyLm9yZzAeFw0xNTExMTExNjA4MDJaFw0yNTExMDgxNjA4MDJa
|
||||
MIGCMSkwJwYDVQQDDCBNZWVya2F0IFZvdGluZyBJbnRlcm1lZGlhdGUgQ0EgMTET
|
||||
MBEGA1UECAwKU29tZS1TdGF0ZTELMAkGA1UEBhMCSUwxFTATBgNVBAoMDElEQyBI
|
||||
ZXJ6bGl5YTEcMBoGA1UECwwTTWVlcmthdCBWb3RpbmcgVGVhbTBWMBAGByqGSM49
|
||||
AgEGBSuBBAAKA0IABChKEC0IZblz2mT/j+wo3WqMKAMqeComltqSS7pwgOpcOv5o
|
||||
eyX78p1Id3jo4jd8TKeX789zznBGxpjpntvU91KjggFYMIIBVDAPBgNVHRMBAf8E
|
||||
BTADAQH/MB0GA1UdDgQWBBQXsr9HO+Xk+jzbph6PU2dgfb7XKTAfBgNVHSMEGDAW
|
||||
gBSJD9L1fLmX4A9CBoLsYXn3OPy1ojALBgNVHQ8EBAMCAaYwEwYDVR0lBAwwCgYI
|
||||
KwYBBQUHAwEwPgYDVR0fBDcwNTAzoDGgL4YtaHR0cDovL2NybC5mYWN0Y2VudGVy
|
||||
Lm9yZy9tZWVya2F0LXJvb3QtY2EuY3JsMCsGA1UdEQQkMCKCIE1lZXJrYXQgVm90
|
||||
aW5nIEludGVybWVkaWF0ZSBDQSAxMHIGCCsGAQUFBwEBBGYwZDA5BggrBgEFBQcw
|
||||
AoYtaHR0cDovL3BraS5mYWN0Y2VudGVyLm9yZy9tZWVya2F0LXJvb3QtY2EuY3J0
|
||||
MCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5mYWN0Y2VudGVyLm9yZy8wCgYIKoZI
|
||||
zj0EAwIDSQAwRgIhALEMHq2ssC9rLXiG8v6NcZetwwxdu3B3LW9s0KeGoNIEAiEA
|
||||
skA56tMnhiZe38msyanRyRrAHyBI2fGs6GP3UBrg2P8=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1 @@
|
|||
V 251108160802Z 1000 unknown /CN=Meerkat Voting Intermediate CA 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting Team
|
|
@ -0,0 +1 @@
|
|||
unique_subject = no
|
|
@ -0,0 +1 @@
|
|||
1001
|
|
@ -0,0 +1 @@
|
|||
1000
|
|
@ -0,0 +1 @@
|
|||
1000
|
|
@ -0,0 +1,61 @@
|
|||
[ ca ]
|
||||
default_ca = myca
|
||||
|
||||
[ crl_ext ]
|
||||
issuerAltName=issuer:copy
|
||||
authorityKeyIdentifier=keyid:always
|
||||
|
||||
[ myca ]
|
||||
dir = ./
|
||||
new_certs_dir = $dir
|
||||
unique_subject = no
|
||||
certificate = $dir/root-ca.crt
|
||||
database = $dir/certindex
|
||||
private_key = $dir/root-ca-private-key.pem
|
||||
serial = $dir/certserial
|
||||
default_days = 3650
|
||||
default_md = sha256
|
||||
policy = myca_policy
|
||||
x509_extensions = myca_extensions
|
||||
crlnumber = $dir/crlnumber
|
||||
default_crl_days = 3650
|
||||
|
||||
[ myca_policy ]
|
||||
commonName = supplied
|
||||
stateOrProvinceName = optional
|
||||
countryName = optional
|
||||
emailAddress = optional
|
||||
organizationName = supplied
|
||||
organizationalUnitName = optional
|
||||
|
||||
[ myca_extensions ]
|
||||
basicConstraints = critical,CA:TRUE
|
||||
keyUsage = critical,any
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always,issuer
|
||||
keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign
|
||||
extendedKeyUsage = serverAuth
|
||||
crlDistributionPoints = @crl_section
|
||||
subjectAltName = @alt_names
|
||||
authorityInfoAccess = @ocsp_section
|
||||
|
||||
[ v3_ca ]
|
||||
basicConstraints = critical,CA:TRUE,pathlen:0
|
||||
keyUsage = critical,any
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always,issuer
|
||||
keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign
|
||||
extendedKeyUsage = serverAuth
|
||||
crlDistributionPoints = @crl_section
|
||||
subjectAltName = @alt_names
|
||||
authorityInfoAccess = @ocsp_section
|
||||
|
||||
[alt_names]
|
||||
DNS.0 = Meerkat Voting Intermediate CA 1
|
||||
|
||||
[crl_section]
|
||||
URI.0 = http://crl.factcenter.org/meerkat-root-ca.crl
|
||||
|
||||
[ocsp_section]
|
||||
caIssuers;URI.0 = http://pki.factcenter.org/meerkat-root-ca.crt
|
||||
OCSP;URI.0 = http://ocsp.factcenter.org/
|
|
@ -0,0 +1,8 @@
|
|||
-----BEGIN EC PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: AES-256-CBC,B8CA131346FD6C9568A6C80935F2AF14
|
||||
|
||||
8q1seEln39/tQTo5KqN+qNRhd0fQ0oC71dYpfTHsP0NlNmjMtwKo2niFwzjxnSyP
|
||||
vpJjGzUlnq30ucbeJA7CDm/1cmYAU5gGQ7gldgpi2TQVS+EBjqi/Y5P9AlrgLv6K
|
||||
tKe4AvkqQcpi4ZvlUL9xmNaM9jEH4syopR9YClEMfa8=
|
||||
-----END EC PRIVATE KEY-----
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHQCAQEEIEi9y6pSKu1kDZcIfQQAnojl1iFxm32W0DVCp2P6HRrkoAcGBSuBBAAK
|
||||
oUQDQgAEoijIYF12bpA0tcjyQnWZGQ4lzdBGR+hK/5al/M+zFgFwvWHoWf6yJsSB
|
||||
ymviB5yUaH+cE+/3LXlGbpRzYKLBYQ==
|
||||
-----END EC PRIVATE KEY-----
|
|
@ -0,0 +1,17 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICpTCCAkygAwIBAgIJAJoVb07aGgNaMAoGCCqGSM49BAMCMIGwMQswCQYDVQQG
|
||||
EwJJTDETMBEGA1UECAwKU29tZS1TdGF0ZTERMA8GA1UEBwwISGVyemxpeWExFDAS
|
||||
BgNVBAoMC0lEQyBIZXJsaXlhMR8wHQYDVQQLDBZNZWVya2F0IFZvdGluZyBQcm9q
|
||||
ZWN0MRgwFgYDVQQDDA9UZXN0aW5nIFJvb3QgQ0ExKDAmBgkqhkiG9w0BCQEWGXRl
|
||||
c3RpbmctY2FAZmFjdGNlbnRlci5vcmcwHhcNMTUxMTExMTUzODE4WhcNMjUxMTA4
|
||||
MTUzODE4WjCBsDELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUxETAP
|
||||
BgNVBAcMCEhlcnpsaXlhMRQwEgYDVQQKDAtJREMgSGVybGl5YTEfMB0GA1UECwwW
|
||||
TWVlcmthdCBWb3RpbmcgUHJvamVjdDEYMBYGA1UEAwwPVGVzdGluZyBSb290IENB
|
||||
MSgwJgYJKoZIhvcNAQkBFhl0ZXN0aW5nLWNhQGZhY3RjZW50ZXIub3JnMFYwEAYH
|
||||
KoZIzj0CAQYFK4EEAAoDQgAEoijIYF12bpA0tcjyQnWZGQ4lzdBGR+hK/5al/M+z
|
||||
FgFwvWHoWf6yJsSBymviB5yUaH+cE+/3LXlGbpRzYKLBYaNQME4wHQYDVR0OBBYE
|
||||
FIkP0vV8uZfgD0IGguxhefc4/LWiMB8GA1UdIwQYMBaAFIkP0vV8uZfgD0IGguxh
|
||||
efc4/LWiMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDRwAwRAIgNftHrW30Git8
|
||||
VFQKyMCkasauSpEHpAGdcRAhRHqUQMUCIDxw++trz/Iv8818xVB1ARr9EQAmH0aC
|
||||
7MHETGuiBC7L
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,3 @@
|
|||
-----BEGIN EC PARAMETERS-----
|
||||
BgUrgQQACg==
|
||||
-----END EC PARAMETERS-----
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
0D r=¥|n“Ò2ɪ‰!S»®[gCŸ$ä°Ž/ Ê”(Âò½ ^esüHLŸ½o,oV®”§ce²p0(èXÆ]&@
|
|
@ -1,6 +1,6 @@
|
|||
#Fri Jan 29 21:00:29 IST 2016
|
||||
#Sat Jul 02 14:15:59 IDT 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-all.zip
|
||||
|
|
|
@ -1,15 +1,52 @@
|
|||
package meerkat.util;
|
||||
|
||||
import meerkat.protobuf.BulletinBoardAPI.*;
|
||||
import meerkat.crypto.DigitalSignature;
|
||||
import meerkat.protobuf.BulletinBoardAPI.BulletinBoardMessage;
|
||||
import meerkat.protobuf.BulletinBoardAPI.UnsignedBulletinBoardMessage;
|
||||
import meerkat.protobuf.Crypto;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.security.SignatureException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by Arbel Deutsch Peled on 16-Feb-16.
|
||||
*/
|
||||
public class BulletinBoardUtils {
|
||||
|
||||
/**
|
||||
* Creates BulletinBoardMessage with UnsignedBulletinBoardMessage and its signature
|
||||
* signed by all given DigitalSignatures
|
||||
*
|
||||
* @param unsignedMessage BasicMessage
|
||||
* @param signer collection of DigitalSignature which will sign the
|
||||
* UnsignedBulletinBoardMessage message
|
||||
* @return BulletinBoardMessage
|
||||
*/
|
||||
public static BulletinBoardMessage signBulletinBoardMessage(UnsignedBulletinBoardMessage unsignedMessage,
|
||||
DigitalSignature signer) throws SignatureException {
|
||||
BulletinBoardMessage.Builder bulletinBoardMessage = BulletinBoardMessage.newBuilder();
|
||||
bulletinBoardMessage.setMsg(unsignedMessage);
|
||||
signer.updateContent(unsignedMessage);
|
||||
Crypto.Signature signature = signer.sign();
|
||||
bulletinBoardMessage.addSig(signature);
|
||||
return bulletinBoardMessage.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the latest message from collection of messages (BulletinBoardMessage) based on timestamp
|
||||
* @param messages List of BulletinBoardMessage
|
||||
* @return BulletinBoardMessage
|
||||
*/
|
||||
public static BulletinBoardMessage getLatestMessage(Collection<BulletinBoardMessage> messages){
|
||||
return Collections.max(messages, new Comparator<BulletinBoardMessage>() {
|
||||
@Override
|
||||
public int compare(BulletinBoardMessage o1, BulletinBoardMessage o2) {
|
||||
TimestampComparator comparator = new TimestampComparator();
|
||||
return comparator.compare(o1.getMsg().getTimestamp(), o2.getMsg().getTimestamp());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches the tags in the message for one that begins with given prefix
|
||||
* @param message is the message to search
|
||||
|
@ -17,7 +54,6 @@ public class BulletinBoardUtils {
|
|||
* @return the tag without the prefix, if found, or null if not found
|
||||
*/
|
||||
public static String findTagWithPrefix(BulletinBoardMessage message, String prefix) {
|
||||
|
||||
for (String tag : message.getMsg().getTagList()){
|
||||
if (tag.startsWith(prefix)) {
|
||||
return tag.substring(prefix.length());
|
||||
|
@ -28,6 +64,22 @@ public class BulletinBoardUtils {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets list of tags values from given messages (tagName values)
|
||||
* @param messages list of messages from which we want to retrieve specific tag values
|
||||
* @return List<String>
|
||||
*/
|
||||
public static List<String> GetListOfTags(List<BulletinBoardMessage> messages, String tagName) {
|
||||
List<String> tagsValues = new ArrayList<>(messages.size());
|
||||
for ( int i = 0 ; i < messages.size() ; i++ ){
|
||||
BulletinBoardMessage message = messages.get(i);
|
||||
tagsValues.add(findTagWithPrefix(message, tagName));
|
||||
}
|
||||
return tagsValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches the tags in a message for tags that do not contain a given list of prefixes
|
||||
* @param message is the message to search
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Comparator;
|
|||
/**
|
||||
* Created by Arbel Deutsch Peled on 20-Feb-16.
|
||||
*/
|
||||
public class TimestampComparator implements Comparator<com.google.protobuf.Timestamp> {
|
||||
public class TimestampComparator implements Comparator<Timestamp> {
|
||||
|
||||
@Override
|
||||
public int compare(Timestamp o1, Timestamp o2) {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meerkat;
|
||||
|
||||
option java_package = "meerkat.protobuf";
|
||||
|
||||
message VoterID{
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message VoterInfo{
|
||||
VoterID id = 1;
|
||||
string info = 2;
|
||||
}
|
||||
|
||||
message GroupID{
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message VoterRegistryMessage{
|
||||
VoterID voterID = 1;
|
||||
repeated GroupID groupID = 2;
|
||||
}
|
|
@ -0,0 +1,222 @@
|
|||
|
||||
plugins {
|
||||
id "us.kirchmeier.capsule" version "1.0.1"
|
||||
id 'com.google.protobuf' version '0.7.0'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
// Uncomment the lines below to define an application
|
||||
// (this will also allow you to build a "fatCapsule" which includes
|
||||
// the entire application, including all dependencies in a single jar)
|
||||
apply plugin: 'application'
|
||||
mainClassName='splash_screen_on_boot.Main'
|
||||
|
||||
// Is this a snapshot version?
|
||||
ext { isSnapshot = false }
|
||||
|
||||
ext {
|
||||
groupId = 'org.factcenter.meerkat'
|
||||
nexusRepository = "https://cs.idc.ac.il/nexus/content/groups/${isSnapshot ? 'unstable' : 'public'}/"
|
||||
|
||||
// Credentials for IDC nexus repositories (needed only for using unstable repositories and publishing)
|
||||
// Should be set in ${HOME}/.gradle/gradle.properties
|
||||
nexusUser = project.hasProperty('nexusUser') ? project.property('nexusUser') : ""
|
||||
nexusPassword = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : ""
|
||||
}
|
||||
|
||||
description = "GUI For polling station"
|
||||
|
||||
// Your project version
|
||||
version = "0.0"
|
||||
|
||||
version += "${isSnapshot ? '-SNAPSHOT' : ''}"
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
// Meerkat common
|
||||
compile project(':meerkat-common')
|
||||
|
||||
|
||||
// Logging
|
||||
compile 'org.slf4j:slf4j-api:1.7.7'
|
||||
runtime 'ch.qos.logback:logback-classic:1.1.2'
|
||||
runtime 'ch.qos.logback:logback-core:1.1.2'
|
||||
|
||||
// Google protobufs
|
||||
compile 'com.google.protobuf:protobuf-java:3.+'
|
||||
|
||||
testCompile 'junit:junit:4.+'
|
||||
|
||||
runtime 'org.codehaus.groovy:groovy:2.4.+'
|
||||
}
|
||||
|
||||
|
||||
/*==== You probably don't have to edit below this line =======*/
|
||||
|
||||
// Setup test configuration that can appear as a dependency in
|
||||
// other subprojects
|
||||
configurations {
|
||||
testOutput.extendsFrom (testCompile)
|
||||
}
|
||||
|
||||
task testJar(type: Jar, dependsOn: testClasses) {
|
||||
classifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
||||
artifacts {
|
||||
testOutput testJar
|
||||
}
|
||||
|
||||
// The run task added by the application plugin
|
||||
// is also of type JavaExec.
|
||||
tasks.withType(JavaExec) {
|
||||
// Assign all Java system properties from
|
||||
// the command line to the JavaExec task.
|
||||
systemProperties System.properties
|
||||
}
|
||||
|
||||
|
||||
protobuf {
|
||||
// Configure the protoc executable
|
||||
protoc {
|
||||
// Download from repositories
|
||||
artifact = 'com.google.protobuf:protoc:3.+'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
idea {
|
||||
module {
|
||||
project.sourceSets.each { sourceSet ->
|
||||
|
||||
def srcDir = "${protobuf.generatedFilesBaseDir}/$sourceSet.name/java"
|
||||
|
||||
println "Adding $srcDir"
|
||||
// add protobuf generated sources to generated source dir.
|
||||
if ("test".equals(sourceSet.name)) {
|
||||
testSourceDirs += file(srcDir)
|
||||
} else {
|
||||
sourceDirs += file(srcDir)
|
||||
}
|
||||
generatedSourceDirs += file(srcDir)
|
||||
|
||||
}
|
||||
|
||||
// Don't exclude build directory
|
||||
excludeDirs -= file(buildDir)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*===================================
|
||||
* "Fat" Build targets
|
||||
*===================================*/
|
||||
|
||||
|
||||
if (project.hasProperty('mainClassName') && (mainClassName != null)) {
|
||||
|
||||
task mavenCapsule(type: MavenCapsule) {
|
||||
description = "Generate a capsule jar that automatically downloads and caches dependencies when run."
|
||||
applicationClass mainClassName
|
||||
destinationDir = buildDir
|
||||
}
|
||||
|
||||
task fatCapsule(type: FatCapsule) {
|
||||
description = "Generate a single capsule jar containing everything. Use -Pfatmain=... to override main class"
|
||||
|
||||
destinationDir = buildDir
|
||||
|
||||
def fatMain = hasProperty('fatmain') ? fatmain : mainClassName
|
||||
|
||||
applicationClass fatMain
|
||||
|
||||
def testJar = hasProperty('test')
|
||||
|
||||
if (hasProperty('fatmain')) {
|
||||
appendix = "fat-${fatMain}"
|
||||
} else {
|
||||
appendix = "fat"
|
||||
}
|
||||
|
||||
if (testJar) {
|
||||
from sourceSets.test.output
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*===================================
|
||||
* Repositories
|
||||
*===================================*/
|
||||
|
||||
repositories {
|
||||
|
||||
// Prefer the local nexus repository (it may have 3rd party artifacts not found in mavenCentral)
|
||||
maven {
|
||||
url nexusRepository
|
||||
|
||||
if (isSnapshot) {
|
||||
credentials { username
|
||||
password
|
||||
|
||||
username nexusUser
|
||||
password nexusPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Use local maven repository
|
||||
mavenLocal()
|
||||
|
||||
// Use 'maven central' for other dependencies.
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
task "info" << {
|
||||
println "Project: ${project.name}"
|
||||
println "Description: ${project.description}"
|
||||
println "--------------------------"
|
||||
println "GroupId: $groupId"
|
||||
println "Version: $version (${isSnapshot ? 'snapshot' : 'release'})"
|
||||
println ""
|
||||
}
|
||||
info.description 'Print some information about project parameters'
|
||||
|
||||
|
||||
/*===================================
|
||||
* Publishing
|
||||
*===================================*/
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId project.groupId
|
||||
pom.withXml {
|
||||
asNode().appendNode('description', project.description)
|
||||
}
|
||||
from project.components.java
|
||||
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
|
||||
credentials { username
|
||||
password
|
||||
|
||||
username nexusUser
|
||||
password nexusPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
../gradlew
|
|
@ -0,0 +1,40 @@
|
|||
package polling_station_dashboard;
|
||||
|
||||
import javafx.event.Event;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.Parent;
|
||||
import java.util.HashMap;
|
||||
|
||||
// TODO: add logging to the process
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 12/06/2016.
|
||||
* EventHandlerMap maps events ids (that are part of polling station dashboard)
|
||||
* to the object that handles this specific event
|
||||
* when EventHandlerMap gets specific event it activates the handle method of the object
|
||||
*/
|
||||
public class EventHandlerMap {
|
||||
|
||||
private HashMap<String, EventHandler<Event>> eventIdToHandler;
|
||||
|
||||
public EventHandlerMap()
|
||||
{
|
||||
this.eventIdToHandler = new HashMap<>();
|
||||
}
|
||||
|
||||
public void Add(String eventId, EventHandler<Event> eventHandler)
|
||||
{
|
||||
this.eventIdToHandler.put(eventId, eventHandler);
|
||||
}
|
||||
|
||||
public void Handle(Event event)
|
||||
{
|
||||
try {
|
||||
this.eventIdToHandler.get(((Parent) event.getSource()).getId()).handle(event);
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
System.out.println("The event map doesn't have this kind of event handler : " + e);
|
||||
// add logs ...
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package polling_station_dashboard;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
import polling_station_dashboard.search.SearchHandler;
|
||||
import polling_station_dashboard.search.advancedSearch.AdvancedSearchHandler;
|
||||
import polling_station_dashboard.search.advancedSearch.AdvancedSearchLoader;
|
||||
import polling_station_dashboard.search.submitVoter.lodgeAppeal.LodgeAppealLoader;
|
||||
import polling_station_dashboard.search.submitVoter.lodgeAppeal.LodgeAppealVisualUpdater;
|
||||
import polling_station_dashboard.search.votersFetcher.DummyVotersFetcher;
|
||||
import polling_station_dashboard.settings.SettingsVisualUpdater;
|
||||
import polling_station_dashboard.settings.settingsLoader;
|
||||
import polling_station_dashboard.statusLog.StatusLogLoader;
|
||||
import polling_station_dashboard.statusLog.StatusLogVisualUpdater;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 12/06/2016.
|
||||
* EventHandlerMapper creates EventHandlerMap with objects that handles next parts:
|
||||
* 1. Status Log extension
|
||||
* 2. Settings extension
|
||||
* 3. Search Handling
|
||||
*/
|
||||
public class EventHandlerMapper {
|
||||
|
||||
public static EventHandlerMap CreateEventHandlerMap(Stage primaryStage) throws IOException
|
||||
{
|
||||
EventHandlerMap map = new EventHandlerMap();
|
||||
|
||||
// maps status log object to settings visual updater
|
||||
settingsLoader settingsLoader = new settingsLoader(primaryStage);
|
||||
SettingsVisualUpdater settingsVisualUpdater =
|
||||
new SettingsVisualUpdater(settingsLoader.GetSettingsInstance(), primaryStage);
|
||||
map.Add("SettingsButton", settingsVisualUpdater);
|
||||
map.Add("Settings", settingsVisualUpdater);
|
||||
|
||||
// maps settings object to status log visual updater
|
||||
StatusLogLoader statusLogLoader = new StatusLogLoader(primaryStage);
|
||||
StatusLogVisualUpdater statusLogVisualUpdater =
|
||||
new StatusLogVisualUpdater(statusLogLoader.GetStatusLogInstance(), primaryStage);
|
||||
map.Add("StatusLogButton", statusLogVisualUpdater);
|
||||
map.Add("StatusLog", statusLogVisualUpdater);
|
||||
|
||||
// map advanced search object to its handler
|
||||
AdvancedSearchLoader advancedSearchLoader = new AdvancedSearchLoader(primaryStage);
|
||||
AdvancedSearchHandler advancedSearchHandler = new AdvancedSearchHandler(
|
||||
advancedSearchLoader.GetSettingsInstance(), primaryStage);
|
||||
map.Add("ExpandAdvanceSearch", advancedSearchHandler);
|
||||
|
||||
// map add voter to search button triggered
|
||||
SearchHandler searchHandler = new SearchHandler(primaryStage, new DummyVotersFetcher());
|
||||
map.Add("SearchButton", searchHandler);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package polling_station_dashboard;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 28/05/2016.
|
||||
* PollingStationDashboardController controls the behavior of the polling station dashboard
|
||||
*/
|
||||
public class PollingStationDashboardController {
|
||||
private EventHandlerMap eventHandlerMap;
|
||||
|
||||
public void SetEventHandlerMap(EventHandlerMap map)
|
||||
{
|
||||
this.eventHandlerMap = map;
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void OnStatusLogPressed(MouseEvent mousePressed)
|
||||
{
|
||||
this.eventHandlerMap.Handle(mousePressed);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void OnSettingsPressed(MouseEvent mousePressed)
|
||||
{
|
||||
this.eventHandlerMap.Handle(mousePressed);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void SearchTrigered(MouseEvent mousePressed)
|
||||
{
|
||||
this.eventHandlerMap.Handle(mousePressed);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void ExpandAdvanceSearch(MouseEvent mousePressed) { this.eventHandlerMap.Handle(mousePressed);}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package polling_station_dashboard;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 28/05/2016
|
||||
* This class loads the polling station fxml
|
||||
*/
|
||||
public class PollingStationDashboardLoader {
|
||||
|
||||
private static final String POLLING_STATION_DASHBOARD_FXML_PATH = "/view/dashboard/polling_station_dashboard.fxml";
|
||||
|
||||
private Stage currentStage;
|
||||
|
||||
public PollingStationDashboardLoader (Stage primaryStage) throws IOException
|
||||
{
|
||||
primaryStage.setX(100);
|
||||
primaryStage.setY(100);
|
||||
|
||||
currentStage = primaryStage;
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(POLLING_STATION_DASHBOARD_FXML_PATH));
|
||||
Parent root = fxmlLoader.load();
|
||||
PollingStationDashboardController controller = fxmlLoader.getController();
|
||||
|
||||
currentStage.setTitle("Polling Station Dashboard");
|
||||
currentStage.setScene(new Scene(root, 850, 615));
|
||||
currentStage.show();
|
||||
|
||||
controller.SetEventHandlerMap(EventHandlerMapper.CreateEventHandlerMap(primaryStage));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package polling_station_dashboard.search;
|
||||
|
||||
import javafx.event.Event;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
import polling_station_dashboard.search.submitVoter.SubmitVoterLoader;
|
||||
import polling_station_dashboard.search.votersFetcher.VotersFetcher;
|
||||
import polling_station_dashboard.search.addVoter.AddVoterLoader;
|
||||
|
||||
import javafx.scene.control.Button;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 12/06/2016.
|
||||
* SearchHandler trying to fetch wanted users by given strings (votersFetcher) and then
|
||||
* Starts the eddit/add panel based on what the votersFetcher Have fetched.
|
||||
*/
|
||||
public class SearchHandler implements EventHandler {
|
||||
|
||||
private Stage currentStage;
|
||||
private VotersFetcher votersFetcher;
|
||||
private Button AddVoterButton;
|
||||
public SearchHandler(Stage primaryStage, VotersFetcher votersFetcher)
|
||||
{
|
||||
this.currentStage = primaryStage;
|
||||
this.votersFetcher = votersFetcher;
|
||||
}
|
||||
|
||||
private List<String> GetFilters()
|
||||
{
|
||||
String unSeparatedFilters = ((TextField)this.currentStage.getScene().lookup("#SearchValue")).getText();
|
||||
String[] filters = unSeparatedFilters.split(" -|\\:|\\,");
|
||||
return Arrays.asList(filters);
|
||||
}
|
||||
|
||||
private void AddVoterPanel() throws IOException
|
||||
{
|
||||
((Pane)this.currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(this.AddVoterButton);
|
||||
new AddVoterLoader(this.currentStage);
|
||||
}
|
||||
|
||||
private void AddVoterAddButton() throws IOException {
|
||||
this.AddVoterButton = new Button("Add New Voter");
|
||||
this.AddVoterButton.setOnAction(e -> {
|
||||
try {
|
||||
AddVoterPanel();
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
});
|
||||
((Pane)currentStage.getScene().lookup("#AddEditPane")).getChildren().add(AddVoterButton);
|
||||
}
|
||||
|
||||
private void AddSubmitVoterPanel(HashMap<String, String> voter) throws IOException
|
||||
{
|
||||
SubmitVoterLoader submitVoterLoader = new SubmitVoterLoader(this.currentStage);
|
||||
submitVoterLoader.GenerateVoterSubmit(voter);
|
||||
}
|
||||
|
||||
private void VotersCheck() throws IOException {
|
||||
List<String> filters = GetFilters();
|
||||
|
||||
List<HashMap<String,String>> voters = votersFetcher.FetchVoters(filters);
|
||||
|
||||
if (voters.isEmpty())
|
||||
{
|
||||
AddVoterAddButton();
|
||||
}
|
||||
else if(voters.get(0).get("EligibleToVote").equals("no") || voters.get(0).get("EligibleToVote").equals("yes"))
|
||||
{
|
||||
AddSubmitVoterPanel(voters.get(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IOException("The given voter have no valid EligibleToVote field");
|
||||
}
|
||||
}
|
||||
|
||||
private void CleanSearchLine()
|
||||
{
|
||||
((TextField)this.currentStage.getScene().lookup("#SearchValue")).setText(" ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(Event event) {
|
||||
try {
|
||||
VotersCheck();
|
||||
CleanSearchLine();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package polling_station_dashboard.search.addVoter;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 11/06/2016.
|
||||
* This object controls the add voter panel behavior
|
||||
*/
|
||||
public class AddVoterController {
|
||||
|
||||
private Stage currentStage;
|
||||
|
||||
|
||||
public void SetStage(Stage primaryStage)
|
||||
{
|
||||
this.currentStage = primaryStage;
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void RemoveAddVoterPanel()
|
||||
{
|
||||
// when this button pressed (the cancel button) only the add voter panel is in list of children of AddEditPane
|
||||
// this why removing the element at index 0 will remove this panel
|
||||
System.out.println(((Pane)this.currentStage.getScene().lookup("#AddEditPane")).getChildren());
|
||||
((Pane)this.currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package polling_station_dashboard.search.addVoter;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 11/06/2016.
|
||||
* This class loads the add voter panel (which adds voters)
|
||||
*/
|
||||
public class AddVoterLoader {
|
||||
|
||||
private static final String ADD_VOTER_FXML_PATH = "/view/dashboard/add_voter.fxml";
|
||||
|
||||
private Stage currentStage;
|
||||
|
||||
public AddVoterLoader (Stage primaryStage) throws IOException
|
||||
{
|
||||
currentStage = primaryStage;
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(ADD_VOTER_FXML_PATH));
|
||||
Parent root = fxmlLoader.load();
|
||||
AddVoterController controller = fxmlLoader.getController();
|
||||
|
||||
Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane");
|
||||
addEditPane.getChildren().add(root);
|
||||
controller.SetStage(primaryStage);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package polling_station_dashboard.search.advancedSearch;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by dasha on 7/9/2016.
|
||||
* AdvancedSearchController controls the behavior of the adnvaced search panel
|
||||
* for example searching by tag type
|
||||
*/
|
||||
public class AdvancedSearchController {
|
||||
|
||||
private Stage currentStage;
|
||||
|
||||
private BorderPane regularSearch;
|
||||
|
||||
public void SetStage(Stage stage){
|
||||
this.currentStage = stage;
|
||||
}
|
||||
|
||||
public void SetRegularSearch(BorderPane regularSearch) { this.regularSearch = regularSearch; }
|
||||
|
||||
@FXML
|
||||
private void RemoveAdvancedSearch(){
|
||||
// the only object in this container by now is the advanced search
|
||||
Pane searchContainer = (Pane) this.currentStage.getScene().lookup("#SearchContainer");
|
||||
searchContainer.getChildren().remove(0);
|
||||
|
||||
// after removed the advanced search we need to return the regular one
|
||||
searchContainer.getChildren().add(this.regularSearch);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package polling_station_dashboard.search.advancedSearch;
|
||||
|
||||
import javafx.event.Event;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by dasha on 7/9/2016.
|
||||
* AdvancedSearchHandler handles the event that being passed from the polling station dashboard
|
||||
*/
|
||||
public class AdvancedSearchHandler implements EventHandler {
|
||||
|
||||
private GridPane advancedSearch;
|
||||
private Stage currentStage;
|
||||
|
||||
public AdvancedSearchHandler(GridPane advancedSearch, Stage primalStage)
|
||||
{
|
||||
this.advancedSearch = advancedSearch;
|
||||
this.currentStage = primalStage;
|
||||
}
|
||||
|
||||
private void UpdateAdvancedSearch() {
|
||||
RemoveRegularSearch();
|
||||
AddAdvancedSearch();
|
||||
}
|
||||
|
||||
private void AddAdvancedSearch() {
|
||||
Pane searchContainer = (Pane) currentStage.getScene().lookup("#SearchContainer");
|
||||
searchContainer.getChildren().add(advancedSearch);
|
||||
}
|
||||
|
||||
private void RemoveRegularSearch() {
|
||||
// the only element that is in this container is the regular search
|
||||
Pane searchContainer = (Pane) currentStage.getScene().lookup("#SearchContainer");
|
||||
searchContainer.getChildren().remove(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(Event event) {
|
||||
UpdateAdvancedSearch();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package polling_station_dashboard.search.advancedSearch;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
import polling_station_dashboard.settings.settingsController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by dasha on 7/9/2016.
|
||||
* AdvancedSearchLoader loads the advanced search panel
|
||||
*/
|
||||
public class AdvancedSearchLoader {
|
||||
private static final String ADVANCED_SEARCH_FXML_PATH = "/view/dashboard/advanced_search.fxml";
|
||||
|
||||
private Stage currentStage;
|
||||
private FXMLLoader fxmlLoader;
|
||||
|
||||
public AdvancedSearchLoader(Stage primaryStage) throws IOException
|
||||
{
|
||||
currentStage = primaryStage;
|
||||
fxmlLoader = new FXMLLoader(getClass().getResource(ADVANCED_SEARCH_FXML_PATH));
|
||||
}
|
||||
|
||||
public GridPane GetSettingsInstance() throws IOException {
|
||||
GridPane settings = fxmlLoader.load();
|
||||
AdvancedSearchController controller = fxmlLoader.getController();
|
||||
Pane searchContainer = (Pane) currentStage.getScene().lookup("#SearchContainer");
|
||||
BorderPane regularSearch = (BorderPane) searchContainer.getChildren().get(0);
|
||||
|
||||
controller.SetRegularSearch(regularSearch);
|
||||
controller.SetStage(currentStage);
|
||||
|
||||
return settings;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package polling_station_dashboard.search.submitVoter;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
import polling_station_dashboard.search.submitVoter.lodgeAppeal.LodgeAppealVisualUpdater;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
|
||||
* SubmitVoterController controls the behavior of the submit panel which gives the ability
|
||||
* to change the ability of vote to a voter
|
||||
*/
|
||||
public class SubmitVoterController {
|
||||
private Stage currentStage;
|
||||
private LodgeAppealVisualUpdater lodgeAppealVisualUpdater;
|
||||
|
||||
public void SetStage(Stage primaryStage)
|
||||
{
|
||||
this.currentStage = primaryStage;
|
||||
}
|
||||
|
||||
public void SetLodgeAppeal(GridPane lodgeAppeal){
|
||||
this.lodgeAppealVisualUpdater = new LodgeAppealVisualUpdater(lodgeAppeal, currentStage);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void AddLodgeAppeal(){
|
||||
this.lodgeAppealVisualUpdater.UpdateLodgeAppeal();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void RemoveSubmitVoterPanel()
|
||||
{
|
||||
// when this button pressed (the cancel button) only the add voter panel is in list of children of AddEditPane
|
||||
// this why removing the element at index 0 will remove this panel
|
||||
((Pane)this.currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package polling_station_dashboard.search.submitVoter;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
import polling_station_dashboard.search.submitVoter.lodgeAppeal.LodgeAppealLoader;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
|
||||
* SubmitVoterLoader Loads the submit voter fxml
|
||||
*/
|
||||
public class SubmitVoterLoader {
|
||||
|
||||
private static final String SUBMIT_VOTER_FXML_PATH = "/view/dashboard/submit_voter.fxml";
|
||||
|
||||
private Stage currentStage;
|
||||
private FXMLLoader fxmlLoader;
|
||||
|
||||
private void ResetVoterParams(HashMap<String, String> voter, Parent root)
|
||||
{
|
||||
((Label)root.lookup("#IDNumberValue")).setText(voter.get("IDNumber"));
|
||||
((Label)root.lookup("#EligibleToVoteValue")).setText(voter.get("EligibleToVote"));
|
||||
((Label)root.lookup("#StatusValue")).setText(voter.get("Status"));
|
||||
((Label)root.lookup("#ChannelValue")).setText(voter.get("Channel"));
|
||||
}
|
||||
|
||||
public SubmitVoterLoader (Stage primaryStage) throws IOException
|
||||
{
|
||||
currentStage = primaryStage;
|
||||
this.fxmlLoader = new FXMLLoader(getClass().getResource(SUBMIT_VOTER_FXML_PATH));
|
||||
}
|
||||
|
||||
public void GenerateVoterSubmit(HashMap<String, String> voter) throws IOException
|
||||
{
|
||||
Parent root = this.fxmlLoader.load();
|
||||
ResetVoterParams(voter, root);
|
||||
|
||||
LodgeAppealLoader lodgeAppealLoader = new LodgeAppealLoader(currentStage);
|
||||
|
||||
SubmitVoterController controller = fxmlLoader.getController();
|
||||
Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane");
|
||||
addEditPane.getChildren().add(root);
|
||||
|
||||
controller.SetStage(currentStage);
|
||||
controller.SetLodgeAppeal(lodgeAppealLoader.GetSettingsInstance());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by dasha on 7/2/2016.
|
||||
* Contros the behavior od the lodge appeal panel
|
||||
*/
|
||||
public class LodgeAppealController {
|
||||
private Stage currentStage;
|
||||
|
||||
public void SetStage(Stage primaryStage)
|
||||
{
|
||||
this.currentStage = primaryStage;
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void HandleCancel(){
|
||||
Pane addEditPane = (Pane) currentStage.getScene().lookup("#AddEditPane");
|
||||
// the add edit pane have only one child at a time which mean removing the child in index 0 will
|
||||
// clean the add edit pane
|
||||
addEditPane.getChildren().remove(0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Stage;
|
||||
import polling_station_dashboard.settings.settingsController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by dasha on 7/2/2016.
|
||||
* Loads the lodge appeal fxml file
|
||||
*/
|
||||
public class LodgeAppealLoader {
|
||||
private static final String LODGE_APPEAL_PATH = "/view/dashboard/lodge_appeal.fxml";
|
||||
|
||||
private Stage currentStage;
|
||||
private FXMLLoader fxmlLoader;
|
||||
|
||||
public LodgeAppealLoader(Stage primaryStage) throws IOException
|
||||
{
|
||||
currentStage = primaryStage;
|
||||
fxmlLoader = new FXMLLoader(getClass().getResource(LODGE_APPEAL_PATH));
|
||||
}
|
||||
|
||||
public GridPane GetSettingsInstance() throws IOException {
|
||||
GridPane settings = fxmlLoader.load();
|
||||
LodgeAppealController controller = fxmlLoader.getController();
|
||||
controller.SetStage(currentStage);
|
||||
|
||||
return settings;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
||||
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by dasha on 7/2/2016.
|
||||
* LodgeAppealVisualUpdater is in response of add and remove the lodge appeal panel
|
||||
* to polling station dashboard
|
||||
*/
|
||||
public class LodgeAppealVisualUpdater {
|
||||
|
||||
private Stage currentStage;
|
||||
private GridPane lodgeAppeal;
|
||||
private boolean lodgeAppealOpened = false;
|
||||
|
||||
public LodgeAppealVisualUpdater(GridPane lodgeAppeal, Stage primalStage)
|
||||
{
|
||||
this.lodgeAppeal = lodgeAppeal;
|
||||
this.currentStage = primalStage;
|
||||
}
|
||||
|
||||
public void UpdateLodgeAppeal() {
|
||||
if (!lodgeAppealOpened) {
|
||||
ClearAddEditPanel();
|
||||
AddLodgeAppeal();
|
||||
}
|
||||
else {
|
||||
ClearAddEditPanel();
|
||||
}
|
||||
lodgeAppealOpened = !lodgeAppealOpened;
|
||||
}
|
||||
|
||||
private void ClearAddEditPanel(){
|
||||
Pane addEditPane = (Pane) currentStage.getScene().lookup("#AddEditPane");
|
||||
// the add edit pane have only one child at a time which mean removing the child in index 0 will
|
||||
// clean the add edit pane
|
||||
addEditPane.getChildren().remove(0);
|
||||
}
|
||||
|
||||
private void AddLodgeAppeal() {
|
||||
Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane");
|
||||
addEditPane.getChildren().add(lodgeAppeal);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package polling_station_dashboard.search.votersFetcher;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 18/06/2016.
|
||||
* This object used for receiving empty list of object for the logic of add voter could be tested
|
||||
* is implemented in this dummy way for testing the normal gui flow
|
||||
*/
|
||||
public class DummyVotersFetcher implements VotersFetcher {
|
||||
|
||||
private List<HashMap<String,String>> dummyVoters;
|
||||
|
||||
public DummyVotersFetcher()
|
||||
{
|
||||
this.dummyVoters = new ArrayList<>();
|
||||
|
||||
// voter that cant vote
|
||||
HashMap<String, String> voter1 = new HashMap<>();
|
||||
voter1.put("IDNumber", "123123123");
|
||||
voter1.put("EligibleToVote", "no");
|
||||
voter1.put("Status", "HasNotVoted");
|
||||
voter1.put("Channel", "IDCMaths");
|
||||
|
||||
// voter that can vote
|
||||
HashMap<String, String> voter2 = new HashMap<>();
|
||||
voter2.put("IDNumber", "234234234");
|
||||
voter2.put("EligibleToVote", "yes");
|
||||
voter2.put("Status", "HasNotVoted");
|
||||
voter2.put("Channel", "IDCPhysics");
|
||||
|
||||
this.dummyVoters.add(voter1);
|
||||
this.dummyVoters.add(voter2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets list of filters and return all the voters from dummy voters that have those filters
|
||||
* @param filters list of strings
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<String,String>> FetchVoters(List<String> filters)
|
||||
{
|
||||
List<HashMap<String,String>> votersWithFilters = new ArrayList<>();
|
||||
|
||||
for (String filter : filters) {
|
||||
for (HashMap<String, String> voter: this.dummyVoters) {
|
||||
Iterator it = voter.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry pair = (Map.Entry) it.next();
|
||||
if (((String) pair.getKey()).contains(filter) || ((String) pair.getValue()).contains(filter)) {
|
||||
votersWithFilters.add(voter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return votersWithFilters;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package polling_station_dashboard.search.votersFetcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 12/06/2016.
|
||||
* votersFetcher gives the ability of fetching voters based on given list of filters
|
||||
*/
|
||||
public interface VotersFetcher {
|
||||
|
||||
List<HashMap<String,String>> FetchVoters(List<String> filters);
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package polling_station_dashboard.settings;
|
||||
|
||||
import javafx.event.Event;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 12/06/2016.
|
||||
* This object manages the visual changes of the settings panel
|
||||
* which means that he opens and closes settings panel)
|
||||
*/
|
||||
public class SettingsVisualUpdater implements EventHandler {
|
||||
|
||||
private GridPane settings;
|
||||
private static final int SETTINGS_HEIGHT_EXPANSION_VALUE = 60;
|
||||
private boolean settingsOpened = false;
|
||||
private Stage currentStage;
|
||||
|
||||
public SettingsVisualUpdater(GridPane settings, Stage primalStage)
|
||||
{
|
||||
this.settings = settings;
|
||||
this.currentStage = primalStage;
|
||||
}
|
||||
|
||||
public void UpdateSettings() {
|
||||
showSettingsButton(settingsOpened);
|
||||
if (!settingsOpened) {
|
||||
SetSettingsSize(SETTINGS_HEIGHT_EXPANSION_VALUE);
|
||||
addSettings();
|
||||
}
|
||||
else {
|
||||
SetSettingsSize(-SETTINGS_HEIGHT_EXPANSION_VALUE);
|
||||
removeSettings();
|
||||
}
|
||||
settingsOpened = !settingsOpened;
|
||||
}
|
||||
|
||||
private void SetSettingsSize(int expansionHeight) {
|
||||
currentStage.setHeight(currentStage.getHeight() + expansionHeight);
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#Settings");
|
||||
statusLog.setPrefHeight(expansionHeight);
|
||||
}
|
||||
|
||||
private void showSettingsButton(boolean showOrNot){
|
||||
Button settings = (Button) currentStage.getScene().lookup("#SettingsButton");
|
||||
settings.setVisible(showOrNot);
|
||||
}
|
||||
|
||||
private void addSettings() {
|
||||
Pane settingsPane = (Pane) currentStage.getScene().lookup("#Settings");
|
||||
settingsPane.getChildren().add(settings);
|
||||
}
|
||||
|
||||
private void removeSettings(){
|
||||
Pane settingsPane = (Pane) currentStage.getScene().lookup("#Settings");
|
||||
settingsPane.getChildren().remove(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(Event event) {
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package polling_station_dashboard.settings;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 04/06/2016.
|
||||
* manages the button pressing of the settings
|
||||
*/
|
||||
public class settingsController {
|
||||
|
||||
private Stage currentStage;
|
||||
|
||||
public void SetStage(Stage stage){
|
||||
this.currentStage = stage;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package polling_station_dashboard.settings;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 04/06/2016.
|
||||
* Loads the settings fxml file
|
||||
*/
|
||||
public class settingsLoader {
|
||||
|
||||
private static final String SETTINGS_FXML_PATH = "/view/dashboard/settings.fxml";
|
||||
|
||||
private Stage currentStage;
|
||||
private FXMLLoader fxmlLoader;
|
||||
|
||||
public settingsLoader(Stage primaryStage) throws IOException
|
||||
{
|
||||
currentStage = primaryStage;
|
||||
fxmlLoader = new FXMLLoader(getClass().getResource(SETTINGS_FXML_PATH));
|
||||
}
|
||||
|
||||
public GridPane GetSettingsInstance() throws IOException {
|
||||
GridPane settings = fxmlLoader.load();
|
||||
settingsController controller = fxmlLoader.getController();
|
||||
controller.SetStage(currentStage);
|
||||
|
||||
return settings;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package polling_station_dashboard.statusLog;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 04/06/2016.
|
||||
* This class represent status of other users progress in the voting process
|
||||
*/
|
||||
public class StatusLogController {
|
||||
|
||||
private Stage primaryStage;
|
||||
|
||||
public void SetStage(Stage stage){
|
||||
primaryStage = stage;
|
||||
}
|
||||
}
|