Skip to content

Commit 45fea11

Browse files
Replace all instances of 'enterprise' with 'cloud' (#807)
## Usage and product changes We replace the term 'enterprise' with 'cloud', to reflect the new consistent terminology used throughout Vaticle.
1 parent 0eb10dd commit 45fea11

File tree

10 files changed

+50
-50
lines changed

10 files changed

+50
-50
lines changed

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ assignees: ''
1212

1313
## Environment
1414

15-
1. TypeDB distribution: Core/Enterprise/Cloud
15+
1. TypeDB distribution: Core/Cloud
1616
2. TypeDB version:
1717
3. Environment: Linux/Mac/Windows/TypeDB Cloud/Google Cloud/AWS/Azure
1818
4. Studio version:

RELEASE_NOTES_LATEST.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ which versions of Studio are compatible with which versions of TypeDB server.
2121

2222

2323
## Bugs Fixed
24-
- **Update Enterprise error code prefix**
24+
- **Update Cloud error code prefix**
2525

26-
* We've updated the enterprise error prefix in places where we detect certain errors.
26+
* We've updated the cloud error prefix in places where we detect certain errors.
2727

2828

2929

dependencies/vaticle/repositories.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def vaticle_dependencies():
2828
git_repository(
2929
name = "vaticle_dependencies",
3030
remote = "https://github.com/vaticle/dependencies",
31-
commit = "a9faffcbe1a0f4a45a07e010e575b7d305ac380e", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_dependencies
31+
commit = "1200b4aef118e75ca070c4944e9459b2aab7982a", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_dependencies
3232
)
3333

3434
def vaticle_force_graph():
@@ -42,12 +42,12 @@ def vaticle_typedb_common():
4242
git_repository(
4343
name = "vaticle_typedb_common",
4444
remote = "https://github.com/vaticle/typedb-common",
45-
tag = "2.25.0", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_common
45+
commit = "4d2adde1cb75a40ca1629eed258d2a7dcda9f5e3", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_common
4646
)
4747

4848
def vaticle_typedb_driver():
4949
git_repository(
5050
name = "vaticle_typedb_driver",
5151
remote = "https://github.com/vaticle/typedb-driver",
52-
tag = "2.25.8", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_client_java
52+
commit = "927343bbb09ad12ba74d88c94d443f3f81cc2e09", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_driver
5353
)

module/connection/ServerDialog.kt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import com.vaticle.typedb.studio.service.Service
5959
import com.vaticle.typedb.studio.service.common.util.Label
6060
import com.vaticle.typedb.studio.service.common.util.Property
6161
import com.vaticle.typedb.studio.service.common.util.Property.Server.TYPEDB_CORE
62-
import com.vaticle.typedb.studio.service.common.util.Property.Server.TYPEDB_ENTERPRISE
62+
import com.vaticle.typedb.studio.service.common.util.Property.Server.TYPEDB_CLOUD
6363
import com.vaticle.typedb.studio.service.common.util.Sentence
6464
import com.vaticle.typedb.studio.service.connection.DriverState.Status.CONNECTED
6565
import com.vaticle.typedb.studio.service.connection.DriverState.Status.CONNECTING
@@ -78,8 +78,8 @@ object ServerDialog {
7878
private class ConnectServerForm : Form.State() {
7979
var server: Property.Server by mutableStateOf(appData.server ?: Property.Server.TYPEDB_CORE)
8080
var coreAddress: String by mutableStateOf(appData.coreAddress ?: "")
81-
var enterpriseAddresses: MutableList<String> = mutableStateListOf<String>().also {
82-
appData.enterpriseAddresses?.let { saved -> it.addAll(saved) }
81+
var cloudAddresses: MutableList<String> = mutableStateListOf<String>().also {
82+
appData.cloudAddresses?.let { saved -> it.addAll(saved) }
8383
}
8484
var username: String by mutableStateOf(appData.username ?: "")
8585
var password: String by mutableStateOf("")
@@ -89,22 +89,22 @@ object ServerDialog {
8989
override fun cancel() = Service.driver.connectServerDialog.close()
9090
override fun isValid(): Boolean = when (server) {
9191
TYPEDB_CORE -> coreAddress.isNotBlank() && addressFormatIsValid(coreAddress)
92-
TYPEDB_ENTERPRISE -> !(enterpriseAddresses.isEmpty() || username.isBlank() || password.isBlank())
92+
TYPEDB_CLOUD -> !(cloudAddresses.isEmpty() || username.isBlank() || password.isBlank())
9393
}
9494

9595
override fun submit() {
9696
when (server) {
9797
TYPEDB_CORE -> Service.driver.tryConnectToTypeDBCoreAsync(coreAddress) {
9898
Service.driver.connectServerDialog.close()
9999
}
100-
TYPEDB_ENTERPRISE -> Service.driver.tryConnectToTypeDBEnterpriseAsync(
101-
enterpriseAddresses.toSet(), username, password, tlsEnabled, caCertificate
100+
TYPEDB_CLOUD -> Service.driver.tryConnectToTypeDBCloudAsync(
101+
cloudAddresses.toSet(), username, password, tlsEnabled, caCertificate
102102
) { Service.driver.connectServerDialog.close() }
103103
}
104104
password = ""
105105
appData.server = server
106106
appData.coreAddress = coreAddress
107-
appData.enterpriseAddresses = enterpriseAddresses
107+
appData.cloudAddresses = cloudAddresses
108108
appData.username = username
109109
appData.tlsEnabled = tlsEnabled
110110
appData.caCertificate = caCertificate
@@ -114,11 +114,11 @@ object ServerDialog {
114114
private object AddAddressForm : Form.State() {
115115
var value: String by mutableStateOf("")
116116
override fun cancel() = Service.driver.manageAddressesDialog.close()
117-
override fun isValid() = value.isNotBlank() && addressFormatIsValid(value) && !state.enterpriseAddresses.contains(value)
117+
override fun isValid() = value.isNotBlank() && addressFormatIsValid(value) && !state.cloudAddresses.contains(value)
118118

119119
override fun submit() {
120120
assert(isValid())
121-
state.enterpriseAddresses.add(value)
121+
state.cloudAddresses.add(value)
122122
value = ""
123123
}
124124
}
@@ -131,7 +131,7 @@ object ServerDialog {
131131
@Composable
132132
fun MayShowDialogs() {
133133
if (Service.driver.connectServerDialog.isOpen) ConnectServer()
134-
if (Service.driver.manageAddressesDialog.isOpen) ManageEnterpriseAddresses()
134+
if (Service.driver.manageAddressesDialog.isOpen) ManageCloudAddresses()
135135
}
136136

137137
@Composable
@@ -143,8 +143,8 @@ object ServerDialog {
143143
) {
144144
Submission(state = state, modifier = Modifier.fillMaxSize(), showButtons = false) {
145145
ServerFormField(state)
146-
if (state.server == TYPEDB_ENTERPRISE) {
147-
ManageEnterpriseAddressesButton(state = state, shouldFocus = Service.driver.isDisconnected)
146+
if (state.server == TYPEDB_CLOUD) {
147+
ManageCloudAddressesButton(state = state, shouldFocus = Service.driver.isDisconnected)
148148
UsernameFormField(state)
149149
PasswordFormField(state)
150150
TLSEnabledFormField(state)
@@ -196,11 +196,11 @@ object ServerDialog {
196196
}
197197

198198
@Composable
199-
private fun ManageEnterpriseAddressesButton(state: ConnectServerForm, shouldFocus: Boolean) {
199+
private fun ManageCloudAddressesButton(state: ConnectServerForm, shouldFocus: Boolean) {
200200
val focusReq = if (shouldFocus) remember { FocusRequester() } else null
201201
Field(label = Label.ADDRESSES) {
202202
TextButton(
203-
text = Label.MANAGE_ENTERPRISE_ADDRESSES + " (${state.enterpriseAddresses.size})",
203+
text = Label.MANAGE_CLOUD_ADDRESSES + " (${state.cloudAddresses.size})",
204204
focusReq = focusReq, leadingIcon = Form.IconArg(Icon.CONNECT_TO_TYPEDB),
205205
enabled = Service.driver.isDisconnected
206206
) {
@@ -211,15 +211,15 @@ object ServerDialog {
211211
}
212212

213213
@Composable
214-
private fun ManageEnterpriseAddresses() {
214+
private fun ManageCloudAddresses() {
215215
val dialogState = Service.driver.manageAddressesDialog
216-
Dialog.Layout(dialogState, Label.MANAGE_ENTERPRISE_ADDRESSES, ADDRESS_MANAGER_WIDTH, ADDRESS_MANAGER_HEIGHT) {
216+
Dialog.Layout(dialogState, Label.MANAGE_CLOUD_ADDRESSES, ADDRESS_MANAGER_WIDTH, ADDRESS_MANAGER_HEIGHT) {
217217
Column(Modifier.fillMaxSize()) {
218218
Text(value = Sentence.MANAGE_ADDRESSES_MESSAGE, softWrap = true)
219219
Spacer(Modifier.height(Dialog.DIALOG_SPACING))
220-
EnterpriseAddressList(Modifier.fillMaxWidth().weight(1f))
220+
CloudAddressList(Modifier.fillMaxWidth().weight(1f))
221221
Spacer(Modifier.height(Dialog.DIALOG_SPACING))
222-
AddEnterpriseAddressForm()
222+
AddCloudAddressForm()
223223
Spacer(Modifier.height(Dialog.DIALOG_SPACING * 2))
224224
Row(verticalAlignment = Alignment.Bottom) {
225225
Spacer(modifier = Modifier.weight(1f))
@@ -231,7 +231,7 @@ object ServerDialog {
231231
}
232232

233233
@Composable
234-
private fun AddEnterpriseAddressForm() {
234+
private fun AddCloudAddressForm() {
235235
val focusReq = remember { FocusRequester() }
236236
Submission(AddAddressForm, modifier = Modifier.height(Form.FIELD_HEIGHT), showButtons = false) {
237237
Row {
@@ -251,15 +251,15 @@ object ServerDialog {
251251
}
252252

253253
@Composable
254-
private fun EnterpriseAddressList(modifier: Modifier) = ActionableList.SingleButtonLayout(
255-
items = state.enterpriseAddresses.toMutableList(),
254+
private fun CloudAddressList(modifier: Modifier) = ActionableList.SingleButtonLayout(
255+
items = state.cloudAddresses.toMutableList(),
256256
modifier = modifier.border(1.dp, Theme.studio.border),
257257
buttonSide = ActionableList.Side.RIGHT,
258258
buttonFn = { address ->
259259
Form.IconButtonArg(
260260
icon = Icon.REMOVE,
261261
color = { Theme.studio.errorStroke },
262-
onClick = { state.enterpriseAddresses.remove(address) }
262+
onClick = { state.cloudAddresses.remove(address) }
263263
)
264264
}
265265
)

service/common/DataService.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class DataService {
7272

7373
private val CONNECTION_SERVER = "connection.server"
7474
private val CONNECTION_CORE_ADDRESS = "connection.core_address"
75-
private val CONNECTION_ENTERPRISE_ADDRESSES = "connection.enterprise_addresses"
75+
private val CONNECTION_CLOUD_ADDRESSES = "connection.cloud_addresses"
7676
private val CONNECTION_USERNAME = "connection.username"
7777
private val CONNECTION_TLS_ENABLED = "connection.tls_enabled"
7878
private val CONNECTION_CA_CERTIFICATE = "connection.ca_certificate"
@@ -83,10 +83,10 @@ class DataService {
8383
var coreAddress: String?
8484
get() = properties?.getProperty(CONNECTION_CORE_ADDRESS)
8585
set(value) = value?.let { setProperty(CONNECTION_CORE_ADDRESS, it) } ?: Unit
86-
var enterpriseAddresses: MutableList<String>?
87-
get() = properties?.getProperty(CONNECTION_ENTERPRISE_ADDRESSES)
86+
var cloudAddresses: MutableList<String>?
87+
get() = properties?.getProperty(CONNECTION_CLOUD_ADDRESSES)
8888
?.split(",")?.filter { it.isNotBlank() }?.toMutableList()
89-
set(value) = value?.let { setProperty(CONNECTION_ENTERPRISE_ADDRESSES, it.joinToString(",")) } ?: Unit
89+
set(value) = value?.let { setProperty(CONNECTION_CLOUD_ADDRESSES, it.joinToString(",")) } ?: Unit
9090
var username: String?
9191
get() = properties?.getProperty(CONNECTION_USERNAME)
9292
set(value) = value?.let { setProperty(CONNECTION_USERNAME, it) } ?: Unit

service/common/util/Label.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ object Label {
127127
const val LABEL = "Label"
128128
const val LEARN_MORE = "Learn More"
129129
const val LOG = "Log"
130-
const val MANAGE_ENTERPRISE_ADDRESSES = "Manage Enterprise Addresses"
130+
const val MANAGE_CLOUD_ADDRESSES = "Manage Cloud Addresses"
131131
const val MANAGE_DATABASES = "Manage Databases"
132132
const val MANAGE_PREFERENCES = "Manage Preferences"
133133
const val MOVE = "Move"

service/common/util/Property.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ object Property {
4545

4646
enum class Server(val displayName: String) {
4747
TYPEDB_CORE("TypeDB Core"),
48-
TYPEDB_ENTERPRISE("TypeDB Enterprise");
48+
TYPEDB_CLOUD("TypeDB Cloud");
4949

5050
companion object {
5151
fun of(name: String): Server? {
5252
return when (name) {
5353
TYPEDB_CORE.displayName -> TYPEDB_CORE
54-
TYPEDB_ENTERPRISE.displayName -> TYPEDB_ENTERPRISE
54+
TYPEDB_CLOUD.displayName -> TYPEDB_CLOUD
5555
else -> null
5656
}
5757
}
@@ -87,7 +87,7 @@ object Property {
8787
fun serverOf(displayName: String): Server {
8888
return when (displayName) {
8989
Server.TYPEDB_CORE.displayName -> Server.TYPEDB_CORE
90-
Server.TYPEDB_ENTERPRISE.displayName -> Server.TYPEDB_ENTERPRISE
90+
Server.TYPEDB_CLOUD.displayName -> Server.TYPEDB_CLOUD
9191
else -> throw IllegalStateException("Unrecognised TypeDB server type")
9292
}
9393
}

service/common/util/Sentence.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ object Sentence {
8585
"Create a new %s type."
8686
const val CREATE_TYPE_AS_SUBTYPE_OF =
8787
"Create a new %s type as a subtype of '%s'."
88-
const val CREATE_AN_ADDRESS_FOR_ENTERPRISE =
89-
"Create a new address for connecting to your TypeDB Enterprise."
88+
const val CREATE_AN_ADDRESS_FOR_CLOUD =
89+
"Create a new address for connecting to your TypeDB Cloud."
9090
const val EDITING_TYPES_REQUIREMENT_DESCRIPTION =
9191
"To add/delete/edit type definitions in the database schema, you must be on a 'schema' session and 'write' transaction."
9292

@@ -113,7 +113,7 @@ object Sentence {
113113
"can set on these parameters in the toolbar, and perform queries against the TypeDB server with configured " +
114114
"parameters interactively. " + BUTTON_ENABLED_WHEN_CONNECTED
115115
const val MANAGE_ADDRESSES_MESSAGE =
116-
"Below is the list of server addresses of your TypeDB Enterprise. You can remove them from the list below and/or " +
116+
"Below is the list of server addresses of your TypeDB Cloud. You can remove them from the list below and/or " +
117117
"add new ones."
118118
const val MANAGE_DATABASES_DESCRIPTION =
119119
"You can manage your databases by adding or deleting databases from the TypeDB Server you are connected to. " +

service/connection/DriverState.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ class DriverState(
117117
private var _driver: TypeDBDriver? by mutableStateOf(null)
118118
private var hasRunningCommandAtomic = AtomicBooleanState(false)
119119
private var databaseListRefreshedTime = System.currentTimeMillis()
120-
internal var isEnterprise: Boolean = false
120+
internal var isCloud: Boolean = false
121121

122122
private val coroutines = CoroutineScope(Dispatchers.Default)
123123

124124
fun tryConnectToTypeDBCoreAsync(
125125
address: String, onSuccess: () -> Unit
126126
) = tryConnectAsync(newConnectionName = address, onSuccess = onSuccess) { TypeDB.coreDriver(address) }
127127

128-
fun tryConnectToTypeDBEnterpriseAsync(
128+
fun tryConnectToTypeDBCloudAsync(
129129
addresses: Set<String>, username: String, password: String,
130130
tlsEnabled: Boolean, caPath: String, onSuccess: (() -> Unit)? = null
131131
) {
@@ -137,7 +137,7 @@ class DriverState(
137137
else mayWarnPasswordExpiry()
138138
}
139139
tryConnectAsync(newConnectionName = "$username@${addresses.first()}", postLoginFn) {
140-
TypeDB.enterpriseDriver(addresses, credentials)
140+
TypeDB.cloudDriver(addresses, credentials)
141141
}
142142
}
143143

@@ -150,8 +150,8 @@ class DriverState(
150150
tryUpdateUserPassword(old, new) {
151151
updateDefaultPasswordDialog.close()
152152
close()
153-
tryConnectToTypeDBEnterpriseAsync(
154-
addresses = dataSrv.connection.enterpriseAddresses!!.toSet(),
153+
tryConnectToTypeDBCloudAsync(
154+
addresses = dataSrv.connection.cloudAddresses!!.toSet(),
155155
username = dataSrv.connection.username!!,
156156
password = new,
157157
tlsEnabled = dataSrv.connection.tlsEnabled!!,
@@ -190,7 +190,7 @@ class DriverState(
190190
}
191191

192192
private fun mayWarnPasswordExpiry() {
193-
if (!this.isEnterprise) return
193+
if (!this.isCloud) return
194194
val passwordExpiryDurationOptional: Optional<Duration>? =
195195
_driver?.user()?.passwordExpirySeconds()?.map { Duration.ofSeconds(it) }
196196
if (passwordExpiryDurationOptional?.isPresent != true) return

test/integration/common/TypeDBRunners.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
package com.vaticle.typedb.studio.test.integration.common
2020

2121
import com.vaticle.typedb.common.test.TypeDBRunner
22-
import com.vaticle.typedb.common.test.enterprise.TypeDBEnterpriseRunner
22+
import com.vaticle.typedb.common.test.cloud.TypeDBCloudRunner
2323
import com.vaticle.typedb.common.test.core.TypeDBCoreRunner
2424
import kotlin.io.path.Path
2525

2626
object TypeDBRunners {
27-
val ENTERPRISE_RUNNER_SERVER_COUNT = 3
28-
val ENTERPRISE_RUNNER_DATA_PATH = Path("enterprise-runner-data-path")
27+
val CLOUD_RUNNER_SERVER_COUNT = 3
28+
val CLOUD_RUNNER_DATA_PATH = Path("cloud-runner-data-path")
2929

3030
fun withTypeDB(runnerType: RunnerType = RunnerType.CORE, testFunction: (TypeDBRunner) -> Unit) {
3131
val typeDB = when (runnerType) {
3232
RunnerType.CORE -> TypeDBCoreRunner()
33-
RunnerType.ENTERPRISE -> TypeDBEnterpriseRunner.create(ENTERPRISE_RUNNER_DATA_PATH, ENTERPRISE_RUNNER_SERVER_COUNT)
33+
RunnerType.CLOUD -> TypeDBCloudRunner.create(CLOUD_RUNNER_DATA_PATH, CLOUD_RUNNER_SERVER_COUNT)
3434
}
3535
typeDB.start()
3636
testFunction(typeDB)
@@ -39,6 +39,6 @@ object TypeDBRunners {
3939

4040
enum class RunnerType {
4141
CORE,
42-
ENTERPRISE
42+
CLOUD
4343
}
4444
}

0 commit comments

Comments
 (0)