mirror of https://github.com/portainer/portainer
fix(app): set defaults for select boxes (#4235)
* fix(container): select runtime by default * fix(network): set default network config * fix(container): set default network container placeholder * fix(services): default service mountpull/4247/head
parent
d850e18ff0
commit
7329ea91ca
|
@ -1,6 +1,6 @@
|
||||||
export function MacvlanFormData() {
|
export function MacvlanFormData() {
|
||||||
this.Scope = 'local';
|
this.Scope = 'local';
|
||||||
this.SelectedNetworkConfig = '';
|
this.SelectedNetworkConfig = null;
|
||||||
this.DatatableState = {
|
this.DatatableState = {
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,7 +63,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
||||||
alwaysPull: true,
|
alwaysPull: true,
|
||||||
Console: 'none',
|
Console: 'none',
|
||||||
Volumes: [],
|
Volumes: [],
|
||||||
NetworkContainer: '',
|
NetworkContainer: null,
|
||||||
Labels: [],
|
Labels: [],
|
||||||
ExtraHosts: [],
|
ExtraHosts: [],
|
||||||
MacAddress: '',
|
MacAddress: '',
|
||||||
|
@ -121,7 +121,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
||||||
NetworkMode: 'bridge',
|
NetworkMode: 'bridge',
|
||||||
Privileged: false,
|
Privileged: false,
|
||||||
Init: false,
|
Init: false,
|
||||||
Runtime: '',
|
Runtime: null,
|
||||||
ExtraHosts: [],
|
ExtraHosts: [],
|
||||||
Devices: [],
|
Devices: [],
|
||||||
CapAdd: [],
|
CapAdd: [],
|
||||||
|
@ -696,7 +696,6 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
||||||
SystemService.info()
|
SystemService.info()
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
$scope.availableRuntimes = data.Runtimes ? Object.keys(data.Runtimes) : [];
|
$scope.availableRuntimes = data.Runtimes ? Object.keys(data.Runtimes) : [];
|
||||||
$scope.config.HostConfig.Runtime = '';
|
|
||||||
$scope.state.sliderMaxCpu = 32;
|
$scope.state.sliderMaxCpu = 32;
|
||||||
if (data.NCPU) {
|
if (data.NCPU) {
|
||||||
$scope.state.sliderMaxCpu = data.NCPU;
|
$scope.state.sliderMaxCpu = data.NCPU;
|
||||||
|
|
|
@ -139,7 +139,7 @@ angular.module('portainer.docker').controller('CreateServiceController', [
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addVolume = function () {
|
$scope.addVolume = function () {
|
||||||
$scope.formValues.Volumes.push({ Source: '', Target: '', ReadOnly: false, Type: 'volume' });
|
$scope.formValues.Volumes.push({ Source: null, Target: '', ReadOnly: false, Type: 'volume' });
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.removeVolume = function (index) {
|
$scope.removeVolume = function (index) {
|
||||||
|
|
|
@ -201,7 +201,7 @@ angular.module('portainer.docker').controller('ServiceController', [
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$scope.addMount = function addMount(service) {
|
$scope.addMount = function addMount(service) {
|
||||||
service.ServiceMounts.push({ Type: 'volume', Source: '', Target: '', ReadOnly: false });
|
service.ServiceMounts.push({ Type: 'volume', Source: null, Target: '', ReadOnly: false });
|
||||||
updateServiceArray(service, 'ServiceMounts', service.ServiceMounts);
|
updateServiceArray(service, 'ServiceMounts', service.ServiceMounts);
|
||||||
};
|
};
|
||||||
$scope.removeMount = function removeMount(service, index) {
|
$scope.removeMount = function removeMount(service, index) {
|
||||||
|
|
Loading…
Reference in New Issue