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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
55d098c9
Commit
55d098c9
authored
Nov 07, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix initial status again
parent
16b9e289
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
app/models/clusters/applications/helm.rb
app/models/clusters/applications/helm.rb
+4
-6
app/models/clusters/concerns/application_status.rb
app/models/clusters/concerns/application_status.rb
+1
-1
No files found.
app/models/clusters/applications/helm.rb
View file @
55d098c9
...
@@ -11,16 +11,14 @@ module Clusters
...
@@ -11,16 +11,14 @@ module Clusters
validates
:cluster
,
presence:
true
validates
:cluster
,
presence:
true
after_initialize
:set_initial_status
def
self
.
application_name
def
self
.
application_name
self
.
to_s
.
demodulize
.
underscore
self
.
to_s
.
demodulize
.
underscore
end
end
def
initial_status
def
set_initial_status
if
cluster
&
.
platform_kubernetes_active?
self
.
status
=
'installable'
if
cluster
&
.
platform_kubernetes_active?
:installable
else
:not_installable
end
end
end
def
name
def
name
...
...
app/models/clusters/concerns/application_status.rb
View file @
55d098c9
...
@@ -4,7 +4,7 @@ module Clusters
...
@@ -4,7 +4,7 @@ module Clusters
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
included
do
included
do
state_machine
:status
,
initial:
->
(
application
)
{
application
.
initial_status
}
do
state_machine
:status
,
initial:
:not_installable
do
state
:not_installable
,
value:
-
2
state
:not_installable
,
value:
-
2
state
:errored
,
value:
-
1
state
:errored
,
value:
-
1
state
:installable
,
value:
0
state
:installable
,
value:
0
...
...
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