Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update order fields to array type, fix onboard darkmode, added last s… #914

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
426 changes: 226 additions & 200 deletions deepfence_frontend/apps/dashboard/api-spec.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ models/ModelScanFilter.ts
models/ModelScanInfo.ts
models/ModelScanListReq.ts
models/ModelScanListResp.ts
models/ModelScanResultBasicNode.ts
models/ModelScanResultsActionRequest.ts
models/ModelScanResultsMaskRequest.ts
models/ModelScanResultsReq.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type {
ApiDocsFailureResponse,
ModelBasicNode,
ModelDownloadReportResponse,
ModelScanResultBasicNode,
ModelScanResultsActionRequest,
ModelScanResultsMaskRequest,
} from '../models';
Expand All @@ -31,6 +32,8 @@ import {
ModelBasicNodeToJSON,
ModelDownloadReportResponseFromJSON,
ModelDownloadReportResponseToJSON,
ModelScanResultBasicNodeFromJSON,
ModelScanResultBasicNodeToJSON,
ModelScanResultsActionRequestFromJSON,
ModelScanResultsActionRequestToJSON,
ModelScanResultsMaskRequestFromJSON,
Expand All @@ -51,10 +54,9 @@ export interface DownloadScanResultsRequest {
scanType: DownloadScanResultsScanTypeEnum;
}

export interface GetAllNodesOfScanResultDocumentRequest {
docId: string;
scanId: string;
scanType: GetAllNodesOfScanResultDocumentScanTypeEnum;
export interface GetAllNodesInScanResultRequest {
resultId: string;
scanType: GetAllNodesInScanResultScanTypeEnum;
}

export interface MaskScanResultRequest {
Expand Down Expand Up @@ -127,22 +129,36 @@ export interface ScanResultsApiInterface {
downloadScanResults(requestParameters: DownloadScanResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelDownloadReportResponse>;

/**
* Get all nodes for given result document
* @summary Get all nodes for given result document
* @param {string} docId
* @param {string} scanId
* Get all nodes in given scan result
* @summary Get all nodes in given scan result
* @param {string} resultId
* @param {'SecretScan' | 'VulnerabilityScan' | 'MalwareScan' | 'ComplianceScan' | 'CloudComplianceScan'} scanType
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScanResultsApiInterface
*/
getAllNodesOfScanResultDocumentRaw(requestParameters: GetAllNodesOfScanResultDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelBasicNode>>>;
getAllNodesInScanResultRaw(requestParameters: GetAllNodesInScanResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelBasicNode>>>;

/**
* Get all nodes in given scan result
* Get all nodes in given scan result
*/
getAllNodesInScanResult(requestParameters: GetAllNodesInScanResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelBasicNode>>;

/**
* Get all nodes in given scan result ids
* @summary Get all nodes in given scan result ids
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ScanResultsApiInterface
*/
getAllNodesInScanResultsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelScanResultBasicNode>>>;

/**
* Get all nodes for given result document
* Get all nodes for given result document
* Get all nodes in given scan result ids
* Get all nodes in given scan result ids
*/
getAllNodesOfScanResultDocument(requestParameters: GetAllNodesOfScanResultDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelBasicNode>>;
getAllNodesInScanResults(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelScanResultBasicNode>>;

/**
* Mask scan results
Expand Down Expand Up @@ -325,20 +341,16 @@ export class ScanResultsApi extends runtime.BaseAPI implements ScanResultsApiInt
}

/**
* Get all nodes for given result document
* Get all nodes for given result document
* Get all nodes in given scan result
* Get all nodes in given scan result
*/
async getAllNodesOfScanResultDocumentRaw(requestParameters: GetAllNodesOfScanResultDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelBasicNode>>> {
if (requestParameters.docId === null || requestParameters.docId === undefined) {
throw new runtime.RequiredError('docId','Required parameter requestParameters.docId was null or undefined when calling getAllNodesOfScanResultDocument.');
}

if (requestParameters.scanId === null || requestParameters.scanId === undefined) {
throw new runtime.RequiredError('scanId','Required parameter requestParameters.scanId was null or undefined when calling getAllNodesOfScanResultDocument.');
async getAllNodesInScanResultRaw(requestParameters: GetAllNodesInScanResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelBasicNode>>> {
if (requestParameters.resultId === null || requestParameters.resultId === undefined) {
throw new runtime.RequiredError('resultId','Required parameter requestParameters.resultId was null or undefined when calling getAllNodesInScanResult.');
}

if (requestParameters.scanType === null || requestParameters.scanType === undefined) {
throw new runtime.RequiredError('scanType','Required parameter requestParameters.scanType was null or undefined when calling getAllNodesOfScanResultDocument.');
throw new runtime.RequiredError('scanType','Required parameter requestParameters.scanType was null or undefined when calling getAllNodesInScanResult.');
}

const queryParameters: any = {};
Expand All @@ -354,7 +366,7 @@ export class ScanResultsApi extends runtime.BaseAPI implements ScanResultsApiInt
}
}
const response = await this.request({
path: `/deepfence/scan/{scan_type}/{scan_id}/{doc_id}/nodes`.replace(`{${"doc_id"}}`, encodeURIComponent(String(requestParameters.docId))).replace(`{${"scan_id"}}`, encodeURIComponent(String(requestParameters.scanId))).replace(`{${"scan_type"}}`, encodeURIComponent(String(requestParameters.scanType))),
path: `/deepfence/scan/nodes/{scan_type}/{result_id}`.replace(`{${"result_id"}}`, encodeURIComponent(String(requestParameters.resultId))).replace(`{${"scan_type"}}`, encodeURIComponent(String(requestParameters.scanType))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
Expand All @@ -364,11 +376,47 @@ export class ScanResultsApi extends runtime.BaseAPI implements ScanResultsApiInt
}

/**
* Get all nodes for given result document
* Get all nodes for given result document
* Get all nodes in given scan result
* Get all nodes in given scan result
*/
async getAllNodesInScanResult(requestParameters: GetAllNodesInScanResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelBasicNode>> {
const response = await this.getAllNodesInScanResultRaw(requestParameters, initOverrides);
return await response.value();
}

/**
* Get all nodes in given scan result ids
* Get all nodes in given scan result ids
*/
async getAllNodesInScanResultsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelScanResultBasicNode>>> {
const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("bearer_token", []);

if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/deepfence/scan/nodes-in-result`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ModelScanResultBasicNodeFromJSON));
}

/**
* Get all nodes in given scan result ids
* Get all nodes in given scan result ids
*/
async getAllNodesOfScanResultDocument(requestParameters: GetAllNodesOfScanResultDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelBasicNode>> {
const response = await this.getAllNodesOfScanResultDocumentRaw(requestParameters, initOverrides);
async getAllNodesInScanResults(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelScanResultBasicNode>> {
const response = await this.getAllNodesInScanResultsRaw(initOverrides);
return await response.value();
}

Expand Down Expand Up @@ -513,11 +561,11 @@ export type DownloadScanResultsScanTypeEnum = typeof DownloadScanResultsScanType
/**
* @export
*/
export const GetAllNodesOfScanResultDocumentScanTypeEnum = {
export const GetAllNodesInScanResultScanTypeEnum = {
SecretScan: 'SecretScan',
VulnerabilityScan: 'VulnerabilityScan',
MalwareScan: 'MalwareScan',
ComplianceScan: 'ComplianceScan',
CloudComplianceScan: 'CloudComplianceScan'
} as const;
export type GetAllNodesOfScanResultDocumentScanTypeEnum = typeof GetAllNodesOfScanResultDocumentScanTypeEnum[keyof typeof GetAllNodesOfScanResultDocumentScanTypeEnum];
export type GetAllNodesInScanResultScanTypeEnum = typeof GetAllNodesInScanResultScanTypeEnum[keyof typeof GetAllNodesInScanResultScanTypeEnum];
Loading