mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 05:15:25 +02:00
feat(endpoint-creation): add requirement message for agent endpoint (#2303)
This commit is contained in:
parent
94b202fedc
commit
f0f01c33bd
2 changed files with 18 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
angular.module('portainer.app')
|
||||
.controller('CreateEndpointController', ['$q', '$scope', '$state', '$filter', 'EndpointService', 'GroupService', 'TagService', 'Notifications',
|
||||
function ($q, $scope, $state, $filter, EndpointService, GroupService, TagService, Notifications) {
|
||||
.controller('CreateEndpointController', ['$q', '$scope', '$state', '$filter', 'clipboard', 'EndpointService', 'GroupService', 'TagService', 'Notifications',
|
||||
function ($q, $scope, $state, $filter, clipboard, EndpointService, GroupService, TagService, Notifications) {
|
||||
|
||||
$scope.state = {
|
||||
EnvironmentType: 'docker',
|
||||
|
@ -19,6 +19,12 @@ function ($q, $scope, $state, $filter, EndpointService, GroupService, TagService
|
|||
Tags: []
|
||||
};
|
||||
|
||||
$scope.copyAgentCommand = function() {
|
||||
clipboard.copyText('curl -L https://portainer.io/download/agent-stack.yml -o agent-stack.yml && docker stack deploy --compose-file=agent-stack.yml portainer-agent');
|
||||
$('#copyNotification').show();
|
||||
$('#copyNotification').fadeOut(2000);
|
||||
};
|
||||
|
||||
$scope.addDockerEndpoint = function() {
|
||||
var name = $scope.formValues.Name;
|
||||
var URL = $filter('stripprotocol')($scope.formValues.URL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue