mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(home): add a new home view (#2033)
This commit is contained in:
parent
a94f2ee7b8
commit
b6792461a4
46 changed files with 994 additions and 399 deletions
|
@ -31,12 +31,15 @@ type (
|
|||
SSLCert *string
|
||||
SSLKey *string
|
||||
SyncInterval *string
|
||||
Snapshot *bool
|
||||
SnapshotInterval *string
|
||||
}
|
||||
|
||||
// Status represents the application status.
|
||||
Status struct {
|
||||
Authentication bool `json:"Authentication"`
|
||||
EndpointManagement bool `json:"EndpointManagement"`
|
||||
Snapshot bool `json:"Snapshot"`
|
||||
Analytics bool `json:"Analytics"`
|
||||
Version string `json:"Version"`
|
||||
}
|
||||
|
@ -75,6 +78,8 @@ type (
|
|||
LDAPSettings LDAPSettings `json:"LDAPSettings"`
|
||||
AllowBindMountsForRegularUsers bool `json:"AllowBindMountsForRegularUsers"`
|
||||
AllowPrivilegedModeForRegularUsers bool `json:"AllowPrivilegedModeForRegularUsers"`
|
||||
SnapshotInterval string `json:"SnapshotInterval"`
|
||||
|
||||
// Deprecated fields
|
||||
DisplayDonationHeader bool
|
||||
DisplayExternalContributors bool
|
||||
|
@ -177,6 +182,9 @@ type (
|
|||
// EndpointType represents the type of an endpoint.
|
||||
EndpointType int
|
||||
|
||||
// EndpointStatus represents the status of an endpoint
|
||||
EndpointStatus int
|
||||
|
||||
// Endpoint represents a Docker endpoint with all the info required
|
||||
// to connect to it.
|
||||
Endpoint struct {
|
||||
|
@ -192,6 +200,8 @@ type (
|
|||
Extensions []EndpointExtension `json:"Extensions"`
|
||||
AzureCredentials AzureCredentials `json:"AzureCredentials,omitempty"`
|
||||
Tags []string `json:"Tags"`
|
||||
Status EndpointStatus `json:"Status"`
|
||||
Snapshots []Snapshot `json:"Snapshots"`
|
||||
|
||||
// Deprecated fields
|
||||
// Deprecated in DBVersion == 4
|
||||
|
@ -209,6 +219,21 @@ type (
|
|||
AuthenticationKey string `json:"AuthenticationKey"`
|
||||
}
|
||||
|
||||
// Snapshot represents a snapshot of a specific endpoint at a specific time
|
||||
Snapshot struct {
|
||||
Time int64 `json:"Time"`
|
||||
DockerVersion string `json:"DockerVersion"`
|
||||
Swarm bool `json:"Swarm"`
|
||||
TotalCPU int `json:"TotalCPU"`
|
||||
TotalMemory int64 `json:"TotalMemory"`
|
||||
RunningContainerCount int `json:"RunningContainerCount"`
|
||||
StoppedContainerCount int `json:"StoppedContainerCount"`
|
||||
VolumeCount int `json:"VolumeCount"`
|
||||
ImageCount int `json:"ImageCount"`
|
||||
ServiceCount int `json:"ServiceCount"`
|
||||
StackCount int `json:"StackCount"`
|
||||
}
|
||||
|
||||
// EndpointGroupID represents an endpoint group identifier.
|
||||
EndpointGroupID int
|
||||
|
||||
|
@ -539,9 +564,17 @@ type (
|
|||
ClonePrivateRepositoryWithBasicAuth(repositoryURL, destination, username, password string) error
|
||||
}
|
||||
|
||||
// EndpointWatcher represents a service to synchronize the endpoints via an external source.
|
||||
EndpointWatcher interface {
|
||||
WatchEndpointFile(endpointFilePath string) error
|
||||
// JobScheduler represents a service to run jobs on a periodic basis.
|
||||
JobScheduler interface {
|
||||
ScheduleEndpointSyncJob(endpointFilePath, interval string) error
|
||||
ScheduleSnapshotJob(interval string) error
|
||||
UpdateSnapshotJob(interval string)
|
||||
Start()
|
||||
}
|
||||
|
||||
// Snapshotter represents a service used to create endpoint snapshots.
|
||||
Snapshotter interface {
|
||||
CreateSnapshot(endpoint *Endpoint) (*Snapshot, error)
|
||||
}
|
||||
|
||||
// LDAPService represents a service used to authenticate users against a LDAP/AD.
|
||||
|
@ -581,6 +614,8 @@ const (
|
|||
// PortainerAgentSignatureMessage represents the message used to create a digital signature
|
||||
// to be used when communicating with an agent
|
||||
PortainerAgentSignatureMessage = "Portainer-App"
|
||||
// SupportedDockerAPIVersion is the minimum Docker API version supported by Portainer.
|
||||
SupportedDockerAPIVersion = "1.24"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -673,3 +708,11 @@ const (
|
|||
// ComposeStackTemplate represents a template used to deploy a Compose stack
|
||||
ComposeStackTemplate
|
||||
)
|
||||
|
||||
const (
|
||||
_ EndpointStatus = iota
|
||||
// EndpointStatusUp is used to represent an available endpoint
|
||||
EndpointStatusUp
|
||||
// EndpointStatusDown is used to represent an unavailable endpoint
|
||||
EndpointStatusDown
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue