Skip to content

Commit

Permalink
Merge pull request #35 from openinfradev/fix_dashboard
Browse files Browse the repository at this point in the history
feature. change dashboard chart scheme.
  • Loading branch information
ktkfree authored Apr 19, 2023
2 parents 7eea50f + a75703c commit ecd545f
Show file tree
Hide file tree
Showing 14 changed files with 727 additions and 419 deletions.
227 changes: 90 additions & 137 deletions api/swagger/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Code generated by swaggo/swag. DO NOT EDIT
// Package swagger GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package swagger

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -1196,7 +1197,7 @@ const docTemplate = `{
"JWT": []
}
],
"description": "Get chart data",
"description": "Get charts data",
"consumes": [
"application/json"
],
Expand All @@ -1206,7 +1207,7 @@ const docTemplate = `{
"tags": [
"Dashboards"
],
"summary": "Get chart data",
"summary": "Get charts data",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1246,6 +1247,64 @@ const docTemplate = `{
}
}
},
"/organizations/{organizationId}/dashboard/charts/{chartType}": {
"get": {
"security": [
{
"JWT": []
}
],
"description": "Get chart data",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Dashboards"
],
"summary": "Get chart data",
"parameters": [
{
"type": "string",
"description": "organizationId",
"name": "organizationId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "chartType",
"name": "chartType",
"in": "path",
"required": true
},
{
"type": "string",
"description": "duration",
"name": "duration",
"in": "query",
"required": true
},
{
"type": "string",
"description": "interval",
"name": "interval",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.GetDashboardChartResponse"
}
}
}
}
},
"/organizations/{organizationId}/primary-cluster": {
"patch": {
"security": [
Expand Down Expand Up @@ -2054,7 +2113,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"appGroupType": {
"$ref": "#/definitions/domain.AppGroupType"
"type": "integer"
},
"clusterId": {
"type": "string"
Expand All @@ -2075,7 +2134,7 @@ const docTemplate = `{
"type": "string"
},
"status": {
"$ref": "#/definitions/domain.AppGroupStatus"
"type": "integer"
},
"statusDescription": {
"type": "string"
Expand All @@ -2091,38 +2150,6 @@ const docTemplate = `{
}
}
},
"domain.AppGroupStatus": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5
],
"x-enum-varnames": [
"AppGroupStatus_PENDING",
"AppGroupStatus_INSTALLING",
"AppGroupStatus_RUNNING",
"AppGroupStatus_DELETING",
"AppGroupStatus_DELETED",
"AppGroupStatus_ERROR"
]
},
"domain.AppGroupType": {
"type": "integer",
"enum": [
0,
1,
2
],
"x-enum-varnames": [
"AppGroupType_UNSPECIFIED",
"AppGroupType_LMA",
"AppGroupType_SERVICE_MESH"
]
},
"domain.AppServeApp": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2279,7 +2306,7 @@ const docTemplate = `{
"type": "string"
},
"applicationType": {
"$ref": "#/definitions/domain.ApplicationType"
"type": "integer"
},
"createdAt": {
"type": "string"
Expand All @@ -2298,34 +2325,16 @@ const docTemplate = `{
}
}
},
"domain.ApplicationType": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"x-enum-varnames": [
"ApplicationType_UNSPECIFIED",
"ApplicationType_THANOS",
"ApplicationType_PROMETHEUS",
"ApplicationType_GRAFANA",
"ApplicationType_KIALI",
"ApplicationType_KIBANA",
"ApplicationType_ELASTICSERCH",
"ApplicationType_CLOUD_CONSOLE",
"ApplicationType_HORIZON",
"ApplicationType_JAEGER",
"ApplicationType_KUBERNETES_DASHBOARD"
]
"domain.Axis": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"domain.ChartData": {
"type": "object",
Expand All @@ -2336,33 +2345,11 @@ const docTemplate = `{
"$ref": "#/definitions/domain.Unit"
}
},
"xaxis": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
}
}
"xAxis": {
"$ref": "#/definitions/domain.Axis"
},
"yaxis": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
}
}
"yAxis": {
"$ref": "#/definitions/domain.Axis"
}
}
},
Expand Down Expand Up @@ -2488,7 +2475,7 @@ const docTemplate = `{
"type": "string"
},
"status": {
"$ref": "#/definitions/domain.ClusterStatus"
"type": "integer"
},
"statusDesc": {
"type": "string"
Expand Down Expand Up @@ -2600,25 +2587,6 @@ const docTemplate = `{
}
}
},
"domain.ClusterStatus": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5
],
"x-enum-varnames": [
"ClusterStatus_PENDING",
"ClusterStatus_INSTALLING",
"ClusterStatus_RUNNING",
"ClusterStatus_DELETING",
"ClusterStatus_DELETED",
"ClusterStatus_ERROR"
]
},
"domain.CreateAppGroupRequest": {
"type": "object",
"required": [
Expand Down Expand Up @@ -3119,6 +3087,14 @@ const docTemplate = `{
}
}
},
"domain.GetDashboardChartResponse": {
"type": "object",
"properties": {
"chart": {
"$ref": "#/definitions/domain.DashboardChartResponse"
}
}
},
"domain.GetDashboardChartsResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -3296,7 +3272,7 @@ const docTemplate = `{
"type": "string"
},
"status": {
"$ref": "#/definitions/domain.OrganizationStatus"
"type": "integer"
},
"updatedAt": {
"type": "string"
Expand Down Expand Up @@ -3410,7 +3386,7 @@ const docTemplate = `{
"type": "string"
},
"status": {
"$ref": "#/definitions/domain.OrganizationStatus"
"type": "integer"
},
"statusDescription": {
"type": "string"
Expand All @@ -3420,29 +3396,6 @@ const docTemplate = `{
}
}
},
"domain.OrganizationStatus": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5,
6,
7
],
"x-enum-varnames": [
"OrganizationStatus_PENDING",
"OrganizationStatus_CREATE",
"OrganizationStatus_CREATING",
"OrganizationStatus_CREATED",
"OrganizationStatus_DELETE",
"OrganizationStatus_DELETING",
"OrganizationStatus_DELETED",
"OrganizationStatus_ERROR"
]
},
"domain.Role": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit ecd545f

Please sign in to comment.