Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ An app configured with `"app": "s3"` will run using files on S3. QASM jobs that
- ``"next_dir_keybind": <string> or <Array[<string>]>`` (Optional) Keybind to advance to the next directory. Defaults to "Enter".
- ``"toggle_center_line_keybind": <string> or <Array[<string>]>`` (Optional) Keybind to toggle a vertical line in the center of the image. Defaults to "c".
- ``"toggle_all_center_lines_keybind": <string> or <Array[<string>]>`` (Optional) Keybind to toggle a vertical line in the center of all images. Defaults to "C".
- ``"<class_type>_toggle_class_keybind": <string> or <Array[<string>]>`` (Optional) Keybind to toggle between class values. Defaults to "1" for the first class value, "2" for the second, etc.



- ``"imagelabeler"`` Configuration ``<Object>``:
Expand Down Expand Up @@ -217,6 +219,25 @@ An app configured with `"app": "s3"` will run using files on S3. QASM jobs that
- ``"dilate_keybind": <string> or <Array[<string>]>`` Keybind to dilate the binary. Defaults to "="
- ``"erode_keybind": <string>`` Keybind to erode the binary. Defaults to "-"


- ``"input"`` Configuration ``<Object>`` (s3 mode only):
- ``"display_string": <string>`` (Optional) String to display at the top of the input component
- ``"inputs": <Array>`` List of input field definition objects
- ``<Object>`` Object with input field definition
- ``"name": <string>`` (Required) Name of the input field
- ``"title": <string>`` (Required) Title of the input field (shown on hover)
- ``"type": <string>`` (Required) Type of the input field
- ``"text"`` Single line text input
- ``"number"`` Number input
- ``"default": <string> or <number> or <boolean>`` (Optional) Default value of the input field
- ``"on_submit": <Object>`` Object defining what happens when the submit button is pressed
- ``"type": <string>`` (Required) Type of submit action
- ``"aws_lambda"`` Call an AWS Lambda function
- ``"function_arn": <string>`` (Required for ``"aws_lambda"``) ARN of the AWS Lambda function to call
- ``"role_arn": <string>`` (Required for ``"aws_lambda"``) ARN of the IAM role that the AWS Lambda function will assume
- ``"alert_message": <string>`` (Optional) Message to display in an alert box when the function call is successful
- ``"title": <string>`` (Optional) Title of the submit button

## Keybinds
Certain components support user-defined keybinds for set operations. Keybinds are stored in the following format:
`{<string keybind_name>: <string keybind> or Array[<string keybind1>, <string keybind2>], ...}`
Expand Down
5 changes: 4 additions & 1 deletion react-frontend/QASM.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
REQUIRED_QASM_KEYS = ["app", "components"]
REQUIRED_S3_KEYS = ["bucket"]
REQUIRED_PUSH_KEYS = ["static_site_bucket"]
QASM_COMPONENTS = ["home", "grid", "multiclassgrid", "binaryeditor", "imagelabeler"]
QASM_COMPONENTS = ["home", "grid", "multiclassgrid", "binaryeditor", "imagelabeler", "input"]
QASM_MODES = ["local", "s3"]
RUN_MODES = ["dev", "build-exe", "push"]
APP_NAME_KEY = "name"
Expand Down Expand Up @@ -165,6 +165,9 @@ def setup_static_site_bucket(bucket_name: str) -> str:
'RestrictPublicBuckets': False,
},
)

import time
time.sleep(10)

# Create and attach bucket policy
bucket_policy = json.dumps({
Expand Down
20 changes: 20 additions & 0 deletions react-frontend/default-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,26 @@
"display_name": "Binary Editor",
"mode": "s3directory",
"dilate_keybind": "w"
},
{
"component": "input",
"display_name": "Input",
"display_string": "Welcome to the Input component! Please enter your name below.",
"inputs": [
{
"name": "Name",
"type": "text"
},
{
"name": "Age",
"type": "number"
}
],
"on_submit": {
"type": "aws_lambda",
"function_arn": "arn:aws:lambda:us-east-1:475283710372:function:qasm-prod-input-demo",
"role_arn": "arn:aws:iam::475283710372:role/qasm-prod-lambda-exec-role"
}
}
]
}
14 changes: 14 additions & 0 deletions react-frontend/license-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"fields": [
"name",
"installedVersion",
"licenseType",
"repository.url"
],
"repository": {
"url": {
"value": "n/a",
"label": "RepoURL"
}
}
}
Loading