Skip to content

Commit

Permalink
PMM-5003 Fix service type values. (#504)
Browse files Browse the repository at this point in the history
* PMM-5003 Fix service type values.

* PMM-5003 Sync/fix comments.

Co-authored-by: Alexey Palazhchenko <[email protected]>
  • Loading branch information
BupycHuk and AlekSi committed Feb 26, 2020
1 parent 4e602e1 commit 2fd5efe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 0 additions & 2 deletions api/inventorypb/types/agent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ const (
AgentTypeRDSExporter = "RDS_EXPORTER"
)

// agentTypeNames is the human readable list of agent names to be used in reports and
// commands like list or status
var agentTypeNames = map[string]string{
// no invalid
AgentTypePMMAgent: "pmm_agent",
Expand Down
11 changes: 6 additions & 5 deletions api/inventorypb/types/node_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ const (
)

var nodeTypeNames = map[string]string{
NodeTypeGenericNode: "generic-node",
NodeTypeContainerNode: "container-node",
NodeTypeRemoteNode: "remote-node",
NodeTypeRemoteRDSNode: "remote-rds-node",
// no invalid
NodeTypeGenericNode: "Generic",
NodeTypeContainerNode: "Container",
NodeTypeRemoteNode: "Remote",
NodeTypeRemoteRDSNode: "Remote RDS",
}

// NodeTypeName returns human friendly agent type to be used in reports
// NodeTypeName returns human friendly node type to be used in reports
func NodeTypeName(t string) string {
res := nodeTypeNames[t]
if res == "" {
Expand Down
11 changes: 6 additions & 5 deletions api/inventorypb/types/service_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ const (
)

var serviceTypeNames = map[string]string{
ServiceTypeMySQLService: "mysql-service",
ServiceTypeMongoDBService: "mongodb-service",
ServiceTypePostgreSQLService: "postgresql-service",
ServiceTypeProxySQLService: "proxysql-service",
// no invalid
ServiceTypeMySQLService: "MySQL",
ServiceTypeMongoDBService: "MongoDB",
ServiceTypePostgreSQLService: "PostgreSQL",
ServiceTypeProxySQLService: "ProxySQL",
}

// ServiceTypeName returns human friendly agent type to be used in reports
// ServiceTypeName returns human friendly service type to be used in reports
func ServiceTypeName(t string) string {
res := serviceTypeNames[t]
if res == "" {
Expand Down

0 comments on commit 2fd5efe

Please sign in to comment.