Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
fumufu86
tower
Commits
1dcd7a78
Commit
1dcd7a78
authored
Mar 26, 2018
by
Aleksey Shirokih
Browse files
Move config_order to compatible mode
parent
e898c612
Changes
4
Hide whitespace changes
Inline
Side-by-side
tower/migrations/037_config_order_param_settings.py
0 → 100644
View file @
1dcd7a78
from
peewee
import
CharField
,
Model
def
migrate
(
migrator
):
class
Environment
(
Model
):
class
Meta
:
database
=
migrator
.
db
db_table
=
"environment"
name
=
CharField
(
unique
=
True
)
config_order
=
CharField
()
if
len
(
Environment
.
select
())
!=
0
:
for
env
in
Environment
.
select
():
env
.
config_order
=
"yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC"
env
.
save
()
tower/models/environment.py
View file @
1dcd7a78
...
...
@@ -57,7 +57,7 @@ class Environment(Model):
# pool id -> service -> key -> value
is_default
=
BooleanField
(
default
=
False
)
config_order
=
CharField
(
default
=
"yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/
local
.yml,env:///NOC"
)
default
=
"yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/
settings
.yml,env:///NOC"
)
install_method
=
CharField
(
default
=
"git"
)
def
list_item
(
self
):
...
...
tower/ui/environment_logic.js
View file @
1dcd7a78
...
...
@@ -32,7 +32,7 @@ var environment_logic = {
install_method
:
"
git
"
,
playbook_link
:
"
git+https://github.com/nocproject/ansible_deploy@microservices
"
,
installation_name
:
"
Unconfigured installation
"
,
config_order
:
"
yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/
local
.yml,env:///NOC
"
,
config_order
:
"
yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/
settings
.yml,env:///NOC
"
,
name
:
"
NOC
"
});
},
...
...
tower/ui/environment_ui.js
View file @
1dcd7a78
...
...
@@ -211,7 +211,7 @@ var environment_form = {
value
:
"
eval
"
},
{
placeholder
:
"
legacy:///
,yaml:///opt/noc/etc/settings.yml,env:///NOC
"
,
placeholder
:
"
yaml:///opt/noc/etc/tower.yml
,yaml:///opt/noc/etc/settings.yml,env:///NOC
"
,
view
:
"
text
"
,
name
:
"
config_order
"
,
bottomLabel
:
"
Read about that field <a href='https://kb.nocproject.org/x/8oKYAQ'> here</a>
"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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