summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/shared/constants/app.constants.ts
blob: 4248be8f59c20121fec34d7f3f341f9f6754e113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
import { Injectable } from '@angular/core';

import { environment } from '~/environments/environment';

export class AppConstants {
  public static readonly organization = 'ceph';
  public static readonly projectName = 'Ceph Dashboard';
  public static readonly license = 'Free software (LGPL 2.1).';
  public static readonly copyright = 'Copyright(c) ' + environment.year + ' Ceph contributors.';
  public static readonly cephLogo = 'assets/Ceph_Logo.svg';
}

export enum URLVerbs {
  /* Create a new item */
  CREATE = 'create',

  /* Make changes to an existing item */
  EDIT = 'edit',

  /* Make changes to an existing item */
  UPDATE = 'update',

  /* Remove an item from a container WITHOUT deleting it */
  REMOVE = 'remove',

  /* Destroy an existing item */
  DELETE = 'delete',

  /* Add an existing item to a container */
  ADD = 'add',

  /* Non-standard verbs */
  COPY = 'copy',
  CLONE = 'clone',

  /* Prometheus wording */
  RECREATE = 'recreate',
  EXPIRE = 'expire',

  /* Daemons */
  RESTART = 'Restart'
}

export enum ActionLabels {
  /* Create a new item */
  CREATE = 'Create',

  /* Destroy an existing item */
  DELETE = 'Delete',

  /* Add an existing item to a container */
  ADD = 'Add',

  /* Remove an item from a container WITHOUT deleting it */
  REMOVE = 'Remove',

  /* Make changes to an existing item */
  EDIT = 'Edit',

  /* */
  CANCEL = 'Cancel',

  /* Non-standard actions */
  COPY = 'Copy',
  CLONE = 'Clone',
  UPDATE = 'Update',
  EVICT = 'Evict',

  /* Read-only */
  SHOW = 'Show',

  /* Prometheus wording */
  RECREATE = 'Recreate',
  EXPIRE = 'Expire',

  /* Daemons */
  START = 'Start',
  STOP = 'Stop',
  REDEPLOY = 'Redeploy',
  RESTART = 'Restart'
}

@Injectable({
  providedIn: 'root'
})
export class ActionLabelsI18n {
  /* This service is required as the i18n polyfill does not provide static
  translation
  */
  CREATE: string;
  DELETE: string;
  ADD: string;
  REMOVE: string;
  EDIT: string;
  CANCEL: string;
  PREVIEW: string;
  MOVE: string;
  NEXT: string;
  BACK: string;
  CHANGE: string;
  COPY: string;
  CLONE: string;
  DEEP_SCRUB: string;
  DESTROY: string;
  EVICT: string;
  EXPIRE: string;
  FLATTEN: string;
  MARK_DOWN: string;
  MARK_IN: string;
  MARK_LOST: string;
  MARK_OUT: string;
  PROTECT: string;
  PURGE: string;
  RECREATE: string;
  RENAME: string;
  RESTORE: string;
  REWEIGHT: string;
  ROLLBACK: string;
  SCRUB: string;
  SET: string;
  SUBMIT: string;
  SHOW: string;
  TRASH: string;
  UNPROTECT: string;
  UNSET: string;
  UPDATE: string;
  FLAGS: string;
  ENTER_MAINTENANCE: string;
  EXIT_MAINTENANCE: string;
  REMOVE_SCHEDULING: string;
  PROMOTE: string;
  DEMOTE: string;
  START_DRAIN: string;
  STOP_DRAIN: string;
  START: string;
  STOP: string;
  REDEPLOY: string;
  RESTART: string;
  RESYNC: string;

