mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 13:24:24 +02:00
DbResourcePage: Warn the user if Icinga DB is used as configuration database
This commit is contained in:
parent
c27ca26dad
commit
62cae50f1e
@ -129,12 +129,18 @@ class DbResourcePage extends Form
|
|||||||
$connectionError = $e;
|
$connectionError = $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($connectionError === null && array_search('icinga_instances', $db->listTables(), true) !== false) {
|
if ($connectionError === null
|
||||||
|
&& (
|
||||||
|
in_array('icinga_instances', $db->listTables(), true)
|
||||||
|
|| in_array('icingadb_instance', $db->listTables(), true)
|
||||||
|
)
|
||||||
|
) {
|
||||||
$this->warning($this->translate(
|
$this->warning($this->translate(
|
||||||
'The database you\'ve configured to use for Icinga Web 2 seems to be the one of Icinga. Please be aware'
|
'The database you\'ve configured to use for Icinga Web seems to be the one of Icinga 2'
|
||||||
. ' that this database configuration is supposed to be used for Icinga Web 2\'s configuration and that'
|
. ' / Icinga DB. Please be aware that this database configuration is supposed to be used for'
|
||||||
. ' it is highly recommended to not mix different schemas in the same database. If this is intentional,'
|
. ' Icinga Web\'s configuration and that it is highly recommended to not mix different schemas'
|
||||||
. ' you can skip the validation and ignore this warning. If not, please provide a different database.'
|
. ' in the same database. If this is intentional, you can skip the validation and ignore this'
|
||||||
|
. ' warning. If not, please provide a different database.'
|
||||||
));
|
));
|
||||||
$state = false;
|
$state = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user