fix(registries): put anon docker at top (#5670)
parent
e1f725d01a
commit
ec3233fb09
|
@ -54,6 +54,21 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<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
|
||||
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 }"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import _ from 'lodash-es';
|
||||
import { DockerHubViewModel } from 'Portainer/models/dockerhub';
|
||||
import { RegistryTypes } from 'Portainer/models/registryTypes';
|
||||
|
||||
class EndpointRegistriesController {
|
||||
|
@ -19,9 +17,8 @@ class EndpointRegistriesController {
|
|||
getRegistries() {
|
||||
return this.$async(async () => {
|
||||
try {
|
||||
const dockerhub = new DockerHubViewModel();
|
||||
const registries = await this.EndpointService.registries(this.endpointId);
|
||||
this.registries = _.concat(dockerhub, registries);
|
||||
this.registries = registries;
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to retrieve registries');
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import _ from 'lodash-es';
|
||||
import { RegistryTypes } from 'Portainer/models/registryTypes';
|
||||
import { DockerHubViewModel } from 'Portainer/models/dockerhub';
|
||||
|
||||
angular.module('portainer.app').controller('RegistriesController', [
|
||||
'$q',
|
||||
|
@ -59,7 +58,7 @@ angular.module('portainer.app').controller('RegistriesController', [
|
|||
registries: RegistryService.registries(),
|
||||
})
|
||||
.then(function success(data) {
|
||||
$scope.registries = _.concat(new DockerHubViewModel(), data.registries);
|
||||
$scope.registries = data.registries;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
$scope.registries = [];
|
||||
|
|
Loading…
Reference in New Issue