2020-06-23 00:09:42 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module WebIde
|
|
|
|
class Config
|
|
|
|
module Entry
|
|
|
|
##
|
|
|
|
# This class represents a global entry - root Entry for entire
|
|
|
|
# GitLab WebIde Configuration file.
|
|
|
|
#
|
|
|
|
class Global < ::Gitlab::Config::Entry::Node
|
|
|
|
include ::Gitlab::Config::Entry::Configurable
|
|
|
|
include ::Gitlab::Config::Entry::Attributable
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
def self.allowed_keys
|
|
|
|
%i[terminal].freeze
|
|
|
|
end
|
2020-06-23 00:09:42 +05:30
|
|
|
|
|
|
|
validations do
|
2020-11-24 15:15:51 +05:30
|
|
|
validates :config, allowed_keys: Global.allowed_keys
|
2020-06-23 00:09:42 +05:30
|
|
|
end
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
attributes allowed_keys
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
entry :terminal, Entry::Terminal,
|
|
|
|
description: 'Configuration of the webide terminal.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
::Gitlab::WebIde::Config::Entry::Global.prepend_if_ee('EE::Gitlab::WebIde::Config::Entry::Global')
|