Merge branch 'release/1.9.2'

pull/267/head 1.9.2
Anthony Lapenna 2016-10-07 18:22:53 +13:00
commit bb9e044e89
23 changed files with 98 additions and 24 deletions

43
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,43 @@
<!--
Thanks for opening an issue on Portainer !
Do you need help or have a question? Come chat with us on gitter: https://gitter.im/portainer/Lobby.
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add a comment
to the existing issue instead.
Also, be sure to check our FAQ and documentation first: https://portainer.readthedocs.io
If you suspect your issue is a bug, please edit your issue description to
include the BUG REPORT INFORMATION shown below.
---------------------------------------------------
BUG REPORT INFORMATION
---------------------------------------------------
You do NOT have to include this information if this is a FEATURE REQUEST
-->
**Description**
<!--
Briefly describe the problem you are having in a few paragraphs.
-->
**Steps to reproduce the issue:**
1.
2.
3.
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
**Technical details:**
* Portainer version:
* Target Docker version (the host/cluster you manage):
* Target Swarm version (if applicable):
* Platform (windows/linux):
* Browser:

View File

@ -24,10 +24,9 @@ Each commit message should include a **type**, a **scope** and a **subject**:
Lines should not exceed 100 characters. This allows the message to be easier to read on github as well as in various git tools and produces a nice, neat commit log ie:
```
#271 feat(standard): add style config and refactor to match
#270 fix(config): only override publicPath when served by webpack
#269 feat(eslint-config-defaults): replace eslint-config-airbnb
#268 feat(config): allow user to configure webpack stats output
#271 feat(containers): add exposed ports in the containers view
#270 fix(templates): fix a display issue in the templates view
#269 style(dashboard): update dashboard with new layout
```
#### Type

View File

