summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/clusters/agents/constants.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-15 09:13:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-15 09:13:34 +0000
commit5cad106998d7826cead879f1122701040cb7bb38 (patch)
tree78ae3b440ca2c8949abf839accbfa5ce6e083544 /app/assets/javascripts/clusters/agents/constants.js
parent908db9a2900d58d368592ad89b7ceefbdeba8c7f (diff)
downloadgitlab-ce-5cad106998d7826cead879f1122701040cb7bb38.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/clusters/agents/constants.js')
-rw-r--r--app/assets/javascripts/clusters/agents/constants.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/assets/javascripts/clusters/agents/constants.js b/app/assets/javascripts/clusters/agents/constants.js
index bbc4630f83b..315c7662755 100644
--- a/app/assets/javascripts/clusters/agents/constants.js
+++ b/app/assets/javascripts/clusters/agents/constants.js
@@ -1 +1,38 @@
+import { s__ } from '~/locale';
+
export const MAX_LIST_COUNT = 25;
+
+export const EVENTS_STORED_DAYS = 7;
+
+export const EVENT_DETAILS = {
+ token_created: {
+ eventTypeIcon: 'token',
+ title: s__('ClusterAgents|%{tokenName} created'),
+ body: s__('ClusterAgents|Token created by %{userName}'),
+ },
+ token_revoked: {
+ eventTypeIcon: 'token',
+ title: s__('ClusterAgents|%{tokenName} revoked'),
+ body: s__('ClusterAgents|Token revoked by %{userName}'),
+ },
+ agent_connected: {
+ eventTypeIcon: 'connected',
+ title: s__('ClusterAgents|%{titleIcon}Connected'),
+ body: s__('ClusterAgents|Agent %{strongStart}connected%{strongEnd}'),
+ titleIcon: {
+ name: 'status-success',
+ class: 'text-success-500',
+ },
+ },
+ agent_disconnected: {
+ eventTypeIcon: 'connected',
+ title: s__('ClusterAgents|%{titleIcon}Not connected'),
+ body: s__('ClusterAgents|Agent %{strongStart}disconnected%{strongEnd}'),
+ titleIcon: {
+ name: 'severity-critical',
+ class: 'text-danger-800',
+ },
+ },
+};
+
+export const DEFAULT_ICON = 'token';