Skip to content

Commit

Permalink
feat(2103): added namespace filter for pods and containers table
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-deepfence committed Apr 25, 2024
1 parent b33c2dc commit a1fe3db
Show file tree
Hide file tree
Showing 18 changed files with 519 additions and 33 deletions.
137 changes: 134 additions & 3 deletions deepfence_frontend/apps/dashboard/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,62 @@
"security": [{ "bearer_token": [] }]
}
},
"/deepfence/complete/container": {
"post": {
"tags": ["Completion"],
"summary": "Get Completion for Container fields",
"description": "Complete Container info",
"operationId": "completeContainerInfo",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionCompletionNodeFieldReq"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionCompletionNodeFieldRes"
}
}
}
},
"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/complete/host": {
"post": {
"tags": ["Completion"],
Expand Down Expand Up @@ -683,6 +739,62 @@
"security": [{ "bearer_token": [] }]
}
},
"/deepfence/complete/pod": {
"post": {
"tags": ["Completion"],
"summary": "Get Completion for Pod fields",
"description": "Complete Pod info",
"operationId": "completePodInfo",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionCompletionNodeFieldReq"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionCompletionNodeFieldRes"
}
}
}
},
"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/complete/process": {
"post": {
"tags": ["Completion"],
Expand Down Expand Up @@ -13095,6 +13207,7 @@
"nullable": true
},
"cron_expr": { "type": "string" },
"deepfence_system_scan": { "type": "boolean" },
"description": { "type": "string" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
Expand Down Expand Up @@ -13676,6 +13789,7 @@
"items": { "type": "string" },
"nullable": true
},
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -13724,7 +13838,11 @@
"secret_latest_scan_id",
"malwares_count",
"malware_scan_status",
"malware_latest_scan_id"
"malware_latest_scan_id",
"kubernetes_cluster_name",
"kubernetes_cluster_id",
"kubernetes_namespace",
"is_deepfence_system"
],
"type": "object",
"properties": {
Expand All @@ -13746,6 +13864,10 @@
},
"host_name": { "type": "string" },
"image": { "$ref": "#/components/schemas/ModelContainerImage" },
"is_deepfence_system": { "type": "boolean" },
"kubernetes_cluster_id": { "type": "string" },
"kubernetes_cluster_name": { "type": "string" },
"kubernetes_namespace": { "type": "string" },
"malware_latest_scan_id": { "type": "string" },
"malware_scan_status": { "type": "string" },
"malwares_count": { "type": "integer" },
Expand Down Expand Up @@ -13788,7 +13910,8 @@
"malwares_count",
"malware_scan_status",
"malware_latest_scan_id",
"containers"
"containers",
"is_deepfence_system"
],
"type": "object",
"properties": {
Expand All @@ -13809,6 +13932,7 @@
},
"docker_image_virtual_size": { "type": "string" },
"image_node_id": { "type": "string" },
"is_deepfence_system": { "type": "boolean" },
"malware_latest_scan_id": { "type": "string" },
"malware_scan_status": { "type": "string" },
"malwares_count": { "type": "integer" },
Expand Down Expand Up @@ -13891,6 +14015,7 @@
"from_timestamp": { "type": "integer" },
"report_id": { "type": "string" },
"status": { "type": "string" },
"status_message": { "type": "string" },
"storage_path": { "type": "string" },
"to_timestamp": { "type": "integer" },
"type": { "type": "string" },
Expand Down Expand Up @@ -14496,6 +14621,7 @@
"required": ["node_ids", "filters"],
"type": "object",
"properties": {
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -14582,7 +14708,8 @@
"kubernetes_created",
"malware_scan_status",
"secret_scan_status",
"vulnerability_scan_status"
"vulnerability_scan_status",
"is_deepfence_system"
],
"type": "object",
"properties": {
Expand All @@ -14592,6 +14719,7 @@
"nullable": true
},
"host_name": { "type": "string" },
"is_deepfence_system": { "type": "boolean" },
"kubernetes_cluster_id": { "type": "string" },
"kubernetes_cluster_name": { "type": "string" },
"kubernetes_created": { "type": "string" },
Expand Down Expand Up @@ -15206,6 +15334,7 @@
"required": ["node_ids", "filters"],
"type": "object",
"properties": {
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -15550,6 +15679,7 @@
"required": ["node_ids", "filters", "scan_config"],
"type": "object",
"properties": {
"deepfence_system_scan": { "type": "boolean" },
"filters": { "$ref": "#/components/schemas/ModelScanFilter" },
"is_priority": { "type": "boolean" },
"node_ids": {
Expand Down Expand Up @@ -15634,6 +15764,7 @@
"interface_ips": { "type": "array", "items": { "type": "string" } },
"interface_names": { "type": "array", "items": { "type": "string" } },
"is_console_vm": { "type": "boolean" },
"is_deepfence_system": { "type": "boolean" },
"kernel_id": { "type": "string" },
"kernel_version": { "type": "string" },
"kubernetes_cluster_id": { "type": "string" },
Expand Down
3 changes: 3 additions & 0 deletions deepfence_frontend/apps/dashboard/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,5 +415,8 @@ export function getScanResultCompletionApiClient() {
scanCompleteionApi.completeComplianceInfo.bind(scanCompleteionApi),
completeCloudCompliance:
scanCompleteionApi.completeCloudCompliance.bind(scanCompleteionApi),
completePodInfo: scanCompleteionApi.completePodInfo.bind(scanCompleteionApi),
completeContainerInfo:
scanCompleteionApi.completeContainerInfo.bind(scanCompleteionApi),
};
}
Loading

0 comments on commit a1fe3db

Please sign in to comment.