diff --git a/cmd/drone-server/static/index.html b/cmd/drone-server/static/index.html index 9f1696029..58597a674 100644 --- a/cmd/drone-server/static/index.html +++ b/cmd/drone-server/static/index.html @@ -22,12 +22,10 @@ - - diff --git a/cmd/drone-server/static/scripts/controllers/agents.js b/cmd/drone-server/static/scripts/controllers/agents.js deleted file mode 100644 index cb9627b46..000000000 --- a/cmd/drone-server/static/scripts/controllers/agents.js +++ /dev/null @@ -1,37 +0,0 @@ -(function () { - - function AgentsCtrl($scope, $window, users, agents) { - // this is the address that agents should connect with. - $scope.addr = $window.location.origin; - - // Gets the currently authenticated user - users.getCached().then(function(payload){ - $scope.user = payload.data; - }); - - // Generages a remote agents. - agents.getAgents().then(function(payload){ - $scope.agents = payload.data; - }); - - $scope.onDelete = function(agent) { - console.log("delete agent", agent) - agents.deleteAgent(agent).then(function(payload){ - var index = $scope.agents.indexOf(agent); - $scope.agents.splice(index, 1); - }); - } - - $scope.newAgent={address: ""}; - $scope.onAdd = function(agent) { - agents.postAgent(agent).then(function(payload){ - $scope.agents.push(payload.data); - $scope.newAgent={address: ""}; - }); - } - } - - angular - .module('drone') - .controller('AgentsCtrl', AgentsCtrl); -})(); diff --git a/cmd/drone-server/static/scripts/drone.js b/cmd/drone-server/static/scripts/drone.js index 04c7bb7a5..82b3a9a97 100644 --- a/cmd/drone-server/static/scripts/drone.js +++ b/cmd/drone-server/static/scripts/drone.js @@ -62,11 +62,6 @@ controller: 'UserCtrl', resolve: resolveUser }) - .when('/agents', { - templateUrl: '/static/scripts/views/agents.html', - controller: 'AgentsCtrl', - resolve: resolveUser - }) .when('/users', { templateUrl: '/static/scripts/views/users.html', controller: 'UsersCtrl', diff --git a/cmd/drone-server/static/scripts/services/agents.js b/cmd/drone-server/static/scripts/services/agents.js deleted file mode 100644 index 15dd6f47b..000000000 --- a/cmd/drone-server/static/scripts/services/agents.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -(function () { - - /** - * The Agent provides access to build agent - * data and management using REST API calls. - */ - function AgentService($http) { - - /** - * Gets an agent list. - */ - this.getAgents = function() { - return $http.get('/api/agents'); - }; - - this.deleteAgent = function(agent) { - return $http.delete('/api/agents/'+agent.id); - }; - - this.postAgent = function(agent) { - return $http.post('/api/agents', agent); - }; - - } - - angular - .module('drone') - .service('agents', AgentService); -})(); diff --git a/cmd/drone-server/static/scripts/views/agents.html b/cmd/drone-server/static/scripts/views/agents.html deleted file mode 100644 index 1592f7250..000000000 --- a/cmd/drone-server/static/scripts/views/agents.html +++ /dev/null @@ -1,28 +0,0 @@ -

{{ user.login }}

- -Back - - - - - - - - - - - - - - - - - - - -
AddressToken
{{ agent.address }}{{ agent.token }} -
- -
-docker run -d drone/drone-agent --addr={{ addr }} --token={{ token }}
-
\ No newline at end of file diff --git a/cmd/drone-server/static/scripts/views/repos.html b/cmd/drone-server/static/scripts/views/repos.html index e5d13a1cb..dcfcd3ab3 100644 --- a/cmd/drone-server/static/scripts/views/repos.html +++ b/cmd/drone-server/static/scripts/views/repos.html @@ -3,7 +3,6 @@ New Settings User Management -Agent Management