2020-10-24 23:57:45 +05:30
|
|
|
import { __, s__ } from '~/locale';
|
|
|
|
import { PackageType } from '../shared/constants';
|
|
|
|
|
|
|
|
export const FETCH_PACKAGES_LIST_ERROR_MESSAGE = __(
|
|
|
|
'Something went wrong while fetching the packages list.',
|
|
|
|
);
|
|
|
|
export const FETCH_PACKAGE_ERROR_MESSAGE = __('Something went wrong while fetching the package.');
|
|
|
|
export const DELETE_PACKAGE_SUCCESS_MESSAGE = __('Package deleted successfully');
|
|
|
|
|
|
|
|
export const DEFAULT_PAGE = 1;
|
|
|
|
export const DEFAULT_PAGE_SIZE = 20;
|
|
|
|
|
|
|
|
export const GROUP_PAGE_TYPE = 'groups';
|
|
|
|
|
|
|
|
export const LIST_KEY_NAME = 'name';
|
|
|
|
export const LIST_KEY_PROJECT = 'project_path';
|
|
|
|
export const LIST_KEY_VERSION = 'version';
|
2021-01-03 14:25:43 +05:30
|
|
|
export const LIST_KEY_PACKAGE_TYPE = 'type';
|
2020-10-24 23:57:45 +05:30
|
|
|
export const LIST_KEY_CREATED_AT = 'created_at';
|
|
|
|
export const LIST_KEY_ACTIONS = 'actions';
|
|
|
|
|
|
|
|
export const LIST_LABEL_NAME = __('Name');
|
|
|
|
export const LIST_LABEL_PROJECT = __('Project');
|
|
|
|
export const LIST_LABEL_VERSION = __('Version');
|
|
|
|
export const LIST_LABEL_PACKAGE_TYPE = __('Type');
|
2021-01-03 14:25:43 +05:30
|
|
|
export const LIST_LABEL_CREATED_AT = __('Published');
|
2020-10-24 23:57:45 +05:30
|
|
|
export const LIST_LABEL_ACTIONS = '';
|
|
|
|
|
|
|
|
// The following is not translated because it is used to build a JavaScript exception error message
|
|
|
|
export const MISSING_DELETE_PATH_ERROR = 'Missing delete_api_path link';
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
export const SORT_FIELDS = [
|
2020-10-24 23:57:45 +05:30
|
|
|
{
|
|
|
|
orderBy: LIST_KEY_NAME,
|
2021-01-03 14:25:43 +05:30
|
|
|
label: LIST_LABEL_NAME,
|
2020-10-24 23:57:45 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
orderBy: LIST_KEY_PROJECT,
|
2021-01-03 14:25:43 +05:30
|
|
|
label: LIST_LABEL_PROJECT,
|
2020-10-24 23:57:45 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
orderBy: LIST_KEY_VERSION,
|
2021-01-03 14:25:43 +05:30
|
|
|
label: LIST_LABEL_VERSION,
|
2020-10-24 23:57:45 +05:30
|
|
|
},
|
|
|
|
{
|
2021-01-03 14:25:43 +05:30
|
|
|
orderBy: LIST_KEY_PACKAGE_TYPE,
|
2020-10-24 23:57:45 +05:30
|
|
|
label: LIST_LABEL_PACKAGE_TYPE,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
orderBy: LIST_KEY_CREATED_AT,
|
2021-01-03 14:25:43 +05:30
|
|
|
label: LIST_LABEL_CREATED_AT,
|
2020-10-24 23:57:45 +05:30
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
export const PACKAGE_TYPES = [
|
2020-10-24 23:57:45 +05:30
|
|
|
{
|
|
|
|
title: s__('PackageRegistry|Composer'),
|
|
|
|
type: PackageType.COMPOSER,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('PackageRegistry|Conan'),
|
|
|
|
type: PackageType.CONAN,
|
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
{
|
|
|
|
title: s__('PackageRegistry|Generic'),
|
|
|
|
type: PackageType.GENERIC,
|
|
|
|
},
|
2020-10-24 23:57:45 +05:30
|
|
|
|
|
|
|
{
|
|
|
|
title: s__('PackageRegistry|Maven'),
|
|
|
|
type: PackageType.MAVEN,
|
|
|
|
},
|
|
|
|
{
|
2021-04-17 20:07:23 +05:30
|
|
|
title: s__('PackageRegistry|npm'),
|
2020-10-24 23:57:45 +05:30
|
|
|
type: PackageType.NPM,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: s__('PackageRegistry|NuGet'),
|
|
|
|
type: PackageType.NUGET,
|
|
|
|
},
|
|
|
|
{
|
2021-01-03 14:25:43 +05:30
|
|
|
title: s__('PackageRegistry|PyPI'),
|
2020-10-24 23:57:45 +05:30
|
|
|
type: PackageType.PYPI,
|
|
|
|
},
|
2021-04-29 21:17:54 +05:30
|
|
|
{
|
|
|
|
title: s__('PackageRegistry|RubyGems'),
|
|
|
|
type: PackageType.RUBYGEMS,
|
|
|
|
},
|
2020-10-24 23:57:45 +05:30
|
|
|
];
|
2021-01-03 14:25:43 +05:30
|
|
|
|
|
|
|
export const LIST_TITLE_TEXT = s__('PackageRegistry|Package Registry');
|
|
|
|
|
|
|
|
export const LIST_INTRO_TEXT = s__(
|
|
|
|
'PackageRegistry|Publish and share packages for a variety of common package managers. %{docLinkStart}More information%{docLinkEnd}',
|
|
|
|
);
|
2021-06-08 01:23:25 +05:30
|
|
|
|
|
|
|
export const TERRAFORM_SEARCH_TYPE = Object.freeze({ value: { data: 'terraform_module' } });
|