-
Notifications
You must be signed in to change notification settings - Fork 75
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
Implemented individual overview functionality. #129
Changes from 3 commits
3460894
6e4cce4
1f05528
065e72b
a415aec
8367859
b2999b6
824bf20
a39677c
0950972
73b3bf6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,17 +11,25 @@ angular | |
$scope.overview_md = '(loading)' | ||
|
||
projectService.ready(function(project) { | ||
|
||
let project_name = $state.params.project_name | ||
? $state.params.project_name | ||
: null; | ||
|
||
// default; | ||
var selected_overview = project.docs["dbt.__overview__"]; | ||
|
||
var overviews = _.filter(project.docs, {name: '__overview__'}); | ||
_.each(overviews, function(overview) { | ||
_.each(overviews, function (overview) { | ||
if (overview.package_name != 'dbt') { | ||
selected_overview = overview; | ||
} | ||
}); | ||
|
||
if (project_name !== null) { | ||
let project_key = `${project_name}.__${project_name}__`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll want to let top-level projects "override" the project-level overviews of installed packages. If There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks a lot @jtcohen6 I'm glad you like the idea, I agree with your comment completely. I added a new commit that I think should handle that scenario. Let me know if you think it needs any other change. |
||
let project_overview = project.docs[project_key]; | ||
if (project_overview !== undefined) { | ||
selected_overview = project_overview; | ||
} | ||
} | ||
$scope.overview_md = selected_overview.block_contents; | ||
}); | ||
}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% docs __dbt_utils__ %}
below?dbt docs generate
in theci-project
to replace the artifacts currently indata/
. If you're up for doing this as part of this PR, great! If not, we can do it separately after merging.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtcohen6 Thanks for the suggestion I added a block for dbt_utils. I also generated docs in the ci-project and replaced the data/ files with them. I also signed the CLA. Please let me know if I did anything incorrectly with the data/ artifacts.