Commit 1dcd7a78 authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

Move config_order to compatible mode

parent e898c612
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()
......@@ -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):
......
......@@ -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"
});
},
......
......@@ -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>",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment