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

Fix toolbar toggle button color not changing #1502

Merged
merged 2 commits into from
Oct 5, 2023
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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ ones in. -->
[#1472](https://github.com/cylc/cylc-ui/pull/1472) -
Added GScan refresh button

### Fixes

[#1502](https://github.com/cylc/cylc-ui/pull/1502) -
Fixed bug where toggle buttons in view toolbars would not change state.

-------------------------------------------------------------------------------
## __cylc-ui-2.1.0 (<span actions:bind='release-date'>Released 2023-09-07</span>)__

Expand Down
95 changes: 46 additions & 49 deletions src/views/Graph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,58 +241,55 @@ export default {
autoRefresh: true,
// true if layout is in progress
updating: false,
controlGroups: [
{
title: 'Graph',
controls: [
{
title: 'Refresh',
icon: mdiRefresh,
action: 'callback',
callback: this.refresh,
disableIf: ['autoRefresh']
},
{
title: 'Auto Refresh',
icon: mdiTimer,
action: 'toggle',
value: true,
key: 'autoRefresh'
},
{
title: 'Transpose',
icon: mdiFileRotateRight,
action: 'toggle',
value: false,
key: 'transpose'
},
{
title: 'Centre',
icon: mdiImageFilterCenterFocus,
action: 'callback',
callback: this.reset
},
{
title: 'Increase Spacing',
icon: mdiArrowExpand,
action: 'callback',
callback: this.increaseSpacing
},
{
title: 'Decrease Spacing',
icon: mdiArrowCollapse,
action: 'callback',
callback: this.decreaseSpacing
}
]
}
],
}
},

created () {
this.controlGroups = [
{
title: 'Graph',
controls: [
{
title: 'Refresh',
icon: mdiRefresh,
action: 'callback',
callback: this.refresh,
disableIf: ['autoRefresh']
},
{
title: 'Auto Refresh',
icon: mdiTimer,
action: 'toggle',
value: true,
key: 'autoRefresh'
},
{
title: 'Transpose',
icon: mdiFileRotateRight,
action: 'toggle',
value: false,
key: 'transpose'
},
{
title: 'Centre',
icon: mdiImageFilterCenterFocus,
action: 'callback',
callback: this.reset
},
{
title: 'Increase Spacing',
icon: mdiArrowExpand,
action: 'callback',
callback: this.increaseSpacing
},
{
title: 'Decrease Spacing',
icon: mdiArrowCollapse,
action: 'callback',
callback: this.decreaseSpacing
}
]
}
]
},

mounted () {
// compile & instantiate graphviz wasm
/** @type {Promise<Graphviz>} */
Expand Down
41 changes: 20 additions & 21 deletions src/views/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,31 +298,30 @@ export default {
jobLog: 0, // default to displaying workflow logs
// toggle timestamps in log files
timestamps: true,
controlGroups: [
{
title: 'Log',
controls: [
{
title: 'Timestamps',
icon: mdiClockOutline,
action: 'toggle',
value: true,
key: 'timestamps'
},
{
title: 'Refresh File List',
icon: mdiFolderRefresh,
action: 'callback',
callback: () => { this.updateLogFileList(false) }
}
]
}
],
}
},

created () {
this.controlGroups = [
{
title: 'Log',
controls: [
{
title: 'Timestamps',
icon: mdiClockOutline,
action: 'toggle',
value: true,
key: 'timestamps'
},
{
title: 'Refresh File List',
icon: mdiFolderRefresh,
action: 'callback',
callback: () => { this.updateLogFileList(false) }
}
]
}
]

// set the ID/file if specified in initialOptions
if (this.initialOptions?.tokens?.task) {
this.relativeID = this.initialOptions.tokens.relative_id
Expand Down