File tree Expand file tree Collapse file tree 4 files changed +10
-22
lines changed Expand file tree Collapse file tree 4 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import { getAlignmentChartSettings } from './charts/alignmentChartSettings';
29
29
import { getChainsChartSettings } from ' ./charts/chainsChartSettings' ;
30
30
import { PlAgChartStackedBarCell , createAgGridColDef } from ' @platforma-sdk/ui-vue' ;
31
31
import { parseProgressString } from ' ./parseProgress' ;
32
- import { ProgressLogWithInfo } from ' @platforma-sdk/model' ;
32
+ import type { ProgressLogWithInfo } from ' @platforma-sdk/model' ;
33
33
34
34
const app = useApp ();
35
35
@@ -100,7 +100,7 @@ const columnDefs: ColDef<MiXCRResult>[] = [
100
100
field: ' progress' ,
101
101
headerName: ' Progress' ,
102
102
progress(cellData ) {
103
- const parsed = parseProgressString (cellData .value ?.progressLine );
103
+ const parsed = parseProgressString (cellData .value ?.progressLine , cellData . value ?. live );
104
104
105
105
if (parsed .stage === ' Queued' ) {
106
106
return {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export const sdkPlugin = defineApp(platforma, (app) => {
8
8
const qc = app . model . outputs . qc ;
9
9
const progresses = app . model . outputs . progress ?. data ;
10
10
if ( ! progresses || ! qc ) return undefined ;
11
- const done = progresses . map ( p => p . value ?. live == false )
11
+ const done = progresses . filter ( ( p ) => p . value ?. live === false ) ;
12
12
13
13
const result = done . length / qc . data . length ;
14
14
Original file line number Diff line number Diff line change 1
- import { ProgressPattern } from '@platforma-open/milaboratories.mixcr-clonotyping.model' ;
1
+ import { ProgressPattern , ProgressPrefix } from '@platforma-open/milaboratories.mixcr-clonotyping.model' ;
2
2
3
3
type ParsedProgress = {
4
4
raw ?: string ;
@@ -17,8 +17,10 @@ type ParsedProgress = {
17
17
// 'Exporting clones: 11.1%'
18
18
// 'Queued'
19
19
// 'Done'
20
- export function parseProgressString ( progressString : string | undefined | null ) : ParsedProgress {
21
- const raw = progressString ?? 'Unknown' ;
20
+ export function parseProgressString ( progressString : string | undefined | null , live : boolean | undefined ) : ParsedProgress {
21
+ let raw = ( progressString ?? 'Not started' ) . replace ( ProgressPrefix , '' ) ;
22
+ if ( live === false )
23
+ raw = 'Done' ;
22
24
23
25
const res : ParsedProgress = {
24
26
raw,
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import type {
3
3
import {
4
4
AlignReport ,
5
5
AssembleReport ,
6
- ProgressPrefix ,
7
6
Qc ,
8
7
} from '@platforma-open/milaboratories.mixcr-clonotyping.model' ;
9
8
import type { AnyLogHandle , ProgressLogWithInfo } from '@platforma-sdk/model' ;
@@ -107,21 +106,8 @@ export const MiXCRResultsFull = computed<MiXCRResult[] | undefined>(() => {
107
106
// adding progress information
108
107
for ( const p of progress . data ) {
109
108
const sampleId = p . key [ 0 ] as string ;
110
- if ( resultMap . get ( sampleId ) )
111
- if ( p ?. value ) {
112
- const progress : ProgressLogWithInfo = {
113
- progressLine : 'Not started' ,
114
- live : true ,
115
- } ;
116
- if ( ( p . value ?. progressLine ?. length ?? 0 ) > 0 ) {
117
- progress . progressLine = p . value . progressLine ?. replace ( ProgressPrefix , '' ) ;
118
- }
119
- if ( p . value ?. live == false ) {
120
- progress . progressLine = 'Done' ;
121
- }
122
-
123
- resultMap . get ( sampleId ) ! . progress = progress ;
124
- }
109
+ if ( resultMap . get ( sampleId ) && p ?. value )
110
+ resultMap . get ( sampleId ) ! . progress = p . value ;
125
111
}
126
112
127
113
return [ ...resultMap . values ( ) ] ;
You can’t perform that action at this time.
0 commit comments