Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Pillinger <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
  • Loading branch information
3 people committed Oct 11, 2024
1 parent dbb4a2f commit 9b3bc07
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
24 changes: 16 additions & 8 deletions src/components/cylc/Info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:class="{satisfied: condition.satisfied}"
>
{{ condition.exprAlias.replace(/c/, '') }}
</span>
<span style="margin-left: 0.5em">
{{ condition.taskId }}:{{ condition.reqState }}

<span style="margin-left: 0.5em; color: rgb(0,0,0)">
{{ condition.taskId }}:{{ condition.reqState }}
</span>
</span>
</li>
</ul>
Expand Down Expand Up @@ -206,18 +207,25 @@ export default {

// for user-defined text where whitespace should be preserved
.markup {
white-space: pre;
white-space: pre-wrap;
}

// change the appearance of satisfied/unsatisfied conditions
.condition {
opacity: 0.6;
}
.condition.satisfied {
opacity: 1;
}

// prefixes a tick or cross before the entry
.condition:before {
content: '';
content: '\25CB';
padding-right: 0.5em;
color: rgb(255, 100, 100);
color: rgb(0, 0, 0);
}
.condition.satisfied:before {
content: '✓';
color: rgb(75, 230, 75);
content: '\25CF';
}

// for prerequsite task "aliases" (used in conditional expressions)
Expand Down
6 changes: 3 additions & 3 deletions src/services/mock/json/infoView.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{
"id": "~user/one//20000102T0000Z/failed/01",
"jobId": "1234",
"startedTime": 0,
"startedTime": "0",
"state": "failed"
}
],
Expand All @@ -39,13 +39,13 @@
{
"taskId": "20000102T0000Z/succeeded",
"reqState": "succeeded",
"expreAlias": "c0",
"exprAlias": "c0",
"satisfied": true
},
{
"taskId": "20000102T0000Z/eventually_succeeded",
"reqState": "succeeded",
"expreAlias": "c1",
"exprAlias": "c1",
"satisfied": true
}
]
Expand Down
7 changes: 4 additions & 3 deletions src/views/Info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ class InfoCallback extends DeltasCallback {
/**
* @param {Results} results
*/
constructor (taskNode) {
constructor (task, taskNode) {
super()
this.task = {}
this.task = task
this.taskNode = taskNode
}

Expand Down Expand Up @@ -219,6 +219,7 @@ export default {
requestedTask: undefined,

// The task formatted as a data-store node
task: {},
taskNode: {},
}
},
Expand All @@ -233,7 +234,7 @@ export default {
{ ...this.variables, taskID: this.requestedTokens?.relativeID },
`info-query-${this._uid}`,
[
new InfoCallback(this.taskNode)
new InfoCallback(this.task, this.taskNode)
],
/* isDelta */ true,
/* isGlobalCallback */ false
Expand Down

0 comments on commit 9b3bc07

Please sign in to comment.