export function linkToHome ( ) { return `/` ; } export function linkToRepositories ( ) { return `/repositories` ; } export function linkToRepository ( repositoryName ) { return encodeURI ( `/repositories/${ encodeURIComponent ( repositoryName ) }` ) ; } export function linkToEditRepository ( repositoryName ) { return encodeURI ( `/edit_repository/${ encodeURIComponent ( repositoryName ) }` ) ; } export function linkToAddRepository ( redirect ? ) { return encodeURI ( `/add_repository${ redirect ? `?redirect=${ encodeURIComponent ( redirect ) }` : '' }` ) ; } export function linkToSnapshots ( repositoryName ? , policyName ? ) { if ( repositoryName ) { return encodeURI ( `/snapshots?repository=${ encodeURIComponent ( repositoryName ) }` ) ; } if ( policyName ) { return encodeURI ( `/snapshots?policy=${ encodeURIComponent ( policyName ) }` ) ; } return `/snapshots` ; } export function linkToSnapshot ( repositoryName , snapshotName ) { return encodeURI ( `/snapshots/${ encodeURIComponent ( repositoryName ) }/${ encodeURIComponent ( snapshotName ) }` ) ; } export function linkToRestoreSnapshot ( repositoryName , snapshotName ) { return encodeURI ( `/restore/${ encodeURIComponent ( repositoryName ) }/${ encodeURIComponent ( snapshotName ) }` ) ; } export function linkToPolicies ( ) { return `/policies` ; } export function linkToPolicy ( policyName ) { return encodeURI ( `/policies/${ encodeURIComponent ( policyName ) }` ) ; } export function linkToEditPolicy ( policyName ) { return encodeURI ( `/edit_policy/${ encodeURIComponent ( policyName ) }` ) ; } export function linkToAddPolicy ( ) { return `/add_policy` ; } export function linkToRestoreStatus ( ) { return `/restore_status` ; }