Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5714cc34
Commit
5714cc34
authored
Dec 07, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change color palette/weight to be enums
- Update graphql types and docs
parent
43184bc8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
280 additions
and
14 deletions
+280
-14
app/graphql/types/data_visualization_palette/color_enum.rb
app/graphql/types/data_visualization_palette/color_enum.rb
+14
-0
app/graphql/types/data_visualization_palette/weight_enum.rb
app/graphql/types/data_visualization_palette/weight_enum.rb
+14
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+92
-2
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+122
-4
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+30
-0
ee/app/graphql/types/incident_management/oncall_user_input_type.rb
...aphql/types/incident_management/oncall_user_input_type.rb
+2
-2
ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
...ations/incident_management/oncall_rotation/create_spec.rb
+4
-4
ee/spec/requests/api/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
...ations/incident_management/oncall_rotation/create_spec.rb
+2
-2
No files found.
app/graphql/types/data_visualization_palette/color_enum.rb
0 → 100644
View file @
5714cc34
# frozen_string_literal: true
module
Types
module
DataVisualizationPalette
class
ColorEnum
<
BaseEnum
graphql_name
'DataVisualizationColorEnum'
description
'Color of the data visualization palette'
Enums
::
DataVisualizationPalette
.
colors
.
keys
.
each
do
|
unit
|
value
unit
.
upcase
,
value:
unit
,
description:
"
#{
unit
.
to_s
.
titleize
}
color"
end
end
end
end
app/graphql/types/data_visualization_palette/weight_enum.rb
0 → 100644
View file @
5714cc34
# frozen_string_literal: true
module
Types
module
DataVisualizationPalette
class
WeightEnum
<
BaseEnum
graphql_name
'DataVisualizationWeightEnum'
description
'Weight of the data visualization palette'
::
Enums
::
DataVisualizationPalette
.
weights
.
keys
.
each
do
|
unit
|
value
"weight_
#{
unit
}
"
.
upcase
,
value:
unit
,
description:
"
#{
unit
.
to_s
.
titleize
}
weight"
end
end
end
end
doc/api/graphql/reference/gitlab_schema.graphql
View file @
5714cc34
...
...
@@ -5700,6 +5700,96 @@ enum DastSiteValidationStrategyEnum {
TEXT_FILE
}
"""
Color of the data visualization palette
"""
enum
DataVisualizationColorEnum
{
"""
Aqua
color
"""
AQUA
"""
Blue
color
"""
BLUE
"""
Green
color
"""
GREEN
"""
Magenta
color
"""
MAGENTA
"""
Orange
color
"""
ORANGE
}
"""
Weight of the data visualization palette
"""
enum
DataVisualizationWeightEnum
{
"""
100
weight
"""
WEIGHT_100
"""
200
weight
"""
WEIGHT_200
"""
300
weight
"""
WEIGHT_300
"""
400
weight
"""
WEIGHT_400
"""
50
weight
"""
WEIGHT_50
"""
500
weight
"""
WEIGHT_500
"""
600
weight
"""
WEIGHT_600
"""
700
weight
"""
WEIGHT_700
"""
800
weight
"""
WEIGHT_800
"""
900
weight
"""
WEIGHT_900
"""
950
weight
"""
WEIGHT_950
}
"""
Date represented in ISO 8601
"""
...
...
@@ -15727,12 +15817,12 @@ input OncallUserInputType {
"""
The
color
palette
to
assign
to
the
on
-
call
user
,
for
example
:
"
blue
".
"""
colorPalette
:
String
colorPalette
:
DataVisualizationColorEnum
"""
The
color
weight
to
assign
to
for
the
on
-
call
user
,
for
example
"500".
Max
4
chars
.
For
easy
identification
of
the
user
.
"""
colorWeight
:
String
colorWeight
:
DataVisualizationWeightEnum
"""
The
username
of
the
user
to
participate
in
the
on
-
call
rotation
.
i
.
e
user_one
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
5714cc34
...
...
@@ -15691,6 +15691,124 @@
],
"possibleTypes": null
},
{
"kind": "ENUM",
"name": "DataVisualizationColorEnum",
"description": "Color of the data visualization palette",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "BLUE",
"description": "Blue color",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "ORANGE",
"description": "Orange color",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "AQUA",
"description": "Aqua color",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "GREEN",
"description": "Green color",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "MAGENTA",
"description": "Magenta color",
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
},
{
"kind": "ENUM",
"name": "DataVisualizationWeightEnum",
"description": "Weight of the data visualization palette",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "WEIGHT_50",
"description": "50 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_100",
"description": "100 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_200",
"description": "200 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_300",
"description": "300 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_400",
"description": "400 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_500",
"description": "500 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_600",
"description": "600 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_700",
"description": "700 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_800",
"description": "800 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_900",
"description": "900 weight",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "WEIGHT_950",
"description": "950 weight",
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "Date",
...
...
@@ -46827,8 +46945,8 @@
"name": "colorPalette",
"description": "The color palette to assign to the on-call user, for example: \"blue\".",
"type": {
"kind": "
SCALAR
",
"name": "
String
",
"kind": "
ENUM
",
"name": "
DataVisualizationColorEnum
",
"ofType": null
},
"defaultValue": null
...
...
@@ -46837,8 +46955,8 @@
"name": "colorWeight",
"description": "The color weight to assign to for the on-call user, for example \"500\". Max 4 chars. For easy identification of the user.",
"type": {
"kind": "
SCALAR
",
"name": "
String
",
"kind": "
ENUM
",
"name": "
DataVisualizationWeightEnum
",
"ofType": null
},
"defaultValue": null
doc/api/graphql/reference/index.md
View file @
5714cc34
...
...
@@ -4272,6 +4272,36 @@ Status of a container repository.
|
`HEADER`
| Header validation |
|
`TEXT_FILE`
| Text file validation |
### DataVisualizationColorEnum
Color of the data visualization palette.
| Value | Description |
| ----- | ----------- |
|
`AQUA`
| Aqua color |
|
`BLUE`
| Blue color |
|
`GREEN`
| Green color |
|
`MAGENTA`
| Magenta color |
|
`ORANGE`
| Orange color |
### DataVisualizationWeightEnum
Weight of the data visualization palette.
| Value | Description |
| ----- | ----------- |
|
`WEIGHT_100`
| 100 weight |
|
`WEIGHT_200`
| 200 weight |
|
`WEIGHT_300`
| 300 weight |
|
`WEIGHT_400`
| 400 weight |
|
`WEIGHT_50`
| 50 weight |
|
`WEIGHT_500`
| 500 weight |
|
`WEIGHT_600`
| 600 weight |
|
`WEIGHT_700`
| 700 weight |
|
`WEIGHT_800`
| 800 weight |
|
`WEIGHT_900`
| 900 weight |
|
`WEIGHT_950`
| 950 weight |
### DesignCollectionCopyState
Copy state of a DesignCollection.
...
...
ee/app/graphql/types/incident_management/oncall_user_input_type.rb
View file @
5714cc34
...
...
@@ -11,11 +11,11 @@ module Types
required:
true
,
description:
'The username of the user to participate in the on-call rotation. i.e user_one'
argument
:color_palette
,
GraphQL
::
STRING_TYPE
,
argument
:color_palette
,
::
Types
::
DataVisualizationPalette
::
ColorEnum
,
required:
false
,
description:
'The color palette to assign to the on-call user, for example: "blue".'
argument
:color_weight
,
GraphQL
::
STRING_TYPE
,
argument
:color_weight
,
::
Types
::
DataVisualizationPalette
::
WeightEnum
,
required:
false
,
description:
'The color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user.'
end
...
...
ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
View file @
5714cc34
...
...
@@ -19,8 +19,8 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Create do
participants:
[
{
username:
current_user
.
username
,
color_weight:
"500"
,
color_palette:
"black"
color_weight:
::
IncidentManagement
::
OncallParticipant
.
color_weights
[
'50'
]
,
color_palette:
::
IncidentManagement
::
OncallParticipant
.
color_palettes
[
:blue
]
}
]
}
...
...
@@ -79,8 +79,8 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Create do
participants:
[
{
username:
other_user
.
username
,
color_weight:
"500"
,
color_palette:
"black"
color_weight:
::
IncidentManagement
::
OncallParticipant
.
color_weights
[
'50'
]
,
color_palette:
::
IncidentManagement
::
OncallParticipant
.
color_palettes
[
:blue
]
}
]
)
...
...
ee/spec/requests/api/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
View file @
5714cc34
...
...
@@ -24,8 +24,8 @@ RSpec.describe 'Creating a new on-call schedule' do
participants:
[
{
username:
current_user
.
username
,
colorWeight:
"500"
,
colorPalette:
"
black
"
colorWeight:
"
WEIGHT_
500"
,
colorPalette:
"
BLUE
"
}
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment