Skip to content

Commit

Permalink
Finishing up CCA error handling for too few rows. Closes #503
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Nov 2, 2015
1 parent 1b897f2 commit 1e7af9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions web-server/plugins/slycat-cca/js/new-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ define(["slycat-server-root", "slycat-web-client", "slycat-dialog", "knockout",
output_columns.push(i);
}

if( input_columns.length > component.row_count() || output_columns.length > component.row_count() )
if( input_columns.length >= component.row_count() || output_columns.length >= component.row_count() )
{
dialog.dialog({
message:"The number of outputs and inputs must be less than or equal to " + component.row_count() +
", because that is the number of rows in the data. You have selected " + input_columns.length +
message:"The number of inputs must be less than " + component.row_count() +
". The number of outputs must be less than " + component.row_count() +
". You have selected " + input_columns.length +
" inputs and " + output_columns.length + " outputs."

});
}
else
Expand Down
8 changes: 4 additions & 4 deletions web-server/plugins/slycat-cca/js/rerun-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ define(["slycat-server-root", "slycat-web-client", "slycat-dialog", "knockout",
output_columns.push(i);
}

if( input_columns.length > component.row_count() || output_columns.length > component.row_count() )
if( input_columns.length >= component.row_count() || output_columns.length >= component.row_count() )
{
dialog.dialog({
message:"The number of outputs and inputs must be less than or equal to " + component.row_count() +
", because that is the number of rows in the data. You have selected " + input_columns.length +
message:"The number of inputs must be less than " + component.row_count() +
". The number of outputs must be less than " + component.row_count() +
". You have selected " + input_columns.length +
" inputs and " + output_columns.length + " outputs."

});
}
else
Expand Down

0 comments on commit 1e7af9d

Please sign in to comment.