17
17
* You should have received a copy of the GNU General Public License
18
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
*/
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'
20
27
import {
28
+ extractServerInfo ,
21
29
extractTrialStatus ,
22
30
extractTrialStatusOld ,
23
31
versionHasEditorHistorySetting
24
32
} 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'
33
33
34
34
export const UPDATE_META = 'meta/UPDATE_META'
35
35
export const PARSE_META = 'meta/PARSE_META'
@@ -206,7 +206,6 @@ export const initialState = {
206
206
storeSize : null
207
207
} ,
208
208
databases : [ ] ,
209
- aliases : [ ] ,
210
209
serverConfigDone : false ,
211
210
settings : initialClientSettings ,
212
211
countAutomaticRefresh : {
@@ -227,17 +226,10 @@ export type Database = {
227
226
home ?: boolean // introduced in neo4j 4.3
228
227
aliases ?: string [ ] // introduced in neo4j 4.4
229
228
type ?: 'system' | 'composite' | 'standard' // introduced in neo4j 5
229
+ constituents ?: string [ ] // introduced in neo4j 5
230
230
status : string
231
231
}
232
232
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
-
241
233
// Selectors
242
234
export function findDatabaseByNameOrAlias (
243
235
state : GlobalState ,
@@ -258,7 +250,7 @@ export function findDatabaseByNameOrAlias(
258
250
)
259
251
}
260
252
261
- export function getUniqueDatabases ( state : GlobalState ) : Database [ ] {
253
+ export function getUniqueDatbases ( state : GlobalState ) : Database [ ] {
262
254
const uniqueDatabaseNames = uniq (
263
255
state [ NAME ] . databases . map ( ( db : Database ) => db . name )
264
256
)
@@ -344,10 +336,6 @@ export const getMetricsPrefix = (state: GlobalState): string =>
344
336
345
337
export const getDatabases = ( state : any ) : Database [ ] =>
346
338
( state [ NAME ] || initialState ) . databases
347
-
348
- export const getAliases = ( state : any ) : null | Alias [ ] =>
349
- ( state [ NAME ] || initialState ) . aliases
350
-
351
339
export const getActiveDbName = ( state : any ) =>
352
340
( ( state [ NAME ] || { } ) . settings || { } ) [ 'dbms.active_database' ]
353
341
0 commit comments