gitlab-org--gitlab-foss/lib/gitlab/template/metrics_dashboard_template.rb

33 lines
743 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module Template
class MetricsDashboardTemplate < BaseTemplate
def content
explanation = "# This file is a template, and might need editing before it works on your project."
[explanation, super].join("\n")
end
class << self
def extension
'.metrics-dashboard.yml'
end
def categories
{
"General" => ''
}
end
def base_dir
Rails.root.join('lib/gitlab/metrics/templates')
end
def finder(project = nil)
Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
end
end
end
end
end