import { ApplicationStart } from 'kibana/public' ; import { getIndexListUri } from '../../../../index_management/public' ; export const ROUTES = { list : '/policies' , edit : '/policies/edit/:policyName?' , create : '/policies/edit' , } ; export const getPolicyEditPath = ( policyName ) : string => { return encodeURI ( `/policies/edit/${ encodeURIComponent ( policyName ) }` ) ; } ; export const getPolicyCreatePath = ( ) => { return ROUTES . create ; } ; export const getPoliciesListPath = ( ) => { return ROUTES . list ; } ; export const getIndicesListPath = ( policyName , getUrlForApp ) => getUrlForApp ( 'management' , { path : `/data/index_management${ getIndexListUri ( `ilm.policy="${ policyName }"` , true ) }` , } ) ;