]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/constants/app.constants.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / constants / app.constants.ts
1 import { Injectable } from '@angular/core';
2
3 import { I18n } from '@ngx-translate/i18n-polyfill';
4
5 export class AppConstants {
6 public static readonly organization = 'ceph';
7 public static readonly projectName = 'Ceph Dashboard';
8 public static readonly license = 'Free software (LGPL 2.1).';
9 }
10
11 export enum URLVerbs {
12 /* Create a new item */
13 CREATE = 'create',
14
15 /* Make changes to an existing item */
16 EDIT = 'edit',
17
18 /* Make changes to an existing item */
19 UPDATE = 'update',
20
21 /* Remove an item from a container WITHOUT deleting it */
22 REMOVE = 'remove',
23
24 /* Destroy an existing item */
25 DELETE = 'delete',
26
27 /* Add an existing item to a container */
28 ADD = 'add',
29
30 /* Non-standard verbs */
31 COPY = 'copy',
32 CLONE = 'clone',
33
34 /* Prometheus wording */
35 RECREATE = 'recreate',
36 EXPIRE = 'expire'
37 }
38
39 export enum ActionLabels {
40 /* Create a new item */
41 CREATE = 'Create',
42
43 /* Destroy an existing item */
44 DELETE = 'Delete',
45
46 /* Add an existing item to a container */
47 ADD = 'Add',
48
49 /* Remove an item from a container WITHOUT deleting it */
50 REMOVE = 'Remove',
51
52 /* Make changes to an existing item */
53 EDIT = 'Edit',
54
55 /* */
56 CANCEL = 'Cancel',
57
58 /* Non-standard actions */
59 COPY = 'Copy',
60 CLONE = 'Clone',
61 UPDATE = 'Update',
62 EVICT = 'Evict',
63
64 /* Read-only */
65 SHOW = 'Show',
66
67 /* Prometheus wording */
68 RECREATE = 'Recreate',
69 EXPIRE = 'Expire'
70 }
71
72 @Injectable({
73 providedIn: 'root'
74 })
75 export class ActionLabelsI18n {
76 /* This service is required as the i18n polyfill does not provide static
77 translation
78 */
79 CREATE: string;
80 DELETE: string;
81 ADD: string;
82 REMOVE: string;
83 EDIT: string;
84 CANCEL: string;
85 CHANGE: string;
86 COPY: string;
87 CLONE: string;
88 DEEP_SCRUB: string;
89 DESTROY: string;
90 EVICT: string;
91 EXPIRE: string;
92 FLATTEN: string;
93 MARK_DOWN: string;
94 MARK_IN: string;
95 MARK_LOST: string;
96 MARK_OUT: string;
97 PROTECT: string;
98 PURGE: string;
99 RECREATE: string;
100 RENAME: string;
101 RESTORE: string;
102 REWEIGHT: string;
103 ROLLBACK: string;
104 SCRUB: string;
105 SET: string;
106 SHOW: string;
107 TRASH: string;
108 UNPROTECT: string;
109 UNSET: string;
110 UPDATE: string;
111
112 constructor(private i18n: I18n) {
113 /* Create a new item */
114 this.CREATE = this.i18n('Create');
115
116 /* Destroy an existing item */
117 this.DELETE = this.i18n('Delete');
118
119 /* Add an existing item to a container */
120 this.ADD = this.i18n('Add');
121 this.SET = this.i18n('Set');
122
123 /* Remove an item from a container WITHOUT deleting it */
124 this.REMOVE = this.i18n('Remove');
125 this.UNSET = this.i18n('Unset');
126
127 /* Make changes to an existing item */
128 this.EDIT = this.i18n('Edit');
129 this.UPDATE = this.i18n('Update');
130 this.CANCEL = this.i18n('Cancel');
131
132 /* Non-standard actions */
133 this.CLONE = this.i18n('Clone');
134 this.COPY = this.i18n('Copy');
135 this.DEEP_SCRUB = this.i18n('Deep Scrub');
136 this.DESTROY = this.i18n('Destroy');
137 this.EVICT = this.i18n('Evict');
138 this.FLATTEN = this.i18n('Flatten');
139 this.MARK_DOWN = this.i18n('Mark Down');
140 this.MARK_IN = this.i18n('Mark In');
141 this.MARK_LOST = this.i18n('Mark Lost');
142 this.MARK_OUT = this.i18n('Mark Out');
143 this.PROTECT = this.i18n('Protect');
144 this.PURGE = this.i18n('Purge');
145 this.RENAME = this.i18n('Rename');
146 this.RESTORE = this.i18n('Restore');
147 this.REWEIGHT = this.i18n('Reweight');
148 this.ROLLBACK = this.i18n('Rollback');
149 this.SCRUB = this.i18n('Scrub');
150 this.SHOW = this.i18n('Show');
151 this.TRASH = this.i18n('Move to Trash');
152 this.UNPROTECT = this.i18n('Unprotect');
153 this.CHANGE = this.i18n('Change');
154
155 /* Prometheus wording */
156 this.RECREATE = this.i18n('Recreate');
157 this.EXPIRE = this.i18n('Expire');
158 }
159 }
160
161 @Injectable({
162 providedIn: 'root'
163 })
164 export class SucceededActionLabelsI18n {
165 /* This service is required as the i18n polyfill does not provide static
166 translation
167 */
168 CREATED: string;
169 DELETED: string;
170 ADDED: string;
171 REMOVED: string;
172 EDITED: string;
173 CANCELED: string;
174 COPIED: string;
175 CLONED: string;
176 DEEP_SCRUBBED: string;
177 DESTROYED: string;
178 FLATTENED: string;
179 MARKED_DOWN: string;
180 MARKED_IN: string;
181 MARKED_LOST: string;
182 MARKED_OUT: string;
183 PROTECTED: string;
184 PURGED: string;
185 RENAMED: string;
186 RESTORED: string;
187 REWEIGHTED: string;
188 ROLLED_BACK: string;
189 SCRUBBED: string;
190 SHOWED: string;
191 TRASHED: string;
192 UNPROTECTED: string;
193 CHANGE: string;
194 RECREATED: string;
195 EXPIRED: string;
196
197 constructor(private i18n: I18n) {
198 /* Create a new item */
199 this.CREATED = this.i18n('Created');
200
201 /* Destroy an existing item */
202 this.DELETED = this.i18n('Deleted');
203
204 /* Add an existing item to a container */
205 this.ADDED = this.i18n('Added');
206
207 /* Remove an item from a container WITHOUT deleting it */
208 this.REMOVED = this.i18n('Removed');
209
210 /* Make changes to an existing item */
211 this.EDITED = this.i18n('Edited');
212 this.CANCELED = this.i18n('Canceled');
213
214 /* Non-standard actions */
215 this.CLONED = this.i18n('Cloned');
216 this.COPIED = this.i18n('Copied');
217 this.DEEP_SCRUBBED = this.i18n('Deep Scrubbed');
218 this.DESTROYED = this.i18n('Destroyed');
219 this.FLATTENED = this.i18n('Flattened');
220 this.MARKED_DOWN = this.i18n('Marked Down');
221 this.MARKED_IN = this.i18n('Marked In');
222 this.MARKED_LOST = this.i18n('Marked Lost');
223 this.MARKED_OUT = this.i18n('Marked Out');
224 this.PROTECTED = this.i18n('Protected');
225 this.PURGED = this.i18n('Purged');
226 this.RENAMED = this.i18n('Renamed');
227 this.RESTORED = this.i18n('Restored');
228 this.REWEIGHTED = this.i18n('Reweighted');
229 this.ROLLED_BACK = this.i18n('Rolled back');
230 this.SCRUBBED = this.i18n('Scrubbed');
231 this.SHOWED = this.i18n('Showed');
232 this.TRASHED = this.i18n('Moved to Trash');
233 this.UNPROTECTED = this.i18n('Unprotected');
234 this.CHANGE = this.i18n('Change');
235
236 /* Prometheus wording */
237 this.RECREATED = this.i18n('Recreated');
238 this.EXPIRED = this.i18n('Expired');
239 }
240 }