forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ingest Pipelines] Add url generator for ingest pipelines app (elasti…
…c#77872) * [Ingest Pipelines] Add url generator for ingest pipelines app * [Ingest Pipelines] Fix type check error * [Ingest Pipelines] Fix import errors * [Ingest Pipelines] Fix type check errors * [Ingest Pipelines] Fix type check errors * [ILM] Update UrlGenerator interface, clean up internal navigation service * [ILM] Fix function export * [ILM] Update functions signatures * [ILM] Fix errors * [ILM] Fix errors * [ILM] Rename ROUTES_CONFIG and export MANAGEMENT_APP_ID Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
8a5a592
commit 818bef9
Showing
20 changed files
with
325 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export const MANAGEMENT_APP_ID = 'management'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
x-pack/plugins/ingest_pipelines/public/application/services/navigation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
const BASE_PATH = '/'; | ||
|
||
const EDIT_PATH = 'edit'; | ||
|
||
const CREATE_PATH = 'create'; | ||
|
||
const _getEditPath = (name: string, encode = true): string => { | ||
return `${BASE_PATH}${EDIT_PATH}/${encode ? encodeURIComponent(name) : name}`; | ||
}; | ||
|
||
const _getCreatePath = (): string => { | ||
return `${BASE_PATH}${CREATE_PATH}`; | ||
}; | ||
|
||
const _getClonePath = (name: string, encode = true): string => { | ||
return `${BASE_PATH}${CREATE_PATH}/${encode ? encodeURIComponent(name) : name}`; | ||
}; | ||
const _getListPath = (name?: string): string => { | ||
return `${BASE_PATH}${name ? `?pipeline=${encodeURIComponent(name)}` : ''}`; | ||
}; | ||
|
||
export const ROUTES = { | ||
list: _getListPath(), | ||
edit: _getEditPath(':name', false), | ||
create: _getCreatePath(), | ||
clone: _getClonePath(':sourceName', false), | ||
}; | ||
|
||
export const getListPath = ({ | ||
inspectedPipelineName, | ||
}: { | ||
inspectedPipelineName?: string; | ||
} = {}): string => _getListPath(inspectedPipelineName); | ||
export const getEditPath = ({ pipelineName }: { pipelineName: string }): string => | ||
_getEditPath(pipelineName, true); | ||
export const getCreatePath = (): string => _getCreatePath(); | ||
export const getClonePath = ({ clonedPipelineName }: { clonedPipelineName: string }): string => | ||
_getClonePath(clonedPipelineName, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.