diff options
author | Taurie Davis, Simon Knox and Adam Niedzielski <awesome@gitlab.com> | 2017-05-24 12:25:44 +0200 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-06-01 17:37:21 +0200 |
commit | 26dde5f55f1dac2e6bea4f7e1dfa51c72dc756cb (patch) | |
tree | f0168cb9ad0be7c4bf8657a5321e5da0bda8e83b /db | |
parent | c72abcefe79dd906cbbf0088b442a8979e9fc746 (diff) | |
download | gitlab-ce-26dde5f55f1dac2e6bea4f7e1dfa51c72dc756cb.tar.gz |
Add Conversational Development Index page to admin panel
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/21_conversational_development_index_metrics.rb | 40 | ||||
-rw-r--r-- | db/migrate/20170523121229_create_conversational_development_index_metrics.rb | 39 | ||||
-rw-r--r-- | db/schema.rb | 25 |
3 files changed, 104 insertions, 0 deletions
diff --git a/db/fixtures/development/21_conversational_development_index_metrics.rb b/db/fixtures/development/21_conversational_development_index_metrics.rb new file mode 100644 index 00000000000..4cd0a82ed1a --- /dev/null +++ b/db/fixtures/development/21_conversational_development_index_metrics.rb @@ -0,0 +1,40 @@ +Gitlab::Seeder.quiet do + conversational_development_index_metric = ConversationalDevelopmentIndex::Metric.new( + leader_issues: 10.2, + instance_issues: 3.2, + + leader_notes: 25.3, + instance_notes: 23.2, + + leader_milestones: 16.2, + instance_milestones: 5.5, + + leader_boards: 5.2, + instance_boards: 3.2, + + leader_merge_requests: 5.2, + instance_merge_requests: 3.2, + + leader_ci_pipelines: 25.1, + instance_ci_pipelines: 21.3, + + leader_environments: 3.3, + instance_environments: 2.2, + + leader_deployments: 41.3, + instance_deployments: 15.2, + + leader_projects_prometheus_active: 0.31, + instance_projects_prometheus_active: 0.30, + + leader_service_desk_issues: 15.8, + instance_service_desk_issues: 15.1 + ) + + if conversational_development_index_metric.save + print '.' + else + puts conversational_development_index_metric.errors.full_messages + print 'F' + end +end diff --git a/db/migrate/20170523121229_create_conversational_development_index_metrics.rb b/db/migrate/20170523121229_create_conversational_development_index_metrics.rb new file mode 100644 index 00000000000..9f9ec526055 --- /dev/null +++ b/db/migrate/20170523121229_create_conversational_development_index_metrics.rb @@ -0,0 +1,39 @@ +class CreateConversationalDevelopmentIndexMetrics < ActiveRecord::Migration + DOWNTIME = false + + def change + create_table :conversational_development_index_metrics do |t| + t.float :leader_issues, null: false + t.float :instance_issues, null: false + + t.float :leader_notes, null: false + t.float :instance_notes, null: false + + t.float :leader_milestones, null: false + t.float :instance_milestones, null: false + + t.float :leader_boards, null: false + t.float :instance_boards, null: false + + t.float :leader_merge_requests, null: false + t.float :instance_merge_requests, null: false + + t.float :leader_ci_pipelines, null: false + t.float :instance_ci_pipelines, null: false + + t.float :leader_environments, null: false + t.float :instance_environments, null: false + + t.float :leader_deployments, null: false + t.float :instance_deployments, null: false + + t.float :leader_projects_prometheus_active, null: false + t.float :instance_projects_prometheus_active, null: false + + t.float :leader_service_desk_issues, null: false + t.float :instance_service_desk_issues, null: false + + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index bac8f95ce3b..a42c05e3b3d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -370,6 +370,31 @@ ActiveRecord::Schema.define(version: 20170525174156) do add_index "container_repositories", ["project_id", "name"], name: "index_container_repositories_on_project_id_and_name", unique: true, using: :btree add_index "container_repositories", ["project_id"], name: "index_container_repositories_on_project_id", using: :btree + create_table "conversational_development_index_metrics", force: :cascade do |t| + t.float "leader_issues", null: false + t.float "instance_issues", null: false + t.float "leader_notes", null: false + t.float "instance_notes", null: false + t.float "leader_milestones", null: false + t.float "instance_milestones", null: false + t.float "leader_boards", null: false + t.float "instance_boards", null: false + t.float "leader_merge_requests", null: false + t.float "instance_merge_requests", null: false + t.float "leader_ci_pipelines", null: false + t.float "instance_ci_pipelines", null: false + t.float "leader_environments", null: false + t.float "instance_environments", null: false + t.float "leader_deployments", null: false + t.float "instance_deployments", null: false + t.float "leader_projects_prometheus_active", null: false + t.float "instance_projects_prometheus_active", null: false + t.float "leader_service_desk_issues", null: false + t.float "instance_service_desk_issues", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "deploy_keys_projects", force: :cascade do |t| t.integer "deploy_key_id", null: false t.integer "project_id", null: false |