@ -2,6 +2,7 @@
The easiest way to manage Docker.
[![Microbadger version](https://images.microbadger.com/badges/version/portainer/portainer.svg)](https://microbadger.com/images/portainer/portainer "Latest version on Docker Hub")
[![Microbadger](https://images.microbadger.com/badges/image/portainer/portainer.svg)](http://microbadger.com/images/portainer/portainer "Image size")
[![Documentation Status](https://readthedocs.org/projects/portainer/badge/?version=stable)](http://portainer.readthedocs.io/en/stable/?badge=stable)
[![Gitter](https://badges.gitter.im/portainer/Lobby.svg)](https://gitter.im/portainer/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

View File

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

@ -188,4 +188,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.9.1');
.constant('UI_VERSION', 'v1.9.2');

View File

@ -82,16 +82,14 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) {
$scope.connected = true;
socket.onopen = function(evt) {
$('#loadConsoleSpinner').hide();
term = new Terminal({
cols: width,
rows: height,
cursorBlink: true
});
term = new Terminal();
term.on('data', function (data) {
socket.send(data);
});
term.open(document.getElementById('terminal-container'));
term.resize(width, height);
term.setOption('cursorBlink', true);
socket.onmessage = function (e) {
term.write(e.data);
@ -102,8 +100,6 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) {
};
socket.onclose = function(evt) {
$scope.connected = false;
// term.write("Session terminated");
// term.destroy();
};
};
}

View File

@ -98,6 +98,9 @@
<span ng-if="container.Ports.length == 0" >-</span>
</td>
</tr>
<tr ng-if="containers.length == 0">
<td colspan="8" class="text-center text-muted">No containers available.</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,7 +1,6 @@
angular.module('containers', [])
.controller('ContainersController', ['$scope', 'Container', 'ContainerHelper', 'Info', 'Settings', 'Messages', 'Config',
function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config) {
$scope.state = {};
$scope.state.displayAll = Settings.displayAll;
$scope.state.displayIP = false;
@ -9,6 +8,7 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config)
$scope.sortReverse = false;
$scope.state.selectedItemCount = 0;
$scope.swarm_mode = false;
$scope.containers = [];
$scope.order = function (sortType) {
$scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false;

View File

@ -156,10 +156,10 @@ function ($scope, $state, Config, Info, Container, Image, Volume, Network, Messa
function preparePortBindings(config) {
var bindings = {};
config.HostConfig.PortBindings.forEach(function (portBinding) {
if (portBinding.hostPort && portBinding.containerPort) {
if (portBinding.containerPort) {
var key = portBinding.containerPort + "/" + portBinding.protocol;
var binding = {};
if (portBinding.hostPort.indexOf(':') > -1) {
if (portBinding.hostPort && portBinding.hostPort.indexOf(':') > -1) {
var hostAndPort = portBinding.hostPort.split(':');
binding.HostIp = hostAndPort[0];
binding.HostPort = hostAndPort[1];

View File

@ -69,7 +69,7 @@
<div ng-repeat="portBinding in config.HostConfig.PortBindings" style="margin-top: 2px;">
<div class="input-group col-sm-5 input-group-sm">
<span class="input-group-addon">host</span>
<input type="text" class="form-control" ng-model="portBinding.hostPort" placeholder="e.g. 80 or 1.2.3.4:80">
<input type="text" class="form-control" ng-model="portBinding.hostPort" placeholder="e.g. 80 or 1.2.3.4:80 (optional)">
</div>
<div class="input-group col-sm-5 input-group-sm">
<span class="input-group-addon">container</span>

View File

@ -107,6 +107,9 @@
<td>{{ image.VirtualSize|humansize }}</td>
<td>{{ image.Created|getisodatefromtimestamp }}</td>
</tr>
<tr ng-if="images.length == 0">
<td colspan="5" class="text-center text-muted">No images available.</td>
</tr>
</tbody>
</table>
</div>

View File

@ -5,6 +5,7 @@ function ($scope, $state, Config, Image, Messages) {
$scope.sortType = 'RepoTags';
$scope.sortReverse = true;
$scope.state.selectedItemCount = 0;
$scope.images = [];
$scope.config = {
Image: '',

View File

@ -131,6 +131,9 @@
<td>{{ network.IPAM.Config[0].Subnet ? network.IPAM.Config[0].Subnet : '-' }}</td>
<td>{{ network.IPAM.Config[0].Gateway ? network.IPAM.Config[0].Gateway : '-' }}</td>
</tr>
<tr ng-if="networks.length == 0">
<td colspan="8" class="text-center text-muted">No networks available.</td>
</tr>
</tbody>
</table>
</div>

View File

@ -6,6 +6,7 @@ function ($scope, $state, Network, Config, Messages) {
$scope.state.advancedSettings = false;
$scope.sortType = 'Name';
$scope.sortReverse = false;
$scope.networks = [];
$scope.config = {
Name: ''

View File

@ -82,6 +82,9 @@
<div class="title">{{ tpl.title }}</div>
<div class="description">{{ tpl.description }}</div>
</div>
<div ng-if="templates.length == 0" class="text-center text-muted">
No templates available.
</div>
</div>
</rd-widget-body>
</rd-widget>

View File

@ -7,6 +7,7 @@ function ($scope, $q, $state, $filter, Config, Info, Container, ContainerHelper,
network: "",
name: ""
};
$scope.templates = [];
var selectedItem = -1;

View File

@ -59,6 +59,9 @@
<td>{{ volume.Driver }}</td>
<td>{{ volume.Mountpoint }}</td>
</tr>
<tr ng-if="volumes.length == 0">
<td colspan="4" class="text-center text-muted">No volumes available.</td>
</tr>
</tbody>
</table>
</div>

View File

@ -5,6 +5,7 @@ function ($scope, $state, Volume, Messages) {
$scope.state.selectedItemCount = 0;
$scope.sortType = 'Name';
$scope.sortReverse = true;
$scope.volumes = [];
$scope.config = {
Name: ''

View File

@ -238,12 +238,12 @@ input[type="radio"] {
}
.container-template--selected {
background-color: #f6f6f6;
background-color: #ececec;
color: #2d3e63;
}
.container-template:hover {
background-color: #f6f6f6;
background-color: #ececec;
color: #2d3e63;
}

View File

@ -1,6 +1,6 @@
{
"name": "portainer",
"version": "1.9.1",
"version": "1.9.2",
"homepage": "https://github.com/portainer/portainer",
"authors": [
"Anthony Lapenna <anthony.lapenna at gmail dot com>"
@ -41,7 +41,7 @@
"lodash": "4.12.0",
"rdash-ui": "1.0.*",
"moment": "~2.14.1",
"xterm.js": "~1.1.3"
"xterm.js": "~2.0.1"
},
"resolutions": {
"angular": "1.5.5"

16
build.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
VERSION=$1
if [[ $# -ne 1 ]] ; then
echo "Usage: $(basename $0) <VERSION>"
exit 1
fi
grunt release
rm -rf /tmp/portainer-build && mkdir -pv /tmp/portainer-build/portainer
mv dist/* /tmp/portainer-build/portainer
cd /tmp/portainer-build
tar cvpfz portainer-${VERSION}.tar.gz portainer
exit 0

View File

@ -73,7 +73,7 @@ module.exports = function (grunt) {
'bower_components/lodash/dist/lodash.min.js',
'bower_components/filesize/lib/filesize.min.js',
'bower_components/moment/min/moment.min.js',
'bower_components/xterm.js/src/xterm.js',
'bower_components/xterm.js/dist/xterm.js',
'assets/js/jquery.gritter.js', // Using custom version to fix error in minified build due to "use strict"
'assets/js/legend.js' // Not a bower package
],
@ -88,7 +88,7 @@ module.exports = function (grunt) {
'bower_components/font-awesome/css/font-awesome.min.css',
'bower_components/rdash-ui/dist/css/rdash.min.css',
'bower_components/angular-ui-select/dist/select.min.css',
'bower_components/xterm.js/src/xterm.css',
'bower_components/xterm.js/dist/xterm.css',
'bower_components/Hover/css/hover-min.css'
]
},

View File

@ -2,7 +2,7 @@
"author": "Portainer.io",
"name": "portainer",
"homepage": "http://portainer.io",
"version": "1.9.1",
"version": "1.9.2",
"repository": {
"type": "git",
"url": "git@github.com:portainer/portainer.git"