diff options
author | Sam Bigelow <sbigelow@gitlab.com> | 2019-03-01 16:41:16 -0500 |
---|---|---|
committer | Sam Bigelow <sbigelow@gitlab.com> | 2019-03-21 10:24:18 -0400 |
commit | 1a14e5230e5b7f705fc09c3baf46f6cf74ca3ad0 (patch) | |
tree | 7c8f1d88347252e88535dc087f3129102ef77bf8 /app/graphql | |
parent | c174fc0cc1a221bb2ab8f265b3691a17d5cfd8aa (diff) | |
download | gitlab-ce-1a14e5230e5b7f705fc09c3baf46f6cf74ca3ad0.tar.gz |
Add merge request popover with details
- Show pipeline status, title, MR Status and project path
- Popover attached to gitlab flavored markdown everywhere, including:
+ MR/Issue Title
+ MR/Issue description
+ MR/Issue comments
+ Rendered markdown files
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/types/ci/detailed_status_type.rb | 17 | ||||
-rw-r--r-- | app/graphql/types/ci/pipeline_type.rb | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/app/graphql/types/ci/detailed_status_type.rb b/app/graphql/types/ci/detailed_status_type.rb new file mode 100644 index 00000000000..2987354b556 --- /dev/null +++ b/app/graphql/types/ci/detailed_status_type.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +module Types + module Ci + class DetailedStatusType < BaseObject + graphql_name 'DetailedStatus' + + field :group, GraphQL::STRING_TYPE, null: false + field :icon, GraphQL::STRING_TYPE, null: false + field :favicon, GraphQL::STRING_TYPE, null: false + field :details_path, GraphQL::STRING_TYPE, null: false + field :has_details, GraphQL::BOOLEAN_TYPE, null: false, method: :has_details? + field :label, GraphQL::STRING_TYPE, null: false + field :text, GraphQL::STRING_TYPE, null: false + field :tooltip, GraphQL::STRING_TYPE, null: false, method: :status_tooltip + end + end +end diff --git a/app/graphql/types/ci/pipeline_type.rb b/app/graphql/types/ci/pipeline_type.rb index 2bbffad4563..18696293b97 100644 --- a/app/graphql/types/ci/pipeline_type.rb +++ b/app/graphql/types/ci/pipeline_type.rb @@ -13,6 +13,10 @@ module Types field :sha, GraphQL::STRING_TYPE, null: false field :before_sha, GraphQL::STRING_TYPE, null: true field :status, PipelineStatusEnum, null: false + field :detailed_status, + Types::Ci::DetailedStatusType, + null: false, + resolve: -> (obj, _args, ctx) { obj.detailed_status(ctx[:current_user]) } field :duration, GraphQL::INT_TYPE, null: true, |