Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 18:10:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 18:10:05 +0300
commitd57e27ef353787dac501d6970c546c9d86dd1f88 (patch)
tree89044194e81f95aaa15ace8a5d6a5b429179965f /app/helpers
parenta27b8a5c104f492e4b0abac4c84385a615c4f6ba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/nav_helper.rb3
-rw-r--r--app/helpers/startupjs_helper.rb13
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