debian-mirror-gitlab/app/assets/javascripts/clusters_list/constants.js

61 lines
2.3 KiB
JavaScript
Raw Normal View History

2021-01-03 14:25:43 +05:30
import { __, s__ } from '~/locale';
export const CLUSTER_ERRORS = {
default: {
tableText: s__('ClusterIntegration|Unknown Error'),
title: s__('ClusterIntegration|Unknown Error'),
description: s__(
'ClusterIntegration|An unknown error occurred while attempting to connect to Kubernetes.',
),
troubleshootingTips: [
s__('ClusterIntegration|Check your cluster status'),
s__('ClusterIntegration|Make sure your API endpoint is correct'),
s__(
'ClusterIntegration|Node calculations use the Kubernetes Metrics API. Make sure your cluster has metrics installed',
),
],
},
authentication_error: {
tableText: s__('ClusterIntegration|Unable to Authenticate'),
title: s__('ClusterIntegration|Authentication Error'),
description: s__('ClusterIntegration|GitLab failed to authenticate.'),
troubleshootingTips: [
s__('ClusterIntegration|Check your token'),
s__('ClusterIntegration|Check your CA certificate'),
],
},
connection_error: {
tableText: s__('ClusterIntegration|Unable to Connect'),
title: s__('ClusterIntegration|Connection Error'),
description: s__('ClusterIntegration|GitLab failed to connect to the cluster.'),
troubleshootingTips: [
s__('ClusterIntegration|Check your cluster status'),
s__('ClusterIntegration|Make sure your API endpoint is correct'),
],
},
http_error: {
tableText: s__('ClusterIntegration|Unable to Connect'),
title: s__('ClusterIntegration|HTTP Error'),
description: s__('ClusterIntegration|There was an HTTP error when connecting to your cluster.'),
troubleshootingTips: [s__('ClusterIntegration|Check your cluster status')],
},
};
2020-04-08 14:13:33 +05:30
export const CLUSTER_TYPES = {
project_type: __('Project'),
group_type: __('Group'),
instance_type: __('Instance'),
};
2020-06-23 00:09:42 +05:30
export const MAX_REQUESTS = 3;
2020-04-08 14:13:33 +05:30
export const STATUSES = {
2020-05-24 23:13:21 +05:30
default: { className: 'bg-white', title: __('Unknown') },
2020-04-08 14:13:33 +05:30
disabled: { className: 'disabled', title: __('Disabled') },
2020-05-24 23:13:21 +05:30
created: { className: 'bg-success', title: __('Connected') },
2020-04-08 14:13:33 +05:30
unreachable: { className: 'bg-danger', title: __('Unreachable') },
authentication_failure: { className: 'bg-warning', title: __('Authentication Failure') },
deleting: { title: __('Deleting') },
2020-06-23 00:09:42 +05:30
creating: { title: __('Creating') },
2020-04-08 14:13:33 +05:30
};