]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { Injectable } from '@angular/core'; |
2 | ||
f67539c2 | 3 | import { environment } from '~/environments/environment'; |
11fdf7f2 TL |
4 | |
5 | export class AppConstants { | |
6 | public static readonly organization = 'ceph'; | |
9f95a23c | 7 | public static readonly projectName = 'Ceph Dashboard'; |
11fdf7f2 | 8 | public static readonly license = 'Free software (LGPL 2.1).'; |
f67539c2 | 9 | public static readonly copyright = 'Copyright(c) ' + environment.year + ' Ceph contributors.'; |
a4b75251 | 10 | public static readonly cephLogo = 'assets/Ceph_Logo.svg'; |
11fdf7f2 TL |
11 | } |
12 | ||
13 | export enum URLVerbs { | |
14 | /* Create a new item */ | |
15 | CREATE = 'create', | |
16 | ||
17 | /* Make changes to an existing item */ | |
18 | EDIT = 'edit', | |
19 | ||
20 | /* Make changes to an existing item */ | |
21 | UPDATE = 'update', | |
22 | ||
23 | /* Remove an item from a container WITHOUT deleting it */ | |
24 | REMOVE = 'remove', | |
25 | ||
26 | /* Destroy an existing item */ | |
27 | DELETE = 'delete', | |
28 | ||
29 | /* Add an existing item to a container */ | |
30 | ADD = 'add', | |
31 | ||
32 | /* Non-standard verbs */ | |
33 | COPY = 'copy', | |
494da23a TL |
34 | CLONE = 'clone', |
35 | ||
36 | /* Prometheus wording */ | |
37 | RECREATE = 'recreate', | |
20effc67 TL |
38 | EXPIRE = 'expire', |
39 | ||
40 | /* Daemons */ | |
41 | RESTART = 'Restart' | |
11fdf7f2 TL |
42 | } |
43 | ||
44 | export enum ActionLabels { | |
45 | /* Create a new item */ | |
46 | CREATE = 'Create', | |
47 | ||
48 | /* Destroy an existing item */ | |
49 | DELETE = 'Delete', | |
50 | ||
51 | /* Add an existing item to a container */ | |
52 | ADD = 'Add', | |
53 | ||
54 | /* Remove an item from a container WITHOUT deleting it */ | |
55 | REMOVE = 'Remove', | |
56 | ||
57 | /* Make changes to an existing item */ | |
58 | EDIT = 'Edit', | |
59 | ||
60 | /* */ | |
61 | CANCEL = 'Cancel', | |
62 | ||
63 | /* Non-standard actions */ | |
64 | COPY = 'Copy', | |
65 | CLONE = 'Clone', | |
9f95a23c TL |
66 | UPDATE = 'Update', |
67 | EVICT = 'Evict', | |
11fdf7f2 TL |
68 | |
69 | /* Read-only */ | |
494da23a TL |
70 | SHOW = 'Show', |
71 | ||
72 | /* Prometheus wording */ | |
73 | RECREATE = 'Recreate', | |
20effc67 TL |
74 | EXPIRE = 'Expire', |
75 | ||
76 | /* Daemons */ | |
77 | START = 'Start', | |
78 | STOP = 'Stop', | |
79 | REDEPLOY = 'Redeploy', | |
80 | RESTART = 'Restart' | |
11fdf7f2 TL |
81 | } |
82 | ||
83 | @Injectable({ | |
84 | providedIn: 'root' | |
85 | }) | |
86 | export class ActionLabelsI18n { | |
87 | /* This service is required as the i18n polyfill does not provide static | |
88 | translation | |
89 | */ | |
90 | CREATE: string; | |
91 | DELETE: string; | |
92 | ADD: string; | |
93 | REMOVE: string; | |
94 | EDIT: string; | |
95 | CANCEL: string; | |
f67539c2 TL |
96 | PREVIEW: string; |
97 | MOVE: string; | |
98 | NEXT: string; | |
99 | BACK: string; | |
9f95a23c | 100 | CHANGE: string; |
11fdf7f2 TL |
101 | COPY: string; |
102 | CLONE: string; | |
eafe8130 TL |
103 | DEEP_SCRUB: string; |
104 | DESTROY: string; | |
9f95a23c TL |
105 | EVICT: string; |
106 | EXPIRE: string; | |
eafe8130 TL |
107 | FLATTEN: string; |
108 | MARK_DOWN: string; | |
109 | MARK_IN: string; | |
110 | MARK_LOST: string; | |
111 | MARK_OUT: string; | |
112 | PROTECT: string; | |
113 | PURGE: string; | |
9f95a23c | 114 | RECREATE: string; |
eafe8130 TL |
115 | RENAME: string; |
116 | RESTORE: string; | |
117 | REWEIGHT: string; | |
118 | ROLLBACK: string; | |
119 | SCRUB: string; | |
9f95a23c | 120 | SET: string; |
f67539c2 | 121 | SUBMIT: string; |
11fdf7f2 | 122 | SHOW: string; |
494da23a TL |
123 | TRASH: string; |
124 | UNPROTECT: string; | |
9f95a23c TL |
125 | UNSET: string; |
126 | UPDATE: string; | |
adb31ebb | 127 | FLAGS: string; |
f67539c2 TL |
128 | ENTER_MAINTENANCE: string; |
129 | EXIT_MAINTENANCE: string; | |
20effc67 TL |
130 | START_DRAIN: string; |
131 | STOP_DRAIN: string; | |
132 | START: string; | |
133 | STOP: string; | |
134 | REDEPLOY: string; | |
135 | RESTART: string; | |
11fdf7f2 | 136 | |
f67539c2 | 137 | constructor() { |
11fdf7f2 | 138 | /* Create a new item */ |
f67539c2 | 139 | this.CREATE = $localize`Create`; |
11fdf7f2 TL |
140 | |
141 | /* Destroy an existing item */ | |
f67539c2 | 142 | this.DELETE = $localize`Delete`; |
11fdf7f2 TL |
143 | |
144 | /* Add an existing item to a container */ | |
f67539c2 TL |
145 | this.ADD = $localize`Add`; |
146 | this.SET = $localize`Set`; | |
147 | this.SUBMIT = $localize`Submit`; | |
11fdf7f2 TL |
148 | |
149 | /* Remove an item from a container WITHOUT deleting it */ | |
f67539c2 TL |
150 | this.REMOVE = $localize`Remove`; |
151 | this.UNSET = $localize`Unset`; | |
11fdf7f2 TL |
152 | |
153 | /* Make changes to an existing item */ | |
f67539c2 TL |
154 | this.EDIT = $localize`Edit`; |
155 | this.UPDATE = $localize`Update`; | |
156 | this.CANCEL = $localize`Cancel`; | |
157 | this.PREVIEW = $localize`Preview`; | |
158 | this.MOVE = $localize`Move`; | |
159 | ||
160 | /* Wizard wording */ | |
161 | this.NEXT = $localize`Next`; | |
162 | this.BACK = $localize`Back`; | |
11fdf7f2 TL |
163 | |
164 | /* Non-standard actions */ | |
f67539c2 TL |
165 | this.CLONE = $localize`Clone`; |
166 | this.COPY = $localize`Copy`; | |
167 | this.DEEP_SCRUB = $localize`Deep Scrub`; | |
168 | this.DESTROY = $localize`Destroy`; | |
169 | this.EVICT = $localize`Evict`; | |
170 | this.FLATTEN = $localize`Flatten`; | |
171 | this.MARK_DOWN = $localize`Mark Down`; | |
172 | this.MARK_IN = $localize`Mark In`; | |
173 | this.MARK_LOST = $localize`Mark Lost`; | |
174 | this.MARK_OUT = $localize`Mark Out`; | |
175 | this.PROTECT = $localize`Protect`; | |
176 | this.PURGE = $localize`Purge`; | |
177 | this.RENAME = $localize`Rename`; | |
178 | this.RESTORE = $localize`Restore`; | |
179 | this.REWEIGHT = $localize`Reweight`; | |
180 | this.ROLLBACK = $localize`Rollback`; | |
181 | this.SCRUB = $localize`Scrub`; | |
182 | this.SHOW = $localize`Show`; | |
183 | this.TRASH = $localize`Move to Trash`; | |
184 | this.UNPROTECT = $localize`Unprotect`; | |
185 | this.CHANGE = $localize`Change`; | |
186 | this.FLAGS = $localize`Flags`; | |
187 | this.ENTER_MAINTENANCE = $localize`Enter Maintenance`; | |
188 | this.EXIT_MAINTENANCE = $localize`Exit Maintenance`; | |
20effc67 TL |
189 | this.START_DRAIN = $localize`Start Drain`; |
190 | this.STOP_DRAIN = $localize`Stop Drain`; | |
494da23a TL |
191 | |
192 | /* Prometheus wording */ | |
f67539c2 TL |
193 | this.RECREATE = $localize`Recreate`; |
194 | this.EXPIRE = $localize`Expire`; | |
20effc67 TL |
195 | |
196 | this.START = $localize`Start`; | |
197 | this.STOP = $localize`Stop`; | |
198 | this.REDEPLOY = $localize`Redeploy`; | |
199 | this.RESTART = $localize`Restart`; | |
494da23a TL |
200 | } |
201 | } | |
202 | ||
203 | @Injectable({ | |
204 | providedIn: 'root' | |
205 | }) | |
206 | export class SucceededActionLabelsI18n { | |
207 | /* This service is required as the i18n polyfill does not provide static | |
208 | translation | |
209 | */ | |
210 | CREATED: string; | |
211 | DELETED: string; | |
212 | ADDED: string; | |
213 | REMOVED: string; | |
214 | EDITED: string; | |
215 | CANCELED: string; | |
f67539c2 TL |
216 | PREVIEWED: string; |
217 | MOVED: string; | |
494da23a TL |
218 | COPIED: string; |
219 | CLONED: string; | |
9f95a23c TL |
220 | DEEP_SCRUBBED: string; |
221 | DESTROYED: string; | |
222 | FLATTENED: string; | |
223 | MARKED_DOWN: string; | |
224 | MARKED_IN: string; | |
225 | MARKED_LOST: string; | |
226 | MARKED_OUT: string; | |
227 | PROTECTED: string; | |
228 | PURGED: string; | |
229 | RENAMED: string; | |
230 | RESTORED: string; | |
231 | REWEIGHTED: string; | |
232 | ROLLED_BACK: string; | |
233 | SCRUBBED: string; | |
494da23a TL |
234 | SHOWED: string; |
235 | TRASHED: string; | |
236 | UNPROTECTED: string; | |
9f95a23c | 237 | CHANGE: string; |
494da23a TL |
238 | RECREATED: string; |
239 | EXPIRED: string; | |
20effc67 TL |
240 | MOVE: string; |
241 | START: string; | |
242 | STOP: string; | |
243 | REDEPLOY: string; | |
244 | RESTART: string; | |
494da23a | 245 | |
f67539c2 | 246 | constructor() { |
494da23a | 247 | /* Create a new item */ |
f67539c2 | 248 | this.CREATED = $localize`Created`; |
494da23a TL |
249 | |
250 | /* Destroy an existing item */ | |
f67539c2 | 251 | this.DELETED = $localize`Deleted`; |
494da23a TL |
252 | |
253 | /* Add an existing item to a container */ | |
f67539c2 | 254 | this.ADDED = $localize`Added`; |
494da23a TL |
255 | |
256 | /* Remove an item from a container WITHOUT deleting it */ | |
f67539c2 | 257 | this.REMOVED = $localize`Removed`; |
494da23a TL |
258 | |
259 | /* Make changes to an existing item */ | |
f67539c2 TL |
260 | this.EDITED = $localize`Edited`; |
261 | this.CANCELED = $localize`Canceled`; | |
262 | this.PREVIEWED = $localize`Previewed`; | |
263 | this.MOVED = $localize`Moved`; | |
494da23a TL |
264 | |
265 | /* Non-standard actions */ | |
f67539c2 TL |
266 | this.CLONED = $localize`Cloned`; |
267 | this.COPIED = $localize`Copied`; | |
268 | this.DEEP_SCRUBBED = $localize`Deep Scrubbed`; | |
269 | this.DESTROYED = $localize`Destroyed`; | |
270 | this.FLATTENED = $localize`Flattened`; | |
271 | this.MARKED_DOWN = $localize`Marked Down`; | |
272 | this.MARKED_IN = $localize`Marked In`; | |
273 | this.MARKED_LOST = $localize`Marked Lost`; | |
274 | this.MARKED_OUT = $localize`Marked Out`; | |
275 | this.PROTECTED = $localize`Protected`; | |
276 | this.PURGED = $localize`Purged`; | |
277 | this.RENAMED = $localize`Renamed`; | |
278 | this.RESTORED = $localize`Restored`; | |
279 | this.REWEIGHTED = $localize`Reweighted`; | |
280 | this.ROLLED_BACK = $localize`Rolled back`; | |
281 | this.SCRUBBED = $localize`Scrubbed`; | |
282 | this.SHOWED = $localize`Showed`; | |
283 | this.TRASHED = $localize`Moved to Trash`; | |
284 | this.UNPROTECTED = $localize`Unprotected`; | |
285 | this.CHANGE = $localize`Change`; | |
494da23a TL |
286 | |
287 | /* Prometheus wording */ | |
f67539c2 TL |
288 | this.RECREATED = $localize`Recreated`; |
289 | this.EXPIRED = $localize`Expired`; | |
20effc67 TL |
290 | |
291 | this.START = $localize`Start`; | |
292 | this.STOP = $localize`Stop`; | |
293 | this.REDEPLOY = $localize`Redeploy`; | |
294 | this.RESTART = $localize`Restart`; | |
11fdf7f2 TL |
295 | } |
296 | } |