mirror of https://github.com/portainer/portainer
fix(registries): put anon docker at top (#5670)
parent
e1f725d01a
commit
ec3233fb09
|
@ -54,6 +54,21 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span class="md-checkbox" ng-if="$ctrl.isAdmin && !$ctrl.endpointType">
|
||||||
|
<input id="select_{{ $index }}" type="checkbox" disabled />
|
||||||
|
<label for="select_{{ $index }}"></label>
|
||||||
|
</span>
|
||||||
|
<span>DockerHub (anonymous)</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
docker.io
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
-
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr
|
<tr
|
||||||
dir-paginate="item in ($ctrl.state.filteredDataSet = ($ctrl.dataset | filter:$ctrl.state.textFilter | orderBy:$ctrl.state.orderBy:$ctrl.state.reverseOrder | itemsPerPage: $ctrl.state.paginatedItemLimit))"
|
dir-paginate="item in ($ctrl.state.filteredDataSet = ($ctrl.dataset | filter:$ctrl.state.textFilter | orderBy:$ctrl.state.orderBy:$ctrl.state.reverseOrder | itemsPerPage: $ctrl.state.paginatedItemLimit))"
|
||||||
ng-class="{ active: item.Checked }"
|
ng-class="{ active: item.Checked }"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import _ from 'lodash-es';
|
|
||||||
import { DockerHubViewModel } from 'Portainer/models/dockerhub';
|
|
||||||
import { RegistryTypes } from 'Portainer/models/registryTypes';
|
import { RegistryTypes } from 'Portainer/models/registryTypes';
|
||||||
|
|
||||||
class EndpointRegistriesController {
|
class EndpointRegistriesController {
|
||||||
|
@ -19,9 +17,8 @@ class EndpointRegistriesController {
|
||||||
getRegistries() {
|
getRegistries() {
|
||||||
return this.$async(async () => {
|
return this.$async(async () => {
|
||||||
try {
|
try {
|
||||||
const dockerhub = new DockerHubViewModel();
|
|
||||||
const registries = await this.EndpointService.registries(this.endpointId);
|
const registries = await this.EndpointService.registries(this.endpointId);
|
||||||
this.registries = _.concat(dockerhub, registries);
|
this.registries = registries;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.Notifications.error('Failure', err, 'Unable to retrieve registries');
|
this.Notifications.error('Failure', err, 'Unable to retrieve registries');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import _ from 'lodash-es';
|
import _ from 'lodash-es';
|
||||||
import { RegistryTypes } from 'Portainer/models/registryTypes';
|
import { RegistryTypes } from 'Portainer/models/registryTypes';
|
||||||
import { DockerHubViewModel } from 'Portainer/models/dockerhub';
|
|
||||||
|
|
||||||
angular.module('portainer.app').controller('RegistriesController', [
|
angular.module('portainer.app').controller('RegistriesController', [
|
||||||
'$q',
|
'$q',
|
||||||
|
@ -59,7 +58,7 @@ angular.module('portainer.app').controller('RegistriesController', [
|
||||||
registries: RegistryService.registries(),
|
registries: RegistryService.registries(),
|
||||||
})
|
})
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
$scope.registries = _.concat(new DockerHubViewModel(), data.registries);
|
$scope.registries = data.registries;
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
$scope.registries = [];
|
$scope.registries = [];
|
||||||
|
|
Loading…
Reference in New Issue