-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(CE): Add data_app_token generation (#381)
Co-authored-by: afthab vp <[email protected]>
- Loading branch information
1 parent
bbd9a78
commit 31ec315
Showing
8 changed files
with
107 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :data_app do | ||
name { "Sales Dashboard" } | ||
description { "A dashboard for visualizing sales data" } | ||
status { "active" } | ||
meta_data do | ||
{ | ||
author: "John Doe", | ||
version: "1.0" | ||
} | ||
end | ||
association :workspace | ||
|
||
transient do | ||
visual_components_count { 1 } | ||
end | ||
|
||
after(:create) do |data_app, evaluator| | ||
if evaluator.visual_components_count > 0 | ||
create_list(:visual_component, evaluator.visual_components_count, data_app:) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :visual_component do | ||
component_type { "doughnut" } | ||
name { "Sales Chart" } | ||
model_id { "1" } | ||
properties do | ||
{ | ||
color: "blue" | ||
} | ||
end | ||
feedback_config do | ||
{ | ||
enabled: true | ||
} | ||
end | ||
association :model | ||
association :workspace | ||
association :data_app | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters