diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 09cfc4e51..fc2407543 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -42,6 +42,22 @@ class SearchController < ApplicationController def new end + def quick + results = [ + Project.first, + Experiment.first, + MyModule.first, + Protocol.first, + RepositoryRow.first, + Result.first, + Step.first, + Report.first, + LabelTemplate.first + ].compact + + render json: results, each_serializer: QuickSearchSerializer + end + private def load_vars diff --git a/app/javascript/vue/navigation/quick_search.vue b/app/javascript/vue/navigation/quick_search.vue new file mode 100644 index 000000000..6a363e3ab --- /dev/null +++ b/app/javascript/vue/navigation/quick_search.vue @@ -0,0 +1,228 @@ + + + diff --git a/app/javascript/vue/navigation/top_menu.vue b/app/javascript/vue/navigation/top_menu.vue index 59082ab97..395d6e154 100644 --- a/app/javascript/vue/navigation/top_menu.vue +++ b/app/javascript/vue/navigation/top_menu.vue @@ -1,9 +1,6 @@