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
39d2f9bc
Commit
39d2f9bc
authored
Apr 01, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
1854c92b
b8118a65
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
53 deletions
+34
-53
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+1
-1
app/assets/stylesheets/framework/markdown_area.scss
app/assets/stylesheets/framework/markdown_area.scss
+0
-4
app/models/clusters/cluster.rb
app/models/clusters/cluster.rb
+7
-5
app/services/clusters/applications/base_service.rb
app/services/clusters/applications/base_service.rb
+20
-4
app/services/clusters/applications/create_service.rb
app/services/clusters/applications/create_service.rb
+3
-19
app/services/clusters/applications/update_service.rb
app/services/clusters/applications/update_service.rb
+2
-19
app/views/projects/_md_preview.html.haml
app/views/projects/_md_preview.html.haml
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
39d2f9bc
...
...
@@ -189,7 +189,7 @@ export default {
<div
ref=
"gl-form"
:class=
"
{ 'prepend-top-default append-bottom-default': addSpacingClasses }"
class="
md-area js-vue-markdown-field
"
class="
js-vue-markdown-field md-area position-relative
"
>
<markdown-header
:preview-markdown=
"previewMarkdown"
...
...
app/assets/stylesheets/framework/markdown_area.scss
View file @
39d2f9bc
...
...
@@ -50,10 +50,6 @@
transition
:
opacity
200ms
ease-in-out
;
}
.md-area
{
position
:
relative
;
}
.md-header
{
.nav-links
{
a
{
...
...
app/models/clusters/cluster.rb
View file @
39d2f9bc
...
...
@@ -8,15 +8,17 @@ module Clusters
self
.
table_name
=
'clusters'
PROJECT_ONLY_APPLICATIONS
=
{
Applications
::
Jupyter
.
application_name
=>
Applications
::
Jupyter
,
Applications
::
Knative
.
application_name
=>
Applications
::
Knative
,
Applications
::
Prometheus
.
application_name
=>
Applications
::
Prometheus
}.
freeze
APPLICATIONS
=
{
Applications
::
Helm
.
application_name
=>
Applications
::
Helm
,
Applications
::
Ingress
.
application_name
=>
Applications
::
Ingress
,
Applications
::
CertManager
.
application_name
=>
Applications
::
CertManager
,
Applications
::
Prometheus
.
application_name
=>
Applications
::
Prometheus
,
Applications
::
Runner
.
application_name
=>
Applications
::
Runner
,
Applications
::
Jupyter
.
application_name
=>
Applications
::
Jupyter
,
Applications
::
Knative
.
application_name
=>
Applications
::
Knative
}.
freeze
Applications
::
Runner
.
application_name
=>
Applications
::
Runner
}.
merge
(
PROJECT_ONLY_APPLICATIONS
).
freeze
DEFAULT_ENVIRONMENT
=
'*'
.
freeze
KUBE_INGRESS_BASE_DOMAIN
=
'KUBE_INGRESS_BASE_DOMAIN'
.
freeze
...
...
app/services/clusters/applications/base_service.rb
View file @
39d2f9bc
...
...
@@ -41,7 +41,7 @@ module Clusters
raise
NotImplementedError
end
def
builder
s
def
builder
raise
NotImplementedError
end
...
...
@@ -50,11 +50,27 @@ module Clusters
end
def
instantiate_application
builder
.
call
(
@cluster
)
||
raise
(
InvalidApplicationError
,
"invalid application:
#{
application_name
}
"
)
raise_invalid_application_error
if
invalid_application?
builder
||
raise
(
InvalidApplicationError
,
"invalid application:
#{
application_name
}
"
)
end
def
builder
builders
[
application_name
]
||
raise
(
InvalidApplicationError
,
"invalid application:
#{
application_name
}
"
)
def
raise_invalid_application_error
raise
(
InvalidApplicationError
,
"invalid application:
#{
application_name
}
"
)
end
def
invalid_application?
unknown_application?
||
(
!
cluster
.
project_type?
&&
project_only_application?
)
end
def
unknown_application?
Clusters
::
Cluster
::
APPLICATIONS
.
keys
.
exclude?
(
application_name
)
end
# These applications will need extra configuration to enable them to work
# with groups of projects
def
project_only_application?
Clusters
::
Cluster
::
PROJECT_ONLY_APPLICATIONS
.
include?
(
application_name
)
end
def
application_name
...
...
app/services/clusters/applications/create_service.rb
View file @
39d2f9bc
...
...
@@ -9,25 +9,9 @@ module Clusters
application
.
updateable?
?
ClusterUpgradeAppWorker
:
ClusterInstallAppWorker
end
def
builders
{
"helm"
=>
->
(
cluster
)
{
cluster
.
application_helm
||
cluster
.
build_application_helm
},
"ingress"
=>
->
(
cluster
)
{
cluster
.
application_ingress
||
cluster
.
build_application_ingress
},
"cert_manager"
=>
->
(
cluster
)
{
cluster
.
application_cert_manager
||
cluster
.
build_application_cert_manager
},
"runner"
=>
->
(
cluster
)
{
cluster
.
application_runner
||
cluster
.
build_application_runner
}
}.
tap
do
|
hash
|
hash
.
merge!
(
project_builders
)
if
cluster
.
project_type?
end
end
# These applications will need extra configuration to enable them to work
# with groups of projects
def
project_builders
{
"prometheus"
=>
->
(
cluster
)
{
cluster
.
application_prometheus
||
cluster
.
build_application_prometheus
},
"jupyter"
=>
->
(
cluster
)
{
cluster
.
application_jupyter
||
cluster
.
build_application_jupyter
},
"knative"
=>
->
(
cluster
)
{
cluster
.
application_knative
||
cluster
.
build_application_knative
}
}
def
builder
cluster
.
method
(
"application_
#{
application_name
}
"
).
call
||
cluster
.
method
(
"build_application_
#{
application_name
}
"
).
call
end
end
end
...
...
app/services/clusters/applications/update_service.rb
View file @
39d2f9bc
...
...
@@ -9,25 +9,8 @@ module Clusters
ClusterPatchAppWorker
end
def
builders
{
"helm"
=>
->
(
cluster
)
{
cluster
.
application_helm
},
"ingress"
=>
->
(
cluster
)
{
cluster
.
application_ingress
},
"cert_manager"
=>
->
(
cluster
)
{
cluster
.
application_cert_manager
}
}.
tap
do
|
hash
|
hash
.
merge!
(
project_builders
)
if
cluster
.
project_type?
end
end
# These applications will need extra configuration to enable them to work
# with groups of projects
def
project_builders
{
"prometheus"
=>
->
(
cluster
)
{
cluster
.
application_prometheus
},
"runner"
=>
->
(
cluster
)
{
cluster
.
application_runner
},
"jupyter"
=>
->
(
cluster
)
{
cluster
.
application_jupyter
},
"knative"
=>
->
(
cluster
)
{
cluster
.
application_knative
}
}
def
builder
cluster
.
method
(
"application_
#{
application_name
}
"
).
call
end
end
end
...
...
app/views/projects/_md_preview.html.haml
View file @
39d2f9bc
...
...
@@ -7,7 +7,7 @@
=
_
(
'This merge request is locked.'
)
=
_
(
'Only project members can comment.'
)
.md-area
.md-area
.position-relative
.md-header
%ul
.nav.nav-tabs.nav-links.clearfix
%li
.md-header-tab.active
...
...
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