1 import { Injectable } from '@angular/core';
3 import { I18n } from '@ngx-translate/i18n-polyfill';
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).';
11 export enum URLVerbs {
12 /* Create a new item */
15 /* Make changes to an existing item */
18 /* Make changes to an existing item */
21 /* Remove an item from a container WITHOUT deleting it */
24 /* Destroy an existing item */
27 /* Add an existing item to a container */
30 /* Non-standard verbs */
34 /* Prometheus wording */
35 RECREATE = 'recreate',
39 export enum ActionLabels {
40 /* Create a new item */
43 /* Destroy an existing item */
46 /* Add an existing item to a container */
49 /* Remove an item from a container WITHOUT deleting it */
52 /* Make changes to an existing item */
58 /* Non-standard actions */
67 /* Prometheus wording */
68 RECREATE = 'Recreate',
75 export class ActionLabelsI18n {
76 /* This service is required as the i18n polyfill does not provide static
112 constructor(private i18n: I18n) {
113 /* Create a new item */
114 this.CREATE = this.i18n('Create');
116 /* Destroy an existing item */
117 this.DELETE = this.i18n('Delete');
119 /* Add an existing item to a container */
120 this.ADD = this.i18n('Add');
121 this.SET = this.i18n('Set');
123 /* Remove an item from a container WITHOUT deleting it */
124 this.REMOVE = this.i18n('Remove');
125 this.UNSET = this.i18n('Unset');
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');
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');
155 /* Prometheus wording */
156 this.RECREATE = this.i18n('Recreate');
157 this.EXPIRE = this.i18n('Expire');
164 export class SucceededActionLabelsI18n {
165 /* This service is required as the i18n polyfill does not provide static
176 DEEP_SCRUBBED: string;
197 constructor(private i18n: I18n) {
198 /* Create a new item */
199 this.CREATED = this.i18n('Created');
201 /* Destroy an existing item */
202 this.DELETED = this.i18n('Deleted');
204 /* Add an existing item to a container */
205 this.ADDED = this.i18n('Added');
207 /* Remove an item from a container WITHOUT deleting it */
208 this.REMOVED = this.i18n('Removed');
210 /* Make changes to an existing item */
211 this.EDITED = this.i18n('Edited');
212 this.CANCELED = this.i18n('Canceled');
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');
236 /* Prometheus wording */
237 this.RECREATED = this.i18n('Recreated');
238 this.EXPIRED = this.i18n('Expired');