File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
services/static-webserver/client/source/class/osparc/jobs Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,22 @@ qx.Class.define("osparc.jobs.RunsTable", {
4444
4545 Object . values ( this . self ( ) . COLS ) . forEach ( col => columnModel . setColumnWidth ( col . column , col . width ) ) ;
4646
47- const jobsStore = osparc . store . Jobs . getInstance ( ) ;
48-
4947 const iconPathStop = "osparc/icons/circle-xmark-text.svg" ;
50- const fontButtonRendererStop = new osparc . ui . table . cellrenderer . ImageButtonRenderer ( "cancel" , iconPathStop ) ;
48+ const shouldShowCancel = cellInfo => {
49+ if ( cellInfo && cellInfo . rowData && cellInfo . rowData [ "state" ] ) {
50+ return [
51+ "Running" ,
52+ ] . includes ( cellInfo . rowData [ "state" ] ) ;
53+ }
54+ return true ;
55+ }
56+ const fontButtonRendererStop = new osparc . ui . table . cellrenderer . ImageButtonRenderer ( "cancel" , iconPathStop , shouldShowCancel ) ;
5157 columnModel . setDataCellRenderer ( this . self ( ) . COLS . ACTION_CANCEL . column , fontButtonRendererStop ) ;
5258
5359 const iconPathInfo = "osparc/icons/circle-info-text.svg" ;
60+ const jobsStore = osparc . store . Jobs . getInstance ( ) ;
5461 const shouldShowInfo = cellInfo => {
55- if ( cellInfo && cellInfo . rowData ) {
62+ if ( cellInfo && cellInfo . rowData && cellInfo . rowData [ "collectionRunId" ] ) {
5663 const job = jobsStore . getJob ( cellInfo . rowData [ "collectionRunId" ] ) ;
5764 if ( ! job ) {
5865 return true ;
You can’t perform that action at this time.
0 commit comments