]>
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; | |
2a845540 TL |
130 | REMOVE_SCHEDULING: string; |
131 | PROMOTE: string; | |
132 | DEMOTE: string; | |
20effc67 TL |
133 | START_DRAIN: string; |
134 | STOP_DRAIN: string; | |
135 | START: string; | |
136 | STOP: string; | |
137 | REDEPLOY: string; | |
138 | RESTART: string; | |
2a845540 | 139 | RESYNC: string; |
aee94f69 TL |
140 | EXPORT: string; |
141 | IMPORT: any; | |
142 | MIGRATE: string; | |
143 | START_UPGRADE: string; | |
11fdf7f2 | 144 | |
f67539c2 | 145 | constructor() { |
11fdf7f2 | 146 | /* Create a new item */ |
f67539c2 | 147 | this.CREATE = $localize`Create`; |
11fdf7f2 | 148 | |
aee94f69 TL |
149 | this.EXPORT = $localize`Export`; |
150 | ||
151 | this.IMPORT = $localize`Import`; | |
152 | ||
153 | this.MIGRATE = $localize`Migrate to Multi-Site`; | |
154 | ||
11fdf7f2 | 155 | /* Destroy an existing item */ |
f67539c2 | 156 | this.DELETE = $localize`Delete`; |
11fdf7f2 TL |
157 | |
158 | /* Add an existing item to a container */ | |
f67539c2 TL |
159 | this.ADD = $localize`Add`; |
160 | this.SET = $localize`Set`; | |
161 | this.SUBMIT = $localize`Submit`; | |
11fdf7f2 TL |
162 | |
163 | /* Remove an item from a container WITHOUT deleting it */ | |
f67539c2 TL |
164 | this.REMOVE = $localize`Remove`; |
165 | this.UNSET = $localize`Unset`; | |
11fdf7f2 TL |
166 | |
167 | /* Make changes to an existing item */ | |
f67539c2 TL |
168 | this.EDIT = $localize`Edit`; |
169 | this.UPDATE = $localize`Update`; | |
170 | this.CANCEL = $localize`Cancel`; | |
171 | this.PREVIEW = $localize`Preview`; | |
172 | this.MOVE = $localize`Move`; | |
173 | ||
174 | /* Wizard wording */ | |
175 | this.NEXT = $localize`Next`; | |
176 | this.BACK = $localize`Back`; | |
11fdf7f2 TL |
177 | |
178 | /* Non-standard actions */ | |
f67539c2 TL |
179 | this.CLONE = $localize`Clone`; |
180 | this.COPY = $localize`Copy`; | |
181 | this.DEEP_SCRUB = $localize`Deep Scrub`; | |
182 | this.DESTROY = $localize`Destroy`; | |
183 | this.EVICT = $localize`Evict`; | |
184 | this.FLATTEN = $localize`Flatten`; | |
185 | this.MARK_DOWN = $localize`Mark Down`; | |
186 | this.MARK_IN = $localize`Mark In`; | |
187 | this.MARK_LOST = $localize`Mark Lost`; | |
188 | this.MARK_OUT = $localize`Mark Out`; | |
189 | this.PROTECT = $localize`Protect`; | |
190 | this.PURGE = $localize`Purge`; | |
191 | this.RENAME = $localize`Rename`; | |
192 | this.RESTORE = $localize`Restore`; | |
193 | this.REWEIGHT = $localize`Reweight`; | |
194 | this.ROLLBACK = $localize`Rollback`; | |
195 | this.SCRUB = $localize`Scrub`; | |
196 | this.SHOW = $localize`Show`; | |
197 | this.TRASH = $localize`Move to Trash`; | |
198 | this.UNPROTECT = $localize`Unprotect`; | |
199 | this.CHANGE = $localize`Change`; | |
200 | this.FLAGS = $localize`Flags`; | |
201 | this.ENTER_MAINTENANCE = $localize`Enter Maintenance`; | |
202 | this.EXIT_MAINTENANCE = $localize`Exit Maintenance`; | |
2a845540 | 203 | |
20effc67 TL |
204 | this.START_DRAIN = $localize`Start Drain`; |
205 | this.STOP_DRAIN = $localize`Stop Drain`; | |
2a845540 | 206 | this.RESYNC = $localize`Resync`; |
494da23a | 207 | /* Prometheus wording */ |
f67539c2 TL |
208 | this.RECREATE = $localize`Recreate`; |
209 | this.EXPIRE = $localize`Expire`; | |
20effc67 TL |
210 | |
211 | this.START = $localize`Start`; | |
212 | this.STOP = $localize`Stop`; | |
213 | this.REDEPLOY = $localize`Redeploy`; | |
214 | this.RESTART = $localize`Restart`; | |
2a845540 TL |
215 | |
216 | this.REMOVE_SCHEDULING = $localize`Remove Scheduling`; | |
217 | this.PROMOTE = $localize`Promote`; | |
218 | this.DEMOTE = $localize`Demote`; | |
aee94f69 TL |
219 | |
220 | this.START_UPGRADE = $localize`Start Upgrade`; | |
494da23a TL |
221 | } |
222 | } | |
223 | ||
224 | @Injectable({ | |
225 | providedIn: 'root' | |
226 | }) | |
227 | export class SucceededActionLabelsI18n { | |
228 | /* This service is required as the i18n polyfill does not provide static | |
229 | translation | |
230 | */ | |
231 | CREATED: string; | |
232 | DELETED: string; | |
233 | ADDED: string; | |
234 | REMOVED: string; | |
235 | EDITED: string; | |
236 | CANCELED: string; | |
f67539c2 TL |
237 | PREVIEWED: string; |
238 | MOVED: string; | |
aee94f69 TL |
239 | EXPORT: string; |
240 | IMPORT: string; | |
494da23a TL |
241 | COPIED: string; |
242 | CLONED: string; | |
9f95a23c TL |
243 | DEEP_SCRUBBED: string; |
244 | DESTROYED: string; | |
245 | FLATTENED: string; | |
246 | MARKED_DOWN: string; | |
247 | MARKED_IN: string; | |
248 | MARKED_LOST: string; | |
249 | MARKED_OUT: string; | |
250 | PROTECTED: string; | |
251 | PURGED: string; | |
252 | RENAMED: string; | |
253 | RESTORED: string; | |
254 | REWEIGHTED: string; | |
255 | ROLLED_BACK: string; | |
256 | SCRUBBED: string; | |
494da23a TL |
257 | SHOWED: string; |
258 | TRASHED: string; | |
259 | UNPROTECTED: string; | |
9f95a23c | 260 | CHANGE: string; |
494da23a TL |
261 | RECREATED: string; |
262 | EXPIRED: string; | |
20effc67 TL |
263 | MOVE: string; |
264 | START: string; | |
265 | STOP: string; | |
266 | REDEPLOY: string; | |
267 | RESTART: string; | |
494da23a | 268 | |
f67539c2 | 269 | constructor() { |
494da23a | 270 | /* Create a new item */ |
f67539c2 | 271 | this.CREATED = $localize`Created`; |
494da23a TL |
272 | |
273 | /* Destroy an existing item */ | |
f67539c2 | 274 | this.DELETED = $localize`Deleted`; |
494da23a TL |
275 | |
276 | /* Add an existing item to a container */ | |
f67539c2 | 277 | this.ADDED = $localize`Added`; |
494da23a TL |
278 | |
279 | /* Remove an item from a container WITHOUT deleting it */ | |
f67539c2 | 280 | this.REMOVED = $localize`Removed`; |
494da23a TL |
281 | |
282 | /* Make changes to an existing item */ | |
f67539c2 TL |
283 | this.EDITED = $localize`Edited`; |
284 | this.CANCELED = $localize`Canceled`; | |
285 | this.PREVIEWED = $localize`Previewed`; | |
286 | this.MOVED = $localize`Moved`; | |
494da23a TL |
287 | |
288 | /* Non-standard actions */ | |
f67539c2 TL |
289 | this.CLONED = $localize`Cloned`; |
290 | this.COPIED = $localize`Copied`; | |
291 | this.DEEP_SCRUBBED = $localize`Deep Scrubbed`; | |
292 | this.DESTROYED = $localize`Destroyed`; | |
293 | this.FLATTENED = $localize`Flattened`; | |
294 | this.MARKED_DOWN = $localize`Marked Down`; | |
295 | this.MARKED_IN = $localize`Marked In`; | |
296 | this.MARKED_LOST = $localize`Marked Lost`; | |
297 | this.MARKED_OUT = $localize`Marked Out`; | |
298 | this.PROTECTED = $localize`Protected`; | |
299 | this.PURGED = $localize`Purged`; | |
300 | this.RENAMED = $localize`Renamed`; | |
301 | this.RESTORED = $localize`Restored`; | |
302 | this.REWEIGHTED = $localize`Reweighted`; | |
303 | this.ROLLED_BACK = $localize`Rolled back`; | |
304 | this.SCRUBBED = $localize`Scrubbed`; | |
305 | this.SHOWED = $localize`Showed`; | |
306 | this.TRASHED = $localize`Moved to Trash`; | |
307 | this.UNPROTECTED = $localize`Unprotected`; | |
308 | this.CHANGE = $localize`Change`; | |
494da23a TL |
309 | |
310 | /* Prometheus wording */ | |
f67539c2 TL |
311 | this.RECREATED = $localize`Recreated`; |
312 | this.EXPIRED = $localize`Expired`; | |
20effc67 TL |
313 | |
314 | this.START = $localize`Start`; | |
315 | this.STOP = $localize`Stop`; | |
316 | this.REDEPLOY = $localize`Redeploy`; | |
317 | this.RESTART = $localize`Restart`; | |
11fdf7f2 TL |
318 | } |
319 | } | |
aee94f69 TL |
320 | |
321 | @Injectable({ | |
322 | providedIn: 'root' | |
323 | }) | |
324 | export class TimerServiceInterval { | |
325 | TIMER_SERVICE_PERIOD: number; | |
326 | ||
327 | constructor() { | |
328 | this.TIMER_SERVICE_PERIOD = 5000; | |
329 | } | |
330 | } |