Skip to content

Commit

Permalink
Allow tracks and groups section name for legacy charts wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Sep 5, 2024
1 parent 1e7a9ab commit c34df82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/src/components/Markdown/MarkdownVisualization.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ export default {
if (this.argumentPayload.settings && this.argumentPayload.settings.length > 0) {
settings = this.argumentPayload.settings.slice();
}
if (this.argumentPayload.groups && this.argumentPayload.groups.length > 0) {
if (this.argumentPayload.tracks && this.argumentPayload.tracks.length > 0) {
settings = settings || [];
settings.push({
type: "repeat",
title: "Columns",
name: "groups",
name: "tracks",
min: 1,
inputs: this.argumentPayload.groups.map((x) => {
inputs: this.argumentPayload.tracks.map((x) => {
if (x.type == "data_column") {
x.is_workflow = true;
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/mvc/visualization/chart/components/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Visualization } from "mvc/visualization/visualization-model";
import Utils from "utils/utils";

const MATCH_GROUP = /^groups_([0-9]+)\|([\w]+)/;
const MATCH_TRACKS = /^tracks_([0-9]+)\|([\w]+)/;

export default Backbone.Model.extend({
defaults: {
Expand Down Expand Up @@ -37,7 +38,7 @@ export default Backbone.Model.extend({
const searchParams = new URLSearchParams(paramsString);
const groups = {};
for (const [k, v] of searchParams.entries()) {
const matched_groups = k.match(MATCH_GROUP);
const matched_groups = k.match(MATCH_TRACKS) || k.match(MATCH_GROUP);
if (matched_groups) {
const group_id = matched_groups[1];
const group_key = matched_groups[2];
Expand Down

0 comments on commit c34df82

Please sign in to comment.