Skip to content

Commit

Permalink
Merge pull request #1023 from deepfence/mv-ui-topology-6
Browse files Browse the repository at this point in the history
[v2][UI] topology enhancements
  • Loading branch information
milan-deepfence authored Apr 19, 2023
2 parents 600399a + e58f11c commit d98bf29
Show file tree
Hide file tree
Showing 33 changed files with 1,724 additions and 166 deletions.
153 changes: 133 additions & 20 deletions deepfence_frontend/apps/dashboard/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6274,6 +6274,58 @@
"security": [{ "bearer_token": [] }]
}
},
"/deepfence/search/count/pods": {
"post": {
"tags": ["Search"],
"summary": "Count Pods",
"description": "Count across all the data associated with pods",
"operationId": "countPods",
"requestBody": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SearchSearchNodeReq" }
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SearchSearchCountResp" }
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ApiDocsBadRequestResponse" }
}
}
},
"401": { "description": "Unauthorized" },
"403": { "description": "Forbidden" },
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ApiDocsFailureResponse" }
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ApiDocsFailureResponse" }
}
}
}
},
"security": [{ "bearer_token": [] }]
}
},
"/deepfence/search/count/secret/scans": {
"post": {
"tags": ["Search"],
Expand Down Expand Up @@ -6757,6 +6809,61 @@
"security": [{ "bearer_token": [] }]
}
},
"/deepfence/search/pods": {
"post": {
"tags": ["Search"],
"summary": "Search Pods",
"description": "Search across all the data associated with pods",
"operationId": "searchPods",
"requestBody": {
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SearchSearchNodeReq" }
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": { "$ref": "#/components/schemas/ModelPod" }
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ApiDocsBadRequestResponse" }
}
}
},
"401": { "description": "Unauthorized" },
"403": { "description": "Forbidden" },
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ApiDocsFailureResponse" }
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ApiDocsFailureResponse" }
}
}
}
},
"security": [{ "bearer_token": [] }]
}
},
"/deepfence/search/secret/scans": {
"post": {
"tags": ["Search"],
Expand Down Expand Up @@ -7228,7 +7335,7 @@
"application/json": {
"schema": {
"type": "array",
"items": { "$ref": "#/components/schemas/ModelGetAuditLogsRow" }
"items": { "$ref": "#/components/schemas/PostgresqlDbGetAuditLogsRow" }
}
}
}
Expand Down Expand Up @@ -8665,7 +8772,17 @@
"type": "object",
"properties": { "api_token": { "type": "string" } }
},
"ModelApiTokenResponse": { "type": "object" },
"ModelApiTokenResponse": {
"type": "object",
"properties": {
"api_token": { "type": "string" },
"company_id": { "type": "integer" },
"created_at": { "type": "string", "format": "date-time" },
"created_by_user_id": { "type": "integer" },
"id": { "type": "integer" },
"name": { "type": "string" }
}
},
"ModelBasicNode": {
"required": ["node_id", "name", "node_type", "host_name"],
"type": "object",
Expand Down Expand Up @@ -9309,20 +9426,6 @@
"type": "object",
"properties": { "report_id": { "type": "string" } }
},
"ModelGetAuditLogsRow": {
"type": "object",
"properties": {
"action": { "type": "string" },
"created_at": { "type": "string", "format": "date-time" },
"email": { "type": "string" },
"event": { "type": "string" },
"resources": { "type": "string" },
"role": { "type": "string" },
"success": { "type": "boolean" },
"user_id": { "type": "integer" },
"user_role_id": { "type": "integer" }
}
},
"ModelHost": {
"required": [
"node_id",
Expand All @@ -9332,8 +9435,6 @@
"processes",
"pods",
"container_images",
"interface_names",
"interface_ips",
"kernel_version",
"uptime",
"version",
Expand Down Expand Up @@ -9399,8 +9500,6 @@
},
"instance_id": { "type": "string" },
"instance_type": { "type": "string" },
"interface_ips": { "type": "array", "items": {}, "nullable": true },
"interface_names": { "type": "array", "items": {}, "nullable": true },
"is_console_vm": { "type": "boolean" },
"kernel_id": { "type": "string" },
"kernel_version": { "type": "string" },
Expand Down Expand Up @@ -10390,6 +10489,20 @@
}
}
},
"PostgresqlDbGetAuditLogsRow": {
"type": "object",
"properties": {
"action": { "type": "string" },
"created_at": { "type": "string", "format": "date-time" },
"email": { "type": "string" },
"event": { "type": "string" },
"resources": { "type": "string" },
"role": { "type": "string" },
"success": { "type": "boolean" },
"user_id": { "type": "integer" },
"user_role_id": { "type": "integer" }
}
},
"ReportIDList": { "type": "array", "items": { "type": "string" } },
"ReportMetadata": {
"type": "object",
Expand Down
4 changes: 4 additions & 0 deletions deepfence_frontend/apps/dashboard/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export function getSearchApiClient() {
searchHosts: searchApi.searchHosts.bind(searchApi),
searchHostsCount: searchApi.countHosts.bind(searchApi),
searchKubernetesClusters: searchApi.searchKubernetesClusters.bind(searchApi),
countKubernetesClusters: searchApi.countKubernetesClusters.bind(searchApi),
countPods: searchApi.countPods.bind(searchApi),
searchPods: searchApi.searchPods.bind(searchApi),
countContainers: searchApi.countContainers.bind(searchApi),
searchVulnerabilities: searchApi.searchVulnerabilities.bind(searchApi),
searchVulnerabilitiesCount: searchApi.countVulnerabilities.bind(searchApi),
searchVulnerabilityScanCount: searchApi.countVulnerabilityScans.bind(searchApi),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ models/LookupLookupFilter.ts
models/ModelAgentId.ts
models/ModelAgentUpgrade.ts
models/ModelApiAuthRequest.ts
models/ModelApiTokenResponse.ts
models/ModelBasicNode.ts
models/ModelCloudCompliance.ts
models/ModelCloudComplianceBenchmark.ts
Expand Down Expand Up @@ -95,7 +96,6 @@ models/ModelFiltersReq.ts
models/ModelFiltersResult.ts
models/ModelGenerateReportReq.ts
models/ModelGenerateReportResp.ts
models/ModelGetAuditLogsRow.ts
models/ModelHost.ts
models/ModelImageStub.ts
models/ModelInitAgentReq.ts
Expand Down Expand Up @@ -155,6 +155,7 @@ models/ModelVulnerability.ts
models/ModelVulnerabilityScanConfigLanguage.ts
models/ModelVulnerabilityScanResult.ts
models/ModelVulnerabilityScanTriggerReq.ts
models/PostgresqlDbGetAuditLogsRow.ts
models/ReportMetadata.ts
models/ReportRawReport.ts
models/ReportersCompareFilter.ts
Expand Down
Loading

0 comments on commit d98bf29

Please sign in to comment.