Skip to content
Snippets Groups Projects
Commit 86efbd50 authored by Evgeniy Martynenko's avatar Evgeniy Martynenko
Browse files

refactoring code

parent 13172a4d
No related branches found
No related tags found
1 merge request!1Antivirus scan detections
......@@ -16,35 +16,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
export interface AvDetectionsListElementModel {
/** Antivirus name */
av_scanner: string;
/** Detection type */
av_type: string;
/** Issue */
av_issue: string;
/** Message */
av_message: string;
/** Branch or image */
av_target: string;
/** File name */
fn_name: string;
/** Branch name */
pkgset_name: string;
/** Package name */
pkg_name: string;
/** Package version */
pkg_version: string;
/** Package release */
pkg_release: string;
}
export interface AvDetectionsListModel {
length: number;
detections: AvDetectionsListElementModel[];
message?: string;
}
export interface AvScannerObjectModel {
/** Antivirus name */
av_scanner: string;
......
......@@ -137,46 +137,5 @@ class AvDetectionsListStore {
}
}
// async getAvImgDetectionsList(input: string, page: number, limit: number) {
// if (this.request) {
// this.request.cancel()
// }
// const cancelToken = axios.CancelToken;
// const source = cancelToken.source();
// this.request = source;
// try {
// this.setIsLoading(true);
// const response: AxiosResponse<AvDetectionsListModel> = await api.get(routes.avImgDetectionsList, {
// params: {
// limit: limit,
// page: page,
// branch: this.filterBranch !== '' ? this.filterBranch: null,
// scanner: this.filterScanner !== '' ? this.filterScanner: null,
// is_image: this.filterIsImage !== '' ? this.filterIsImage: null,
// input: input !== '' ? smartSplit(input).join(',') : null
// },
// cancelToken: source.token,
// });
// if (response.status === 200) {
// this.setDetectionsList(response.data.detections)
// this.setTotalCount(Number(response.headers['x-total-count']))
// this.setError("")
// } else {
// this.setDetectionsList([])
// this.setTotalCount(0)
// if (response.data.message) this.setError(response.data.message)
// }
// this.request = null;
// this.setIsLoading(false);
// } catch (e) {
// if (e.code !== "ERR_CANCELED") {
// this.setIsLoading(false);
// this.request = null;
// }
// this.setError(e.message);
// }
// }
// }
const avDetectionsListStore = new AvDetectionsListStore();
export default avDetectionsListStore;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment