Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amp 3081 WF param display, AMP-3152 search table row selection highlight #511

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ svg.icon-user {
height: 250px;
overflow-y: scroll; }

.highlight {
background: #F8ECB4; }
/* .highlight {
background: #F8ECB4; } */

.scrollDiv td, .scrollDiv th {
text-align: left; }
Expand Down
3 changes: 3 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ export default {
<style lang="css">
@import './styles/style.css';
</style>
<style lang="scss">
@import './styles/style.scss';
</style>
4 changes: 2 additions & 2 deletions src/components/deliverables/Deliverables.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@
v-on:keyup.down="onArrowDown"
v-on:keyup.up="onArrowUp"
v-on:click="rowClicked(index)"
v-bind:class="{
highlight: rowSelected(pfile.primaryfileId),
:class="{
'table-dark': rowSelected(pfile.primaryfileId),
}"
>
<td>{{ pfile.collectionName }}</td>
Expand Down
11 changes: 8 additions & 3 deletions src/components/shared/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
:class="
type === 'item-search'
? source.id === selectedItemId
? 'item-cls trActive'
? 'item-cls table-dark'
: 'item-cls'
: ''
"
Expand Down Expand Up @@ -1086,9 +1086,14 @@ export default {
</script>

<style scoped>
/*
table tbody tr:nth-of-type(odd) {
background-color: #f8ecb4;
}
.table-striped tbody tr:nth-of-type(odd) {
background-color: #f8ecb4;
}
*/
.table td,
.table th {
padding: 0.75rem;
Expand Down Expand Up @@ -1124,10 +1129,10 @@ table tbody tr:nth-of-type(odd) {
.item-cls {
cursor: pointer;
}
.trActive {
/* .trActive {
background-color: #153c4d !important;
color: #fff;
}
} */
.trActive {
animation-name: expandOpen;
animation-duration: 0.3s;
Expand Down
33 changes: 22 additions & 11 deletions src/service/workflow-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,20 @@ export default class WorkflowService extends BaseService {
var tempParams = [];
return await super.get_auth('/workflows/' + id).then(response => {
// Get the steps from the response
var data = response.data.steps;
var steps = response.data.steps;

// If we didn't get an steps, return empty list
if (!response.data.steps) {
if (!steps) {
return tempParams;
}

// Get the node keys
var nodeKeys = Object.keys(data);
var nodeKeys = Object.keys(steps);
for (var nodeKey in nodeKeys) {
var thisNode = data[nodeKey];
var thisNode = steps[nodeKey];

// skip input (non-MGM) nodes, which have null toolId and are of type "data_input"
if (!thisNode.toolId || thisNode.type == "data_input") continue;

// Create a new node object
var newNode = {
Expand All @@ -140,17 +143,23 @@ export default class WorkflowService extends BaseService {
params: []
};

// Iterate over the tool inputs and add appropriate
// Iterate over the tool inputs and add appropriate parameters
var toolInputKeys = Object.keys(thisNode.toolInputs);
for (var input = 0; input < toolInputKeys.length; input++) {
// Get the input
var toolInputKey = toolInputKeys[input];
var thisInput = thisNode.toolInputs[toolInputKey];

// Note: below code commented out, as we do want to show all user parameters disregarding if the value is empty
// If we don't have an input, skip it
if (!thisInput) continue;
// __class__ as far as I can tell, is an indication it is not a parameter
if (thisInput.__class__) continue;
// if (!thisInput) continue;

// skip Galaxy workflow system param such as __page__ and __rerun_remap_job_id__,
// assuming no MGM parameter starts and ends with __
if (toolInputKey.startsWith('__') && toolInputKey.endsWith('__')) continue;

// skip input value "__class__": "RuntimeValue", which refers to data input of a tool, not a parameter.
if (thisInput && thisInput.__class__) continue;

// Add the parameter
newNode.params.push({
Expand All @@ -160,10 +169,12 @@ export default class WorkflowService extends BaseService {
});

}

// Note: below condition is commented out, as we do want to show all steps disregarding if it has any param
// If we had any params, add it to the list of nodes with params
if (newNode.params.length > 0) {
tempParams.push(newNode);
}
// if (newNode.params.length > 0) {
tempParams.push(newNode);
// }
}
return { tempParams: tempParams, response: response.data };
});
Expand Down
1 change: 1 addition & 0 deletions src/styles/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*$table-bg: #f8ecb4;*/
Loading