1717 * You should have received a copy of the GNU General Public License
1818 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1919 */
20+ import { uniq } from 'lodash-es'
21+ import { QueryResult } from 'neo4j-driver'
22+ import { SemVer , coerce , gte } from 'semver'
23+ import { isConfigValFalsy } from 'services/bolt/boltHelpers'
24+ import { GlobalState } from 'shared/globalState'
25+ import { APP_START } from 'shared/modules/app/appDuck'
26+ import { FIRST_MULTI_DB_SUPPORT } from '../features/versionedFeatures'
2027import {
28+ extractServerInfo ,
2129 extractTrialStatus ,
2230 extractTrialStatusOld ,
2331 versionHasEditorHistorySetting
2432} from './utils'
25- import { isConfigValFalsy } from 'services/bolt/boltHelpers'
26- import { GlobalState } from 'shared/globalState'
27- import { APP_START } from 'shared/modules/app/appDuck'
28- import { extractServerInfo } from './utils'
29- import { coerce , SemVer , gte } from 'semver'
30- import { QueryResult } from 'neo4j-driver'
31- import { uniq } from 'lodash-es'
32- import { FIRST_MULTI_DB_SUPPORT } from '../features/versionedFeatures'
3333
3434export const UPDATE_META = 'meta/UPDATE_META'
3535export const PARSE_META = 'meta/PARSE_META'
@@ -206,7 +206,6 @@ export const initialState = {
206206 storeSize : null
207207 } ,
208208 databases : [ ] ,
209- aliases : [ ] ,
210209 serverConfigDone : false ,
211210 settings : initialClientSettings ,
212211 countAutomaticRefresh : {
@@ -227,17 +226,10 @@ export type Database = {
227226 home ?: boolean // introduced in neo4j 4.3
228227 aliases ?: string [ ] // introduced in neo4j 4.4
229228 type ?: 'system' | 'composite' | 'standard' // introduced in neo4j 5
229+ constituents ?: string [ ] // introduced in neo4j 5
230230 status : string
231231}
232232
233- export const ALIAS_COMPOSITE_FIELD_FIRST_VERSION = '5.11.0'
234- export type Alias = {
235- name : string
236- database : string
237- location : string
238- composite ?: string | null // introduced in neo4j 5.11
239- }
240-
241233// Selectors
242234export function findDatabaseByNameOrAlias (
243235 state : GlobalState ,
@@ -258,7 +250,7 @@ export function findDatabaseByNameOrAlias(
258250 )
259251}
260252
261- export function getUniqueDatabases ( state : GlobalState ) : Database [ ] {
253+ export function getUniqueDatbases ( state : GlobalState ) : Database [ ] {
262254 const uniqueDatabaseNames = uniq (
263255 state [ NAME ] . databases . map ( ( db : Database ) => db . name )
264256 )
@@ -344,10 +336,6 @@ export const getMetricsPrefix = (state: GlobalState): string =>
344336
345337export const getDatabases = ( state : any ) : Database [ ] =>
346338 ( state [ NAME ] || initialState ) . databases
347-
348- export const getAliases = ( state : any ) : null | Alias [ ] =>
349- ( state [ NAME ] || initialState ) . aliases
350-
351339export const getActiveDbName = ( state : any ) =>
352340 ( ( state [ NAME ] || { } ) . settings || { } ) [ 'dbms.active_database' ]
353341
0 commit comments