diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/nav_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/startupjs_helper.rb | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb index 578c7ae7923..3c757a4ef26 100644 --- a/app/helpers/nav_helper.rb +++ b/app/helpers/nav_helper.rb @@ -55,7 +55,8 @@ module NavHelper current_path?('projects/merge_requests/conflicts#show') || current_path?('issues#show') || current_path?('milestones#show') || - current_path?('issues#designs') + current_path?('issues#designs') || + current_path?('incidents#show') end def admin_monitoring_nav_links diff --git a/app/helpers/startupjs_helper.rb b/app/helpers/startupjs_helper.rb new file mode 100644 index 00000000000..da95cfe03ee --- /dev/null +++ b/app/helpers/startupjs_helper.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module StartupjsHelper + def page_startup_graphql_calls + @graphql_startup_calls + end + + def add_page_startup_graphql_call(query, variables = {}) + @graphql_startup_calls ||= [] + query_str = File.read(File.join(Rails.root, "app/assets/javascripts/#{query}.query.graphql")) + @graphql_startup_calls << { query: query_str, variables: variables } + end +end |