Sfoglia il codice sorgente

fix CloudServices management for nodes

tags/v0.9.0
Jonathan Cobb 4 anni fa
parent
commit
dd0f8a15d3
5 ha cambiato i file con 18 aggiunte e 4 eliminazioni
  1. +8
    -0
      bubble-server/src/main/java/bubble/dao/account/AccountDAO.java
  2. +3
    -0
      bubble-server/src/main/java/bubble/server/BubbleConfiguration.java
  3. +3
    -0
      bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java
  4. +3
    -3
      bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties
  5. +1
    -1
      bubble-web

+ 8
- 0
bubble-server/src/main/java/bubble/dao/account/AccountDAO.java Vedi File

@@ -171,6 +171,14 @@ public class AccountDAO extends AbstractCRUDDAO<Account> implements SqlViewSearc
final CloudServiceDriver driver = parentEntity.getDriver();
if (driver.disableDelegation()) {
return accountEntity.setTemplate(false);

} else if (selfNodeService.getThisNetwork() != null && selfNodeService.getThisNetwork().getInstallType() == AnsibleInstallType.node) {
// on a node, sub-accounts can use the same cloud/config/credentials as their admin
return accountEntity.setDelegated(parentEntity.getDelegated())
.setCredentialsJson(parentEntity.getCredentialsJson())
.setDriverConfigJson(parentEntity.getDriverConfigJson())
.setTemplate(false);

} else {
return accountEntity.setDelegated(parentEntity.getUuid())
.setCredentials(CloudCredentials.delegate(configuration.getThisNode(), configuration))


+ 3
- 0
bubble-server/src/main/java/bubble/server/BubbleConfiguration.java Vedi File

@@ -7,6 +7,7 @@ import bubble.client.BubbleApiClient;
import bubble.cloud.CloudServiceDriver;
import bubble.dao.account.AccountDAO;
import bubble.dao.cloud.CloudServiceDAO;
import bubble.model.cloud.AnsibleInstallType;
import bubble.model.cloud.BubbleNetwork;
import bubble.model.cloud.BubbleNode;
import bubble.server.listener.BubbleFirstTimeListener;
@@ -70,6 +71,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration
public static final File DEBUG_NODE_INSTALL_FILE = new File(HOME_DIR, ".debug_node_install");

public static final String TAG_SAGE_LAUNCHER = "sageLauncher";
public static final String TAG_BUBBLE_NODE = "bubbleNode";
public static final String TAG_NETWORK_UUID = "networkUuid";
public static final String TAG_PAYMENTS_ENABLED = "paymentsEnabled";
public static final String TAG_ENTITY_CLASSES = "entityClasses";
@@ -276,6 +278,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration
{TAG_ALLOW_REGISTRATION, thisNetwork == null ? null : thisNetwork.getBooleanTag(TAG_ALLOW_REGISTRATION, false)},
{TAG_NETWORK_UUID, thisNetwork == null ? null : thisNetwork.getUuid()},
{TAG_SAGE_LAUNCHER, thisNetwork == null || isSageLauncher()},
{TAG_BUBBLE_NODE, thisNetwork == null ? null : thisNetwork.getInstallType() == AnsibleInstallType.node},
{TAG_PAYMENTS_ENABLED, cloudDAO.paymentsEnabled()},
{TAG_PROMO_CODE_POLICY, getPromoCodePolicy().name()},
{TAG_REQUIRE_SEND_METRICS, requireSendMetrics()},


+ 3
- 0
bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java Vedi File

@@ -98,6 +98,9 @@ public abstract class EntityIterator implements Iterator<Identifiable> {
} else {
noopClouds.put(type, cs);
}
} else {
// for new node, cloud services become templates
cs.setTemplate(true);
}
}
add(setLocalStoragePath(cs));


+ 3
- 3
bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties Vedi File

@@ -82,12 +82,12 @@ button_label_set_locale=Set Language
field_label_locale=Language
field_label_timezone=Time Zone

# Sidebar menu
# Menu
label_menu_dashboard=Dashboard
label_menu_dashboard_icon=fa fa-home
label_menu_admin=Admin
label_menu_admin_icon=fa fa-cog
label_menu_admin_users=Accounts
label_menu_admin_users=Users
label_menu_admin_users_icon=fa fa-user-cog
label_menu_admin_model=System Objects
label_menu_admin_model_icon=fa fa-boxes
@@ -95,7 +95,7 @@ label_menu_admin_networks=User Bubbles
label_menu_admin_networks_icon=fa fa-dot-circle
label_menu_admin_bills=User Bills
label_menu_admin_bills_icon=fa fa-money-check-alt
label_menu_account=Account
label_menu_account=My Account
label_menu_account_icon=fa fa-user
label_menu_devices=Devices
label_menu_devices_icon=fa fa-mobile-alt


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit c2e48de27c60183c3c7e8bf9f4d59585bc9b8f2c
Subproject commit b7f7d68eed6d07d35ef2f8f126dc9a7f1624d085

Caricamento…
Annulla
Salva