diff options
author | Maneschi Romain <rmaneschi@gmail.com> | 2019-07-03 19:09:51 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-07-03 19:09:51 +0300 |
commit | def94f5043abe57f453094fa570407e5b806c48a (patch) | |
tree | a96016ceab428c70f55da9fd173b224259388ed0 /db/migrate | |
parent | 6359a1fabdca65af1c1a514fda44a32bbfe5c4ec (diff) |
Add Grafana to Admin > Monitoring menu when enabled
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20190617123615_add_grafana_to_settings.rb | 18 | ||||
-rw-r--r-- | db/migrate/20190624123615_add_grafana_url_to_settings.rb | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/db/migrate/20190617123615_add_grafana_to_settings.rb b/db/migrate/20190617123615_add_grafana_to_settings.rb new file mode 100644 index 00000000000..f9c6f4d883e --- /dev/null +++ b/db/migrate/20190617123615_add_grafana_to_settings.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddGrafanaToSettings < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + DOWNTIME = false + + def up + add_column_with_default(:application_settings, :grafana_enabled, :boolean, + default: false, allow_null: false) + end + + def down + remove_column(:application_settings, :grafana_enabled) + end +end diff --git a/db/migrate/20190624123615_add_grafana_url_to_settings.rb b/db/migrate/20190624123615_add_grafana_url_to_settings.rb new file mode 100644 index 00000000000..61efe64a7a1 --- /dev/null +++ b/db/migrate/20190624123615_add_grafana_url_to_settings.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddGrafanaUrlToSettings < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + DOWNTIME = false + + def up + add_column_with_default(:application_settings, :grafana_url, :string, + default: '/-/grafana', allow_null: false) + end + + def down + remove_column(:application_settings, :grafana_url) + end +end |