|
1 | 1 | import * as React from 'react'; |
2 | | -import { VariantAnalysisStatus } from '../../remote-queries/shared/variant-analysis'; |
| 2 | + |
| 3 | +import { |
| 4 | + VariantAnalysis as VariantAnalysisDomainModel, |
| 5 | + VariantAnalysisQueryLanguage, |
| 6 | + VariantAnalysisRepoStatus, |
| 7 | + VariantAnalysisStatus |
| 8 | +} from '../../remote-queries/shared/variant-analysis'; |
3 | 9 | import { VariantAnalysisContainer } from './VariantAnalysisContainer'; |
4 | 10 | import { VariantAnalysisHeader } from './VariantAnalysisHeader'; |
5 | 11 |
|
| 12 | +const variantAnalysis: VariantAnalysisDomainModel = { |
| 13 | + id: 1, |
| 14 | + controllerRepoId: 1, |
| 15 | + query: { |
| 16 | + name: 'Example query', |
| 17 | + filePath: 'example.ql', |
| 18 | + language: VariantAnalysisQueryLanguage.Javascript, |
| 19 | + }, |
| 20 | + databases: {}, |
| 21 | + status: VariantAnalysisStatus.InProgress, |
| 22 | + scannedRepos: [ |
| 23 | + { |
| 24 | + repository: { |
| 25 | + id: 1, |
| 26 | + fullName: 'octodemo/hello-world-1', |
| 27 | + private: false, |
| 28 | + }, |
| 29 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 30 | + }, |
| 31 | + { |
| 32 | + repository: { |
| 33 | + id: 2, |
| 34 | + fullName: 'octodemo/hello-world-2', |
| 35 | + private: false, |
| 36 | + }, |
| 37 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 38 | + }, |
| 39 | + { |
| 40 | + repository: { |
| 41 | + id: 3, |
| 42 | + fullName: 'octodemo/hello-world-3', |
| 43 | + private: false, |
| 44 | + }, |
| 45 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 46 | + }, |
| 47 | + { |
| 48 | + repository: { |
| 49 | + id: 4, |
| 50 | + fullName: 'octodemo/hello-world-4', |
| 51 | + private: false, |
| 52 | + }, |
| 53 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 54 | + }, |
| 55 | + { |
| 56 | + repository: { |
| 57 | + id: 5, |
| 58 | + fullName: 'octodemo/hello-world-5', |
| 59 | + private: false, |
| 60 | + }, |
| 61 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 62 | + }, |
| 63 | + { |
| 64 | + repository: { |
| 65 | + id: 6, |
| 66 | + fullName: 'octodemo/hello-world-6', |
| 67 | + private: false, |
| 68 | + }, |
| 69 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 70 | + }, |
| 71 | + { |
| 72 | + repository: { |
| 73 | + id: 7, |
| 74 | + fullName: 'octodemo/hello-world-7', |
| 75 | + private: false, |
| 76 | + }, |
| 77 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 78 | + }, |
| 79 | + { |
| 80 | + repository: { |
| 81 | + id: 8, |
| 82 | + fullName: 'octodemo/hello-world-8', |
| 83 | + private: false, |
| 84 | + }, |
| 85 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 86 | + }, |
| 87 | + { |
| 88 | + repository: { |
| 89 | + id: 9, |
| 90 | + fullName: 'octodemo/hello-world-9', |
| 91 | + private: false, |
| 92 | + }, |
| 93 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 94 | + }, |
| 95 | + { |
| 96 | + repository: { |
| 97 | + id: 10, |
| 98 | + fullName: 'octodemo/hello-world-10', |
| 99 | + private: false, |
| 100 | + }, |
| 101 | + analysisStatus: VariantAnalysisRepoStatus.Pending, |
| 102 | + }, |
| 103 | + ] |
| 104 | +}; |
| 105 | + |
6 | 106 | export function VariantAnalysis(): JSX.Element { |
7 | 107 | return ( |
8 | 108 | <VariantAnalysisContainer> |
9 | 109 | <VariantAnalysisHeader |
10 | | - queryName="Example query" |
11 | | - queryFileName="example.ql" |
12 | | - totalRepositoryCount={10} |
13 | | - variantAnalysisStatus={VariantAnalysisStatus.InProgress} |
| 110 | + variantAnalysis={variantAnalysis} |
14 | 111 | onOpenQueryFileClick={() => console.log('Open query')} |
15 | 112 | onViewQueryTextClick={() => console.log('View query')} |
16 | 113 | onStopQueryClick={() => console.log('Stop query')} |
|
0 commit comments