mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(endpoints): automatically strip URL's protocol when creating a new endpoint (#1294)
This commit is contained in:
parent
c9ccdaaea4
commit
4a49942ae5
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
angular.module('endpoints', [])
|
angular.module('endpoints', [])
|
||||||
.controller('EndpointsController', ['$scope', '$state', 'EndpointService', 'EndpointProvider', 'Notifications', 'Pagination',
|
.controller('EndpointsController', ['$scope', '$state', '$filter', 'EndpointService', 'EndpointProvider', 'Notifications', 'Pagination',
|
||||||
function ($scope, $state, EndpointService, EndpointProvider, Notifications, Pagination) {
|
function ($scope, $state, $filter, EndpointService, EndpointProvider, Notifications, Pagination) {
|
||||||
$scope.state = {
|
$scope.state = {
|
||||||
uploadInProgress: false,
|
uploadInProgress: false,
|
||||||
selectedItemCount: 0,
|
selectedItemCount: 0,
|
||||||
|
@ -44,7 +44,7 @@ function ($scope, $state, EndpointService, EndpointProvider, Notifications, Pagi
|
||||||
|
|
||||||
$scope.addEndpoint = function() {
|
$scope.addEndpoint = function() {
|
||||||
var name = $scope.formValues.Name;
|
var name = $scope.formValues.Name;
|
||||||
var URL = $scope.formValues.URL;
|
var URL = $filter('stripprotocol')($scope.formValues.URL);
|
||||||
var PublicURL = $scope.formValues.PublicURL;
|
var PublicURL = $scope.formValues.PublicURL;
|
||||||
if (PublicURL === '') {
|
if (PublicURL === '') {
|
||||||
PublicURL = URL.split(':')[0];
|
PublicURL = URL.split(':')[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue