1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

feat(agent): support agent deployed on standalone engine endpoint (#2061)

This commit is contained in:
Anthony Lapenna 2018-07-23 11:31:21 +02:00 committed by GitHub
parent 3c6f6cf5bf
commit 7225619456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 18 additions and 19 deletions

View file

@ -12,10 +12,7 @@ angular.module('portainer.docker')
}; };
if (type === 2) { if (type === 2) {
mode.provider = 'DOCKER_SWARM_MODE';
mode.role = 'MANAGER';
mode.agentProxy = true; mode.agentProxy = true;
return mode;
} }
if (!info.Swarm || _.isEmpty(info.Swarm.NodeID)) { if (!info.Swarm || _.isEmpty(info.Swarm.NodeID)) {

View file

@ -12,9 +12,9 @@
<containers-datatable <containers-datatable
title-text="Containers" title-icon="fa-server" title-text="Containers" title-icon="fa-server"
dataset="containers" table-key="containers" dataset="containers" table-key="containers"
order-by="Status" order-by="Status"
show-ownership-column="applicationState.application.authentication" show-ownership-column="applicationState.application.authentication"
show-host-column="applicationState.endpoint.mode.agentProxy" show-host-column="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
show-add-action="true" show-add-action="true"
></containers-datatable> ></containers-datatable>
</div> </div>

View file

@ -107,7 +107,7 @@
<!-- !port-mapping-input-list --> <!-- !port-mapping-input-list -->
</div> </div>
<!-- !port-mapping --> <!-- !port-mapping -->
<div ng-if="applicationState.endpoint.mode.agentProxy"> <div ng-if="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">
<div class="col-sm-12 form-section-title"> <div class="col-sm-12 form-section-title">
Deployment Deployment
</div> </div>

View file

@ -3,14 +3,14 @@
<rd-header-content>Endpoint summary</rd-header-content> <rd-header-content>Endpoint summary</rd-header-content>
</rd-header> </rd-header>
<div class="row" ng-if="applicationState.endpoint.mode.agentProxy"> <div class="row" ng-if="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">
<div class="col-sm-12"> <div class="col-sm-12">
<dashboard-cluster-agent-info></dashboard-cluster-agent-info> <dashboard-cluster-agent-info></dashboard-cluster-agent-info>
</div> </div>
</div> </div>
<div class="row" ng-if="!applicationState.endpoint.mode.agentProxy"> <div class="row" ng-if="!applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">
<div class="col-sm-12" ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"> <div class="col-sm-12">
<rd-widget> <rd-widget>
<rd-widget-body> <rd-widget-body>
<div class="col-sm-12 form-section-title"> <div class="col-sm-12 form-section-title">
@ -32,7 +32,9 @@
</rd-widget-body> </rd-widget-body>
</rd-widget> </rd-widget>
</div> </div>
</div>
<div class="row" ng-if="!applicationState.endpoint.mode.agentProxy || applicationState.endpoint.mode.provider !== 'DOCKER_SWARM_MODE'">
<div class="col-sm-12"> <div class="col-sm-12">
<rd-widget> <rd-widget>
<rd-widget-header icon="fa-tachometer-alt" title-text="Node info"></rd-widget-header> <rd-widget-header icon="fa-tachometer-alt" title-text="Node info"></rd-widget-header>

View file

@ -194,7 +194,7 @@
</div> </div>
</div> </div>
<!-- !url --> <!-- !url -->
<div ng-if="applicationState.endpoint.mode.agentProxy"> <div ng-if="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">
<div class="col-sm-12 form-section-title"> <div class="col-sm-12 form-section-title">
Deployment Deployment
</div> </div>

View file

@ -28,7 +28,7 @@
</div> </div>
</div> </div>
<!-- !tag-note --> <!-- !tag-note -->
<div ng-if="applicationState.endpoint.mode.agentProxy"> <div ng-if="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">
<div class="col-sm-12 form-section-title"> <div class="col-sm-12 form-section-title">
Deployment Deployment
</div> </div>
@ -57,8 +57,8 @@
<images-datatable <images-datatable
title-text="Images" title-icon="fa-clone" title-text="Images" title-icon="fa-clone"
dataset="images" table-key="images" dataset="images" table-key="images"
order-by="RepoTags" order-by="RepoTags"
show-host-column="applicationState.endpoint.mode.agentProxy" show-host-column="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
remove-action="removeAction" remove-action="removeAction"
force-remove-action="confirmRemovalAction" force-remove-action="confirmRemovalAction"
></images-datatable> ></images-datatable>

View file

@ -119,7 +119,7 @@
</div> </div>
</div> </div>
<!-- !internal --> <!-- !internal -->
<div ng-if="applicationState.endpoint.mode.agentProxy && config.Driver !== 'overlay'"> <div ng-if="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE' && config.Driver !== 'overlay'">
<div class="col-sm-12 form-section-title"> <div class="col-sm-12 form-section-title">
Deployment Deployment
</div> </div>

View file

@ -12,10 +12,10 @@
<networks-datatable <networks-datatable
title-text="Networks" title-icon="fa-sitemap" title-text="Networks" title-icon="fa-sitemap"
dataset="networks" table-key="networks" dataset="networks" table-key="networks"
order-by="Name" order-by="Name"
remove-action="removeAction" remove-action="removeAction"
show-ownership-column="applicationState.application.authentication" show-ownership-column="applicationState.application.authentication"
show-host-column="applicationState.endpoint.mode.agentProxy" show-host-column="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
></networks-datatable> ></networks-datatable>
</div> </div>
</div> </div>

View file

@ -70,7 +70,7 @@
<storidge-profile-selector storidge-profile="formValues.StoridgeProfile"></storidge-profile-selector> <storidge-profile-selector storidge-profile="formValues.StoridgeProfile"></storidge-profile-selector>
</div> </div>
<!-- storidge --> <!-- storidge -->
<div ng-if="applicationState.endpoint.mode.agentProxy && formValues.Driver === 'local'"> <div ng-if="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE' && formValues.Driver === 'local'">
<div class="col-sm-12 form-section-title"> <div class="col-sm-12 form-section-title">
Deployment Deployment
</div> </div>

View file

@ -15,7 +15,7 @@
order-by="Id" order-by="Id"
remove-action="removeAction" remove-action="removeAction"
show-ownership-column="applicationState.application.authentication" show-ownership-column="applicationState.application.authentication"
show-host-column="applicationState.endpoint.mode.agentProxy" show-host-column="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
show-browse-action="applicationState.endpoint.mode.agentProxy" show-browse-action="applicationState.endpoint.mode.agentProxy"
></volumes-datatable> ></volumes-datatable>
</div> </div>

View file

@ -186,7 +186,7 @@
dataset="services" table-key="stack-services" dataset="services" table-key="stack-services"
order-by="Name" order-by="Name"
nodes="nodes" nodes="nodes"
agent-proxy="applicationState.endpoint.mode.agentProxy" agent-proxy="applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'"
show-ownership-column="false" show-ownership-column="false"
show-update-action="applicationState.endpoint.apiVersion >= 1.25" show-update-action="applicationState.endpoint.apiVersion >= 1.25"
show-task-logs-button="applicationState.endpoint.apiVersion >= 1.30" show-task-logs-button="applicationState.endpoint.apiVersion >= 1.30"