mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
feat(container-creation): display a warning message when editing a container with an unknow registry (#1143)
This commit is contained in:
parent
bf6b398a27
commit
be4beacdf7
2 changed files with 22 additions and 17 deletions
|
@ -403,7 +403,6 @@ function ($q, $scope, $state, $stateParams, $filter, Container, ContainerHelper,
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadFromContainerImageConfig(d) {
|
function loadFromContainerImageConfig(d) {
|
||||||
// If no registry found, we let default DockerHub and let full image path
|
|
||||||
var imageInfo = ImageHelper.extractImageAndRegistryFromRepository($scope.config.Image);
|
var imageInfo = ImageHelper.extractImageAndRegistryFromRepository($scope.config.Image);
|
||||||
RegistryService.retrieveRegistryFromRepository($scope.config.Image)
|
RegistryService.retrieveRegistryFromRepository($scope.config.Image)
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
<div class="col-sm-12 form-section-title">
|
<div class="col-sm-12 form-section-title">
|
||||||
Image configuration
|
Image configuration
|
||||||
</div>
|
</div>
|
||||||
|
<div ng-if="!formValues.Registry && fromContainer">
|
||||||
|
<i class="fa fa-exclamation-triangle orange-icon" aria-hidden="true"></i>
|
||||||
|
<span class="small text-danger" style="margin-left: 5px;">The Docker registry for the <code>{{ config.Image }}</code> image is not registered inside Portainer, you will not be able to create a container. Please register that registry first.</span>
|
||||||
|
</div>
|
||||||
|
<div ng-if="formValues.Registry || !fromContainer">
|
||||||
<!-- image-and-registry -->
|
<!-- image-and-registry -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<por-image-registry image="config.Image" registry="formValues.Registry" ng-if="formValues.Registry"></por-image-registry>
|
<por-image-registry image="config.Image" registry="formValues.Registry" ng-if="formValues.Registry"></por-image-registry>
|
||||||
|
@ -39,6 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- !always-pull -->
|
<!-- !always-pull -->
|
||||||
|
</div>
|
||||||
<div class="col-sm-12 form-section-title">
|
<div class="col-sm-12 form-section-title">
|
||||||
Ports configuration
|
Ports configuration
|
||||||
</div>
|
</div>
|
||||||
|
@ -106,7 +112,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!config.Image" ng-click="create()">Start container</button>
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!config.Image || (!formValues.Registry && fromContainer)" ng-click="create()">Start container</button>
|
||||||
<a type="button" class="btn btn-default btn-sm" ui-sref="containers">Cancel</a>
|
<a type="button" class="btn btn-default btn-sm" ui-sref="containers">Cancel</a>
|
||||||
<i id="createContainerSpinner" class="fa fa-cog fa-spin" style="margin-left: 5px; display: none;"></i>
|
<i id="createContainerSpinner" class="fa fa-cog fa-spin" style="margin-left: 5px; display: none;"></i>
|
||||||
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
|
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue