1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 06:45:23 +02:00

refactor(endpoints): remove endpointProvider from views [EE-1136] (#5359)

[EE-1136]
This commit is contained in:
Chaim Lev-Ari 2021-12-14 09:34:54 +02:00 committed by GitHub
parent 7088da5157
commit eb9f6c77f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 408 additions and 429 deletions

View file

@ -7,6 +7,6 @@
<div class="row">
<div class="col-sm-12">
<host-browser ng-if="$ctrl.host"></host-browser>
<host-browser ng-if="$ctrl.host" endpoint-id="$ctrl.endpoint.Id"></host-browser>
</div>
</div>

View file

@ -1,4 +1,7 @@
angular.module('portainer.docker').component('hostBrowserView', {
templateUrl: './host-browser-view.html',
controller: 'HostBrowserViewController',
bindings: {
endpoint: '<',
},
});

View file

@ -1,3 +1,5 @@
import { isOfflineEndpoint } from '@/portainer/helpers/endpointHelper';
angular.module('portainer.docker').controller('HostViewController', [
'$q',
'SystemService',
@ -6,8 +8,7 @@ angular.module('portainer.docker').controller('HostViewController', [
'AgentService',
'ContainerService',
'Authentication',
'EndpointProvider',
function HostViewController($q, SystemService, Notifications, StateManager, AgentService, ContainerService, Authentication, EndpointProvider) {
function HostViewController($q, SystemService, Notifications, StateManager, AgentService, ContainerService, Authentication) {
var ctrl = this;
this.$onInit = initView;
@ -39,7 +40,7 @@ angular.module('portainer.docker').controller('HostViewController', [
.then(function success(data) {
ctrl.engineDetails = buildEngineDetails(data);
ctrl.hostDetails = buildHostDetails(data.info);
ctrl.state.offlineMode = EndpointProvider.offlineMode();
ctrl.state.offlineMode = isOfflineEndpoint(ctrl.endpoint);
ctrl.jobs = data.jobs;
if (ctrl.state.isAgent && agentApiVersion > 1) {