diff --git a/app/portainer/models/endpoint/formValues.js b/app/portainer/models/endpoint/formValues.js
index f7268ffb9..05e9d180c 100644
--- a/app/portainer/models/endpoint/formValues.js
+++ b/app/portainer/models/endpoint/formValues.js
@@ -35,7 +35,5 @@ export const PortainerEndpointInitFormValueEndpointSections = Object.freeze([
'fas fa-dharmachakra',
'Manage the local Kubernetes environment'
),
- new PortainerEndpointInitFormValueEndpointSection(PortainerEndpointConnectionTypes.REMOTE, 'Remote', 'fab fa-docker', 'Manage a remote Docker environment'),
new PortainerEndpointInitFormValueEndpointSection(PortainerEndpointConnectionTypes.AGENT, 'Agent', 'fa fa-bolt', 'Connect to a Portainer agent'),
- new PortainerEndpointInitFormValueEndpointSection(PortainerEndpointConnectionTypes.AZURE, 'Azure', 'fab fa-microsoft', 'Connect to Microsoft Azure ACI'),
]);
diff --git a/app/portainer/views/init/endpoint/includes/azure.html b/app/portainer/views/init/endpoint/includes/azure.html
deleted file mode 100644
index dca7e4953..000000000
--- a/app/portainer/views/init/endpoint/includes/azure.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
- Information
-
-
-
- Environment
-
-
-
-
-
- Azure credentials
-
-
-
-
-
-
-
-
-
-
diff --git a/app/portainer/views/init/endpoint/includes/remote.html b/app/portainer/views/init/endpoint/includes/remote.html
deleted file mode 100644
index a6e23ab15..000000000
--- a/app/portainer/views/init/endpoint/includes/remote.html
+++ /dev/null
@@ -1,120 +0,0 @@
-
- Information
-
-
-
- Environment
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Required TLS files
-
-
-
-
-
-
-
diff --git a/app/portainer/views/init/endpoint/initEndpoint.html b/app/portainer/views/init/endpoint/initEndpoint.html
index 3f3c50f99..df9b01966 100644
--- a/app/portainer/views/init/endpoint/initEndpoint.html
+++ b/app/portainer/views/init/endpoint/initEndpoint.html
@@ -45,12 +45,6 @@
-
-
-
-
-
-
diff --git a/app/portainer/views/init/endpoint/initEndpointController.js b/app/portainer/views/init/endpoint/initEndpointController.js
index ca2d94ca3..e643a3679 100644
--- a/app/portainer/views/init/endpoint/initEndpointController.js
+++ b/app/portainer/views/init/endpoint/initEndpointController.js
@@ -1,12 +1,10 @@
import _ from 'lodash-es';
import angular from 'angular';
-import { PortainerEndpointInitFormValues, PortainerEndpointInitFormValueEndpointSections } from 'Portainer/models/endpoint/formValues';
-import { PortainerEndpointTypes, PortainerEndpointConnectionTypes } from 'Portainer/models/endpoint/models';
+import { PortainerEndpointInitFormValueEndpointSections, PortainerEndpointInitFormValues } from 'Portainer/models/endpoint/formValues';
+import { PortainerEndpointConnectionTypes, PortainerEndpointTypes } from 'Portainer/models/endpoint/models';
require('./includes/localDocker.html');
require('./includes/localKubernetes.html');
-require('./includes/remote.html');
-require('./includes/azure.html');
require('./includes/agent.html');
class InitEndpointController {
@@ -23,8 +21,6 @@ class InitEndpointController {
this.createLocalEndpointAsync = this.createLocalEndpointAsync.bind(this);
this.createLocalKubernetesEndpointAsync = this.createLocalKubernetesEndpointAsync.bind(this);
this.createAgentEndpointAsync = this.createAgentEndpointAsync.bind(this);
- this.createAzureEndpointAsync = this.createAzureEndpointAsync.bind(this);
- this.createRemoteEndpointAsync = this.createRemoteEndpointAsync.bind(this);
}
$onInit() {
@@ -43,30 +39,12 @@ class InitEndpointController {
this.PortainerEndpointConnectionTypes = PortainerEndpointConnectionTypes;
}
- isRemoteConnectButtonDisabled() {
- return (
- this.state.actionInProgress ||
- !this.formValues.Name ||
- !this.formValues.URL ||
- (this.formValues.TLS &&
- ((this.formValues.TLSVerify && !this.formValues.TLSCACert) || (!this.formValues.TLSSKipClientVerify && (!this.formValues.TLSCert || !this.formValues.TLSKey))))
- );
- }
-
- isAzureConnectButtonDisabled() {
- return this.state.actionInProgress || !this.formValues.Name || !this.formValues.AzureApplicationId || !this.formValues.AzureTenantId || !this.formValues.AzureAuthenticationKey;
- }
-
isConnectButtonDisabled() {
switch (this.formValues.ConnectionType) {
case PortainerEndpointConnectionTypes.DOCKER_LOCAL:
return this.state.actionInProgress;
case PortainerEndpointConnectionTypes.KUBERNETES_LOCAL:
return this.state.actionInProgress;
- case PortainerEndpointConnectionTypes.REMOTE:
- return this.isRemoteConnectButtonDisabled();
- case PortainerEndpointConnectionTypes.AZURE:
- return this.isAzureConnectButtonDisabled();
case PortainerEndpointConnectionTypes.AGENT:
return this.state.actionInProgress || !this.formValues.Name || !this.formValues.URL;
default:
@@ -80,10 +58,6 @@ class InitEndpointController {
return this.createLocalEndpoint();
case PortainerEndpointConnectionTypes.KUBERNETES_LOCAL:
return this.createLocalKubernetesEndpoint();
- case PortainerEndpointConnectionTypes.REMOTE:
- return this.createRemoteEndpoint();
- case PortainerEndpointConnectionTypes.AZURE:
- return this.createAzureEndpoint();
case PortainerEndpointConnectionTypes.AGENT:
return this.createAgentEndpoint();
default:
@@ -165,58 +139,6 @@ class InitEndpointController {
createAgentEndpoint() {
return this.$async(this.createAgentEndpointAsync);
}
-
- /**
- * DOCKER REMOTE (1)
- */
- async createRemoteEndpointAsync() {
- try {
- this.state.actionInProgress = true;
- const name = this.formValues.Name;
- const type = PortainerEndpointTypes.DockerEnvironment;
- const URL = this.formValues.URL;
- const PublicURL = URL.split(':')[0];
- const TLS = this.formValues.TLS;
- const TLSSkipVerify = TLS && this.formValues.TLSSkipVerify;
- const TLSSKipClientVerify = TLS && this.formValues.TLSSKipClientVerify;
- const TLSCAFile = TLSSkipVerify ? null : this.formValues.TLSCACert;
- const TLSCertFile = TLSSKipClientVerify ? null : this.formValues.TLSCert;
- const TLSKeyFile = TLSSKipClientVerify ? null : this.formValues.TLSKey;
- await this.EndpointService.createRemoteEndpoint(name, type, URL, PublicURL, 1, [], TLS, TLSSkipVerify, TLSSKipClientVerify, TLSCAFile, TLSCertFile, TLSKeyFile);
- this.$state.go('portainer.home');
- } catch (err) {
- this.Notifications.error('Failure', err, 'Unable to connect to the Docker environment');
- } finally {
- this.state.actionInProgress = false;
- }
- }
-
- createRemoteEndpoint() {
- return this.$async(this.createAgentEndpointAsync);
- }
-
- /**
- * AZURE (4)
- */
- async createAzureEndpointAsync() {
- try {
- this.state.actionInProgress = true;
- var name = this.formValues.Name;
- var applicationId = this.formValues.AzureApplicationId;
- var tenantId = this.formValues.AzureTenantId;
- var authenticationKey = this.formValues.AzureAuthenticationKey;
- await this.EndpointService.createAzureEndpoint(name, applicationId, tenantId, authenticationKey, 1, []);
- this.$state.go('portainer.home');
- } catch (err) {
- this.Notifications.error('Failure', err, 'Unable to connect to the Azure environment');
- } finally {
- this.state.actionInProgress = false;
- }
- }
-
- createAzureEndpoint() {
- return this.$async(this.createAgentEndpointAsync);
- }
}
export default InitEndpointController;