mirror of https://github.com/portainer/portainer
commit
8e743a8d32
|
@ -1,5 +1,8 @@
|
||||||
# Portainer
|
# Portainer
|
||||||
|
|
||||||
|
[![Microbadger](https://images.microbadger.com/badges/image/cloudinovasi/portainer.svg)](http://microbadger.com/images/cloudinovasi/portainer "Image size")
|
||||||
|
[![Gitter](https://badges.gitter.im/portainer/Lobby.svg)](https://gitter.im/portainer/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
Portainer is a web interface for the Docker remote API.
|
Portainer is a web interface for the Docker remote API.
|
||||||
|
|
||||||
![Dashboard](/dashboard.png)
|
![Dashboard](/dashboard.png)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// main is the entry point of the program
|
// main is the entry point of the program
|
||||||
func main() {
|
func main() {
|
||||||
kingpin.Version("1.8.0")
|
kingpin.Version("1.8.1")
|
||||||
var (
|
var (
|
||||||
endpoint = kingpin.Flag("host", "Dockerd endpoint").Default("unix:///var/run/docker.sock").Short('H').String()
|
endpoint = kingpin.Flag("host", "Dockerd endpoint").Default("unix:///var/run/docker.sock").Short('H').String()
|
||||||
addr = kingpin.Flag("bind", "Address and port to serve Portainer").Default(":9000").Short('p').String()
|
addr = kingpin.Flag("bind", "Address and port to serve Portainer").Default(":9000").Short('p').String()
|
||||||
|
|
|
@ -164,4 +164,4 @@ angular.module('portainer', [
|
||||||
.constant('DOCKER_PORT', '') // Docker port, leave as an empty string if no port is requred. If you have a port, prefix it with a ':' i.e. :4243
|
.constant('DOCKER_PORT', '') // Docker port, leave as an empty string if no port is requred. If you have a port, prefix it with a ':' i.e. :4243
|
||||||
.constant('CONFIG_ENDPOINT', 'settings')
|
.constant('CONFIG_ENDPOINT', 'settings')
|
||||||
.constant('TEMPLATES_ENDPOINT', 'templates')
|
.constant('TEMPLATES_ENDPOINT', 'templates')
|
||||||
.constant('UI_VERSION', 'v1.8.0');
|
.constant('UI_VERSION', 'v1.8.1');
|
||||||
|
|
|
@ -14,13 +14,13 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config)
|
||||||
$scope.sortType = sortType;
|
$scope.sortType = sortType;
|
||||||
};
|
};
|
||||||
|
|
||||||
var update = function (data, containersToHideLabels) {
|
var update = function (data) {
|
||||||
$('#loadContainersSpinner').show();
|
$('#loadContainersSpinner').show();
|
||||||
$scope.state.selectedItemCount = 0;
|
$scope.state.selectedItemCount = 0;
|
||||||
Container.query(data, function (d) {
|
Container.query(data, function (d) {
|
||||||
var containers = d;
|
var containers = d;
|
||||||
if (containersToHideLabels) {
|
if ($scope.containersToHideLabels) {
|
||||||
containers = ContainerHelper.hideContainers(d, containersToHideLabels);
|
containers = ContainerHelper.hideContainers(d, $scope.containersToHideLabels);
|
||||||
}
|
}
|
||||||
$scope.containers = containers.map(function (container) {
|
$scope.containers = containers.map(function (container) {
|
||||||
var model = new ContainerViewModel(container);
|
var model = new ContainerViewModel(container);
|
||||||
|
@ -147,15 +147,15 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config)
|
||||||
|
|
||||||
$scope.swarm = false;
|
$scope.swarm = false;
|
||||||
Config.$promise.then(function (c) {
|
Config.$promise.then(function (c) {
|
||||||
var containersToHideLabels = c.hiddenLabels;
|
$scope.containersToHideLabels = c.hiddenLabels;
|
||||||
$scope.swarm = c.swarm;
|
$scope.swarm = c.swarm;
|
||||||
if (c.swarm) {
|
if (c.swarm) {
|
||||||
Info.get({}, function (d) {
|
Info.get({}, function (d) {
|
||||||
$scope.swarm_hosts = retrieveSwarmHostsInfo(d);
|
$scope.swarm_hosts = retrieveSwarmHostsInfo(d);
|
||||||
update({all: Settings.displayAll ? 1 : 0}, containersToHideLabels);
|
update({all: Settings.displayAll ? 1 : 0});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
update({all: Settings.displayAll ? 1 : 0}, containersToHideLabels);
|
update({all: Settings.displayAll ? 1 : 0});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<div>
|
<div>
|
||||||
<i id="createNetworkSpinner" class="fa fa-cog fa-3x fa-spin" style="margin-bottom: 5px; display: none;"></i>
|
<i id="createNetworkSpinner" class="fa fa-cog fa-3x fa-spin" style="margin-bottom: 5px; display: none;"></i>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-default btn-lg" ng-click="create()">Create</button>
|
<button type="button" class="btn btn-default btn-lg" ng-disabled="!config.Name" ng-click="create()">Create</button>
|
||||||
<a type="button" class="btn btn-default btn-lg" ui-sref="networks">Cancel</a>
|
<a type="button" class="btn btn-default btn-lg" ui-sref="networks">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,9 +36,13 @@ function ($scope, $state, Volume, Messages) {
|
||||||
if (volume.Checked) {
|
if (volume.Checked) {
|
||||||
counter = counter + 1;
|
counter = counter + 1;
|
||||||
Volume.remove({name: volume.Name}, function (d) {
|
Volume.remove({name: volume.Name}, function (d) {
|
||||||
Messages.send("Volume deleted", volume.Name);
|
if (d.message) {
|
||||||
var index = $scope.volumes.indexOf(volume);
|
Messages.error("Unable to remove volume", {}, d.message);
|
||||||
$scope.volumes.splice(index, 1);
|
} else {
|
||||||
|
Messages.send("Volume deleted", volume.Name);
|
||||||
|
var index = $scope.volumes.indexOf(volume);
|
||||||
|
$scope.volumes.splice(index, 1);
|
||||||
|
}
|
||||||
complete();
|
complete();
|
||||||
}, function (e) {
|
}, function (e) {
|
||||||
Messages.error("Failure", e, "Unable to remove volume");
|
Messages.error("Failure", e, "Unable to remove volume");
|
||||||
|
|
|
@ -50,8 +50,8 @@ function genericHandler(data) {
|
||||||
// This handler returns the original array on success or a newly created array containing
|
// This handler returns the original array on success or a newly created array containing
|
||||||
// only one JSON object with the field message filled with the error message on failure.
|
// only one JSON object with the field message filled with the error message on failure.
|
||||||
function deleteImageHandler(data) {
|
function deleteImageHandler(data) {
|
||||||
var response = [];
|
|
||||||
// A string is returned on failure (Docker < 1.12)
|
// A string is returned on failure (Docker < 1.12)
|
||||||
|
var response = [];
|
||||||
if (!isJSON(data)) {
|
if (!isJSON(data)) {
|
||||||
response.push({message: data});
|
response.push({message: data});
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,9 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
|
||||||
query: {method: 'GET'},
|
query: {method: 'GET'},
|
||||||
get: {method: 'GET'},
|
get: {method: 'GET'},
|
||||||
create: {method: 'POST', params: {action: 'create'}, transformResponse: genericHandler},
|
create: {method: 'POST', params: {action: 'create'}, transformResponse: genericHandler},
|
||||||
remove: {method: 'DELETE'}
|
remove: {
|
||||||
|
method: 'DELETE', transformResponse: genericHandler
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}])
|
}])
|
||||||
.factory('Config', ['$resource', 'CONFIG_ENDPOINT', function ConfigFactory($resource, CONFIG_ENDPOINT) {
|
.factory('Config', ['$resource', 'CONFIG_ENDPOINT', function ConfigFactory($resource, CONFIG_ENDPOINT) {
|
||||||
|
@ -207,12 +209,13 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error: function (title, e, fallbackText) {
|
error: function (title, e, fallbackText) {
|
||||||
console.log(JSON.stringify(e, null, 4));
|
|
||||||
var msg = fallbackText;
|
var msg = fallbackText;
|
||||||
if (e.data && e.data.message) {
|
if (e.data && e.data.message) {
|
||||||
msg = e.data.message;
|
msg = e.data.message;
|
||||||
} else if (e.message) {
|
} else if (e.message) {
|
||||||
msg = e.message;
|
msg = e.message;
|
||||||
|
} else if (e.data && e.data.length > 0 && e.data[0].message) {
|
||||||
|
msg = e.data[0].message;
|
||||||
}
|
}
|
||||||
$.gritter.add({
|
$.gritter.add({
|
||||||
title: $sanitize(title),
|
title: $sanitize(title),
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.0 KiB |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "portainer",
|
"name": "portainer",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"homepage": "https://github.com/cloud-inovasi/portainer",
|
"homepage": "https://github.com/cloud-inovasi/portainer",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Anthony Lapenna <anthony.lapenna@cloudinovasi.id>"
|
"Anthony Lapenna <anthony.lapenna@cloudinovasi.id>"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"author": "Cloud Inovasi",
|
"author": "Cloud Inovasi",
|
||||||
"name": "portainer",
|
"name": "portainer",
|
||||||
"homepage": "https://github.com/cloud-inovasi/portainer",
|
"homepage": "https://github.com/cloud-inovasi/portainer",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com:cloud-inovasi/portainer.git"
|
"url": "git@github.com:cloud-inovasi/portainer.git"
|
||||||
|
|
Loading…
Reference in New Issue