Merge branch 'release/1.8.1'

pull/209/head 1.8.1
Anthony Lapenna 2016-09-07 18:31:44 +12:00
commit 8e743a8d32
11 changed files with 27 additions and 17 deletions

View File

@ -1,5 +1,8 @@
# 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.
![Dashboard](/dashboard.png)

View File

@ -6,7 +6,7 @@ import (
// main is the entry point of the program
func main() {
kingpin.Version("1.8.0")
kingpin.Version("1.8.1")
var (
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()

View File

@ -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('CONFIG_ENDPOINT', 'settings')
.constant('TEMPLATES_ENDPOINT', 'templates')
.constant('UI_VERSION', 'v1.8.0');
.constant('UI_VERSION', 'v1.8.1');

View File

@ -14,13 +14,13 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config)
$scope.sortType = sortType;
};
var update = function (data, containersToHideLabels) {
var update = function (data) {
$('#loadContainersSpinner').show();
$scope.state.selectedItemCount = 0;
Container.query(data, function (d) {
var containers = d;
if (containersToHideLabels) {
containers = ContainerHelper.hideContainers(d, containersToHideLabels);
if ($scope.containersToHideLabels) {
containers = ContainerHelper.hideContainers(d, $scope.containersToHideLabels);
}
$scope.containers = containers.map(function (container) {
var model = new ContainerViewModel(container);
@ -147,15 +147,15 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config)
$scope.swarm = false;
Config.$promise.then(function (c) {
var containersToHideLabels = c.hiddenLabels;
$scope.containersToHideLabels = c.hiddenLabels;
$scope.swarm = c.swarm;
if (c.swarm) {
Info.get({}, function (d) {
$scope.swarm_hosts = retrieveSwarmHostsInfo(d);
update({all: Settings.displayAll ? 1 : 0}, containersToHideLabels);
update({all: Settings.displayAll ? 1 : 0});
});
} else {
update({all: Settings.displayAll ? 1 : 0}, containersToHideLabels);
update({all: Settings.displayAll ? 1 : 0});
}
});
}]);

View File

@ -89,7 +89,7 @@
<div>
<i id="createNetworkSpinner" class="fa fa-cog fa-3x fa-spin" style="margin-bottom: 5px; display: none;"></i>
</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>
</div>
</div>

View File

@ -36,9 +36,13 @@ function ($scope, $state, Volume, Messages) {
if (volume.Checked) {
counter = counter + 1;
Volume.remove({name: volume.Name}, function (d) {
if (d.message) {
Messages.error("Unable to remove volume", {}, d.message);
} else {
Messages.send("Volume deleted", volume.Name);
var index = $scope.volumes.indexOf(volume);
$scope.volumes.splice(index, 1);
}
complete();
}, function (e) {
Messages.error("Failure", e, "Unable to remove volume");

View File

@ -50,8 +50,8 @@ function genericHandler(data) {
// 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.
function deleteImageHandler(data) {
var response = [];
// A string is returned on failure (Docker < 1.12)
var response = [];
if (!isJSON(data)) {
response.push({message: data});
}

View File

@ -165,7 +165,9 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
query: {method: 'GET'},
get: {method: 'GET'},
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) {
@ -207,12 +209,13 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
});
},
error: function (title, e, fallbackText) {
console.log(JSON.stringify(e, null, 4));
var msg = fallbackText;
if (e.data && e.data.message) {
msg = e.data.message;
} else if (e.message) {
msg = e.message;
} else if (e.data && e.data.length > 0 && e.data[0].message) {
msg = e.data[0].message;
}
$.gritter.add({
title: $sanitize(title),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -1,6 +1,6 @@
{
"name": "portainer",
"version": "1.8.0",
"version": "1.8.1",
"homepage": "https://github.com/cloud-inovasi/portainer",
"authors": [
"Anthony Lapenna <anthony.lapenna@cloudinovasi.id>"

View File

@ -2,7 +2,7 @@
"author": "Cloud Inovasi",
"name": "portainer",
"homepage": "https://github.com/cloud-inovasi/portainer",
"version": "1.8.0",
"version": "1.8.1",
"repository": {
"type": "git",
"url": "git@github.com:cloud-inovasi/portainer.git"