瀏覽代碼

Add: 添加cloudshell_scanner.py下载

iaun 2 月之前
父節點
當前提交
b85e3b17e6
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. 3 0
      Dockerfile
  2. 8 1
      frontend/src/pages/Tasks.tsx

+ 3 - 0
Dockerfile

@@ -35,6 +35,9 @@ COPY --from=frontend-builder /app/frontend/dist ./static
 # Copy report template
 COPY sample-reports/ ./sample-reports/
 
+# Copy cloudshell scanner for download
+COPY cloudshell_scanner.py ./static/downloads/cloudshell_scanner.py
+
 # Create necessary directories
 RUN mkdir -p uploads reports uploads/scan_data instance
 

+ 8 - 1
frontend/src/pages/Tasks.tsx

@@ -34,7 +34,8 @@ import {
   SyncOutlined,
   ClockCircleOutlined,
   CloudUploadOutlined,
-  KeyOutlined
+  KeyOutlined,
+  DownloadOutlined
 } from '@ant-design/icons';
 import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
 import type { UploadFile } from 'antd/es/upload/interface';
@@ -508,6 +509,12 @@ export default function Tasks() {
       <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
         <Title level={2} style={{ margin: 0 }}>Tasks</Title>
         <Space>
+          <Button 
+            icon={<DownloadOutlined />}
+            onClick={() => window.open('/downloads/cloudshell_scanner.py', '_blank')}
+          >
+            Download Scanner
+          </Button>
           <Select
             placeholder="Filter by status"
             allowClear