diff --git a/bubble-server/src/main/java/bubble/model/cloud/BubbleNetworkState.java b/bubble-server/src/main/java/bubble/model/cloud/BubbleNetworkState.java index ebf7c559..e7fc3fbe 100644 --- a/bubble-server/src/main/java/bubble/model/cloud/BubbleNetworkState.java +++ b/bubble-server/src/main/java/bubble/model/cloud/BubbleNetworkState.java @@ -6,7 +6,7 @@ import static bubble.ApiConstants.enumFromString; public enum BubbleNetworkState { - created, setup, starting, restoring, running, stopping, stopped; + created, starting, restoring, running, stopping, stopped; @JsonCreator public static BubbleNetworkState fromString(String v) { return enumFromString(BubbleNetworkState.class, v); } diff --git a/bubble-server/src/main/java/bubble/notify/NewNodeNotification.java b/bubble-server/src/main/java/bubble/notify/NewNodeNotification.java index 9a84c0a3..453b4fcc 100644 --- a/bubble-server/src/main/java/bubble/notify/NewNodeNotification.java +++ b/bubble-server/src/main/java/bubble/notify/NewNodeNotification.java @@ -15,6 +15,7 @@ public class NewNodeNotification { @Getter @Setter private String account; @Getter @Setter private String host; @Getter @Setter private String network; + @Getter @Setter private String networkName; @Getter @Setter private String domain; @Getter @Setter private String fqdn; @Getter @Setter private String cloud; diff --git a/bubble-server/src/main/java/bubble/notify/NotificationHandler_hello_from_sage.java b/bubble-server/src/main/java/bubble/notify/NotificationHandler_hello_from_sage.java index ad1158fa..ee8fe27e 100644 --- a/bubble-server/src/main/java/bubble/notify/NotificationHandler_hello_from_sage.java +++ b/bubble-server/src/main/java/bubble/notify/NotificationHandler_hello_from_sage.java @@ -113,6 +113,7 @@ public class NotificationHandler_hello_from_sage extends ReceivedNotificationHan final NewNodeNotification newNodeRequest = new NewNodeNotification() .setAccount(network.getAccount()) .setNetwork(network.getUuid()) + .setNetworkName(network.getName()) .setDomain(network.getDomain()) .setCloud(cloud.getUuid()) .setRegion(closestNotUs.getInternalName()) diff --git a/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java b/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java index d2aee938..0957e7f2 100644 --- a/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java +++ b/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java @@ -300,6 +300,13 @@ public class AccountsResource { return configuration.subResource(DomainsResource.class, c.account); } + @Path("/{id}"+EP_FOOTPRINTS) + public FootprintsResource getFootprints(@Context ContainerRequest ctx, + @PathParam("id") String id) { + final AccountContext c = new AccountContext(ctx, id); + return configuration.subResource(FootprintsResource.class, c.account); + } + @Path("/{id}"+EP_NETWORKS) public NetworksResource getNetworks(@Context ContainerRequest ctx, @PathParam("id") String id) { diff --git a/bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java b/bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java index 91500000..17fd7a36 100644 --- a/bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java +++ b/bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java @@ -131,7 +131,7 @@ public class StandardNetworkService implements NetworkService { progressMeter.write(METER_TICK_VALIDATING_NODE_NETWORK_AND_PLAN); final BubbleNetwork network = networkDAO.findByUuid(nn.getNetwork()); - if (network.getState() != BubbleNetworkState.setup) { + if (network.getState() != BubbleNetworkState.starting) { progressMeter.error(METER_ERROR_NETWORK_NOT_READY_FOR_SETUP); return die("newNode: network is not in 'setup' state: "+network.getState()); } @@ -406,7 +406,7 @@ public class StandardNetworkService implements NetworkService { // if there are no running nodes, and network was in 'setup' state, put it network back into 'created' state final BubbleNetwork network = networkDAO.findByUuid(node.getNetwork()); - if (network.getState() == BubbleNetworkState.setup) { + if (network.getState() == BubbleNetworkState.starting) { if (nodeDAO.findByNetwork(node.getNetwork()).stream().noneMatch(BubbleNode::isRunning)) { networkDAO.update(network.setState(BubbleNetworkState.created)); } @@ -502,7 +502,7 @@ public class StandardNetworkService implements NetworkService { throw invalidEx("err.network.cannotStartInCurrentState"); } - network.setState(BubbleNetworkState.setup); + network.setState(BubbleNetworkState.starting); networkDAO.update(network); // ensure NS records for network are in DNS @@ -515,6 +515,7 @@ public class StandardNetworkService implements NetworkService { final NewNodeNotification newNodeRequest = new NewNodeNotification() .setAccount(accountUuid) .setNetwork(network.getUuid()) + .setNetworkName(network.getName()) .setDomain(network.getDomain()) .setFork(network.fork()) .setHost(host) @@ -554,7 +555,7 @@ public class StandardNetworkService implements NetworkService { if (network.getState() != BubbleNetworkState.stopped) { throw invalidEx("err.network.restore.notStopped"); } - network.setState(BubbleNetworkState.setup); + network.setState(BubbleNetworkState.starting); networkDAO.update(network); // ensure NS records for network are in DNS @@ -569,6 +570,7 @@ public class StandardNetworkService implements NetworkService { final NewNodeNotification newNodeRequest = new NewNodeNotification() .setAccount(network.getAccount()) .setNetwork(network.getUuid()) + .setNetworkName(network.getName()) .setDomain(network.getDomain()) .setRestoreKey(restoreKey) .setHost(host) diff --git a/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties b/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties index 14d02e93..43cd0973 100644 --- a/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties +++ b/bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties @@ -74,6 +74,8 @@ account_deletion_name_full_delete=Full delete account_deletion_description_full_delete=If you delete your account, it will be completely deleted. Another user could then register a new Account using your old username. account_deletion_name_block_delete=Delete all data, block future registrations account_deletion_description_block_delete=If you delete your account, all your account data and information will be deleted, but an empty stub Account with your username will remain. This prevents anyone from reusing your username in the future. +account_deletion_name_=Error loading deletion policy +account_deletion_description_=Error loading deletion policy field_label_policy_account_operation_timeout=Account Operation Timeout field_label_policy_account_operation_timeout_description=To ensure your Account security, certain operations (like downloading your Account data) require your approval. If no response is received before this timeout, the operation will not be allowed to proceed. field_label_policy_node_operation_timeout=Bubble Operation Timeout @@ -143,13 +145,13 @@ message_inbound_failure=failed # Networks table loading_networks=Loading bubbles... table_title_networks=Bubbles -table_head_networks_name=Name -table_head_networks_locale=Locale -table_head_networks_timezone=Time Zone -table_head_networks_object_state=State -table_head_networks_action_view=View -table_head_networks_action_start_stop=Start/Stop -table_head_networks_action_delete=Delete +label_field_networks_name=Name +label_field_networks_locale=Locale +label_field_networks_timezone=Time Zone +label_field_networks_object_state=State +label_field_networks_action_view=View +label_field_networks_action_start_stop=Start/Stop +label_field_networks_action_delete=Delete table_row_networks_action_view=View table_row_networks_action_start=Start table_row_networks_action_stop=Stop @@ -157,6 +159,13 @@ table_row_networks_action_delete=Delete button_label_new_network=Create Bubble message_empty_networks=Create your first Bubble! +# Nodes table +label_field_nodes_fqdn=Name +label_field_nodes_region=Region +label_field_nodes_state=State +label_field_nodes_ip4=IPv4 +label_field_nodes_ip6=IPv6 + # New Network page message_no_contacts=No authorized contact info found link_label_no_contacts=Add an email address or SMS-enabled phone number @@ -267,6 +276,29 @@ meter_error_role_validation_errors=Validation of ansible roles failed, cannot in # Launch progress meter: catch-all for unknown/unmapped errors meter_unknown_error=An unknown error occurred +# Network statuses +msg_network_state_created=initialized +msg_network_state_starting=starting +msg_network_state_restoring=restoring +msg_network_state_running=running +msg_network_state_stopping=stopping +msg_network_state_stopped=stopped + +# Node states +msg_node_state_created=created +msg_node_state_starting=starting +msg_node_state_booting=booting +msg_node_state_booted=booted +msg_node_state_preparing_install=preparing installation +msg_node_state_awaiting_dns=waiting for DNS to be visible +msg_node_state_installing=installing +msg_node_state_running=running +msg_node_state_stopping=stopping +msg_node_state_unreachable=unreachable +msg_node_state_error_stopping=error stopping +msg_node_state_error_stopped=stopped with error +msg_node_state_unknown_error=unknown error + # Error messages from API server err.accountContactsJson.length=Account contacts length violation err.accountOperationTimeout.required=Account operation timeout is required diff --git a/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties b/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties index 0acf05eb..92b0ebae 100644 --- a/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties +++ b/bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties @@ -8,6 +8,9 @@ message_false=False message_null=null message_undefined=undefined +# Display of percent values has localized variations +label_percent={{percent}}% + button_label_set_locale=Set Language field_label_locale=Language field_label_timezone=Time Zone diff --git a/bubble-server/src/main/resources/models/defaults/cloudService.json b/bubble-server/src/main/resources/models/defaults/cloudService.json index 7904a9ed..a70aa7ab 100644 --- a/bubble-server/src/main/resources/models/defaults/cloudService.json +++ b/bubble-server/src/main/resources/models/defaults/cloudService.json @@ -36,7 +36,7 @@ }, { - "name": "S3_US_Standard", + "name": "S3Storage", "type": "storage", "driverClass": "bubble.cloud.storage.s3.S3StorageDriver", "driverConfig": { diff --git a/bubble-server/src/test/java/bubble/test/S3StorageTest.java b/bubble-server/src/test/java/bubble/test/S3StorageTest.java index 321b47d4..18e721a5 100644 --- a/bubble-server/src/test/java/bubble/test/S3StorageTest.java +++ b/bubble-server/src/test/java/bubble/test/S3StorageTest.java @@ -39,7 +39,7 @@ public class S3StorageTest extends NetworkTestBase { public static final int NUM_FILES_IN_DIR = 13; public static final int LIST_FETCH_SIZE = 5; - public static final String S3_CLOUD_NAME = "S3_US_Standard"; + public static final String S3_CLOUD_NAME = "S3Storage"; public static final String REKEY_S3_CLOUD = "RekeyS3Cloud"; public static String comment = "not running"; diff --git a/bubble-server/src/test/resources/models/system/cloudService.json b/bubble-server/src/test/resources/models/system/cloudService.json index 6aefee3c..918938c7 100644 --- a/bubble-server/src/test/resources/models/system/cloudService.json +++ b/bubble-server/src/test/resources/models/system/cloudService.json @@ -1,7 +1,7 @@ [ { "_subst": true, - "name": "S3_US_Standard", + "name": "S3Storage", "type": "storage", "driverClass": "bubble.cloud.storage.s3.S3StorageDriver", "driverConfig": { diff --git a/bubble-web b/bubble-web index 5929c083..2796ab0a 160000 --- a/bubble-web +++ b/bubble-web @@ -1 +1 @@ -Subproject commit 5929c083466af4326f149feef4576b3fb1f9b89c +Subproject commit 2796ab0a31f995e0c2d3a3e34e08ebafcba3da7c diff --git a/config/activation.json b/config/activation.json index 90cceeb8..a4fe7a90 100644 --- a/config/activation.json +++ b/config/activation.json @@ -30,7 +30,7 @@ }, // You must configure the AWS S3 Storage service in order to launch new Bubbles - "S3_US_Standard" : { + "S3Storage" : { "config": { // region must be a valid value from the Regions enum: https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/main/java/com/amazonaws/regions/Regions.java "region": "US_EAST_1",