  constructor() {
    /* Create a new item */
    this.CREATE = $localize`Create`;

    /* Destroy an existing item */
    this.DELETE = $localize`Delete`;

    /* Add an existing item to a container */
    this.ADD = $localize`Add`;
    this.SET = $localize`Set`;
    this.SUBMIT = $localize`Submit`;

    /* Remove an item from a container WITHOUT deleting it */
    this.REMOVE = $localize`Remove`;
    this.UNSET = $localize`Unset`;

    /* Make changes to an existing item */
    this.EDIT = $localize`Edit`;
    this.UPDATE = $localize`Update`;
    this.CANCEL = $localize`Cancel`;
    this.PREVIEW = $localize`Preview`;
    this.MOVE = $localize`Move`;

    /* Wizard wording */
    this.NEXT = $localize`Next`;
    this.BACK = $localize`Back`;

    /* Non-standard actions */
    this.CLONE = $localize`Clone`;
    this.COPY = $localize`Copy`;
    this.DEEP_SCRUB = $localize`Deep Scrub`;
    this.DESTROY = $localize`Destroy`;
    this.EVICT = $localize`Evict`;
    this.FLATTEN = $localize`Flatten`;
    this.MARK_DOWN = $localize`Mark Down`;
    this.MARK_IN = $localize`Mark In`;
    this.MARK_LOST = $localize`Mark Lost`;
    this.MARK_OUT = $localize`Mark Out`;
    this.PROTECT = $localize`Protect`;
    this.PURGE = $localize`Purge`;
    this.RENAME = $localize`Rename`;
    this.RESTORE = $localize`Restore`;
    this.REWEIGHT = $localize`Reweight`;
    this.ROLLBACK = $localize`Rollback`;
    this.SCRUB = $localize`Scrub`;
    this.SHOW = $localize`Show`;
    this.TRASH = $localize`Move to Trash`;
    this.UNPROTECT = $localize`Unprotect`;
    this.CHANGE = $localize`Change`;
    this.FLAGS = $localize`Flags`;
    this.ENTER_MAINTENANCE = $localize`Enter Maintenance`;
    this.EXIT_MAINTENANCE = $localize`Exit Maintenance`;

    this.START_DRAIN = $localize`Start Drain`;
    this.STOP_DRAIN = $localize`Stop Drain`;
    this.RESYNC = $localize`Resync`;
    /* Prometheus wording */
    this.RECREATE = $localize`Recreate`;
    this.EXPIRE = $localize`Expire`;

    this.START = $localize`Start`;
    this.STOP = $localize`Stop`;
    this.REDEPLOY = $localize`Redeploy`;
    this.RESTART = $localize`Restart`;

    this.REMOVE_SCHEDULING = $localize`Remove Scheduling`;
    this.PROMOTE = $localize`Promote`;
    this.DEMOTE = $localize`Demote`;
  }
}

@Injectable({
  providedIn: 'root'
})
export class SucceededActionLabelsI18n {
  /* This service is required as the i18n polyfill does not provide static
  translation
  */
  CREATED: string;
  DELETED: string;
  ADDED: string;
  REMOVED: string;
  EDITED: string;
  CANCELED: string;
  PREVIEWED: string;
  MOVED: string;
  COPIED: string;
  CLONED: string;
  DEEP_SCRUBBED: string;
  DESTROYED: string;
  FLATTENED: string;
  MARKED_DOWN: string;
  MARKED_IN: string;
  MARKED_LOST: string;
  MARKED_OUT: string;
  PROTECTED: string;
  PURGED: string;
  RENAMED: string;
  RESTORED: string;
  REWEIGHTED: string;
  ROLLED_BACK: string;
  SCRUBBED: string;
  SHOWED: string;
  TRASHED: string;
  UNPROTECTED: string;
  CHANGE: string;
  RECREATED: string;
  EXPIRED: string;
  MOVE: string;
  START: string;
  STOP: string;
  REDEPLOY: string;
  RESTART: string;

  constructor() {
    /* Create a new item */
    this.CREATED = $localize`Created`;

    /* Destroy an existing item */
    this.DELETED = $localize`Deleted`;

    /* Add an existing item to a container */
    this.ADDED = $localize`Added`;

    /* Remove an item from a container WITHOUT deleting it */
    this.REMOVED = $localize`Removed`;

    /* Make changes to an existing item */
    this.EDITED = $localize`Edited`;
    this.CANCELED = $localize`Canceled`;
    this.PREVIEWED = $localize`Previewed`;
    this.MOVED = $localize`Moved`;

    /* Non-standard actions */
    this.CLONED = $localize`Cloned`;
    this.COPIED = $localize`Copied`;
    this.DEEP_SCRUBBED = $localize`Deep Scrubbed`;
    this.DESTROYED = $localize`Destroyed`;
    this.FLATTENED = $localize`Flattened`;
    this.MARKED_DOWN = $localize`Marked Down`;
    this.MARKED_IN = $localize`Marked In`;
    this.MARKED_LOST = $localize`Marked Lost`;
    this.MARKED_OUT = $localize`Marked Out`;
    this.PROTECTED = $localize`Protected`;
    this.PURGED = $localize`Purged`;
    this.RENAMED = $localize`Renamed`;
    this.RESTORED = $localize`Restored`;
    this.REWEIGHTED = $localize`Reweighted`;
    this.ROLLED_BACK = $localize`Rolled back`;
    this.SCRUBBED = $localize`Scrubbed`;
    this.SHOWED = $localize`Showed`;
    this.TRASHED = $localize`Moved to Trash`;
    this.UNPROTECTED = $localize`Unprotected`;
    this.CHANGE = $localize`Change`;

    /* Prometheus wording */
    this.RECREATED = $localize`Recreated`;
    this.EXPIRED = $localize`Expired`;

    this.START = $localize`Start`;
    this.STOP = $localize`Stop`;
    this.REDEPLOY = $localize`Redeploy`;
    this.RESTART = $localize`Restart`;
  }
}