@daocloud-proto/insight 0.8.1 → 0.8.3-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,9 +91,9 @@ export type BaseGraphQuery = {
91
91
  }
92
92
 
93
93
  export type BaseMetricsQuery = {
94
- clusters?: string
95
- namespaces?: string
96
- services?: string
94
+ cluster?: string
95
+ namespace?: string
96
+ service?: string
97
97
  extensionFilters?: string
98
98
  endTime?: string
99
99
  lookback?: string
@@ -101,7 +101,7 @@ export type BaseMetricsQuery = {
101
101
  ratePer?: string
102
102
  }
103
103
 
104
- export type ServiceREDMetricResponse = {
104
+ export type NodeMetricResponse = {
105
105
  reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
106
106
  errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
107
107
  repLatencyMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
@@ -46,6 +46,7 @@ export type GlobalConfig = {
46
46
  export type userinfo = {
47
47
  name?: string
48
48
  isAdmin?: boolean
49
+ canView?: boolean
49
50
  }
50
51
 
51
52
  export type helmInstallConfigRequest = {
@@ -273,9 +274,9 @@ export class Tracing {
273
274
  }
274
275
  export class GraphQueryService {
275
276
  static GetGraph(req: InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.Graph> {
276
- return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service_graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
277
+ return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service-graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
277
278
  }
278
- static GetREDMetrics(req: InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.ServiceREDMetricResponse> {
279
- return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, InsightIoApiGraphV1alpha1Graph.ServiceREDMetricResponse>(`/apis/insight.io/v1alpha1/service_graph/service-RED-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
279
+ static GetNodeMetrics(req: InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.NodeMetricResponse> {
280
+ return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, InsightIoApiGraphV1alpha1Graph.NodeMetricResponse>(`/apis/insight.io/v1alpha1/service-graph/node-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
280
281
  }
281
282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.8.1",
3
+ "version":"0.8.3-10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -34,6 +34,11 @@ export enum InsightAgentStatus {
34
34
  UNHEALTHY = "UNHEALTHY",
35
35
  }
36
36
 
37
+ export enum Role {
38
+ NOT_ADMIN = "NOT_ADMIN",
39
+ ADMIN = "ADMIN",
40
+ }
41
+
37
42
  export type ListClustersResponse = {
38
43
  items?: Cluster[]
39
44
  }
@@ -42,6 +47,7 @@ export type Cluster = {
42
47
  name?: string
43
48
  kubeSystemId?: string
44
49
  phase?: ClusterPhase
50
+ role?: Role
45
51
  }
46
52
 
47
53
  export type ListClusterSummaryRequest = {
@@ -95,4 +101,5 @@ export type ListNamespacesResponse = {
95
101
 
96
102
  export type Namespace = {
97
103
  name?: string
104
+ role?: Role
98
105
  }