diff --git a/extensions/arc/package.json b/extensions/arc/package.json index f017aa4619..eee35a0e8b 100644 --- a/extensions/arc/package.json +++ b/extensions/arc/package.json @@ -139,776 +139,781 @@ "viewsWelcome": [ { "view": "azureArc", - "contents": "%arc.view.welcome%" + "contents": "%arc.view.welcome.connect%", + "when": "arc.loaded" + }, + { + "view": "azureArc", + "contents": "%arc.view.welcome.loading%", + "when": "!arc.loaded" } ], - "resourceDeploymentTypes": [ - { - "name": "arc.control.create", - "displayName": "%resource.type.azure.arc.display.name%", - "description": "%resource.type.azure.arc.description%", - "platforms": "*", - "icon": { - "light": "./images/data_controller.svg", - "dark": "./images/data_controller.svg" - }, - "providers": [ - { - "notebookWizard": { - "notebook": "./notesbooks/arcDeployment/deploy.arc.control.plane.ipynb", - "type": "new-arc-control-plane", - "runNotebook": false, - "codeCellInsertionPosition": 5, - "actionText": "%deploy.arc.control.plane.action%", - "title": "%arc.control.plane.new.wizard.title%", - "name": "arc.control.plane.new.wizard", - "labelPosition": "left", - "generateSummaryPage": false, - "pages": [ - { - "title": "%arc.control.plane.select.cluster.title%", - "sections": [ - { - "fields": [ - { - "type": "kube_cluster_context_picker", - "label": "%arc.control.plane.kube.cluster.context%", - "required": true, - "inputWidth": "350px", - "variableName": "AZDATA_NB_VAR_ARC_CLUSTER_CONTEXT", - "configFileVariableName": "AZDATA_NB_VAR_ARC_CONFIG_FILE" - } - ] - }, - { - "title": "%arc.control.plane.docker.account.title%", - "fields": [ - { - "label": "%arc.control.plane.docker.account.name%", - "variableName": "AZDATA_NB_VAR_ARC_DOCKER_USERNAME", - "type": "text", - "required": true, - "defaultValue": "22cda7bb-2eb1-419e-a742-8710c313fe79", - "enabled": true - }, - { - "label": "%arc.control.plane.docker.account.password%", - "variableName": "AZDATA_NB_VAR_ARC_DOCKER_PASSWORD", - "type": "password", - "userName": "docker", - "confirmationRequired": false, - "defaultValue": "", - "required": true - } - ] - } - ] - }, - { - "title": "%arc.control.plane.cluster.config.profile.title%", - "sections": [ - { - "fields": [ - { - "type": "options", - "label": "%arc.control.plane.cluster.config.profile%", - "required": true, - "variableName": "AZDATA_NB_VAR_ARC_PROFILE", - "editable": false, - "options": { - "values":[ - "azure-arc-aks-private-preview", - "azure-arc-eks-private-preview", - "azure-arc-kubeadm-private-preview" - ], - "defaultValue": "azure-arc-aks-private-preview", - "optionsType": "radio" - } - } - ] - } - ] - }, - { - "title": "%arc.control.plane.data.controller.create.title%", - "sections": [ - { - "title": "%arc.control.plane.project.details.title%", - "fields": [ - { - "type": "readonly_text", - "label": "%arc.control.plane.project.details.description%", - "labelWidth": "600px" - }, - { - "type": "azure_account", - "required": true, - "subscriptionVariableName": "AZDATA_NB_VAR_ARC_SUBSCRIPTION", - "displaySubscriptionVariableName": "AZDATA_NB_VAR_ARC_DISPLAY_SUBSCRIPTION", - "resourceGroupVariableName": "AZDATA_NB_VAR_ARC_RESOURCE_GROUP" - } - ] - }, - { - "title": "%arc.control.plane.data.controller.details.title%", - "fields": [ - { - "type": "readonly_text", - "label": "%arc.control.plane.data.controller.details.description%", - "labelWidth": "600px" - }, - { - "type": "text", - "label": "%arc.control.plane.arc.data.controller.namespace%", - "textValidationRequired": true, - "textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,11}[a-z0-9])?$", - "textValidationDescription": "%arc.control.plane.arc.data.controller.namespace.validation.description%", - "defaultValue": "arc", - "required": true, - "variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAMESPACE" - }, - { - "type": "text", - "label": "%arc.control.plane.arc.data.controller.name%", - "textValidationRequired": true, - "textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,11}[a-z0-9])?$", - "textValidationDescription": "%arc.control.plane.arc.data.controller.name.validation.description%", - "defaultValue": "arc-cp1", - "required": true, - "variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAME" - }, - { - "type": "azure_locations", - "label": "%arc.control.plane.arc.data.controller.location%", - "defaultValue": "East US", - "required": true, - "locationVariableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_LOCATION", - "displayLocationVariableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_DISPLAY_LOCATION", - "locations": [ - "East US", - "East US 2", - "Central US" - ] - }, - { - "type": "options", - "label": "%arc.control.plane.arc.data.controller.connectivity.mode%", - "options": { - "values":[ - "Indirect", - "Direct" - ], - "defaultValue": "Indirect", - "optionsType": "radio" - }, - "required": true, - "variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE" - } - ] - }, - { - "title": "%arc.control.plane.admin.account.title%", - "fields": [ - { - "label": "%arc.control.plane.admin.account.name%", - "variableName": "AZDATA_NB_VAR_ARC_ADMIN_USERNAME", - "type": "text", - "required": true, - "defaultValue": "arcadmin", - "enabled": true - }, - { - "label": "%arc.control.plane.admin.account.password%", - "variableName": "AZDATA_NB_VAR_ARC_ADMIN_PASSWORD", - "type": "sql_password", - "userName": "arcadmin", - "confirmationRequired": true, - "confirmationLabel": "%arc.control.plane.admin.account.confirm.password%", - "defaultValue": "", - "required": true - } - ] - } - ] - }, - { - "title": "%arc.control.plane.data.controller.create.summary.title%", - "isSummaryPage": true, - "fieldHeight": "16px", - "sections": [ - { - "title": "", - "collapsible": false, - "fieldWidth": "200px", - "fieldHeight": "14px", - "spaceBetweenFields": 0, - "rows": [ - { - "items": [ - { - "items": [ - { - "label": "%arc.control.plane.summary.arc.data.controller%", - "type": "readonly_text", - "enabled": true, - "labelWidth": "185px" - } - ] - }, - { - "items": [ - { - "label": "%arc.control.plane.summary.estimated.cost.per.month%", - "type": "readonly_text", - "enabled": true, - "labelWidth": "190px", - "labelCSSStyles": { - "fontWeight": "Bold" - } - - } - ] - } - ] - }, - { - "items": [ - { - "items": [ - { - "label": "%arc.control.plane.summary.arc.by.microsoft%", - "type": "readonly_text", - "labelWidth": "185px" - } - ] - }, - { - "items": [ - { - "label": "%arc.control.plane.summary.free%", - "type": "readonly_text", - "enabled": true, - "defaultValue": "", - "labelWidth": "100px" - } - ] - } - ] - }, - { - "items": [ - { - "items": [ - { - "label": "{0}", - "type": "readonly_text", - "enabled": true, - "labelWidth": "67px", - "links": [ - { - "text": "%arc.control.plane.summary.arc.terms.of.use%", - "url": "https://go.microsoft.com/fwlink/?linkid=2045708" - } - ] - }, - { - "label": "|", - "type": "readonly_text", - "enabled": true, - "defaultValue": "", - "labelWidth": "4px", - "fieldWidth": "6px" - }, - { - "label": "{0}", - "type": "readonly_text", - "enabled": true, - "labelWidth": "102px", - "links": [ - { - "text": "%arc.control.plane.summary.arc.terms.privacy.policy%", - "url": "https://go.microsoft.com/fwlink/?linkid=512132" - } - ] - } - ] - } - ] - } - ] - }, - { - "title": "%arc.control.plane.summary.terms%", - "fieldHeight": "88px", - "fields":[ - { - "label": "%arc.control.plane.summary.terms.description%", - "type": "readonly_text", - "enabled": true, - "labelWidth": "750px", - "links": [ - { - "text": "%arc.control.plane.summary.terms.link.text%", - "url": "https://go.microsoft.com/fwlink/?linkid=2045624" - } - ] - } - ] - }, - { - "title": "%arc.control.plane.summary.kubernetes%", - "fields":[ - { - "label": "%arc.control.plane.summary.kube.config.file.path%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_CONFIG_FILE)" - }, - { - "label": "%arc.control.plane.summary.cluster.context%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_CLUSTER_CONTEXT)" - }, - { - "label": "%arc.control.plane.summary.profile%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_PROFILE)" - }, - { - "label": "%arc.control.plane.summary.username%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_ADMIN_USERNAME)" - }, - { - "label": "%arc.control.plane.summary.docker.username%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_DOCKER_USERNAME)" - } - ] - }, - { - "title": "%arc.control.plane.summary.azure%", - "fields":[ - { - "label": "%arc.control.plane.summary.data.controller.namespace%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAMESPACE)" - }, - { - "label": "%arc.control.plane.summary.data.controller.name%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAME)" - }, - { - "label": "%arc.control.plane.summary.data.controller.connectivity.mode%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE)" - }, - { - "label": "%arc.control.plane.summary.subscription%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_DISPLAY_SUBSCRIPTION)", - "inputWidth": "600" - }, - { - "label": "%arc.control.plane.summary.resource.group%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_RESOURCE_GROUP)" - }, - { - "label": "%arc.control.plane.summary.location%", - "type": "readonly_text", - "isEvaluated": true, - "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_DISPLAY_LOCATION)" - } - ] - } - ] - } - ] - }, - "requiredTools": [ - { - "name": "kubectl" - }, - { - "name": "azdata", - "version": "20.0.0" - } - ], - "when": true - } - ], - "agreement": { - "template": "%arc.control.plane.arc.data.controller.agreement%", - "links": [ - { - "text": "%microsoft.agreement.privacy.statement%", - "url": "https://go.microsoft.com/fwlink/?LinkId=853010" - }, - { - "text": "%arc.agreement.azdata.eula%", - "url": "https://aka.ms/eula-azdata-en" - } - ] - } - }, - { - "name": "arc.sql", - "displayName": "%resource.type.arc.sql.display.name%", - "description": "%resource.type.arc.sql.description%", - "platforms": "*", - "icon": { - "light": "./images/miaa.svg", - "dark": "./images/miaa.svg" - }, - "options": [ - { - "name": "resourceType", - "displayName": "%resource.type.picker.display.name%", - "values": [ - { - "name": "sql.managed.instance", - "displayName": "%sql.managed.instance.display.name%" - } - ] - } - ], - "providers": [ - { - "dialog": { - "notebook": "./notesbooks/arcDeployment/deploy.sql.existing.arc.ipynb", - "runNotebook": true, - "taskName": "%arc.sql.new.dialog.title%", - "actionText": "%arc.deploy.action%", - "title": "%arc.sql.new.dialog.title%", - "name": "arc.sql.new.dialog", - "tabs": [ - { - "title": "", - "sections": [ - { - "title": "%arc.azure.section.title%", - "fields": [ - { - "subscriptionVariableName": "AZDATA_NB_VAR_ARC_SUBSCRIPTION", - "resourceGroupVariableName": "AZDATA_NB_VAR_ARC_RESOURCE_GROUP_NAME", - "type": "azure_account", - "required": true - } - ] - }, - { - "title": "%arc.sql.settings.section.title%", - "fields": [ - { - "label": "%arc.sql.instance.name%", - "variableName": "AZDATA_NB_VAR_SQL_INSTANCE_NAME", - "type": "text", - "defaultValue": "sqlinstance1", - "required": true - }, - { - "label": "%arc.sql.username%", - "variableName": "AZDATA_NB_VAR_SQL_USERNAME", - "type": "text", - "defaultValue": "sa", - "enabled": false - }, - { - "label": "%arc.sql.password%", - "variableName": "AZDATA_NB_VAR_SQL_PASSWORD", - "type": "sql_password", - "userName": "sa", - "confirmationRequired": true, - "confirmationLabel": "%arc.confirm.password%", - "defaultValue": "", - "required": true - } - ] - } - ] - } - ] - }, - "requiredTools": [ - { - "name": "kubectl" - }, - { - "name": "azdata", - "version": "15.0.2100" - } - ], - "when": "resourceType=sql.managed.instance" - } - ], - "agreement": { - "template": "%arc.agreement%", - "links": [ - { - "text": "%microsoft.agreement.privacy.statement%", - "url": "https://go.microsoft.com/fwlink/?LinkId=853010" - }, - { - "text": "%arc.agreement.sql.terms.conditions%", - "url": "https://go.microsoft.com/fwlink/?linkid=2045708" - }, - { - "text": "%arc.agreement.azdata.eula%", - "url": "https://aka.ms/eula-azdata-en" - } - ] - } - }, - { - "name": "arc.postgres", - "displayName": "%resource.type.arc.postgres.display.name%", - "description": "%resource.type.arc.postgres.description%", - "platforms": "*", - "icon": { - "light": "./images/postgres.svg", - "dark": "./images/postgres.svg" - }, - "options": [ - { - "name": "resourceType", - "displayName": "%resource.type.picker.display.name%", - "values": [ - { - "name": "postgres", - "displayName": "%postgres.server.group.display.name%" - } - ] - } - ], - "providers": [ - { - "dialog": { - "notebook": "./notesbooks/arcDeployment/deploy.postgres.existing.arc.ipynb", - "runNotebook": true, - "taskName": "%arc.postgres.new.dialog.title%", - "actionText": "%arc.deploy.action%", - "title": "%arc.postgres.new.dialog.title%", - "name": "arc.postgres.new.dialog", - "tabs": [ - { - "title": "", - "sections": [ - { - "title": "%arc.azure.section.title%", - "fields": [ - { - "subscriptionVariableName": "AZDATA_NB_VAR_ARC_SUBSCRIPTION", - "resourceGroupVariableName": "AZDATA_NB_VAR_ARC_RESOURCE_GROUP_NAME", - "type": "azure_account", - "required": true - } - ] - }, - { - "title": "%arc.postgres.settings.section.title%", - "fields": [ - { - "label": "%arc.postgres.server.group.name%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_NAME", - "type": "text", - "textValidationRequired": true, - "textValidationRegex": "^[a-z]([-a-z0-9]{0,8}[a-z0-9])?$", - "textValidationDescription": "%arc.postgres.server.group.name.validation.description%", - "defaultValue": "postgres1", - "required": true - }, - { - "label": "%arc.postgres.server.group.namespace%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_NAMESPACE", - "type": "text", - "defaultValue": "default", - "required": true - }, - { - "label": "%arc.postgres.server.group.workers%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS", - "type": "number", - "defaultValue": "1", - "required": true, - "min": 1 - }, - { - "label": "%arc.postgres.server.group.service.type%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_SERVICE_TYPE", - "type": "options", - "options": [ - "ClusterIP", - "NodePort", - "LoadBalancer" - ], - "defaultValue": "NodePort", - "required": true - }, - { - "label": "%arc.postgres.server.group.data.size%", - "description": "%arc.postgres.server.group.data.size.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_DATA_SIZE", - "type": "number", - "defaultValue": "1024", - "required": true, - "min": 1 - }, - { - "label": "%arc.postgres.server.group.data.class%", - "description": "%arc.postgres.server.group.data.class.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_DATA_CLASS", - "type": "text" - }, - { - "label": "%arc.postgres.server.group.port%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PORT", - "type": "number", - "defaultValue": "5432", - "min": 1, - "max": 65535 - }, - { - "label": "%arc.postgres.server.group.extensions%", - "description": "%arc.postgres.server.group.extensions.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_EXTENSIONS", - "type": "text", - "textValidationRequired": true, - "textValidationRegex": "^(?:(?:pg_cron|postgis|postgis_raster|postgis_topology)(?!\\s*,\\s*$)(?:\\s*,\\s*|$))*$", - "textValidationDescription": "%arc.postgres.server.group.extensions.validation.description%", - "defaultValue": "" - } - ] - }, - { - "title": "%arc.postgres.settings.scheduling.title%", - "fields": [ - { - "label": "%arc.postgres.server.group.cpu.min%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_CPU_MIN", - "type": "number", - "min": 0 - }, - { - "label": "%arc.postgres.server.group.cpu.max%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_CPU_MAX", - "type": "number", - "min": 0 - }, - { - "label": "%arc.postgres.server.group.memory.min%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_MEMORY_MIN", - "type": "number", - "min": 0 - }, - { - "label": "%arc.postgres.server.group.memory.max%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_MEMORY_MAX", - "type": "number", - "min": 0 - } - ] - }, - { - "title": "%arc.postgres.settings.backups.title%", - "fields": [ - { - "label": "%arc.postgres.server.group.backup.classes%", - "description": "%arc.postgres.server.group.backup.classes.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_CLASSES", - "type": "text" - }, - { - "label": "%arc.postgres.server.group.backup.sizes%", - "description": "%arc.postgres.server.group.backup.sizes.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_SIZES", - "type": "text" - }, - { - "label": "%arc.postgres.server.group.backup.claims%", - "description": "%arc.postgres.server.group.backup.claims.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_CLAIMS", - "type": "text" - }, - { - "label": "%arc.postgres.server.group.backup.full.interval%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_FULL_INTERVAL", - "type": "number", - "min": 0 - }, - { - "label": "%arc.postgres.server.group.backup.delta.interval%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_DELTA_INTERVAL", - "type": "number", - "min": 0 - }, - { - "label": "%arc.postgres.server.group.backup.retention.min%", - "description": "%arc.postgres.server.group.backup.retention.min.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_RETENTION_MIN", - "type": "text", - "textValidationRequired": true, - "textValidationRegex": "^(?:(?:\\d+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[mMhHdDwW]|[mMgGtTpPeE][bB]))(?!\\s*[,;]\\s*$)(?:\\s*[,;]\\s*|$))*$", - "textValidationDescription": "%arc.postgres.server.group.backup.retention.min.validation.description%", - "defaultValue": "" - }, - { - "label": "%arc.postgres.server.group.backup.retention.max%", - "description": "%arc.postgres.server.group.backup.retention.max.description%", - "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_RETENTION_MAX", - "type": "text", - "textValidationRequired": true, - "textValidationRegex": "^(?:(?:\\d+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[mMhHdDwW]|[mMgGtTpPeE][bB]))(?!\\s*[,;]\\s*$)(?:\\s*[,;]\\s*|$))*$", - "textValidationDescription": "%arc.postgres.server.group.backup.retention.max.validation.description%", - "defaultValue": "" - } - ] - } - ] - } - ] - }, - "requiredTools": [ - { - "name": "azure-cli" - }, - { - "name": "azdata", - "version": "15.0.4003" - } - ], - "when": "resourceType=postgres" - } - ], - "agreement": { - "template": "%arc.agreement%", - "links": [ - { - "text": "%microsoft.agreement.privacy.statement%", - "url": "https://go.microsoft.com/fwlink/?LinkId=853010" - }, - { - "text": "%arc.agreement.postgres.terms.conditions%", - "url": "https://go.microsoft.com/fwlink/?linkid=2045708" - }, - { - "text": "%arc.agreement.azdata.eula%", - "url": "https://aka.ms/eula-azdata-en" - } - ] - } - } - ] + "resourceDeploymentTypes": [ + { + "name": "arc.control.create", + "displayName": "%resource.type.azure.arc.display.name%", + "description": "%resource.type.azure.arc.description%", + "platforms": "*", + "icon": { + "light": "./images/data_controller.svg", + "dark": "./images/data_controller.svg" + }, + "providers": [ + { + "notebookWizard": { + "notebook": "./notesbooks/arcDeployment/deploy.arc.control.plane.ipynb", + "type": "new-arc-control-plane", + "runNotebook": false, + "codeCellInsertionPosition": 5, + "actionText": "%deploy.arc.control.plane.action%", + "title": "%arc.control.plane.new.wizard.title%", + "name": "arc.control.plane.new.wizard", + "labelPosition": "left", + "generateSummaryPage": false, + "pages": [ + { + "title": "%arc.control.plane.select.cluster.title%", + "sections": [ + { + "fields": [ + { + "type": "kube_cluster_context_picker", + "label": "%arc.control.plane.kube.cluster.context%", + "required": true, + "inputWidth": "350px", + "variableName": "AZDATA_NB_VAR_ARC_CLUSTER_CONTEXT", + "configFileVariableName": "AZDATA_NB_VAR_ARC_CONFIG_FILE" + } + ] + }, + { + "title": "%arc.control.plane.docker.account.title%", + "fields": [ + { + "label": "%arc.control.plane.docker.account.name%", + "variableName": "AZDATA_NB_VAR_ARC_DOCKER_USERNAME", + "type": "text", + "required": true, + "defaultValue": "22cda7bb-2eb1-419e-a742-8710c313fe79", + "enabled": true + }, + { + "label": "%arc.control.plane.docker.account.password%", + "variableName": "AZDATA_NB_VAR_ARC_DOCKER_PASSWORD", + "type": "password", + "userName": "docker", + "confirmationRequired": false, + "defaultValue": "", + "required": true + } + ] + } + ] + }, + { + "title": "%arc.control.plane.cluster.config.profile.title%", + "sections": [ + { + "fields": [ + { + "type": "options", + "label": "%arc.control.plane.cluster.config.profile%", + "required": true, + "variableName": "AZDATA_NB_VAR_ARC_PROFILE", + "editable": false, + "options": { + "values": [ + "azure-arc-aks-private-preview", + "azure-arc-eks-private-preview", + "azure-arc-kubeadm-private-preview" + ], + "defaultValue": "azure-arc-aks-private-preview", + "optionsType": "radio" + } + } + ] + } + ] + }, + { + "title": "%arc.control.plane.data.controller.create.title%", + "sections": [ + { + "title": "%arc.control.plane.project.details.title%", + "fields": [ + { + "type": "readonly_text", + "label": "%arc.control.plane.project.details.description%", + "labelWidth": "600px" + }, + { + "type": "azure_account", + "required": true, + "subscriptionVariableName": "AZDATA_NB_VAR_ARC_SUBSCRIPTION", + "displaySubscriptionVariableName": "AZDATA_NB_VAR_ARC_DISPLAY_SUBSCRIPTION", + "resourceGroupVariableName": "AZDATA_NB_VAR_ARC_RESOURCE_GROUP" + } + ] + }, + { + "title": "%arc.control.plane.data.controller.details.title%", + "fields": [ + { + "type": "readonly_text", + "label": "%arc.control.plane.data.controller.details.description%", + "labelWidth": "600px" + }, + { + "type": "text", + "label": "%arc.control.plane.arc.data.controller.namespace%", + "textValidationRequired": true, + "textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,11}[a-z0-9])?$", + "textValidationDescription": "%arc.control.plane.arc.data.controller.namespace.validation.description%", + "defaultValue": "arc", + "required": true, + "variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAMESPACE" + }, + { + "type": "text", + "label": "%arc.control.plane.arc.data.controller.name%", + "textValidationRequired": true, + "textValidationRegex": "^[a-z0-9]([-a-z0-9]{0,11}[a-z0-9])?$", + "textValidationDescription": "%arc.control.plane.arc.data.controller.name.validation.description%", + "defaultValue": "arc-cp1", + "required": true, + "variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAME" + }, + { + "type": "azure_locations", + "label": "%arc.control.plane.arc.data.controller.location%", + "defaultValue": "East US", + "required": true, + "locationVariableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_LOCATION", + "displayLocationVariableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_DISPLAY_LOCATION", + "locations": [ + "East US", + "East US 2", + "Central US" + ] + }, + { + "type": "options", + "label": "%arc.control.plane.arc.data.controller.connectivity.mode%", + "options": { + "values": [ + "Indirect", + "Direct" + ], + "defaultValue": "Indirect", + "optionsType": "radio" + }, + "required": true, + "variableName": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE" + } + ] + }, + { + "title": "%arc.control.plane.admin.account.title%", + "fields": [ + { + "label": "%arc.control.plane.admin.account.name%", + "variableName": "AZDATA_NB_VAR_ARC_ADMIN_USERNAME", + "type": "text", + "required": true, + "defaultValue": "arcadmin", + "enabled": true + }, + { + "label": "%arc.control.plane.admin.account.password%", + "variableName": "AZDATA_NB_VAR_ARC_ADMIN_PASSWORD", + "type": "sql_password", + "userName": "arcadmin", + "confirmationRequired": true, + "confirmationLabel": "%arc.control.plane.admin.account.confirm.password%", + "defaultValue": "", + "required": true + } + ] + } + ] + }, + { + "title": "%arc.control.plane.data.controller.create.summary.title%", + "isSummaryPage": true, + "fieldHeight": "16px", + "sections": [ + { + "title": "", + "collapsible": false, + "fieldWidth": "200px", + "fieldHeight": "14px", + "spaceBetweenFields": 0, + "rows": [ + { + "items": [ + { + "items": [ + { + "label": "%arc.control.plane.summary.arc.data.controller%", + "type": "readonly_text", + "enabled": true, + "labelWidth": "185px" + } + ] + }, + { + "items": [ + { + "label": "%arc.control.plane.summary.estimated.cost.per.month%", + "type": "readonly_text", + "enabled": true, + "labelWidth": "190px", + "labelCSSStyles": { + "fontWeight": "Bold" + } + } + ] + } + ] + }, + { + "items": [ + { + "items": [ + { + "label": "%arc.control.plane.summary.arc.by.microsoft%", + "type": "readonly_text", + "labelWidth": "185px" + } + ] + }, + { + "items": [ + { + "label": "%arc.control.plane.summary.free%", + "type": "readonly_text", + "enabled": true, + "defaultValue": "", + "labelWidth": "100px" + } + ] + } + ] + }, + { + "items": [ + { + "items": [ + { + "label": "{0}", + "type": "readonly_text", + "enabled": true, + "labelWidth": "67px", + "links": [ + { + "text": "%arc.control.plane.summary.arc.terms.of.use%", + "url": "https://go.microsoft.com/fwlink/?linkid=2045708" + } + ] + }, + { + "label": "|", + "type": "readonly_text", + "enabled": true, + "defaultValue": "", + "labelWidth": "4px", + "fieldWidth": "6px" + }, + { + "label": "{0}", + "type": "readonly_text", + "enabled": true, + "labelWidth": "102px", + "links": [ + { + "text": "%arc.control.plane.summary.arc.terms.privacy.policy%", + "url": "https://go.microsoft.com/fwlink/?linkid=512132" + } + ] + } + ] + } + ] + } + ] + }, + { + "title": "%arc.control.plane.summary.terms%", + "fieldHeight": "88px", + "fields": [ + { + "label": "%arc.control.plane.summary.terms.description%", + "type": "readonly_text", + "enabled": true, + "labelWidth": "750px", + "links": [ + { + "text": "%arc.control.plane.summary.terms.link.text%", + "url": "https://go.microsoft.com/fwlink/?linkid=2045624" + } + ] + } + ] + }, + { + "title": "%arc.control.plane.summary.kubernetes%", + "fields": [ + { + "label": "%arc.control.plane.summary.kube.config.file.path%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_CONFIG_FILE)" + }, + { + "label": "%arc.control.plane.summary.cluster.context%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_CLUSTER_CONTEXT)" + }, + { + "label": "%arc.control.plane.summary.profile%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_PROFILE)" + }, + { + "label": "%arc.control.plane.summary.username%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_ADMIN_USERNAME)" + }, + { + "label": "%arc.control.plane.summary.docker.username%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_DOCKER_USERNAME)" + } + ] + }, + { + "title": "%arc.control.plane.summary.azure%", + "fields": [ + { + "label": "%arc.control.plane.summary.data.controller.namespace%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAMESPACE)" + }, + { + "label": "%arc.control.plane.summary.data.controller.name%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_NAME)" + }, + { + "label": "%arc.control.plane.summary.data.controller.connectivity.mode%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE)" + }, + { + "label": "%arc.control.plane.summary.subscription%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_DISPLAY_SUBSCRIPTION)", + "inputWidth": "600" + }, + { + "label": "%arc.control.plane.summary.resource.group%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_RESOURCE_GROUP)" + }, + { + "label": "%arc.control.plane.summary.location%", + "type": "readonly_text", + "isEvaluated": true, + "defaultValue": "$(AZDATA_NB_VAR_ARC_DATA_CONTROLLER_DISPLAY_LOCATION)" + } + ] + } + ] + } + ] + }, + "requiredTools": [ + { + "name": "kubectl" + }, + { + "name": "azdata", + "version": "20.0.0" + } + ], + "when": true + } + ], + "agreement": { + "template": "%arc.control.plane.arc.data.controller.agreement%", + "links": [ + { + "text": "%microsoft.agreement.privacy.statement%", + "url": "https://go.microsoft.com/fwlink/?LinkId=853010" + }, + { + "text": "%arc.agreement.azdata.eula%", + "url": "https://aka.ms/eula-azdata-en" + } + ] + } + }, + { + "name": "arc.sql", + "displayName": "%resource.type.arc.sql.display.name%", + "description": "%resource.type.arc.sql.description%", + "platforms": "*", + "icon": { + "light": "./images/miaa.svg", + "dark": "./images/miaa.svg" + }, + "options": [ + { + "name": "resourceType", + "displayName": "%resource.type.picker.display.name%", + "values": [ + { + "name": "sql.managed.instance", + "displayName": "%sql.managed.instance.display.name%" + } + ] + } + ], + "providers": [ + { + "dialog": { + "notebook": "./notesbooks/arcDeployment/deploy.sql.existing.arc.ipynb", + "runNotebook": true, + "taskName": "%arc.sql.new.dialog.title%", + "actionText": "%arc.deploy.action%", + "title": "%arc.sql.new.dialog.title%", + "name": "arc.sql.new.dialog", + "tabs": [ + { + "title": "", + "sections": [ + { + "title": "%arc.azure.section.title%", + "fields": [ + { + "subscriptionVariableName": "AZDATA_NB_VAR_ARC_SUBSCRIPTION", + "resourceGroupVariableName": "AZDATA_NB_VAR_ARC_RESOURCE_GROUP_NAME", + "type": "azure_account", + "required": true + } + ] + }, + { + "title": "%arc.sql.settings.section.title%", + "fields": [ + { + "label": "%arc.sql.instance.name%", + "variableName": "AZDATA_NB_VAR_SQL_INSTANCE_NAME", + "type": "text", + "defaultValue": "sqlinstance1", + "required": true + }, + { + "label": "%arc.sql.username%", + "variableName": "AZDATA_NB_VAR_SQL_USERNAME", + "type": "text", + "defaultValue": "sa", + "enabled": false + }, + { + "label": "%arc.sql.password%", + "variableName": "AZDATA_NB_VAR_SQL_PASSWORD", + "type": "sql_password", + "userName": "sa", + "confirmationRequired": true, + "confirmationLabel": "%arc.confirm.password%", + "defaultValue": "", + "required": true + } + ] + } + ] + } + ] + }, + "requiredTools": [ + { + "name": "kubectl" + }, + { + "name": "azdata", + "version": "15.0.2100" + } + ], + "when": "resourceType=sql.managed.instance" + } + ], + "agreement": { + "template": "%arc.agreement%", + "links": [ + { + "text": "%microsoft.agreement.privacy.statement%", + "url": "https://go.microsoft.com/fwlink/?LinkId=853010" + }, + { + "text": "%arc.agreement.sql.terms.conditions%", + "url": "https://go.microsoft.com/fwlink/?linkid=2045708" + }, + { + "text": "%arc.agreement.azdata.eula%", + "url": "https://aka.ms/eula-azdata-en" + } + ] + } + }, + { + "name": "arc.postgres", + "displayName": "%resource.type.arc.postgres.display.name%", + "description": "%resource.type.arc.postgres.description%", + "platforms": "*", + "icon": { + "light": "./images/postgres.svg", + "dark": "./images/postgres.svg" + }, + "options": [ + { + "name": "resourceType", + "displayName": "%resource.type.picker.display.name%", + "values": [ + { + "name": "postgres", + "displayName": "%postgres.server.group.display.name%" + } + ] + } + ], + "providers": [ + { + "dialog": { + "notebook": "./notesbooks/arcDeployment/deploy.postgres.existing.arc.ipynb", + "runNotebook": true, + "taskName": "%arc.postgres.new.dialog.title%", + "actionText": "%arc.deploy.action%", + "title": "%arc.postgres.new.dialog.title%", + "name": "arc.postgres.new.dialog", + "tabs": [ + { + "title": "", + "sections": [ + { + "title": "%arc.azure.section.title%", + "fields": [ + { + "subscriptionVariableName": "AZDATA_NB_VAR_ARC_SUBSCRIPTION", + "resourceGroupVariableName": "AZDATA_NB_VAR_ARC_RESOURCE_GROUP_NAME", + "type": "azure_account", + "required": true + } + ] + }, + { + "title": "%arc.postgres.settings.section.title%", + "fields": [ + { + "label": "%arc.postgres.server.group.name%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_NAME", + "type": "text", + "textValidationRequired": true, + "textValidationRegex": "^[a-z]([-a-z0-9]{0,8}[a-z0-9])?$", + "textValidationDescription": "%arc.postgres.server.group.name.validation.description%", + "defaultValue": "postgres1", + "required": true + }, + { + "label": "%arc.postgres.server.group.namespace%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_NAMESPACE", + "type": "text", + "defaultValue": "default", + "required": true + }, + { + "label": "%arc.postgres.server.group.workers%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS", + "type": "number", + "defaultValue": "1", + "required": true, + "min": 1 + }, + { + "label": "%arc.postgres.server.group.service.type%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_SERVICE_TYPE", + "type": "options", + "options": [ + "ClusterIP", + "NodePort", + "LoadBalancer" + ], + "defaultValue": "NodePort", + "required": true + }, + { + "label": "%arc.postgres.server.group.data.size%", + "description": "%arc.postgres.server.group.data.size.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_DATA_SIZE", + "type": "number", + "defaultValue": "1024", + "required": true, + "min": 1 + }, + { + "label": "%arc.postgres.server.group.data.class%", + "description": "%arc.postgres.server.group.data.class.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_DATA_CLASS", + "type": "text" + }, + { + "label": "%arc.postgres.server.group.port%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PORT", + "type": "number", + "defaultValue": "5432", + "min": 1, + "max": 65535 + }, + { + "label": "%arc.postgres.server.group.extensions%", + "description": "%arc.postgres.server.group.extensions.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_EXTENSIONS", + "type": "text", + "textValidationRequired": true, + "textValidationRegex": "^(?:(?:pg_cron|postgis|postgis_raster|postgis_topology)(?!\\s*,\\s*$)(?:\\s*,\\s*|$))*$", + "textValidationDescription": "%arc.postgres.server.group.extensions.validation.description%", + "defaultValue": "" + } + ] + }, + { + "title": "%arc.postgres.settings.scheduling.title%", + "fields": [ + { + "label": "%arc.postgres.server.group.cpu.min%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_CPU_MIN", + "type": "number", + "min": 0 + }, + { + "label": "%arc.postgres.server.group.cpu.max%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_CPU_MAX", + "type": "number", + "min": 0 + }, + { + "label": "%arc.postgres.server.group.memory.min%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_MEMORY_MIN", + "type": "number", + "min": 0 + }, + { + "label": "%arc.postgres.server.group.memory.max%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_MEMORY_MAX", + "type": "number", + "min": 0 + } + ] + }, + { + "title": "%arc.postgres.settings.backups.title%", + "fields": [ + { + "label": "%arc.postgres.server.group.backup.classes%", + "description": "%arc.postgres.server.group.backup.classes.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_CLASSES", + "type": "text" + }, + { + "label": "%arc.postgres.server.group.backup.sizes%", + "description": "%arc.postgres.server.group.backup.sizes.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_SIZES", + "type": "text" + }, + { + "label": "%arc.postgres.server.group.backup.claims%", + "description": "%arc.postgres.server.group.backup.claims.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_CLAIMS", + "type": "text" + }, + { + "label": "%arc.postgres.server.group.backup.full.interval%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_FULL_INTERVAL", + "type": "number", + "min": 0 + }, + { + "label": "%arc.postgres.server.group.backup.delta.interval%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_DELTA_INTERVAL", + "type": "number", + "min": 0 + }, + { + "label": "%arc.postgres.server.group.backup.retention.min%", + "description": "%arc.postgres.server.group.backup.retention.min.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_RETENTION_MIN", + "type": "text", + "textValidationRequired": true, + "textValidationRegex": "^(?:(?:\\d+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[mMhHdDwW]|[mMgGtTpPeE][bB]))(?!\\s*[,;]\\s*$)(?:\\s*[,;]\\s*|$))*$", + "textValidationDescription": "%arc.postgres.server.group.backup.retention.min.validation.description%", + "defaultValue": "" + }, + { + "label": "%arc.postgres.server.group.backup.retention.max%", + "description": "%arc.postgres.server.group.backup.retention.max.description%", + "variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_BACKUP_RETENTION_MAX", + "type": "text", + "textValidationRequired": true, + "textValidationRegex": "^(?:(?:\\d+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[mMhHdDwW]|[mMgGtTpPeE][bB]))(?!\\s*[,;]\\s*$)(?:\\s*[,;]\\s*|$))*$", + "textValidationDescription": "%arc.postgres.server.group.backup.retention.max.validation.description%", + "defaultValue": "" + } + ] + } + ] + } + ] + }, + "requiredTools": [ + { + "name": "azure-cli" + }, + { + "name": "azdata", + "version": "15.0.4003" + } + ], + "when": "resourceType=postgres" + } + ], + "agreement": { + "template": "%arc.agreement%", + "links": [ + { + "text": "%microsoft.agreement.privacy.statement%", + "url": "https://go.microsoft.com/fwlink/?LinkId=853010" + }, + { + "text": "%arc.agreement.postgres.terms.conditions%", + "url": "https://go.microsoft.com/fwlink/?linkid=2045708" + }, + { + "text": "%arc.agreement.azdata.eula%", + "url": "https://aka.ms/eula-azdata-en" + } + ] + } + } + ] }, "dependencies": { "request": "^2.88.0", diff --git a/extensions/arc/package.nls.json b/extensions/arc/package.nls.json index c963328b89..7b344515b5 100644 --- a/extensions/arc/package.nls.json +++ b/extensions/arc/package.nls.json @@ -7,7 +7,8 @@ "arc.managePostgres": "Manage Postgres", "arc.manageArcController": "Manage Arc Controller", "arc.view.title" : "Azure Arc Controllers", - "arc.view.welcome" : "No Azure Arc controllers registered. [Learn More](https://azure.microsoft.com/services/azure-arc/)\n[Connect Controller](command:arc.connectToController)", + "arc.view.welcome.connect" : "No Azure Arc controllers registered. [Learn More](https://azure.microsoft.com/services/azure-arc/)\n[Connect Controller](command:arc.connectToController)", + "arc.view.welcome.loading" : "Loading controllers...", "command.createController.title" : "Create New Controller", "command.connectToController.title": "Connect to Existing Controller", "command.removeController.title": "Remove Controller", diff --git a/extensions/arc/src/extension.ts b/extensions/arc/src/extension.ts index 23e41e8d79..a5bddf93aa 100644 --- a/extensions/arc/src/extension.ts +++ b/extensions/arc/src/extension.ts @@ -14,6 +14,8 @@ import { ConnectToControllerDialog } from './ui/dialogs/connectControllerDialog' export async function activate(context: vscode.ExtensionContext): Promise { IconPathHelper.setExtensionContext(context); + await vscode.commands.executeCommand('setContext', 'arc.loaded', false); + const treeDataProvider = new AzureArcTreeDataProvider(context); vscode.window.registerTreeDataProvider('azureArc', treeDataProvider); diff --git a/extensions/arc/src/models/controllerModel.ts b/extensions/arc/src/models/controllerModel.ts index 0c6bfb341c..0b299c3788 100644 --- a/extensions/arc/src/models/controllerModel.ts +++ b/extensions/arc/src/models/controllerModel.ts @@ -62,7 +62,7 @@ export class ControllerModel { } } - public async refresh(): Promise { + public async refresh(showErrors: boolean = true): Promise { // We haven't gotten our password yet, fetch it now if (!this._auth) { let password = ''; @@ -93,7 +93,9 @@ export class ControllerModel { // If an error occurs show a message so the user knows something failed but still // fire the event so callers can know to update (e.g. so dashboards don't show the // loading icon forever) - vscode.window.showErrorMessage(loc.fetchEndpointsFailed(this.info.url, err)); + if (showErrors) { + vscode.window.showErrorMessage(loc.fetchEndpointsFailed(this.info.url, err)); + } this._onEndpointsUpdated.fire(this._endpoints); throw err; }), @@ -107,7 +109,9 @@ export class ControllerModel { // If an error occurs show a message so the user knows something failed but still // fire the event so callers can know to update (e.g. so dashboards don't show the // loading icon forever) - vscode.window.showErrorMessage(loc.fetchRegistrationsFailed(this.info.url, err)); + if (showErrors) { + vscode.window.showErrorMessage(loc.fetchRegistrationsFailed(this.info.url, err)); + } this._onRegistrationsUpdated.fire(this._registrations); throw err; }), diff --git a/extensions/arc/src/models/miaaModel.ts b/extensions/arc/src/models/miaaModel.ts index 7f8b179aed..28c943e682 100644 --- a/extensions/arc/src/models/miaaModel.ts +++ b/extensions/arc/src/models/miaaModel.ts @@ -184,8 +184,24 @@ export class MiaaModel extends ResourceModel { } if (!connection) { + // We need the password so prompt the user for it + const connectionProfile: azdata.IConnectionProfile = { + serverName: (this.registration.externalIp && this.registration.externalPort) ? `${this.registration.externalIp},${this.registration.externalPort}` : '', + databaseName: '', + authenticationType: 'SqlLogin', + providerName: 'MSSQL', + connectionName: '', + userName: 'sa', + password: '', + savePassword: true, + groupFullName: undefined, + saveProfile: true, + id: '', + groupId: undefined, + options: {} + }; // Weren't able to load the existing connection so prompt user for new one - connection = await azdata.connection.openConnectionDialog(['MSSQL']); + connection = await azdata.connection.openConnectionDialog(['MSSQL'], connectionProfile); } if (connection) { diff --git a/extensions/arc/src/test/ui/tree/azureArcTreeDataProvider.test.ts b/extensions/arc/src/test/ui/tree/azureArcTreeDataProvider.test.ts index 5c924986bc..ddfdda6d54 100644 --- a/extensions/arc/src/test/ui/tree/azureArcTreeDataProvider.test.ts +++ b/extensions/arc/src/test/ui/tree/azureArcTreeDataProvider.test.ts @@ -10,7 +10,6 @@ import * as TypeMoq from 'typemoq'; import { AzureArcTreeDataProvider } from '../../../ui/tree/azureArcTreeDataProvider'; import { ControllerModel } from '../../../models/controllerModel'; import { ControllerTreeNode } from '../../../ui/tree/controllerTreeNode'; -import { LoadingControllerNode } from '../../../ui/tree/loadingTreeNode'; describe('AzureArcTreeDataProvider tests', function (): void { let treeDataProvider: AzureArcTreeDataProvider; @@ -67,11 +66,10 @@ describe('AzureArcTreeDataProvider tests', function (): void { }); describe('getChildren', function (): void { - it('should return a loading node before loading stored controllers is completed', async function (): Promise { + it('should return an empty array before loading stored controllers is completed', async function (): Promise { treeDataProvider['_loading'] = true; let children = await treeDataProvider.getChildren(); - should(children.length).equal(1, 'While loading we should return the loading node'); - should(children[0] instanceof LoadingControllerNode).be.true('Node returned was not a LoadingControllerNode'); + should(children.length).equal(0, 'While loading we should return an empty array'); }); it('should return no children after loading', async function (): Promise { diff --git a/extensions/arc/src/ui/dashboards/controller/controllerDashboard.ts b/extensions/arc/src/ui/dashboards/controller/controllerDashboard.ts index bed32b3ed2..9e332f4bd7 100644 --- a/extensions/arc/src/ui/dashboards/controller/controllerDashboard.ts +++ b/extensions/arc/src/ui/dashboards/controller/controllerDashboard.ts @@ -18,7 +18,7 @@ export class ControllerDashboard extends Dashboard { public async showDashboard(): Promise { await super.showDashboard(); // Kick off the model refresh but don't wait on it since that's all handled with callbacks anyways - this._controllerModel.refresh().catch(err => console.log(`Error refreshing Controller dashboard ${err}`)); + this._controllerModel.refresh(false).catch(err => console.log(`Error refreshing Controller dashboard ${err}`)); } protected async registerTabs(modelView: azdata.ModelView): Promise<(azdata.DashboardTab | azdata.DashboardTabGroup)[]> { diff --git a/extensions/arc/src/ui/dashboards/controller/controllerDashboardOverviewPage.ts b/extensions/arc/src/ui/dashboards/controller/controllerDashboardOverviewPage.ts index 4ff1c1a0c4..bb81e404aa 100644 --- a/extensions/arc/src/ui/dashboards/controller/controllerDashboardOverviewPage.ts +++ b/extensions/arc/src/ui/dashboards/controller/controllerDashboardOverviewPage.ts @@ -162,7 +162,7 @@ export class ControllerDashboardOverviewPage extends DashboardPage { try { this._propertiesLoadingComponent!.loading = true; this._arcResourcesLoadingComponent!.loading = true; - await this._controllerModel.refresh(); + await this.refresh(); } finally { refreshButton.enabled = true; } diff --git a/extensions/arc/src/ui/dashboards/miaa/miaaConnectionStringsPage.ts b/extensions/arc/src/ui/dashboards/miaa/miaaConnectionStringsPage.ts index bb69b2572f..d6fc936235 100644 --- a/extensions/arc/src/ui/dashboards/miaa/miaaConnectionStringsPage.ts +++ b/extensions/arc/src/ui/dashboards/miaa/miaaConnectionStringsPage.ts @@ -24,10 +24,6 @@ export class MiaaConnectionStringsPage extends DashboardPage { })); } - protected async refresh(): Promise { - await this._controllerModel.refresh(); - } - protected get title(): string { return loc.connectionStrings; } diff --git a/extensions/arc/src/ui/dashboards/miaa/miaaDashboardOverviewPage.ts b/extensions/arc/src/ui/dashboards/miaa/miaaDashboardOverviewPage.ts index 54427da4c5..b406a83cba 100644 --- a/extensions/arc/src/ui/dashboards/miaa/miaaDashboardOverviewPage.ts +++ b/extensions/arc/src/ui/dashboards/miaa/miaaDashboardOverviewPage.ts @@ -199,10 +199,7 @@ export class MiaaDashboardOverviewPage extends DashboardPage { this._grafanaLoading!.loading = true; this._databasesTableLoading!.loading = true; - await Promise.all([ - this._miaaModel.refresh(), - this._controllerModel.refresh() - ]); + await this.refresh(); } finally { refreshButton.enabled = true; } diff --git a/extensions/arc/src/ui/dialogs/connectControllerDialog.ts b/extensions/arc/src/ui/dialogs/connectControllerDialog.ts index 9de44824d3..3dad3816a1 100644 --- a/extensions/arc/src/ui/dialogs/connectControllerDialog.ts +++ b/extensions/arc/src/ui/dialogs/connectControllerDialog.ts @@ -96,7 +96,7 @@ export class ConnectToControllerDialog { const controllerModel = new ControllerModel(this._treeDataProvider, controllerInfo, this.passwordInputBox.value); try { // Validate that we can connect to the controller - await controllerModel.refresh(); + await controllerModel.refresh(false); } catch (err) { vscode.window.showErrorMessage(loc.connectToControllerFailed(this.urlInputBox.value, err)); return false; diff --git a/extensions/arc/src/ui/tree/azureArcTreeDataProvider.ts b/extensions/arc/src/ui/tree/azureArcTreeDataProvider.ts index c4ef87ff6a..0942fee64a 100644 --- a/extensions/arc/src/ui/tree/azureArcTreeDataProvider.ts +++ b/extensions/arc/src/ui/tree/azureArcTreeDataProvider.ts @@ -7,7 +7,6 @@ import * as azdata from 'azdata'; import * as vscode from 'vscode'; import { ControllerTreeNode } from './controllerTreeNode'; import { TreeNode } from './treeNode'; -import { LoadingControllerNode as LoadingTreeNode } from './loadingTreeNode'; import { ControllerModel, ControllerInfo } from '../../models/controllerModel'; const mementoToken = 'arcControllers'; @@ -23,7 +22,6 @@ export class AzureArcTreeDataProvider implements vscode.TreeDataProvider = this._onDidChangeTreeData.event; private _loading: boolean = true; - private _loadingNode = new LoadingTreeNode(); private _controllerNodes: ControllerTreeNode[] = []; @@ -33,9 +31,14 @@ export class AzureArcTreeDataProvider implements vscode.TreeDataProvider { if (this._loading) { - return [this._loadingNode]; + return []; } + // We set the context here since VS Code takes a bit of time to process the _onDidChangeTreeData + // and so if we set it as soon as we finished loading the controllers it would briefly flash + // the "connect to controller" welcome view + await vscode.commands.executeCommand('setContext', 'arc.loaded', true); + if (element) { return element.getChildren(); } else { diff --git a/extensions/arc/src/ui/tree/controllerTreeNode.ts b/extensions/arc/src/ui/tree/controllerTreeNode.ts index 8854e796be..cd6d898cf5 100644 --- a/extensions/arc/src/ui/tree/controllerTreeNode.ts +++ b/extensions/arc/src/ui/tree/controllerTreeNode.ts @@ -35,7 +35,7 @@ export class ControllerTreeNode extends TreeNode { // First reset our deferred promise so we're sure we'll get the refreshed children this._childrenRefreshPromise = new Deferred(); try { - await this.model.refresh(); + await this.model.refresh(false); await this._childrenRefreshPromise.promise; } catch (err) { // Couldn't get the children and TreeView doesn't have a way to collapse a node diff --git a/extensions/arc/src/ui/tree/loadingTreeNode.ts b/extensions/arc/src/ui/tree/loadingTreeNode.ts deleted file mode 100644 index 4a4628a190..0000000000 --- a/extensions/arc/src/ui/tree/loadingTreeNode.ts +++ /dev/null @@ -1,18 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the Source EULA. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import * as loc from '../../localizedConstants'; -import { TreeNode } from './treeNode'; - -/** - * A placeholder TreeNode to display while we're loading the initial set of stored nodes - */ -export class LoadingControllerNode extends TreeNode { - - constructor() { - super(loc.loading, vscode.TreeItemCollapsibleState.None, 'loading'); - } -} diff --git a/extensions/big-data-cluster/package.json b/extensions/big-data-cluster/package.json index 3c22cbd525..2916f55280 100644 --- a/extensions/big-data-cluster/package.json +++ b/extensions/big-data-cluster/package.json @@ -1,186 +1,192 @@ { - "name": "big-data-cluster", - "displayName": "%text.sqlServerBigDataClusters%", - "description": "%description%", - "version": "1.0.0", - "publisher": "Microsoft", - "preview": true, - "license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt", - "icon": "images/extension.png", - "engines": { - "vscode": "*", - "azdata": "*" - }, - "activationEvents": [ - "onCommand:bigDataClusters.command.mount", - "onCommand:bigDataClusters.command.refreshmount", - "onCommand:bigDataClusters.command.deletemount", - "onCommand:bigDataClusters.command.createController", - "onCommand:bigDataClusters.command.connectController", - "onCommand:bigDataClusters.command.removeController", - "onCommand:bigDataClusters.command.manageController", - "onCommand:bigDataClusters.command.refreshController", - "onView:sqlBigDataCluster" - ], - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/azuredatastudio.git" - }, - "main": "./out/extension", - "contributes": { - "dataExplorer": { - "sqlBigDataCluster": [ - { - "id": "sqlBigDataCluster", - "name": "%text.sqlServerBigDataClusters%" - } - ] - }, - "menus": { - "commandPalette": [ - { - "command": "bigDataClusters.command.createController", - "when": "false" - }, - { - "command": "bigDataClusters.command.connectController", - "when": "false" - }, - { - "command": "bigDataClusters.command.removeController", - "when": "false" - }, - { - "command": "bigDataClusters.command.refreshController", - "when": "false" - }, - { - "command": "bigDataClusters.command.manageController", - "when": "false" - }, - { - "command": "bigDataClusters.command.mount", - "when": "false" - }, - { - "command": "bigDataClusters.command.refreshmount", - "when": "false" - }, - { - "command": "bigDataClusters.command.deletemount", - "when": "false" - } - ], - "view/title": [ - { - "command": "bigDataClusters.command.createController", - "when": "view == sqlBigDataCluster", - "group": "navigation@1" - }, - { - "command": "bigDataClusters.command.connectController", - "when": "view == sqlBigDataCluster", - "group": "navigation@2" - } - ], - "view/item/context": [ - { - "command": "bigDataClusters.command.manageController", - "when": "view == sqlBigDataCluster && viewItem == bigDataClusters.itemType.controllerNode", - "group": "navigation@1" - }, - { - "command": "bigDataClusters.command.refreshController", - "when": "view == sqlBigDataCluster && viewItem == bigDataClusters.itemType.controllerNode", - "group": "navigation@2" - }, - { - "command": "bigDataClusters.command.removeController", - "when": "view == sqlBigDataCluster && viewItem == bigDataClusters.itemType.controllerNode", - "group": "navigation@3" - } - ], - "objectExplorer/item/context": [ - { - "command": "bigDataClusters.command.mount", - "when": "nodeType=~/^mssqlCluster/ && nodeType!=mssqlCluster:message && nodeSubType=~/^(?!:mount).*$/", - "group": "1mssqlCluster@10" - }, - { - "command": "bigDataClusters.command.refreshmount", - "when": "nodeType == mssqlCluster:folder && nodeSubType==:mount:", - "group": "1mssqlCluster@11" - }, - { - "command": "bigDataClusters.command.deletemount", - "when": "nodeType == mssqlCluster:folder && nodeSubType==:mount:", - "group": "1mssqlCluster@12" - } - ] - }, - "commands": [ - { - "command": "bigDataClusters.command.createController", - "title": "%command.createController.title%", - "icon": "$(add)" - }, - { - "command": "bigDataClusters.command.connectController", - "title": "%command.connectController.title%", - "icon": "$(disconnect)" - }, - { - "command": "bigDataClusters.command.removeController", - "title": "%command.removeController.title%", - "when": "viewItem == bigDataClusters.itemType.controllerNode" - }, - { - "command": "bigDataClusters.command.refreshController", - "title": "%command.refreshController.title%", - "icon": "$(refresh)" - }, - { - "command": "bigDataClusters.command.manageController", - "title": "%command.manageController.title%" - }, - { - "command": "bigDataClusters.command.mount", - "title": "%command.mount.title%" - }, - { - "command": "bigDataClusters.command.refreshmount", - "title": "%command.refreshmount.title%" - }, - { - "command": "bigDataClusters.command.deletemount", - "title": "%command.deletemount.title%" - } - ], - "configuration": { - "type": "object", - "title": "%bdc.configuration.title%", - "properties": { - "bigDataCluster.ignoreSslVerification": { - "type": "boolean", - "default": true, - "description": "%bdc.ignoreSslVerification.desc%" - } - } - }, - "viewsWelcome": [ - { - "view": "sqlBigDataCluster", - "contents": "%bdc.view.welcome%" - } - ] - }, - "dependencies": { - "ads-kerberos": "^1.1.3", - "request": "^2.88.0", - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/request": "^2.48.3", - "vscode": "^1.1.36" - } + "name": "big-data-cluster", + "displayName": "%text.sqlServerBigDataClusters%", + "description": "%description%", + "version": "1.0.0", + "publisher": "Microsoft", + "preview": true, + "license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt", + "icon": "images/extension.png", + "engines": { + "vscode": "*", + "azdata": "*" + }, + "activationEvents": [ + "onCommand:bigDataClusters.command.mount", + "onCommand:bigDataClusters.command.refreshmount", + "onCommand:bigDataClusters.command.deletemount", + "onCommand:bigDataClusters.command.createController", + "onCommand:bigDataClusters.command.connectController", + "onCommand:bigDataClusters.command.removeController", + "onCommand:bigDataClusters.command.manageController", + "onCommand:bigDataClusters.command.refreshController", + "onView:sqlBigDataCluster" + ], + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/azuredatastudio.git" + }, + "main": "./out/extension", + "contributes": { + "dataExplorer": { + "sqlBigDataCluster": [ + { + "id": "sqlBigDataCluster", + "name": "%text.sqlServerBigDataClusters%" + } + ] + }, + "menus": { + "commandPalette": [ + { + "command": "bigDataClusters.command.createController", + "when": "false" + }, + { + "command": "bigDataClusters.command.connectController", + "when": "false" + }, + { + "command": "bigDataClusters.command.removeController", + "when": "false" + }, + { + "command": "bigDataClusters.command.refreshController", + "when": "false" + }, + { + "command": "bigDataClusters.command.manageController", + "when": "false" + }, + { + "command": "bigDataClusters.command.mount", + "when": "false" + }, + { + "command": "bigDataClusters.command.refreshmount", + "when": "false" + }, + { + "command": "bigDataClusters.command.deletemount", + "when": "false" + } + ], + "view/title": [ + { + "command": "bigDataClusters.command.createController", + "when": "view == sqlBigDataCluster", + "group": "navigation@1" + }, + { + "command": "bigDataClusters.command.connectController", + "when": "view == sqlBigDataCluster", + "group": "navigation@2" + } + ], + "view/item/context": [ + { + "command": "bigDataClusters.command.manageController", + "when": "view == sqlBigDataCluster && viewItem == bigDataClusters.itemType.controllerNode", + "group": "navigation@1" + }, + { + "command": "bigDataClusters.command.refreshController", + "when": "view == sqlBigDataCluster && viewItem == bigDataClusters.itemType.controllerNode", + "group": "navigation@2" + }, + { + "command": "bigDataClusters.command.removeController", + "when": "view == sqlBigDataCluster && viewItem == bigDataClusters.itemType.controllerNode", + "group": "navigation@3" + } + ], + "objectExplorer/item/context": [ + { + "command": "bigDataClusters.command.mount", + "when": "nodeType=~/^mssqlCluster/ && nodeType!=mssqlCluster:message && nodeSubType=~/^(?!:mount).*$/", + "group": "1mssqlCluster@10" + }, + { + "command": "bigDataClusters.command.refreshmount", + "when": "nodeType == mssqlCluster:folder && nodeSubType==:mount:", + "group": "1mssqlCluster@11" + }, + { + "command": "bigDataClusters.command.deletemount", + "when": "nodeType == mssqlCluster:folder && nodeSubType==:mount:", + "group": "1mssqlCluster@12" + } + ] + }, + "commands": [ + { + "command": "bigDataClusters.command.createController", + "title": "%command.createController.title%", + "icon": "$(add)" + }, + { + "command": "bigDataClusters.command.connectController", + "title": "%command.connectController.title%", + "icon": "$(disconnect)" + }, + { + "command": "bigDataClusters.command.removeController", + "title": "%command.removeController.title%", + "when": "viewItem == bigDataClusters.itemType.controllerNode" + }, + { + "command": "bigDataClusters.command.refreshController", + "title": "%command.refreshController.title%", + "icon": "$(refresh)" + }, + { + "command": "bigDataClusters.command.manageController", + "title": "%command.manageController.title%" + }, + { + "command": "bigDataClusters.command.mount", + "title": "%command.mount.title%" + }, + { + "command": "bigDataClusters.command.refreshmount", + "title": "%command.refreshmount.title%" + }, + { + "command": "bigDataClusters.command.deletemount", + "title": "%command.deletemount.title%" + } + ], + "configuration": { + "type": "object", + "title": "%bdc.configuration.title%", + "properties": { + "bigDataCluster.ignoreSslVerification": { + "type": "boolean", + "default": true, + "description": "%bdc.ignoreSslVerification.desc%" + } + } + }, + "viewsWelcome": [ + { + "view": "sqlBigDataCluster", + "contents": "%bdc.view.welcome.connect%", + "when": "bdc.loaded" + }, + { + "view": "sqlBigDataCluster", + "contents": "%bdc.view.welcome.loading%", + "when": "!bdc.loaded" + } + ] + }, + "dependencies": { + "ads-kerberos": "^1.1.3", + "request": "^2.88.0", + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/request": "^2.48.3", + "vscode": "^1.1.36" + } } diff --git a/extensions/big-data-cluster/package.nls.json b/extensions/big-data-cluster/package.nls.json index a0143ddd14..c768774192 100644 --- a/extensions/big-data-cluster/package.nls.json +++ b/extensions/big-data-cluster/package.nls.json @@ -3,13 +3,14 @@ "text.sqlServerBigDataClusters": "SQL Server Big Data Clusters", "command.connectController.title": "Connect to Existing Controller", "command.createController.title": "Create New Controller", - "command.removeController.title" : "Remove Controller", - "command.refreshController.title" : "Refresh", - "command.manageController.title" : "Manage", - "command.mount.title" : "Mount HDFS", - "command.refreshmount.title" : "Refresh Mount", - "command.deletemount.title" : "Delete Mount", - "bdc.configuration.title" : "Big Data Cluster", - "bdc.view.welcome" : "No SQL Big Data Cluster controllers registered. [Learn More](https://docs.microsoft.com/sql/big-data-cluster/big-data-cluster-overview)\n[Connect Controller](command:bigDataClusters.command.connectController)", - "bdc.ignoreSslVerification.desc" : "Ignore SSL verification errors against SQL Server Big Data Cluster endpoints such as HDFS, Spark, and Controller if true" + "command.removeController.title": "Remove Controller", + "command.refreshController.title": "Refresh", + "command.manageController.title": "Manage", + "command.mount.title": "Mount HDFS", + "command.refreshmount.title": "Refresh Mount", + "command.deletemount.title": "Delete Mount", + "bdc.configuration.title": "Big Data Cluster", + "bdc.view.welcome.connect": "No SQL Big Data Cluster controllers registered. [Learn More](https://docs.microsoft.com/sql/big-data-cluster/big-data-cluster-overview)\n[Connect Controller](command:bigDataClusters.command.connectController)", + "bdc.view.welcome.loading": "Loading controllers...", + "bdc.ignoreSslVerification.desc": "Ignore SSL verification errors against SQL Server Big Data Cluster endpoints such as HDFS, Spark, and Controller if true" } diff --git a/extensions/big-data-cluster/src/bigDataCluster/tree/controllerTreeDataProvider.ts b/extensions/big-data-cluster/src/bigDataCluster/tree/controllerTreeDataProvider.ts index fb3212c9ba..2490b4293b 100644 --- a/extensions/big-data-cluster/src/bigDataCluster/tree/controllerTreeDataProvider.ts +++ b/extensions/big-data-cluster/src/bigDataCluster/tree/controllerTreeDataProvider.ts @@ -10,7 +10,6 @@ import { TreeNode } from './treeNode'; import { IControllerTreeChangeHandler } from './controllerTreeChangeHandler'; import { ControllerRootNode, ControllerNode } from './controllerTreeNode'; import { showErrorMessage } from '../utils'; -import { LoadingControllerNode } from './loadingControllerNode'; import { AuthType } from 'bdc'; const localize = nls.loadMessageBundle(); @@ -35,7 +34,6 @@ export class ControllerTreeDataProvider implements vscode.TreeDataProvider { @@ -45,6 +43,11 @@ export class ControllerTreeDataProvider implements vscode.TreeDataProvider { vscode.window.showErrorMessage(localize('bdc.controllerTreeDataProvider.error', "Unexpected error loading saved controllers: {0}", err)); }); + } else { + // We set the context here since VS Code takes a bit of time to process the _onDidChangeTreeData + // and so if we set it as soon as we finished loading the controllers it would briefly flash + // the "connect to controller" welcome view + await vscode.commands.executeCommand('setContext', 'bdc.loaded', true); } return this.root.getChildren(); @@ -87,21 +90,9 @@ export class ControllerTreeDataProvider implements vscode.TreeDataProvider 0) { - for (let i = 0; i < nodes.length; ++i) { - if (nodes[i] instanceof LoadingControllerNode - ) { - nodes.splice(i--, 1); - } - } - } - } - private removeDefectiveControllerNodes(nodes: TreeNode[]): void { if (nodes.length > 0) { for (let i = 0; i < nodes.length; ++i) { diff --git a/extensions/big-data-cluster/src/bigDataCluster/tree/loadingControllerNode.ts b/extensions/big-data-cluster/src/bigDataCluster/tree/loadingControllerNode.ts deleted file mode 100644 index 6fd00b4842..0000000000 --- a/extensions/big-data-cluster/src/bigDataCluster/tree/loadingControllerNode.ts +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the Source EULA. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as nls from 'vscode-nls'; -import * as azdata from 'azdata'; -import * as vscode from 'vscode'; -import { TreeNode } from './treeNode'; -import { BdcItemType } from '../constants'; - -const localize = nls.loadMessageBundle(); - -export class LoadingControllerNode extends TreeNode { - private readonly nodeType: string; - - constructor() { - super(localize('textLoadingWithDots', "Loading...")); - this.nodeType = BdcItemType.loadingController; - } - - public async getChildren(): Promise { - return []; - } - - public getTreeItem(): vscode.TreeItem { - let item = new vscode.TreeItem(this.label, vscode.TreeItemCollapsibleState.None); - item.contextValue = this.nodeType; - return item; - } - - public getNodeInfo(): azdata.NodeInfo { - return { - label: this.label, - isLeaf: this.isLeaf, - errorMessage: undefined, - metadata: undefined, - nodePath: this.nodePath, - nodeStatus: undefined, - nodeType: this.nodeType, - iconType: this.nodeType, - nodeSubType: undefined - }; - } -} diff --git a/extensions/big-data-cluster/src/extension.ts b/extensions/big-data-cluster/src/extension.ts index 1572d7575e..aa9f216662 100644 --- a/extensions/big-data-cluster/src/extension.ts +++ b/extensions/big-data-cluster/src/extension.ts @@ -26,8 +26,9 @@ const endpointNotFoundError = localize('mount.error.endpointNotFound', "Controll let throttleTimers: { [key: string]: any } = {}; -export function activate(extensionContext: vscode.ExtensionContext): IExtension { +export async function activate(extensionContext: vscode.ExtensionContext): Promise { IconPathHelper.setExtensionContext(extensionContext); + await vscode.commands.executeCommand('setContext', 'bdc.loaded', false); const treeDataProvider = new ControllerTreeDataProvider(extensionContext.globalState); vscode.window.registerTreeDataProvider('sqlBigDataCluster', treeDataProvider); registerCommands(extensionContext, treeDataProvider);