"node_modules/ngx-toastr/toastr.css",
"src/styles.scss"
],
- "scripts": [
- "node_modules/chart.js/dist/Chart.bundle.js"
- ],
+ "scripts": ["node_modules/chart.js/dist/Chart.bundle.js"],
"stylePreprocessorOptions": {
"includePaths": [
"src"
module.exports = {
packages: {
'simplebar-angular': {
- ignorableDeepImportMatchers: [
- /simplebar-core\.esm/,
- ]
+ ignorableDeepImportMatchers: [/simplebar-core\.esm/]
},
- },
+ '@locl/cli': {
+ ignorableDeepImportMatchers: [/@angular\/localize/]
+ }
+ }
};
}
},
"@babel/compat-data": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.4.tgz",
- "integrity": "sha512-t+rjExOrSVvjQQXNp5zAIYDp00KjdvGl/TpDX5REPr0S9IAIPQMTilcfG6q8c0QFmj9lSTVySV2VTsyggvtNIw==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.5.tgz",
+ "integrity": "sha512-mPVoWNzIpYJHbWje0if7Ck36bpbtTvIxOi9+6WSK9wjGEXearAqlwBoTQvVjsAY2VIwgcs8V940geY3okzRCEw==",
"dev": true,
"requires": {
"browserslist": "^4.12.0",
}
},
"@babel/generator": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.4.tgz",
- "integrity": "sha512-toLIHUIAgcQygFZRAQcsLQV3CBuX6yOIru1kJk/qqqvcRmZrYe6WavZTSG+bB8MxhnL9YPf+pKQfuiP161q7ng==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz",
+ "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==",
"requires": {
- "@babel/types": "^7.10.4",
+ "@babel/types": "^7.10.5",
"jsesc": "^2.5.1",
- "lodash": "4.17.19",
"source-map": "^0.5.0"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.19"
- }
}
},
"@babel/helper-annotate-as-pure": {
}
},
"@babel/helper-define-map": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.4.tgz",
- "integrity": "sha512-nIij0oKErfCnLUCWaCaHW0Bmtl2RO9cN7+u2QT8yqTywgALKlyUVOvHDElh+b5DwVC6YB1FOYFOTWcN/+41EDA==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz",
+ "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==",
"dev": true,
"requires": {
"@babel/helper-function-name": "^7.10.4",
- "@babel/types": "^7.10.4",
+ "@babel/types": "^7.10.5",
"lodash": "4.17.19"
},
"dependencies": {
}
},
"@babel/helper-member-expression-to-functions": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.4.tgz",
- "integrity": "sha512-m5j85pK/KZhuSdM/8cHUABQTAslV47OjfIB9Cc7P+PvlAoBzdb79BGNfw8RhT5Mq3p+xGd0ZfAKixbrUZx0C7A==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz",
+ "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==",
"dev": true,
"requires": {
- "@babel/types": "^7.10.4"
+ "@babel/types": "^7.10.5"
}
},
"@babel/helper-module-imports": {
}
},
"@babel/helper-module-transforms": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.4.tgz",
- "integrity": "sha512-Er2FQX0oa3nV7eM1o0tNCTx7izmQtwAQsIiaLRWtavAAEcskb0XJ5OjJbVrYXWOTr8om921Scabn4/tzlx7j1Q==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz",
+ "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.10.4",
"@babel/helper-simple-access": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.10.4",
"@babel/template": "^7.10.4",
- "@babel/types": "^7.10.4",
+ "@babel/types": "^7.10.5",
"lodash": "4.17.19"
},
"dependencies": {
"dev": true
},
"@babel/helper-regex": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.4.tgz",
- "integrity": "sha512-inWpnHGgtg5NOF0eyHlC0/74/VkdRITY9dtTpB2PrxKKn+AkVMRiZz/Adrx+Ssg+MLDesi2zohBW6MVq6b4pOQ==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz",
+ "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==",
"dev": true,
"requires": {
"lodash": "4.17.19"
}
},
"@babel/parser": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.4.tgz",
- "integrity": "sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA=="
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz",
+ "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ=="
},
"@babel/plugin-proposal-async-generator-functions": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.4.tgz",
- "integrity": "sha512-MJbxGSmejEFVOANAezdO39SObkURO5o/8b6fSH6D1pi9RZQt+ldppKPXfqgUWpSQ9asM6xaSaSJIaeWMDRP0Zg==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz",
+ "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.10.4",
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.4.tgz",
- "integrity": "sha512-J3b5CluMg3hPUii2onJDRiaVbPtKFPLEaV5dOPY5OeAbDi1iU/UbbFFTgwb7WnanaDy7bjU35kc26W3eM5Qa0A==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.5.tgz",
+ "integrity": "sha512-6Ycw3hjpQti0qssQcA6AMSFDHeNJ++R6dIMnpRqUjFeBBTmTDPa8zgF90OVfTvAo11mXZTlVUViY1g8ffrURLg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "lodash": "4.17.19"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.19"
- }
+ "@babel/helper-plugin-utils": "^7.10.4"
}
},
"@babel/plugin-transform-classes": {
}
},
"@babel/plugin-transform-modules-amd": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.4.tgz",
- "integrity": "sha512-3Fw+H3WLUrTlzi3zMiZWp3AR4xadAEMv6XRCYnd5jAlLM61Rn+CRJaZMaNvIpcJpQ3vs1kyifYvEVPFfoSkKOA==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz",
+ "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.10.4",
+ "@babel/helper-module-transforms": "^7.10.5",
"@babel/helper-plugin-utils": "^7.10.4",
"babel-plugin-dynamic-import-node": "^2.3.3"
}
}
},
"@babel/plugin-transform-modules-systemjs": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.4.tgz",
- "integrity": "sha512-Tb28LlfxrTiOTGtZFsvkjpyjCl9IoaRI52AEU/VIwOwvDQWtbNJsAqTXzh+5R7i74e/OZHH2c2w2fsOqAfnQYQ==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz",
+ "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==",
"dev": true,
"requires": {
"@babel/helper-hoist-variables": "^7.10.4",
- "@babel/helper-module-transforms": "^7.10.4",
+ "@babel/helper-module-transforms": "^7.10.5",
"@babel/helper-plugin-utils": "^7.10.4",
"babel-plugin-dynamic-import-node": "^2.3.3"
}
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.4.tgz",
- "integrity": "sha512-RurVtZ/D5nYfEg0iVERXYKEgDFeesHrHfx8RT05Sq57ucj2eOYAP6eu5fynL4Adju4I/mP/I6SO0DqNWAXjfLQ==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz",
+ "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.10.4",
}
},
"@babel/plugin-transform-template-literals": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.4.tgz",
- "integrity": "sha512-4NErciJkAYe+xI5cqfS8pV/0ntlY5N5Ske/4ImxAVX7mk9Rxt2bwDTGv1Msc2BRJvWQcmYEC+yoMLdX22aE4VQ==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz",
+ "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.10.4",
}
},
"@babel/runtime": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz",
- "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz",
+ "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@babel/traverse": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.4.tgz",
- "integrity": "sha512-aSy7p5THgSYm4YyxNGz6jZpXf+Ok40QF3aA2LyIONkDHpAcJzDUqlCKXv6peqYUs2gmic849C/t2HKw2a2K20Q==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz",
+ "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==",
"requires": {
"@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.10.4",
+ "@babel/generator": "^7.10.5",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.10.4",
- "@babel/parser": "^7.10.4",
- "@babel/types": "^7.10.4",
+ "@babel/parser": "^7.10.5",
+ "@babel/types": "^7.10.5",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "4.17.19"
}
},
"@babel/types": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz",
- "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz",
+ "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==",
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"lodash": "4.17.19",
}
}
},
- "@mrmlnc/readdir-enhanced": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
- "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
- "dev": true,
- "requires": {
- "call-me-maybe": "^1.0.1",
- "glob-to-regexp": "^0.3.0"
- }
- },
- "@ng-bootstrap/ng-bootstrap": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-6.1.0.tgz",
- "integrity": "sha512-2GzkNJBKdeHkaUqaCAqSILPft0IzzHjMfAlAuGY6/ZLlVQ0glt5MTbIXtIhSbjR+OvlrljoXFLrvzs1LGdmE+A=="
- },
- "@ngtools/webpack": {
- "version": "9.1.7",
- "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-9.1.7.tgz",
- "integrity": "sha512-A7VB2I42Kn+7jl0tDKzGNLAoZLWSqkKo9Hg1bmKpvAAIz+DSbq3uV+JWgGgTprM3tn0lfkVgmqk4H17HKwAOcg==",
+ "@locl/cli": {
+ "version": "0.0.1-beta.9",
+ "resolved": "https://registry.npmjs.org/@locl/cli/-/cli-0.0.1-beta.9.tgz",
+ "integrity": "sha512-sTYl4q585AftySMct/qNF4i3bTsnVxAN6g1STOUinpfx84s4JYWW9WL0sgl0bdM4sL7+AjxlYg21RxCDc6JUkg==",
"dev": true,
"requires": {
- "@angular-devkit/core": "9.1.7",
- "enhanced-resolve": "4.1.1",
- "rxjs": "6.5.4",
- "webpack-sources": "1.4.3"
+ "@babel/core": "^7.8.6",
+ "chalk": "^3.0.0",
+ "find-up": "^4.1.0",
+ "glob": "^7.1.2",
+ "yargs": "^13.1.0"
},
"dependencies": {
- "rxjs": {
- "version": "6.5.4",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
- "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
+ "@babel/core": {
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz",
+ "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==",
"dev": true,
"requires": {
- "tslib": "^1.9.0"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.10.5",
+ "@babel/helper-module-transforms": "^7.10.5",
+ "@babel/helpers": "^7.10.4",
+ "@babel/parser": "^7.10.5",
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.10.5",
+ "@babel/types": "^7.10.5",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.1",
+ "json5": "^2.1.2",
+ "lodash": "4.17.19",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.19"
+ }
}
- }
- }
- },
- "@ngx-translate/i18n-polyfill": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@ngx-translate/i18n-polyfill/-/i18n-polyfill-1.0.0.tgz",
- "integrity": "sha512-+UKmSr6cWBJiMDex6w2FwVjEeVnlEsINDGYvTgRaFRI3/IKZrsSVcfISDcBX2wWr6m4jumfOyCcimIl2TxcaoA==",
- "requires": {
- "glob": "7.1.2",
- "tslib": "^1.9.0",
- "yargs": "10.0.3"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
- "camelcase": {
+ "ansi-regex": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
},
- "cliui": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
- "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
"requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wrap-ansi": "^2.0.0"
- },
- "dependencies": {
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- }
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
}
},
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
"requires": {
- "locate-path": "^2.0.0"
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
}
},
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "cliui": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+ "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+ "dev": true,
"requires": {
- "number-is-nan": "^1.0.0"
+ "string-width": "^3.1.0",
+ "strip-ansi": "^5.2.0",
+ "wrap-ansi": "^5.1.0"
}
},
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
"requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
+ "color-name": "~1.1.4"
}
},
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "dev": true,
"requires": {
- "p-try": "^1.0.0"
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
}
},
"p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "dev": true,
"requires": {
- "p-limit": "^1.1.0"
+ "p-limit": "^2.0.0"
}
},
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
- },
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
- },
- "require-main-filename": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
},
"string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
"requires": {
+ "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
- },
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- }
+ "strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
"requires": {
- "ansi-regex": "^2.0.0"
+ "ansi-regex": "^4.1.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
}
},
"wrap-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
- "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
+ "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+ "dev": true,
"requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
+ "ansi-styles": "^3.2.0",
+ "string-width": "^3.0.0",
+ "strip-ansi": "^5.0.0"
},
"dependencies": {
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
"requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
+ "color-convert": "^1.9.0"
}
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
}
}
},
- "y18n": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
- },
"yargs": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.0.3.tgz",
- "integrity": "sha512-DqBpQ8NAUX4GyPP/ijDGHsJya4tYqLQrjPr95HNsr1YwL3+daCfvBwg7+gIC6IdJhR2kATh3hb61vjzMWEtjdw==",
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+ "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
+ "dev": true,
"requires": {
- "cliui": "^3.2.0",
- "decamelize": "^1.1.1",
- "find-up": "^2.1.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^2.0.0",
+ "cliui": "^5.0.0",
+ "find-up": "^3.0.0",
+ "get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
+ "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
+ "string-width": "^3.0.0",
"which-module": "^2.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^8.0.0"
+ "y18n": "^4.0.0",
+ "yargs-parser": "^13.1.2"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
+ }
}
},
"yargs-parser": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz",
- "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==",
+ "version": "13.1.2",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+ "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+ "dev": true,
"requires": {
- "camelcase": "^4.1.0"
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
+ }
+ }
+ },
+ "@mrmlnc/readdir-enhanced": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
+ "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
+ "dev": true,
+ "requires": {
+ "call-me-maybe": "^1.0.1",
+ "glob-to-regexp": "^0.3.0"
+ }
+ },
+ "@ng-bootstrap/ng-bootstrap": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-6.1.0.tgz",
+ "integrity": "sha512-2GzkNJBKdeHkaUqaCAqSILPft0IzzHjMfAlAuGY6/ZLlVQ0glt5MTbIXtIhSbjR+OvlrljoXFLrvzs1LGdmE+A=="
+ },
+ "@ngtools/webpack": {
+ "version": "9.1.7",
+ "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-9.1.7.tgz",
+ "integrity": "sha512-A7VB2I42Kn+7jl0tDKzGNLAoZLWSqkKo9Hg1bmKpvAAIz+DSbq3uV+JWgGgTprM3tn0lfkVgmqk4H17HKwAOcg==",
+ "dev": true,
+ "requires": {
+ "@angular-devkit/core": "9.1.7",
+ "enhanced-resolve": "4.1.1",
+ "rxjs": "6.5.4",
+ "webpack-sources": "1.4.3"
+ },
+ "dependencies": {
+ "rxjs": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
+ "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
}
}
}
},
"dependencies": {
"@babel/core": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.4.tgz",
- "integrity": "sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz",
+ "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.10.4",
- "@babel/helper-module-transforms": "^7.10.4",
+ "@babel/generator": "^7.10.5",
+ "@babel/helper-module-transforms": "^7.10.5",
"@babel/helpers": "^7.10.4",
- "@babel/parser": "^7.10.4",
+ "@babel/parser": "^7.10.5",
"@babel/template": "^7.10.4",
- "@babel/traverse": "^7.10.4",
- "@babel/types": "^7.10.4",
+ "@babel/traverse": "^7.10.5",
+ "@babel/types": "^7.10.5",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
}
},
"@types/chart.js": {
- "version": "2.9.22",
- "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.22.tgz",
- "integrity": "sha512-CneMxwh2T5fyMpXE5fuprTTmFtlLyZUFq1A3laUrCgOblDzupgiohrFg3jjsTIrqRI5K4qLZdrLN4zT9/MY5Dw==",
+ "version": "2.9.23",
+ "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.23.tgz",
+ "integrity": "sha512-4QQNE/b+digosu3mnj4E7aNQGKnlpzXa9JvQYPtexpO7v9gnDeqwc1DxF8vLJWLDCNoO6hH0EgO8K/7PtJl8wg==",
"requires": {
"moment": "^2.10.2"
}
"path-is-absolute": "^1.0.0"
}
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"requires": {
"glob": "^7.1.3"
}
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true
}
}
},
}
},
"caniuse-lite": {
- "version": "1.0.30001099",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001099.tgz",
- "integrity": "sha512-sdS9A+sQTk7wKoeuZBN/YMAHVztUfVnjDi4/UV3sDE8xoh7YR12hKW+pIdB3oqKGwr9XaFL2ovfzt9w8eUI5CA==",
+ "version": "1.0.30001100",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001100.tgz",
+ "integrity": "sha512-0eYdp1+wFCnMlCj2oudciuQn2B9xAFq3WpgpcBIZTxk/1HNA/O2YA7rpeYhnOqsqAJq1AHUgx6i1jtafg7m2zA==",
"dev": true
},
"canonical-path": {
}
},
"chokidar": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
- "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.1.tgz",
+ "integrity": "sha512-TQTJyr2stihpC4Sya9hs2Xh+O2wf+igjL36Y75xx2WdHuiICcn/XJza46Jwt0eT5hVpQOzo3FpY3cj3RVYLX0g==",
"dev": true,
"requires": {
"anymatch": "~3.1.1",
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "dev": true
},
"codelyzer": {
"version": "5.2.2",
"json5": "^1.0.1"
}
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"requires": {
"figgy-pudding": "^3.5.1"
}
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true
}
}
},
}
},
"cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
"requires": {
- "lru-cache": "^4.0.1",
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
"dev": true
},
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
"fs-extra": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
"universalify": "^0.1.0"
}
},
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
- "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
- "dev": true
- },
- "deepmerge": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
- "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
- "dev": true
- },
- "default-gateway": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz",
- "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==",
- "dev": true,
- "requires": {
- "execa": "^1.0.0",
- "ip-regex": "^2.1.0"
- },
- "dependencies": {
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- }
+ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+ "dev": true
+ },
+ "deepmerge": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
+ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
+ "dev": true
+ },
+ "default-gateway": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz",
+ "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==",
+ "dev": true,
+ "requires": {
+ "execa": "^1.0.0",
+ "ip-regex": "^2.1.0"
}
},
"defaults": {
"dev": true
},
"electron-to-chromium": {
- "version": "1.3.497",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.497.tgz",
- "integrity": "sha512-sPdW5bUDZwiFtoonuZCUwRGzsZmKzcLM0bMVhp6SMCfUG+B3faENLx3cE+o+K0Jl+MPuNA9s9cScyFjOlixZpQ==",
+ "version": "1.3.498",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.498.tgz",
+ "integrity": "sha512-W1hGwaQEU8j9su2jeAr3aabkPuuXw+j8t73eajGAkEJWbfWiwbxBwQN/8Qmv2qCy3uCDm2rOAaZneYQM8VGC4w==",
"dev": true
},
"elegant-spinner": {
}
},
"escalade": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz",
- "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz",
+ "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==",
"dev": true
},
"escape-html": {
"dev": true
},
"execa": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
- "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
+ "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
+ "dev": true,
"requires": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
+ "cross-spawn": "^6.0.0",
+ "get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"dev": true
},
"get-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
+ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
+ "dev": true,
+ "requires": {
+ "pump": "^3.0.0"
+ }
},
"get-value": {
"version": "2.0.6",
"requires": {
"yallist": "^4.0.0"
}
- },
- "yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
}
}
},
"wrap-ansi": "^2.0.0"
}
},
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
"dev": true
},
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
- "invert-kv": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
- "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
- "dev": true
- },
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
- "lcid": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
- "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
- "dev": true,
- "requires": {
- "invert-kv": "^2.0.0"
- }
- },
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"path-exists": "^3.0.0"
}
},
- "mem": {
- "dev": true,
- "requires": {
- "map-age-cleaner": "^0.1.1",
- "mimic-fn": "^2.0.0",
- "p-is-promise": "^2.0.0"
- },
- "version": "4.3.0"
- },
- "mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true
- },
- "os-locale": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
- "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
- "dev": true,
- "requires": {
- "execa": "^1.0.0",
- "lcid": "^2.0.0",
- "mem": "4.3.0"
- },
- "dependencies": {
- "mem": {
- "version": "4.3.0"
- }
- }
- },
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
}
},
"invert-kv": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
+ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
+ "dev": true
},
"ip": {
"version": "1.1.5",
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+ "dev": true
},
"is-svg": {
"version": "3.0.0",
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
},
"isobject": {
"version": "3.0.1",
"dev": true
},
"lcid": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
+ "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
+ "dev": true,
"requires": {
- "invert-kv": "^1.0.0"
+ "invert-kv": "^2.0.0"
}
},
"less": {
"escape-string-regexp": "^1.0.5"
}
},
+ "mimic-fn": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "dev": true
+ },
"onetime": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
+ "mimic-fn": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "dev": true
+ },
"onetime": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
}
},
"lru-cache": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
- "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
"requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
+ "yallist": "^3.0.2"
+ },
+ "dependencies": {
+ "yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "dev": true
+ }
}
},
"lunr": {
"path-is-absolute": "^1.0.0"
}
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"requires": {
"figgy-pudding": "^3.5.1"
}
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true
}
}
},
"dev": true
},
"mem": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
+ "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
+ "dev": true,
"requires": {
- "mimic-fn": "^1.0.0"
- },
- "version": "4.3.0"
+ "map-age-cleaner": "^0.1.1",
+ "mimic-fn": "^2.0.0",
+ "p-is-promise": "^2.0.0"
+ }
},
"memory-fs": {
"version": "0.5.0",
}
},
"mimic-fn": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true
},
"min-indent": {
"version": "1.0.1",
"dev": true,
"requires": {
"yallist": "^4.0.0"
- },
- "dependencies": {
- "yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- }
}
},
"minipass-collect": {
"requires": {
"minipass": "^3.0.0",
"yallist": "^4.0.0"
- },
- "dependencies": {
- "yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- }
}
},
"mississippi": {
}
},
"mri": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz",
- "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==",
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz",
+ "integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==",
"dev": true
},
"ms": {
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"dev": true
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"npm-package-arg": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true
}
}
},
"string.prototype.padend": "^3.0.0"
},
"dependencies": {
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
"read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+ "dev": true,
"requires": {
"path-key": "^2.0.0"
}
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "dev": true
},
"nwsapi": {
"version": "2.2.0",
"dev": true,
"requires": {
"mimic-fn": "^2.1.0"
- },
- "dependencies": {
- "mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true
- }
}
},
"open": {
"dev": true
},
"os-locale": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
- "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
+ "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
+ "dev": true,
"requires": {
- "execa": "^0.7.0",
- "lcid": "^1.0.0",
- "mem": "4.3.0"
- },
- "dependencies": {
- "mem": {
- "version": "4.3.0"
- }
+ "execa": "^1.0.0",
+ "lcid": "^2.0.0",
+ "mem": "^4.0.0"
}
},
"os-name": {
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+ "dev": true
},
"p-is-promise": {
"version": "2.1.0",
"minipass": "^2.6.0"
}
},
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"dev": true
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"minipass": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "dev": true
},
"path-parse": {
"version": "1.0.6",
"event-stream": "=3.3.4"
}
},
- "pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
- },
"psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"normalize-path": "^2.1.1"
}
},
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "dev": true
},
"shell-quote": {
"version": "1.7.2",
"signal-exit": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
- "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
+ "dev": true
},
"simple-swizzle": {
"version": "0.2.2",
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+ "dev": true
},
"strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true
- },
- "yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
}
}
},
"path-is-absolute": "^1.0.0"
}
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"figgy-pudding": "^3.5.1",
"minipass": "^3.1.1"
}
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true
}
}
},
"json5": "^1.0.1"
}
},
- "lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "requires": {
- "yallist": "^3.0.2"
- }
- },
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
"webpack-sources": "^1.4.0",
"worker-farm": "^1.7.0"
}
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true
}
}
},
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
"requires": {
"isexe": "^2.0.0"
}
"dev": true,
"requires": {
"execa": "^1.0.0"
- },
- "dependencies": {
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- }
}
},
"word-wrap": {
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
},
"yaml": {
"version": "1.10.0",
"postbuild:localize": "node cd --res",
"env_build": "node cd --env",
"i18n": "npm run i18n:extract && npm run i18n:push && npm run i18n:pull && npm run i18n:merge",
- "i18n:extract": "ng xi18n --output-path locale --progress=false && ngx-extractor -i 'src/**/*.ts' -f xlf -o src/locale/messages.xlf -l en-US",
+ "i18n:extract": "ng build --localize=false && locl extract -s=dist/*.js -f=xlf -o=src/locale/messages.xlf",
"i18n:push": "npx i18ntool push -c i18n.config.json",
"i18n:pull": "npx i18ntool pull -c i18n.config.json",
"i18n:merge": "npx i18ntool merge -c i18n.config.json",
"@angular/router": "9.1.11",
"@auth0/angular-jwt": "4.2.0",
"@ng-bootstrap/ng-bootstrap": "6.1.0",
- "@ngx-translate/i18n-polyfill": "1.0.0",
"@swimlane/ngx-datatable": "17.0.0",
"@types/file-saver": "2.0.1",
"angular-tree-component": "8.5.6",
"@angular/compiler-cli": "9.1.11",
"@angular/language-service": "9.1.11",
"@compodoc/compodoc": "1.1.11",
+ "@locl/cli": "0.0.1-beta.9",
"@types/jest": "26.0.3",
"@types/lodash": "4.14.157",
"@types/node": "12.12.47",
"typescript": "3.8.3"
},
"resolutions": {
- "mem": "4.3.0",
"fsevents": "2.1.2",
"lodash": "4.17.19"
}
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
-import {
- ErrorHandler,
- LOCALE_ID,
- NgModule,
- TRANSLATIONS,
- TRANSLATIONS_FORMAT
-} from '@angular/core';
+import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { JwtModule } from '@auth0/angular-jwt';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
import { ToastrModule } from 'ngx-toastr';
-import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CephModule } from './ceph/ceph.module';
provide: HTTP_INTERCEPTORS,
useClass: ApiInterceptorService,
multi: true
- },
- {
- provide: TRANSLATIONS,
- useFactory: (locale: string) => {
- locale = locale || environment.default_lang;
- try {
- return require(`raw-loader!locale/messages.${locale}.xlf`).default;
- } catch (error) {
- return [];
- }
- },
- deps: [LOCALE_ID]
- },
- { provide: TRANSLATIONS_FORMAT, useValue: 'xlf' },
- I18n
+ }
],
bootstrap: [AppComponent]
})
import { TreeModel, TreeModule } from 'angular-tree-component';
import * as _ from 'lodash';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { IscsiTargetDetailsComponent } from './iscsi-target-details.component';
configureTestBed({
declarations: [IscsiTargetDetailsComponent],
- imports: [BrowserAnimationsModule, TreeModule.forRoot(), SharedModule],
- providers: [i18nProviders]
+ imports: [BrowserAnimationsModule, TreeModule.forRoot(), SharedModule]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import {
ITreeOptions,
TreeComponent,
};
constructor(
- private i18n: I18n,
private iscsiBackstorePipe: IscsiBackstorePipe,
private booleanTextPipe: BooleanTextPipe
) {}
this.columns = [
{
prop: 'displayName',
- name: this.i18n('Name'),
+ name: $localize`Name`,
flexGrow: 1,
cellTemplate: this.highlightTpl
},
{
prop: 'current',
- name: this.i18n('Current'),
+ name: $localize`Current`,
flexGrow: 1,
cellTemplate: this.highlightTpl
},
{
prop: 'default',
- name: this.i18n('Default'),
+ name: $localize`Default`,
flexGrow: 1,
cellTemplate: this.highlightTpl
}
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders,
- IscsiHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper, IscsiHelper } from '../../../../testing/unit-test-helper';
import { Permission } from '../../../shared/models/permissions';
import { SharedModule } from '../../../shared/shared.module';
import { IscsiTargetDiscoveryModalComponent } from './iscsi-target-discovery-modal.component';
ToastrModule.forRoot(),
RouterTestingModule
],
- providers: [i18nProviders, NgbActiveModal]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { FormControl, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { IscsiService } from '../../../shared/api/iscsi.service';
import { NotificationType } from '../../../shared/enum/notification-type.enum';
private authStorageService: AuthStorageService,
public activeModal: NgbActiveModal,
private iscsiService: IscsiService,
- private notificationService: NotificationService,
- private i18n: I18n
+ private notificationService: NotificationService
) {
this.permission = this.authStorageService.getPermissions().iscsi;
}
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n('Updated discovery authentication')
+ $localize`Updated discovery authentication`
);
this.activeModal.close();
},
import { ToastrModule } from 'ngx-toastr';
import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders,
- IscsiHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper, IscsiHelper } from '../../../../testing/unit-test-helper';
import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
import { CdFormGroup } from '../../../shared/forms/cd-form-group';
import { SharedModule } from '../../../shared/shared.module';
ToastrModule.forRoot()
],
providers: [
- i18nProviders,
{
provide: ActivatedRoute,
useValue: new ActivatedRouteStub({ target_iqn: undefined })
import { ActivatedRoute, Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin } from 'rxjs';
imagesSettings: any = {};
messages = {
- portals: new SelectMessages(
- { noOptions: this.i18n('There are no portals available.') },
- this.i18n
- ),
- images: new SelectMessages(
- { noOptions: this.i18n('There are no images available.') },
- this.i18n
- ),
- initiatorImage: new SelectMessages(
- {
- noOptions: this.i18n(
- 'There are no images available. Please make sure you add an image to the target.'
- )
- },
- this.i18n
- ),
- groupInitiator: new SelectMessages(
- {
- noOptions: this.i18n(
- 'There are no initiators available. Please make sure you add an initiator to the target.'
- )
- },
- this.i18n
- )
+ portals: new SelectMessages({ noOptions: $localize`There are no portals available.` }),
+ images: new SelectMessages({ noOptions: $localize`There are no images available.` }),
+ initiatorImage: new SelectMessages({
+ noOptions: $localize`There are no images available. Please make sure you add an image to the target.`
+ }),
+ groupInitiator: new SelectMessages({
+ noOptions: $localize`There are no initiators available. Please make sure you add an initiator to the target.`
+ })
};
IQN_REGEX = /^iqn\.(19|20)\d\d-(0[1-9]|1[0-2])\.\D{2,3}(\.[A-Za-z0-9-]+)+(:[A-Za-z0-9-\.]+)*$/;
private rbdService: RbdService,
private router: Router,
private route: ActivatedRoute,
- private i18n: I18n,
private taskWrapper: TaskWrapperService,
public actionLabels: ActionLabelsI18n
) {
super();
- this.resource = this.i18n('target');
+ this.resource = $localize`target`;
}
ngOnInit() {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { IscsiSettingComponent } from '../iscsi-setting/iscsi-setting.component';
import { IscsiTargetImageSettingsModalComponent } from './iscsi-target-image-settings-modal.component';
configureTestBed({
declarations: [IscsiTargetImageSettingsModalComponent, IscsiSettingComponent],
imports: [SharedModule, ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { IscsiSettingComponent } from '../iscsi-setting/iscsi-setting.component';
import { IscsiTargetIqnSettingsModalComponent } from './iscsi-target-iqn-settings-modal.component';
configureTestBed({
declarations: [IscsiTargetIqnSettingsModalComponent, IscsiSettingComponent],
imports: [SharedModule, ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import {
configureTestBed,
expectItemTasks,
- i18nProviders,
PermissionHelper
} from '../../../../testing/unit-test-helper';
import { IscsiService } from '../../../shared/api/iscsi.service';
NgbNavModule
],
declarations: [IscsiTargetListComponent, IscsiTabsComponent, IscsiTargetDetailsComponent],
- providers: [TaskListService, i18nProviders]
+ providers: [TaskListService]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Subscription } from 'rxjs';
constructor(
private authStorageService: AuthStorageService,
- private i18n: I18n,
private iscsiService: IscsiService,
private taskListService: TaskListService,
private cephReleaseNamePipe: CephReleaseNamePipe,
ngOnInit() {
this.columns = [
{
- name: this.i18n('Target'),
+ name: $localize`Target`,
prop: 'target_iqn',
flexGrow: 2,
cellTransformation: CellTemplate.executing
},
{
- name: this.i18n('Portals'),
+ name: $localize`Portals`,
prop: 'cdPortals',
flexGrow: 2
},
{
- name: this.i18n('Images'),
+ name: $localize`Images`,
prop: 'cdImages',
flexGrow: 2
},
{
- name: this.i18n('# Sessions'),
+ name: $localize`# Sessions`,
prop: 'info.num_sessions',
pipe: this.notAvailablePipe,
flexGrow: 1
return first.cdExecuting;
}
if (first && _.isUndefined(first['info'])) {
- return this.i18n('Unavailable gateway(s)');
+ return $localize`Unavailable gateway(s)`;
}
return undefined;
return first.cdExecuting;
}
if (first && _.isUndefined(first['info'])) {
- return this.i18n('Unavailable gateway(s)');
+ return $localize`Unavailable gateway(s)`;
}
if (first && first['info'] && first['info']['num_sessions']) {
- return this.i18n('Target has active sessions');
+ return $localize`Target has active sessions`;
}
return undefined;
const target_iqn = this.selection.first().target_iqn;
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.i18n('iSCSI target'),
+ itemDescription: $localize`iSCSI target`,
itemNames: [target_iqn],
submitActionObservable: () =>
this.taskWrapper.wrapTaskAroundCall({
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { IscsiService } from '../../../shared/api/iscsi.service';
import { CephShortVersionPipe } from '../../../shared/pipes/ceph-short-version.pipe';
import { DimlessPipe } from '../../../shared/pipes/dimless.pipe';
FormatterService,
RelativeDatePipe,
IscsiBackstorePipe,
- { provide: IscsiService, useValue: fakeService },
- i18nProviders
+ { provide: IscsiService, useValue: fakeService }
]
});
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { IscsiService } from '../../../shared/api/iscsi.service';
import { CellTemplate } from '../../../shared/enum/cell-template.enum';
import { DimlessPipe } from '../../../shared/pipes/dimless.pipe';
constructor(
private iscsiService: IscsiService,
private dimlessPipe: DimlessPipe,
- private iscsiBackstorePipe: IscsiBackstorePipe,
- private i18n: I18n
+ private iscsiBackstorePipe: IscsiBackstorePipe
) {}
ngOnInit() {
this.gatewaysColumns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name'
},
{
- name: this.i18n('State'),
+ name: $localize`State`,
prop: 'state',
flexGrow: 1,
cellTransformation: CellTemplate.badge,
}
},
{
- name: this.i18n('# Targets'),
+ name: $localize`# Targets`,
prop: 'num_targets'
},
{
- name: this.i18n('# Sessions'),
+ name: $localize`# Sessions`,
prop: 'num_sessions'
}
];
this.imagesColumns = [
{
- name: this.i18n('Pool'),
+ name: $localize`Pool`,
prop: 'pool'
},
{
- name: this.i18n('Image'),
+ name: $localize`Image`,
prop: 'image'
},
{
- name: this.i18n('Backstore'),
+ name: $localize`Backstore`,
prop: 'backstore',
pipe: this.iscsiBackstorePipe
},
{
- name: this.i18n('Read Bytes'),
+ name: $localize`Read Bytes`,
prop: 'stats_history.rd_bytes',
cellTemplate: this.iscsiSparklineTpl
},
{
- name: this.i18n('Write Bytes'),
+ name: $localize`Write Bytes`,
prop: 'stats_history.wr_bytes',
cellTemplate: this.iscsiSparklineTpl
},
{
- name: this.i18n('Read Ops'),
+ name: $localize`Read Ops`,
prop: 'stats.rd',
pipe: this.dimlessPipe,
cellTemplate: this.iscsiPerSecondTpl
},
{
- name: this.i18n('Write Ops'),
+ name: $localize`Write Ops`,
prop: 'stats.wr',
pipe: this.dimlessPipe,
cellTemplate: this.iscsiPerSecondTpl
},
{
- name: this.i18n('A/O Since'),
+ name: $localize`A/O Since`,
prop: 'optimized_since',
cellTemplate: this.iscsiRelativeDateTpl
}
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../../testing/unit-test-helper';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
import { NotificationService } from '../../../../shared/services/notification.service';
import { SharedModule } from '../../../../shared/shared.module';
SharedModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../../testing/unit-test-helper';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
import { NotificationService } from '../../../../shared/services/notification.service';
import { SharedModule } from '../../../../shared/shared.module';
SharedModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { MirrorHealthColorPipe } from '../mirror-health-color.pipe';
import { DaemonListComponent } from './daemon-list.component';
configureTestBed({
declarations: [DaemonListComponent, MirrorHealthColorPipe],
- imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule],
- providers: i18nProviders
+ imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Subscription } from 'rxjs';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
constructor(
private rbdMirroringService: RbdMirroringService,
- private cephShortVersionPipe: CephShortVersionPipe,
- private i18n: I18n
+ private cephShortVersionPipe: CephShortVersionPipe
) {}
ngOnInit() {
this.columns = [
- { prop: 'instance_id', name: this.i18n('Instance'), flexGrow: 2 },
- { prop: 'id', name: this.i18n('ID'), flexGrow: 2 },
- { prop: 'server_hostname', name: this.i18n('Hostname'), flexGrow: 2 },
+ { prop: 'instance_id', name: $localize`Instance`, flexGrow: 2 },
+ { prop: 'id', name: $localize`ID`, flexGrow: 2 },
+ { prop: 'server_hostname', name: $localize`Hostname`, flexGrow: 2 },
{
prop: 'version',
- name: this.i18n('Version'),
+ name: $localize`Version`,
pipe: this.cephShortVersionPipe,
flexGrow: 2
},
{
prop: 'health',
- name: this.i18n('Health'),
+ name: $localize`Health`,
cellTemplate: this.healthTmpl,
flexGrow: 1
}
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
import { NotificationService } from '../../../../shared/services/notification.service';
import { SharedModule } from '../../../../shared/shared.module';
SharedModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { NgbNavModule, NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { MirrorHealthColorPipe } from '../mirror-health-color.pipe';
import { ImageListComponent } from './image-list.component';
NgbNavModule,
NgbProgressbarModule,
HttpClientTestingModule
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Subscription } from 'rxjs';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
columns: {}
};
- constructor(private rbdMirroringService: RbdMirroringService, private i18n: I18n) {}
+ constructor(private rbdMirroringService: RbdMirroringService) {}
ngOnInit() {
this.image_error.columns = [
- { prop: 'pool_name', name: this.i18n('Pool'), flexGrow: 2 },
- { prop: 'name', name: this.i18n('Image'), flexGrow: 2 },
- { prop: 'description', name: this.i18n('Issue'), flexGrow: 4 },
+ { prop: 'pool_name', name: $localize`Pool`, flexGrow: 2 },
+ { prop: 'name', name: $localize`Image`, flexGrow: 2 },
+ { prop: 'description', name: $localize`Issue`, flexGrow: 4 },
{
prop: 'state',
- name: this.i18n('State'),
+ name: $localize`State`,
cellTemplate: this.stateTmpl,
flexGrow: 1
}
];
this.image_syncing.columns = [
- { prop: 'pool_name', name: this.i18n('Pool'), flexGrow: 2 },
- { prop: 'name', name: this.i18n('Image'), flexGrow: 2 },
+ { prop: 'pool_name', name: $localize`Pool`, flexGrow: 2 },
+ { prop: 'name', name: $localize`Image`, flexGrow: 2 },
{
prop: 'progress',
- name: this.i18n('Progress'),
+ name: $localize`Progress`,
cellTemplate: this.progressTmpl,
flexGrow: 2
},
{
prop: 'state',
- name: this.i18n('State'),
+ name: $localize`State`,
cellTemplate: this.syncTmpl,
flexGrow: 1
}
];
this.image_ready.columns = [
- { prop: 'pool_name', name: this.i18n('Pool'), flexGrow: 2 },
- { prop: 'name', name: this.i18n('Image'), flexGrow: 2 },
- { prop: 'description', name: this.i18n('Description'), flexGrow: 4 },
+ { prop: 'pool_name', name: $localize`Pool`, flexGrow: 2 },
+ { prop: 'name', name: $localize`Image`, flexGrow: 2 },
+ { prop: 'description', name: $localize`Description`, flexGrow: 4 },
{
prop: 'state',
- name: this.i18n('State'),
+ name: $localize`State`,
cellTemplate: this.stateTmpl,
flexGrow: 1
}
import { NgbNavModule, NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { DaemonListComponent } from '../daemon-list/daemon-list.component';
import { ImageListComponent } from '../image-list/image-list.component';
HttpClientTestingModule,
RouterTestingModule,
ToastrModule.forRoot()
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Subscription } from 'rxjs';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
constructor(
private authStorageService: AuthStorageService,
private rbdMirroringService: RbdMirroringService,
- private modalService: ModalService,
- private i18n: I18n
+ private modalService: ModalService
) {
this.permission = this.authStorageService.getPermissions().rbdMirroring;
permission: 'update',
icon: Icons.edit,
click: () => this.editSiteNameModal(),
- name: this.i18n('Edit Site Name'),
+ name: $localize`Edit Site Name`,
canBePrimary: () => true,
disable: () => false
};
permission: 'update',
icon: Icons.upload,
click: () => this.createBootstrapModal(),
- name: this.i18n('Create Bootstrap Token'),
+ name: $localize`Create Bootstrap Token`,
disable: () => false
};
const importBootstrapAction: CdTableAction = {
permission: 'update',
icon: Icons.download,
click: () => this.importBootstrapModal(),
- name: this.i18n('Import Bootstrap Token'),
+ name: $localize`Import Bootstrap Token`,
disable: () => this.peersExist
};
this.tableActions = [editSiteNameAction, createBootstrapAction, importBootstrapAction];
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../../testing/unit-test-helper';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
import { NotificationService } from '../../../../shared/services/notification.service';
import { SharedModule } from '../../../../shared/shared.module';
SharedModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { AbstractControl, FormControl, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Subscription } from 'rxjs';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
peerExists = false;
mirrorModes: Array<{ id: string; name: string }> = [
- { id: 'disabled', name: this.i18n('Disabled') },
- { id: 'pool', name: this.i18n('Pool') },
- { id: 'image', name: this.i18n('Image') }
+ { id: 'disabled', name: $localize`Disabled` },
+ { id: 'pool', name: $localize`Pool` },
+ { id: 'image', name: $localize`Image` }
];
constructor(
public activeModal: NgbActiveModal,
- private i18n: I18n,
private rbdMirroringService: RbdMirroringService,
private taskWrapper: TaskWrapperService
) {
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- FormHelper,
- i18nProviders
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../../testing/unit-test-helper';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
import { NotificationService } from '../../../../shared/services/notification.service';
import { SharedModule } from '../../../../shared/shared.module';
SharedModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { MirrorHealthColorPipe } from '../mirror-health-color.pipe';
import { PoolListComponent } from './pool-list.component';
HttpClientTestingModule,
RouterTestingModule,
ToastrModule.forRoot()
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Observable, Subscriber, Subscription } from 'rxjs';
import { RbdMirroringService } from '../../../../shared/api/rbd-mirroring.service';
private authStorageService: AuthStorageService,
private rbdMirroringService: RbdMirroringService,
private modalService: ModalService,
- private taskWrapper: TaskWrapperService,
- private i18n: I18n
+ private taskWrapper: TaskWrapperService
) {
this.data = [];
this.permission = this.authStorageService.getPermissions().rbdMirroring;
permission: 'update',
icon: Icons.edit,
click: () => this.editModeModal(),
- name: this.i18n('Edit Mode'),
+ name: $localize`Edit Mode`,
canBePrimary: () => true
};
const addPeerAction: CdTableAction = {
permission: 'create',
icon: Icons.add,
- name: this.i18n('Add Peer'),
+ name: $localize`Add Peer`,
click: () => this.editPeersModal('add'),
disable: () => !this.selection.first() || this.selection.first().mirror_mode === 'disabled',
visible: () => !this.getPeerUUID(),
const editPeerAction: CdTableAction = {
permission: 'update',
icon: Icons.exchange,
- name: this.i18n('Edit Peer'),
+ name: $localize`Edit Peer`,
click: () => this.editPeersModal('edit'),
visible: () => !!this.getPeerUUID()
};
const deletePeerAction: CdTableAction = {
permission: 'delete',
icon: Icons.destroy,
- name: this.i18n('Delete Peer'),
+ name: $localize`Delete Peer`,
click: () => this.deletePeersModal(),
visible: () => !!this.getPeerUUID()
};
ngOnInit() {
this.columns = [
- { prop: 'name', name: this.i18n('Name'), flexGrow: 2 },
- { prop: 'mirror_mode', name: this.i18n('Mode'), flexGrow: 2 },
- { prop: 'leader_id', name: this.i18n('Leader'), flexGrow: 2 },
- { prop: 'image_local_count', name: this.i18n('# Local'), flexGrow: 2 },
- { prop: 'image_remote_count', name: this.i18n('# Remote'), flexGrow: 2 },
+ { prop: 'name', name: $localize`Name`, flexGrow: 2 },
+ { prop: 'mirror_mode', name: $localize`Mode`, flexGrow: 2 },
+ { prop: 'leader_id', name: $localize`Leader`, flexGrow: 2 },
+ { prop: 'image_local_count', name: $localize`# Local`, flexGrow: 2 },
+ { prop: 'image_remote_count', name: $localize`# Remote`, flexGrow: 2 },
{
prop: 'health',
- name: this.i18n('Health'),
+ name: $localize`Health`,
cellTemplate: this.healthTmpl,
flexGrow: 1
}
const peerUUID = this.getPeerUUID();
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.i18n('mirror peer'),
+ itemDescription: $localize`mirror peer`,
itemNames: [`${poolName} (${peerUUID})`],
submitActionObservable: () =>
new Observable((observer: Subscriber<any>) => {
import { ReactiveFormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { DirectivesModule } from '../../../shared/directives/directives.module';
import { CdFormGroup } from '../../../shared/forms/cd-form-group';
import { RbdConfigurationSourceField } from '../../../shared/models/configuration';
configureTestBed({
imports: [ReactiveFormsModule, DirectivesModule, SharedModule],
declarations: [RbdConfigurationFormComponent],
- providers: [
- RbdConfigurationService,
- FormatterService,
- DimlessBinaryPerSecondPipe,
- i18nProviders
- ]
+ providers: [RbdConfigurationService, FormatterService, DimlessBinaryPerSecondPipe]
});
beforeEach(() => {
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
import { ChartsModule } from 'ng2-charts';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { ComponentsModule } from '../../../shared/components/components.module';
import { TableComponent } from '../../../shared/datatable/table/table.component';
import { RbdConfigurationEntry } from '../../../shared/models/configuration';
PipesModule
],
declarations: [RbdConfigurationListComponent, TableComponent],
- providers: [FormatterService, RbdConfigurationService, i18nProviders]
+ providers: [FormatterService, RbdConfigurationService]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { TableComponent } from '../../../shared/datatable/table/table.component';
import { CdTableColumn } from '../../../shared/models/cd-table-column';
import {
constructor(
public formatterService: FormatterService,
- private rbdConfigurationService: RbdConfigurationService,
- private i18n: I18n
+ private rbdConfigurationService: RbdConfigurationService
) {}
ngOnInit() {
this.poolConfigurationColumns = [
- { prop: 'displayName', name: this.i18n('Name') },
- { prop: 'description', name: this.i18n('Description') },
- { prop: 'name', name: this.i18n('Key') },
+ { prop: 'displayName', name: $localize`Name` },
+ { prop: 'description', name: $localize`Description` },
+ { prop: 'name', name: $localize`Key` },
{
prop: 'source',
- name: this.i18n('Source'),
+ name: $localize`Source`,
cellTemplate: this.configurationSourceTpl,
pipe: new RbdConfigurationSourcePipe()
},
- { prop: 'value', name: this.i18n('Value'), cellTemplate: this.configurationValueTpl }
+ { prop: 'value', name: $localize`Value`, cellTemplate: this.configurationValueTpl }
];
}
import { delay } from 'rxjs/operators';
import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { RbdService } from '../../../shared/api/rbd.service';
import { ImageSpec } from '../../../shared/models/image-spec';
import { SharedModule } from '../../../shared/shared.module';
provide: ActivatedRoute,
useValue: new ActivatedRouteStub({ pool: 'foo', name: 'bar', snap: undefined })
},
- i18nProviders,
RbdService
]
});
import { FormControl, ValidatorFn, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin, Observable, ReplaySubject } from 'rxjs';
import { first, switchMap } from 'rxjs/operators';
private formatter: FormatterService,
private taskWrapper: TaskWrapperService,
private dimlessBinaryPipe: DimlessBinaryPipe,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n,
public router: Router
) {
super();
this.poolPermission = this.authStorageService.getPermissions().pool;
- this.resource = this.i18n('RBD');
+ this.resource = $localize`RBD`;
this.features = {
'deep-flatten': {
- desc: this.i18n('Deep flatten'),
+ desc: $localize`Deep flatten`,
requires: null,
allowEnable: false,
allowDisable: true
},
layering: {
- desc: this.i18n('Layering'),
+ desc: $localize`Layering`,
requires: null,
allowEnable: false,
allowDisable: false
},
'exclusive-lock': {
- desc: this.i18n('Exclusive lock'),
+ desc: $localize`Exclusive lock`,
requires: null,
allowEnable: true,
allowDisable: true
},
'object-map': {
- desc: this.i18n('Object map (requires exclusive-lock)'),
+ desc: $localize`Object map (requires exclusive-lock)`,
requires: 'exclusive-lock',
allowEnable: true,
allowDisable: true,
initDisabled: true
},
journaling: {
- desc: this.i18n('Journaling (requires exclusive-lock)'),
+ desc: $localize`Journaling (requires exclusive-lock)`,
requires: 'exclusive-lock',
allowEnable: true,
allowDisable: true,
initDisabled: true
},
'fast-diff': {
- desc: this.i18n('Fast diff (interlocked with object-map)'),
+ desc: $localize`Fast diff (interlocked with object-map)`,
requires: 'object-map',
allowEnable: true,
allowDisable: true,
import {
configureTestBed,
expectItemTasks,
- i18nProviders,
PermissionHelper
} from '../../../../testing/unit-test-helper';
import { RbdService } from '../../../shared/api/rbd.service';
RbdConfigurationListComponent,
RbdTabsComponent
],
- providers: [TaskListService, i18nProviders]
+ providers: [TaskListService]
});
beforeEach(() => {
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { RbdService } from '../../../shared/api/rbd.service';
private modalService: ModalService,
private taskWrapper: TaskWrapperService,
private taskListService: TaskListService,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
public actionLabels: ActionLabelsI18n
) {
ngOnInit() {
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
flexGrow: 2,
cellTransformation: CellTemplate.executing
},
{
- name: this.i18n('Pool'),
+ name: $localize`Pool`,
prop: 'pool_name',
flexGrow: 2
},
{
- name: this.i18n('Namespace'),
+ name: $localize`Namespace`,
prop: 'namespace',
flexGrow: 2
},
{
- name: this.i18n('Size'),
+ name: $localize`Size`,
prop: 'size',
flexGrow: 1,
cellClass: 'text-right',
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('Objects'),
+ name: $localize`Objects`,
prop: 'num_objs',
flexGrow: 1,
cellClass: 'text-right',
pipe: this.dimlessPipe
},
{
- name: this.i18n('Object size'),
+ name: $localize`Object size`,
prop: 'obj_size',
flexGrow: 1,
cellClass: 'text-right',
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('Provisioned'),
+ name: $localize`Provisioned`,
prop: 'disk_usage',
cellClass: 'text-center',
flexGrow: 1,
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('Total provisioned'),
+ name: $localize`Total provisioned`,
prop: 'total_disk_usage',
cellClass: 'text-center',
flexGrow: 1,
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('Parent'),
+ name: $localize`Parent`,
prop: 'parent',
flexGrow: 2,
cellTemplate: this.parentTpl
getDeleteDisableDesc(): string {
const first = this.selection.first();
if (first && this.hasClonedSnapshots(first)) {
- return this.i18n(
- 'This RBD has cloned snapshots. Please delete related RBDs before deleting this RBD.'
- );
+ return $localize`This RBD has cloned snapshots. Please delete related RBDs before deleting this RBD.`;
}
return '';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { ComponentsModule } from '../../../shared/components/components.module';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
import { RbdNamespaceFormModalComponent } from './rbd-namespace-form-modal.component';
RouterTestingModule
],
declarations: [RbdNamespaceFormModalComponent],
- providers: [NgbActiveModal, AuthStorageService, i18nProviders]
+ providers: [NgbActiveModal, AuthStorageService]
});
beforeEach(() => {
} from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Subject } from 'rxjs';
import { PoolService } from '../../../shared/api/pool.service';
private authStorageService: AuthStorageService,
private notificationService: NotificationService,
private poolService: PoolService,
- private rbdService: RbdService,
- private i18n: I18n
+ private rbdService: RbdService
) {
this.poolPermission = this.authStorageService.getPermissions().pool;
this.createForm();
.then(() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Created namespace '{{pool}}/{{namespace}}'`, {
- pool: pool,
- namespace: namespace
- })
+ $localize`Created namespace '${pool}/${namespace}'`
);
this.activeModal.close();
this.onSubmit.next();
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { TaskListService } from '../../../shared/services/task-list.service';
import { SharedModule } from '../../../shared/shared.module';
import { RbdTabsComponent } from '../rbd-tabs/rbd-tabs.component';
ToastrModule.forRoot(),
NgbNavModule
],
- providers: [TaskListService, i18nProviders]
+ providers: [TaskListService]
});
beforeEach(() => {
import { Component, OnInit } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin, Observable } from 'rxjs';
private poolService: PoolService,
private modalService: ModalService,
private notificationService: NotificationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
this.permission = this.authStorageService.getPermissions().rbdImage;
ngOnInit() {
this.columns = [
{
- name: this.i18n('Namespace'),
+ name: $localize`Namespace`,
prop: 'namespace',
flexGrow: 1
},
{
- name: this.i18n('Pool'),
+ name: $localize`Pool`,
prop: 'pool',
flexGrow: 1
},
{
- name: this.i18n('Total images'),
+ name: $localize`Total images`,
prop: 'num_images',
flexGrow: 1
}
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Deleted namespace '{{pool}}/{{namespace}}'`, {
- pool: pool,
- namespace: namespace
- })
+ $localize`Deleted namespace '${pool}/${namespace}'`
);
this.modalRef.close();
this.refresh();
const first = this.selection.first();
if (first) {
if (first.num_images > 0) {
- return this.i18n('Namespace contains images');
+ return $localize`Namespace contains images`;
}
}
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RbdTabsComponent } from '../rbd-tabs/rbd-tabs.component';
import { RbdPerformanceComponent } from './rbd-performance.component';
configureTestBed({
imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, NgbNavModule],
- declarations: [RbdPerformanceComponent, RbdTabsComponent],
- providers: i18nProviders
+ declarations: [RbdPerformanceComponent, RbdTabsComponent]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { ComponentsModule } from '../../../shared/components/components.module';
import { PipesModule } from '../../../shared/pipes/pipes.module';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
RouterTestingModule
],
declarations: [RbdSnapshotFormModalComponent],
- providers: [NgbActiveModal, AuthStorageService, i18nProviders]
+ providers: [NgbActiveModal, AuthStorageService]
});
beforeEach(() => {
import { FormControl, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Subject } from 'rxjs';
import { RbdService } from '../../../shared/api/rbd.service';
private rbdService: RbdService,
private taskManagerService: TaskManagerService,
private notificationService: NotificationService,
- private i18n: I18n,
private actionLabels: ActionLabelsI18n
) {
this.action = this.actionLabels.CREATE;
- this.resource = this.i18n('RBD Snapshot');
+ this.resource = $localize`RBD Snapshot`;
this.createForm();
}
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
import { CdTableSelection } from '../../../shared/models/cd-table-selection';
export class RbdSnapshotActionsModel {
- i18n: I18n;
-
create: CdTableAction;
rename: CdTableAction;
protect: CdTableAction;
deleteSnap: CdTableAction;
ordering: CdTableAction[];
- constructor(i18n: I18n, actionLabels: ActionLabelsI18n, featuresName: string[]) {
- this.i18n = i18n;
-
+ constructor(actionLabels: ActionLabelsI18n, featuresName: string[]) {
this.create = {
permission: 'create',
icon: Icons.add,
getCloneDisableDesc(featuresName: string[]): string | undefined {
if (!featuresName?.includes('layering')) {
- return this.i18n('Parent image must support Layering');
+ return $localize`Parent image must support Layering`;
}
return undefined;
import { RouterTestingModule } from '@angular/router/testing';
import { NgbModalModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
import { MockComponent } from 'ng-mocks';
import { ToastrModule } from 'ngx-toastr';
import {
configureTestBed,
expectItemTasks,
- i18nProviders,
PermissionHelper
} from '../../../../testing/unit-test-helper';
import { RbdService } from '../../../shared/api/rbd.service';
],
providers: [
{ provide: AuthStorageService, useValue: fakeAuthStorageService },
- TaskListService,
- i18nProviders
+ TaskListService
]
},
[CriticalConfirmationModalComponent]
beforeEach(() => {
fixture.detectChanges();
- const i18n = TestBed.inject(I18n);
const modalService = TestBed.inject(ModalService);
const actionLabelsI18n = TestBed.inject(ActionLabelsI18n);
called = false;
notificationService,
null,
null,
- i18n,
actionLabelsI18n
);
spyOn(rbdService, 'deleteSnapshot').and.returnValue(observableThrowError({ status: 500 }));
null,
null,
null,
- TestBed.inject(I18n),
TestBed.inject(ActionLabelsI18n)
);
ref.componentInstance.onSubmit = new Subject();
import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as moment from 'moment';
import { of } from 'rxjs';
private notificationService: NotificationService,
private summaryService: SummaryService,
private taskListService: TaskListService,
- private i18n: I18n,
private actionLabels: ActionLabelsI18n
) {
this.permission = this.authStorageService.getPermissions().rbdImage;
ngOnInit() {
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
cellTransformation: CellTemplate.executing,
flexGrow: 2
},
{
- name: this.i18n('Size'),
+ name: $localize`Size`,
prop: 'size',
flexGrow: 1,
cellClass: 'text-right',
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('Provisioned'),
+ name: $localize`Provisioned`,
prop: 'disk_usage',
flexGrow: 1,
cellClass: 'text-right',
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('State'),
+ name: $localize`State`,
prop: 'is_protected',
flexGrow: 1,
cellTransformation: CellTemplate.badge,
customTemplateConfig: {
map: {
- true: { value: this.i18n('PROTECTED'), class: 'badge-success' },
- false: { value: this.i18n('UNPROTECTED'), class: 'badge-info' }
+ true: { value: $localize`PROTECTED`, class: 'badge-success' },
+ false: { value: $localize`UNPROTECTED`, class: 'badge-info' }
}
}
},
{
- name: this.i18n('Created'),
+ name: $localize`Created`,
prop: 'timestamp',
flexGrow: 1,
pipe: this.cdDatePipe
ngOnChanges() {
const imageSpec = new ImageSpec(this.poolName, this.namespace, this.rbdName);
- const actions = new RbdSnapshotActionsModel(this.i18n, this.actionLabels, this.featuresName);
+ const actions = new RbdSnapshotActionsModel(this.actionLabels, this.featuresName);
actions.create.click = () => this.openCreateSnapshotModal();
actions.rename.click = () => this.openEditSnapshotModal();
actions.protect.click = () => this.toggleProtection();
const snapshotName = this.selection.selected[0].name;
const imageSpec = new ImageSpec(this.poolName, this.namespace, this.rbdName).toString();
const initialState = {
- titleText: this.i18n('RBD snapshot rollback'),
- buttonText: this.i18n('Rollback'),
+ titleText: $localize`RBD snapshot rollback`,
+ buttonText: $localize`Rollback`,
bodyTpl: this.rollbackTpl,
bodyData: {
snapName: `${imageSpec}@${snapshotName}`
deleteSnapshotModal() {
const snapshotName = this.selection.selected[0].name;
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.i18n('RBD snapshot'),
+ itemDescription: $localize`RBD snapshot`,
itemNames: [snapshotName],
submitAction: () => this._asyncTask('deleteSnapshot', 'rbd/snap/delete', snapshotName)
});
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- expectItemTasks,
- i18nProviders
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, expectItemTasks } from '../../../../testing/unit-test-helper';
import { RbdService } from '../../../shared/api/rbd.service';
import { CdTableSelection } from '../../../shared/models/cd-table-selection';
import { ExecutingTask } from '../../../shared/models/executing-task';
NgbNavModule,
ToastrModule.forRoot()
],
- providers: [TaskListService, i18nProviders]
+ providers: [TaskListService]
});
beforeEach(() => {
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import * as moment from 'moment';
private cdDatePipe: CdDatePipe,
private taskListService: TaskListService,
private taskWrapper: TaskWrapperService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
this.permission = this.authStorageService.getPermissions().rbdImage;
ngOnInit() {
this.columns = [
{
- name: this.i18n('ID'),
+ name: $localize`ID`,
prop: 'id',
flexGrow: 1,
cellTransformation: CellTemplate.executing
},
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
flexGrow: 1
},
{
- name: this.i18n('Pool'),
+ name: $localize`Pool`,
prop: 'pool_name',
flexGrow: 1
},
{
- name: this.i18n('Namespace'),
+ name: $localize`Namespace`,
prop: 'namespace',
flexGrow: 1
},
{
- name: this.i18n('Status'),
+ name: $localize`Status`,
prop: 'deferment_end_time',
flexGrow: 1,
cellTemplate: this.expiresTpl
},
{
- name: this.i18n('Deleted At'),
+ name: $localize`Deleted At`,
prop: 'deletion_time',
flexGrow: 1,
pipe: this.cdDatePipe
import * as moment from 'moment';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { NotificationService } from '../../../shared/services/notification.service';
import { SharedModule } from '../../../shared/shared.module';
import { RbdTrashMoveModalComponent } from './rbd-trash-move-modal.component';
NgbPopoverModule
],
declarations: [RbdTrashMoveModalComponent],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { Permission } from '../../../shared/models/permissions';
import { NotificationService } from '../../../shared/services/notification.service';
import { SharedModule } from '../../../shared/shared.module';
RouterTestingModule
],
declarations: [RbdTrashPurgeModalComponent],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { NotificationService } from '../../../shared/services/notification.service';
import { SharedModule } from '../../../shared/shared.module';
import { RbdTrashRestoreModalComponent } from './rbd-trash-restore-modal.component';
SharedModule,
RouterTestingModule
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum';
import { SharedModule } from '../../../shared/shared.module';
SharedModule,
HttpClientTestingModule
],
- declarations: [CephfsClientsComponent],
- providers: i18nProviders
+ declarations: [CephfsClientsComponent]
});
beforeEach(() => {
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { CephfsService } from '../../../shared/api/cephfs.service';
import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
private modalService: ModalService,
private notificationService: NotificationService,
private authStorageService: AuthStorageService,
- private i18n: I18n,
private actionLabels: ActionLabelsI18n
) {
this.permission = this.authStorageService.getPermissions().cephfs;
ngOnInit() {
this.columns = [
- { prop: 'id', name: this.i18n('id') },
- { prop: 'type', name: this.i18n('type') },
- { prop: 'state', name: this.i18n('state') },
- { prop: 'version', name: this.i18n('version') },
- { prop: 'hostname', name: this.i18n('Host') },
- { prop: 'root', name: this.i18n('root') }
+ { prop: 'id', name: $localize`id` },
+ { prop: 'type', name: $localize`type` },
+ { prop: 'state', name: $localize`state` },
+ { prop: 'version', name: $localize`version` },
+ { prop: 'hostname', name: $localize`Host` },
+ { prop: 'root', name: $localize`root` }
];
}
this.modalRef.close();
this.notificationService.show(
NotificationType.success,
- this.i18n(`Evicted client '{{clientId}}'`, { clientId: clientId })
+ $localize`Evicted client '${clientId}'`
);
},
() => {
import { Component, Input } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { CephfsDetailComponent } from './cephfs-detail.component';
configureTestBed({
imports: [SharedModule],
- declarations: [CephfsDetailComponent, CephfsChartStubComponent],
- providers: i18nProviders
+ declarations: [CephfsDetailComponent, CephfsChartStubComponent]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { CdTableColumn } from '../../../shared/models/cd-table-column';
objectValues = Object.values;
- constructor(
- private dimlessBinary: DimlessBinaryPipe,
- private dimless: DimlessPipe,
- private i18n: I18n
- ) {}
+ constructor(private dimlessBinary: DimlessBinaryPipe, private dimless: DimlessPipe) {}
ngOnChanges() {
this.setStandbys();
private setStandbys() {
this.standbys = [
{
- key: this.i18n('Standby daemons'),
+ key: $localize`Standby daemons`,
value: this.data.standbys
}
];
ngOnInit() {
this.columns = {
ranks: [
- { prop: 'rank', name: this.i18n('Rank') },
- { prop: 'state', name: this.i18n('State') },
- { prop: 'mds', name: this.i18n('Daemon') },
- { prop: 'activity', name: this.i18n('Activity'), cellTemplate: this.activityTmpl },
- { prop: 'dns', name: this.i18n('Dentries'), pipe: this.dimless },
- { prop: 'inos', name: this.i18n('Inodes'), pipe: this.dimless }
+ { prop: 'rank', name: $localize`Rank` },
+ { prop: 'state', name: $localize`State` },
+ { prop: 'mds', name: $localize`Daemon` },
+ { prop: 'activity', name: $localize`Activity`, cellTemplate: this.activityTmpl },
+ { prop: 'dns', name: $localize`Dentries`, pipe: this.dimless },
+ { prop: 'inos', name: $localize`Inodes`, pipe: this.dimless }
],
pools: [
- { prop: 'pool', name: this.i18n('Pool') },
- { prop: 'type', name: this.i18n('Type') },
- { prop: 'size', name: this.i18n('Size'), pipe: this.dimlessBinary },
+ { prop: 'pool', name: $localize`Pool` },
+ { prop: 'type', name: $localize`Type` },
+ { prop: 'size', name: $localize`Size`, pipe: this.dimlessBinary },
{
- name: this.i18n('Usage'),
+ name: $localize`Usage`,
cellTemplate: this.poolUsageTpl,
comparator: (_valueA: any, _valueB: any, rowA: any, rowB: any) => {
const valA = rowA.used / rowA.avail;
import {
configureTestBed,
- i18nProviders,
modalServiceShow,
PermissionHelper
} from '../../../../testing/unit-test-helper';
NgbModalModule
],
declarations: [CephfsDirectoriesComponent],
- providers: [i18nProviders, NgbActiveModal]
+ providers: [NgbActiveModal]
},
[CriticalConfirmationModalComponent, FormModalComponent, ConfirmationModalComponent]
);
import { Validators } from '@angular/forms';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import {
ITreeOptions,
TreeComponent,
private modalService: ModalService,
private cephfsService: CephfsService,
private cdDatePipe: CdDatePipe,
- private i18n: I18n,
private actionLabels: ActionLabelsI18n,
private notificationService: NotificationService,
private dimlessBinaryPipe: DimlessBinaryPipe
columns: [
{
prop: 'row.name',
- name: this.i18n('Name'),
+ name: $localize`Name`,
flexGrow: 1
},
{
prop: 'row.value',
- name: this.i18n('Value'),
+ name: $localize`Value`,
sortable: false,
flexGrow: 1
},
{
prop: 'row.originPath',
- name: this.i18n('Origin'),
+ name: $localize`Origin`,
sortable: false,
cellTemplate: this.originTmpl,
flexGrow: 1
columns: [
{
prop: 'name',
- name: this.i18n('Name'),
+ name: $localize`Name`,
flexGrow: 1
},
{
prop: 'path',
- name: this.i18n('Path'),
+ name: $localize`Path`,
isHidden: true,
flexGrow: 2
},
{
prop: 'created',
- name: this.i18n('Created'),
+ name: $localize`Created`,
flexGrow: 1,
pipe: this.cdDatePipe
}
}
return {
row: {
- name: quotaKey === 'max_bytes' ? this.i18n('Max size') : this.i18n('Max files'),
+ name: quotaKey === 'max_bytes' ? $localize`Max size` : $localize`Max files`,
value: valueConvertFn(value),
originPath: value ? dir.path : ''
},
path
),
message: nextMax.value
- ? this.i18n('The inherited {{quotaValue}} is the maximum value to be used.', {
- quotaValue: this.getQuotaValueFromPathMsg(nextMax.value, nextMax.path)
- })
+ ? $localize`The inherited ${this.getQuotaValueFromPathMsg(
+ nextMax.value,
+ nextMax.path
+ )} is the maximum value to be used.`
: undefined,
fields: [this.getQuotaFormField(selection.row.name, key, value, nextMax.value)],
- submitButtonText: this.i18n('Save'),
+ submitButtonText: $localize`Save`,
onSubmit: (values: CephfsQuotas) => this.updateQuota(values)
});
}
private getModalQuotaTitle(action: string, path: string): string {
- return this.i18n(`{{action}} CephFS {{quotaName}} quota for '{{path}}'`, {
- action,
- quotaName: this.getQuotaName(),
- path
- });
+ return $localize`${action} CephFS ${this.getQuotaName()} quota for '${path}'`;
}
private getQuotaName(): string {
- return this.isBytesQuotaSelected() ? this.i18n('size') : this.i18n('files');
+ return this.isBytesQuotaSelected() ? $localize`size` : $localize`files`;
}
private isBytesQuotaSelected(): boolean {
}
private getQuotaValueFromPathMsg(value: number, path: string): string {
- return this.i18n(`{{quotaName}} quota {{value}} from '{{path}}'`, {
- value: this.isBytesQuotaSelected() ? this.dimlessBinaryPipe.transform(value) : value,
- quotaName: this.getQuotaName(),
- path
- });
+ value = this.isBytesQuotaSelected() ? this.dimlessBinaryPipe.transform(value) : value;
+
+ return $localize`${this.getQuotaName()} quota ${value} from '${path}'`;
}
private getQuotaFormField(
};
if (!isBinary) {
field.errors = {
- min: this.i18n(`Value has to be at least {{value}} or more`, { value: 0 }),
- max: this.i18n(`Value has to be at most {{value}} or less`, { value: maxValue })
+ min: $localize`Value has to be at least 0 or more`,
+ max: $localize`Value has to be at most ${maxValue} or less`
};
}
return field;
? this.actionLabels.SET
: values[key] === 0
? this.actionLabels.UNSET
- : this.i18n('Updated');
+ : $localize`Updated`;
this.cephfsService.updateQuota(this.id, path, values).subscribe(() => {
if (onSuccess) {
onSuccess();
const nextMax = selection.nextTreeMaximum;
const dirValue = selection.dirValue;
+ const quotaValue = this.getQuotaValueFromPathMsg(nextMax.value, nextMax.path);
+ const conclusion =
+ nextMax.value > 0
+ ? nextMax.value > dirValue
+ ? $localize`in order to inherit ${quotaValue}`
+ : $localize`which isn't used because of the inheritance of ${quotaValue}`
+ : $localize`in order to have no quota on the directory`;
+
this.modalRef = this.modalService.show(ConfirmationModalComponent, {
titleText: this.getModalQuotaTitle(this.actionLabels.UNSET, path),
buttonText: this.actionLabels.UNSET,
- description: this.i18n(`{{action}} {{quotaValue}} {{conclusion}}.`, {
- action: this.actionLabels.UNSET,
- quotaValue: this.getQuotaValueFromPathMsg(dirValue, path),
- conclusion:
- nextMax.value > 0
- ? nextMax.value > dirValue
- ? this.i18n('in order to inherit {{quotaValue}}', {
- quotaValue: this.getQuotaValueFromPathMsg(nextMax.value, nextMax.path)
- })
- : this.i18n(`which isn't used because of the inheritance of {{quotaValue}}`, {
- quotaValue: this.getQuotaValueFromPathMsg(nextMax.value, nextMax.path)
- })
- : this.i18n('in order to have no quota on the directory')
- }),
+ description: $localize`${this.actionLabels.UNSET} ${this.getQuotaValueFromPathMsg(
+ dirValue,
+ path
+ )} ${conclusion}.`,
onSubmit: () => this.updateQuota({ [key]: 0 }, () => this.modalRef.close())
});
}
// Create a snapshot. Auto-generate a snapshot name by default.
const path = this.selectedDir.path;
this.modalService.show(FormModalComponent, {
- titleText: this.i18n('Create Snapshot'),
- message: this.i18n('Please enter the name of the snapshot.'),
+ titleText: $localize`Create Snapshot`,
+ message: $localize`Please enter the name of the snapshot.`,
fields: [
{
type: 'text',
required: true
}
],
- submitButtonText: this.i18n('Create Snapshot'),
+ submitButtonText: $localize`Create Snapshot`,
onSubmit: (values: CephfsSnapshot) => {
this.cephfsService.mkSnapshot(this.id, path, values.name).subscribe((name) => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Created snapshot '{{name}}' for '{{path}}'`, {
- name: name,
- path: path
- })
+ $localize`Created snapshot '${name}' for '${path}'`
);
this.forceDirRefresh();
});
deleteSnapshotModal() {
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.i18n('CephFs Snapshot'),
+ itemDescription: $localize`CephFs Snapshot`,
itemNames: this.snapshot.selection.selected.map((snapshot: CephfsSnapshot) => snapshot.name),
submitAction: () => this.deleteSnapshot()
});
this.cephfsService.rmSnapshot(this.id, path, name).subscribe(() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Deleted snapshot '{{name}}' for '{{path}}'`, {
- name: name,
- path: path
- })
+ $localize`Deleted snapshot '${name}' for '${path}'`
);
});
});
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CdTableSelection } from '../../../shared/models/cd-table-selection';
import { SharedModule } from '../../../shared/shared.module';
import { CephfsListComponent } from './cephfs-list.component';
configureTestBed({
imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule],
- declarations: [CephfsListComponent, CephfsTabsStubComponent],
- providers: i18nProviders
+ declarations: [CephfsListComponent, CephfsTabsStubComponent]
});
beforeEach(() => {
import { Component, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { CephfsService } from '../../../shared/api/cephfs.service';
import { ListWithDetails } from '../../../shared/classes/list-with-details.class';
import { CellTemplate } from '../../../shared/enum/cell-template.enum';
filesystems: any = [];
selection = new CdTableSelection();
- constructor(
- private cephfsService: CephfsService,
- private cdDatePipe: CdDatePipe,
- private i18n: I18n
- ) {
+ constructor(private cephfsService: CephfsService, private cdDatePipe: CdDatePipe) {
super();
}
ngOnInit() {
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'mdsmap.fs_name',
flexGrow: 2
},
{
- name: this.i18n('Created'),
+ name: $localize`Created`,
prop: 'mdsmap.created',
flexGrow: 2,
pipe: this.cdDatePipe
},
{
- name: this.i18n('Enabled'),
+ name: $localize`Enabled`,
prop: 'mdsmap.enabled',
flexGrow: 1,
cellTransformation: CellTemplate.checkIcon
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CephfsService } from '../../../shared/api/cephfs.service';
import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum';
import { SharedModule } from '../../../shared/shared.module';
CephfsDetailComponent,
CephfsDirectoriesComponent,
CephfsClientsComponent
- ],
- providers: [i18nProviders]
+ ]
});
beforeEach(() => {
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { DataTableModule } from '../../../../shared/datatable/datatable.module';
import { SharedModule } from '../../../../shared/shared.module';
import { ConfigurationDetailsComponent } from './configuration-details.component';
configureTestBed({
declarations: [ConfigurationDetailsComponent],
- imports: [DataTableModule, SharedModule],
- providers: [i18nProviders]
+ imports: [DataTableModule, SharedModule]
});
beforeEach(() => {
import { Component, Input, OnChanges } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
@Component({
@Input()
selection: any;
flags = {
- runtime: this.i18n('The value can be updated at runtime.'),
- no_mon_update: this.i18n(`Daemons/clients do not pull this value from the
+ runtime: $localize`The value can be updated at runtime.`,
+ no_mon_update: $localize`Daemons/clients do not pull this value from the
monitor config database. We disallow setting this option via 'ceph config
set ...'. This option should be configured via ceph.conf or via the
- command line.`),
- startup: this.i18n('Option takes effect only during daemon startup.'),
- cluster_create: this.i18n('Option only affects cluster creation.'),
- create: this.i18n('Option only affects daemon creation.')
+ command line.`,
+ startup: $localize`Option takes effect only during daemon startup.`,
+ cluster_create: $localize`Option only affects cluster creation.`,
+ create: $localize`Option only affects daemon creation.`
};
- constructor(private i18n: I18n) {}
-
ngOnChanges() {
if (this.selection) {
this.selection.services = _.split(this.selection.services, ',');
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { ConfigFormModel } from '../../../../shared/components/config-option/config-option.model';
import { SharedModule } from '../../../../shared/shared.module';
import { ConfigurationFormComponent } from './configuration-form.component';
providers: [
{
provide: ActivatedRoute
- },
- i18nProviders
+ }
]
});
import { FormControl, FormGroup, ValidatorFn } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ConfigurationService } from '../../../../shared/api/configuration.service';
private route: ActivatedRoute,
private router: Router,
private configService: ConfigurationService,
- private notificationService: NotificationService,
- private i18n: I18n
+ private notificationService: NotificationService
) {
super();
this.createForm();
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n('Updated config option {{name}}', { name: request.name })
+ $localize`Updated config option ${request.name}`
);
this.router.navigate(['/configuration']);
},
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { ConfigurationDetailsComponent } from './configuration-details/configuration-details.component';
import { ConfigurationComponent } from './configuration.component';
NgbNavModule,
HttpClientTestingModule,
RouterTestingModule
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { ConfigurationService } from '../../../shared/api/configuration.service';
import { ListWithDetails } from '../../../shared/classes/list-with-details.class';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
selection = new CdTableSelection();
filters: CdTableColumn[] = [
{
- name: this.i18n('Level'),
+ name: $localize`Level`,
prop: 'level',
filterOptions: ['basic', 'advanced', 'dev'],
filterInitValue: 'basic',
}
},
{
- name: this.i18n('Service'),
+ name: $localize`Service`,
prop: 'services',
filterOptions: ['mon', 'mgr', 'osd', 'mds', 'common', 'mds_client', 'rgw'],
filterPredicate: (row, value) => {
}
},
{
- name: this.i18n('Source'),
+ name: $localize`Source`,
prop: 'source',
filterOptions: ['mon'],
filterPredicate: (row, value) => {
}
},
{
- name: this.i18n('Modified'),
+ name: $localize`Modified`,
prop: 'modified',
filterOptions: ['yes', 'no'],
filterPredicate: (row, value) => {
constructor(
private authStorageService: AuthStorageService,
private configurationService: ConfigurationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
ngOnInit() {
this.columns = [
- { canAutoResize: true, prop: 'name', name: this.i18n('Name') },
- { prop: 'desc', name: this.i18n('Description'), cellClass: 'wrap' },
+ { canAutoResize: true, prop: 'name', name: $localize`Name` },
+ { prop: 'desc', name: $localize`Description`, cellClass: 'wrap' },
{
prop: 'value',
- name: this.i18n('Current value'),
+ name: $localize`Current value`,
cellClass: 'wrap',
cellTemplate: this.confValTpl
},
- { prop: 'default', name: this.i18n('Default'), cellClass: 'wrap' },
+ { prop: 'default', name: $localize`Default`, cellClass: 'wrap' },
{
prop: 'can_update_at_runtime',
- name: this.i18n('Editable'),
+ name: $localize`Editable`,
cellTransformation: CellTemplate.checkIcon,
flexGrow: 0.4,
cellClass: 'text-center'
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- i18nProviders,
- TabHelper
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, TabHelper } from '../../../../../testing/unit-test-helper';
import { CoreModule } from '../../../../core/core.module';
import { Permissions } from '../../../../shared/models/permissions';
import { SharedModule } from '../../../../shared/shared.module';
CephSharedModule,
SharedModule,
ToastrModule.forRoot()
- ],
- declarations: [],
- providers: [i18nProviders]
+ ]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { LoadingPanelComponent } from '../../../../shared/components/loading-panel/loading-panel.component';
import { SharedModule } from '../../../../shared/shared.module';
import { HostFormComponent } from './host-form.component';
ReactiveFormsModule,
ToastrModule.forRoot()
],
- providers: [i18nProviders],
declarations: [HostFormComponent]
},
[LoadingPanelComponent]
import { FormControl, Validators } from '@angular/forms';
import { Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { HostService } from '../../../../shared/api/host.service';
import { ActionLabelsI18n, URLVerbs } from '../../../../shared/constants/app.constants';
import { CdForm } from '../../../../shared/forms/cd-form';
constructor(
private router: Router,
- private i18n: I18n,
private actionLabels: ActionLabelsI18n,
private hostService: HostService,
private taskWrapper: TaskWrapperService
) {
super();
- this.resource = this.i18n('host');
+ this.resource = $localize`host`;
this.action = this.actionLabels.CREATE;
this.createForm();
}
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CoreModule } from '../../../core/core.module';
import { HostService } from '../../../shared/api/host.service';
import { Permissions } from '../../../shared/models/permissions';
CephModule,
CoreModule
],
- providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }, i18nProviders],
- declarations: []
+ providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }]
});
beforeEach(() => {
import { Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { HostService } from '../../../shared/api/host.service';
import { ListWithDetails } from '../../../shared/classes/list-with-details.class';
private hostService: HostService,
private cephShortVersionPipe: CephShortVersionPipe,
private joinPipe: JoinPipe,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
private actionLabels: ActionLabelsI18n,
private modalService: ModalService,
click: () => {
this.depCheckerService.checkOrchestratorOrModal(
this.actionLabels.CREATE,
- this.i18n('Host'),
+ $localize`Host`,
() => {
this.router.navigate([this.urlBuilder.getCreate()]);
}
click: () => {
this.depCheckerService.checkOrchestratorOrModal(
this.actionLabels.EDIT,
- this.i18n('Host'),
+ $localize`Host`,
() => this.editAction()
);
},
click: () => {
this.depCheckerService.checkOrchestratorOrModal(
this.actionLabels.DELETE,
- this.i18n('Host'),
+ $localize`Host`,
() => this.deleteAction()
);
},
ngOnInit() {
this.columns = [
{
- name: this.i18n('Hostname'),
+ name: $localize`Hostname`,
prop: 'hostname',
flexGrow: 1
},
{
- name: this.i18n('Services'),
+ name: $localize`Services`,
prop: 'services',
flexGrow: 3,
cellTemplate: this.servicesTpl
},
{
- name: this.i18n('Labels'),
+ name: $localize`Labels`,
prop: 'labels',
flexGrow: 1,
pipe: this.joinPipe
},
{
- name: this.i18n('Version'),
+ name: $localize`Version`,
prop: 'ceph_version',
flexGrow: 1,
pipe: this.cephShortVersionPipe
return { enabled: true, name: label };
});
this.modalService.show(FormModalComponent, {
- titleText: this.i18n('Edit Host: {{hostname}}', host),
+ titleText: $localize`Edit Host: ${host.hostname}`,
fields: [
{
type: 'select-badges',
name: 'labels',
value: host['labels'],
- label: this.i18n('Labels'),
+ label: $localize`Labels`,
typeConfig: {
customBadges: true,
options: allLabels,
- messages: new SelectMessages(
- {
- empty: this.i18n('There are no labels.'),
- filter: this.i18n('Filter or add labels'),
- add: this.i18n('Add label')
- },
- this.i18n
- )
+ messages: new SelectMessages({
+ empty: $localize`There are no labels.`,
+ filter: $localize`Filter or add labels`,
+ add: $localize`Add label`
+ })
}
}
],
- submitButtonText: this.i18n('Edit Host'),
+ submitButtonText: $localize`Edit Host`,
onSubmit: (values: any) => {
this.hostService.update(host['hostname'], values.labels).subscribe(() => {
this.notificationService.show(
NotificationType.success,
- this.i18n('Updated Host "{{hostname}}"', host)
+ $localize`Updated Host "${host.hostname}"`
);
// Reload the data table content.
this.table.refreshBtn();
getEditDisableDesc(selection: CdTableSelection): string | undefined {
if (selection && selection.hasSingleSelection && !selection.first().sources.orchestrator) {
- return this.i18n(
- 'Host editing is disabled because the selected host is not managed by Orchestrator.'
- );
+ return $localize`Host editing is disabled because the selected host is not managed by Orchestrator.`;
}
return undefined;
}
selection.hasSelection &&
!selection.selected.every((selected) => selected.sources.orchestrator)
) {
- return this.i18n(
- 'Host deletion is disabled because a selected host is not managed by Orchestrator.'
- );
+ return $localize`Host deletion is disabled because a selected host is not managed by Orchestrator.`;
}
return undefined;
}
import * as _ from 'lodash';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { InventoryDevicesComponent } from './inventory-devices.component';
SharedModule,
ToastrModule.forRoot()
],
- providers: [i18nProviders],
declarations: [InventoryDevicesComponent]
});
ViewChild
} from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Subscription } from 'rxjs';
constructor(
private authStorageService: AuthStorageService,
private dimlessBinary: DimlessBinaryPipe,
- private i18n: I18n,
private modalService: ModalService,
private notificationService: NotificationService,
private orchService: OrchestratorService
permission: 'update',
icon: Icons.show,
click: () => this.identifyDevice(),
- name: this.i18n('Identify'),
+ name: $localize`Identify`,
disable: () => !this.selection.hasSingleSelection,
canBePrimary: (selection: CdTableSelection) => !selection.hasSingleSelection,
visible: () => _.isString(this.selectionType)
];
const columns = [
{
- name: this.i18n('Hostname'),
+ name: $localize`Hostname`,
prop: 'hostname',
flexGrow: 1
},
{
- name: this.i18n('Device path'),
+ name: $localize`Device path`,
prop: 'path',
flexGrow: 1
},
{
- name: this.i18n('Type'),
+ name: $localize`Type`,
prop: 'human_readable_type',
flexGrow: 1,
cellTransformation: CellTemplate.badge,
}
},
{
- name: this.i18n('Available'),
+ name: $localize`Available`,
prop: 'available',
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
- name: this.i18n('Vendor'),
+ name: $localize`Vendor`,
prop: 'sys_api.vendor',
flexGrow: 1
},
{
- name: this.i18n('Model'),
+ name: $localize`Model`,
prop: 'sys_api.model',
flexGrow: 1
},
{
- name: this.i18n('Size'),
+ name: $localize`Size`,
prop: 'sys_api.size',
flexGrow: 1,
pipe: this.dimlessBinary
},
{
- name: this.i18n('OSDs'),
+ name: $localize`OSDs`,
prop: 'osd_ids',
flexGrow: 1,
cellTransformation: CellTemplate.badge,
const hostname = selected.hostname;
const device = selected.path || selected.device_id;
this.modalService.show(FormModalComponent, {
- titleText: this.i18n(`Identify device {{device}}`, { device }),
- message: this.i18n('Please enter the duration how long to blink the LED.'),
+ titleText: $localize`Identify device ${device}`,
+ message: $localize`Please enter the duration how long to blink the LED.`,
fields: [
{
type: 'select',
required: true,
typeConfig: {
options: [
- { text: this.i18n('1 minute'), value: 60 },
- { text: this.i18n('2 minutes'), value: 120 },
- { text: this.i18n('5 minutes'), value: 300 },
- { text: this.i18n('10 minutes'), value: 600 },
- { text: this.i18n('15 minutes'), value: 900 }
+ { text: $localize`1 minute`, value: 60 },
+ { text: $localize`2 minutes`, value: 120 },
+ { text: $localize`5 minutes`, value: 300 },
+ { text: $localize`10 minutes`, value: 600 },
+ { text: $localize`15 minutes`, value: 900 }
]
}
}
],
- submitButtonText: this.i18n('Execute'),
+ submitButtonText: $localize`Execute`,
onSubmit: (values: any) => {
this.orchService.identifyDevice(hostname, device, values.duration).subscribe(() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Identifying '{{device}}' started on host '{{hostname}}'`, {
- hostname,
- device
- })
+ $localize`Identifying '${device}' started on host '${hostname}'`
);
});
}
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { OrchestratorService } from '../../../shared/api/orchestrator.service';
import { SharedModule } from '../../../shared/shared.module';
import { InventoryDevicesComponent } from './inventory-devices/inventory-devices.component';
RouterTestingModule,
ToastrModule.forRoot()
],
- providers: [i18nProviders],
declarations: [InventoryComponent, InventoryDevicesComponent]
});
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { MgrModuleDetailsComponent } from './mgr-module-details.component';
configureTestBed({
declarations: [MgrModuleDetailsComponent],
- imports: [HttpClientTestingModule, SharedModule],
- providers: [i18nProviders]
+ imports: [HttpClientTestingModule, SharedModule]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { LoadingPanelComponent } from '../../../../shared/components/loading-panel/loading-panel.component';
import { SharedModule } from '../../../../shared/shared.module';
import { MgrModuleFormComponent } from './mgr-module-form.component';
RouterTestingModule,
SharedModule,
ToastrModule.forRoot()
- ],
- providers: i18nProviders
+ ]
},
[LoadingPanelComponent]
);
import { ValidatorFn, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin as observableForkJoin } from 'rxjs';
private router: Router,
private formBuilder: CdFormBuilder,
private mgrModuleService: MgrModuleService,
- private notificationService: NotificationService,
- private i18n: I18n
+ private notificationService: NotificationService
) {
super();
}
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Updated options for module '{{name}}'.`, { name: this.moduleName })
+ $localize`Updated options for module '${this.moduleName}'.`
);
this.goToListView();
},
import { ToastrModule } from 'ngx-toastr';
import { of as observableOf, throwError as observableThrowError } from 'rxjs';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../../testing/unit-test-helper';
import { MgrModuleService } from '../../../../shared/api/mgr-module.service';
import { TableActionsComponent } from '../../../../shared/datatable/table-actions/table-actions.component';
import { CdTableSelection } from '../../../../shared/models/cd-table-selection';
NgbNavModule,
ToastrModule.forRoot()
],
- providers: [MgrModuleService, NotificationService, i18nProviders]
+ providers: [MgrModuleService, NotificationService]
});
beforeEach(() => {
import { Component, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { BlockUI, NgBlockUI } from 'ng-block-ui';
import { timer as observableTimer } from 'rxjs';
constructor(
private authStorageService: AuthStorageService,
private mgrModuleService: MgrModuleService,
- private notificationService: NotificationService,
- private i18n: I18n
+ private notificationService: NotificationService
) {
super();
this.permission = this.authStorageService.getPermissions().configOpt;
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
flexGrow: 1
},
{
- name: this.i18n('Enabled'),
+ name: $localize`Enabled`,
prop: 'enabled',
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
- name: this.i18n('Always-On'),
+ name: $localize`Always-On`,
prop: 'always_on',
isHidden: true,
flexGrow: 1,
this.selection.first() && encodeURIComponent(this.selection.first().name);
this.tableActions = [
{
- name: this.i18n('Edit'),
+ name: $localize`Edit`,
permission: 'update',
disable: () => {
if (!this.selection.hasSelection) {
icon: Icons.edit
},
{
- name: this.i18n('Enable'),
+ name: $localize`Enable`,
permission: 'update',
click: () => this.updateModuleState(),
disable: () => this.isTableActionDisabled('enabled'),
icon: Icons.start
},
{
- name: this.i18n('Disable'),
+ name: $localize`Disable`,
permission: 'update',
click: () => this.updateModuleState(),
disable: () => this.isTableActionDisabled('disabled'),
if (this.selection.hasSelection) {
const selected = this.selection.first();
if (selected.always_on) {
- return this.i18n('This Manager module is always on.');
+ return $localize`This Manager module is always on.`;
}
}
this.notificationService.suspendToasties(true);
// Block the whole UI to prevent user interactions until
// the connection to the backend is reestablished
- this.blockUI.start(this.i18n('Reconnecting, please wait ...'));
+ this.blockUI.start($localize`Reconnecting, please wait ...`);
fnWaitUntilReconnected();
}
);
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { MonitorService } from '../../../shared/api/monitor.service';
import { MonitorComponent } from './monitor.component';
imports: [HttpClientTestingModule],
declarations: [MonitorComponent],
schemas: [NO_ERRORS_SCHEMA],
- providers: [MonitorService, i18nProviders]
+ providers: [MonitorService]
});
beforeEach(() => {
import { Component } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { MonitorService } from '../../../shared/api/monitor.service';
interval: any;
- constructor(private monitorService: MonitorService, private i18n: I18n) {
+ constructor(private monitorService: MonitorService) {
this.inQuorum = {
columns: [
- { prop: 'name', name: this.i18n('Name'), cellTransformation: CellTemplate.routerLink },
- { prop: 'rank', name: this.i18n('Rank') },
- { prop: 'public_addr', name: this.i18n('Public Address') },
+ { prop: 'name', name: $localize`Name`, cellTransformation: CellTemplate.routerLink },
+ { prop: 'rank', name: $localize`Rank` },
+ { prop: 'public_addr', name: $localize`Public Address` },
{
prop: 'cdOpenSessions',
- name: this.i18n('Open Sessions'),
+ name: $localize`Open Sessions`,
cellTransformation: CellTemplate.sparkline,
comparator: (dataA: any, dataB: any) => {
// We get the last value of time series to compare:
this.notInQuorum = {
columns: [
- { prop: 'name', name: this.i18n('Name'), cellTransformation: CellTemplate.routerLink },
- { prop: 'rank', name: this.i18n('Rank') },
- { prop: 'public_addr', name: this.i18n('Public Address') }
+ { prop: 'name', name: $localize`Name`, cellTransformation: CellTemplate.routerLink },
+ { prop: 'rank', name: $localize`Rank` },
+ { prop: 'public_addr', name: $localize`Public Address` }
]
};
}
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { OsdCreationPreviewModalComponent } from './osd-creation-preview-modal.component';
RouterTestingModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders],
+ providers: [NgbActiveModal],
declarations: [OsdCreationPreviewModalComponent]
});
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { OsdService } from '../../../../shared/api/osd.service';
import { SharedModule } from '../../../../shared/shared.module';
import { TablePerformanceCounterComponent } from '../../../performance-counter/table-performance-counter/table-performance-counter.component';
SmartListComponent,
TablePerformanceCounterComponent,
OsdPerformanceHistogramComponent
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- FixtureHelper,
- i18nProviders,
- Mocks
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, FixtureHelper, Mocks } from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
import { InventoryDevice } from '../../inventory/inventory-devices/inventory-device.model';
import { InventoryDevicesComponent } from '../../inventory/inventory-devices/inventory-devices.component';
SharedModule,
ToastrModule.forRoot()
],
- providers: [i18nProviders],
declarations: [OsdDevicesSelectionGroupsComponent, InventoryDevicesComponent]
});
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Icons } from '../../../../shared/enum/icons.enum';
addButtonTooltip: String;
tooltips = {
- noAvailDevices: this.i18n('No available devices'),
- addPrimaryFirst: this.i18n('Please add primary devices first'),
- addByFilters: this.i18n('Add devices by using filters')
+ noAvailDevices: $localize`No available devices`,
+ addPrimaryFirst: $localize`Please add primary devices first`,
+ addByFilters: $localize`Add devices by using filters`
};
- constructor(private modalService: ModalService, private i18n: I18n) {}
+ constructor(private modalService: ModalService) {}
ngOnInit() {
this.updateAddButtonTooltip();
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders, Mocks } from '../../../../../testing/unit-test-helper';
+import { configureTestBed, Mocks } from '../../../../../testing/unit-test-helper';
import { CdTableColumnFiltersChange } from '../../../../shared/models/cd-table-column-filters-change';
import { SharedModule } from '../../../../shared/shared.module';
import { InventoryDevice } from '../../inventory/inventory-devices/inventory-device.model';
RouterTestingModule,
ToastrModule.forRoot()
],
- providers: [NgbActiveModal, i18nProviders],
+ providers: [NgbActiveModal],
declarations: [OsdDevicesSelectionModalComponent, InventoryDevicesComponent]
});
import * as _ from 'lodash';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { NotificationType } from '../../../../shared/enum/notification-type.enum';
import { NotificationService } from '../../../../shared/services/notification.service';
import { SharedModule } from '../../../../shared/shared.module';
ToastrModule.forRoot()
],
declarations: [OsdFlagsModalComponent],
- providers: [i18nProviders, NgbActiveModal]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { FormGroup } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { OsdService } from '../../../../shared/api/osd.service';
allFlags = {
noin: {
code: 'noin',
- name: this.i18n('No In'),
+ name: $localize`No In`,
value: false,
- description: this.i18n(
- 'OSDs that were previously marked out will not be marked back in when they start'
- )
+ description: $localize`OSDs that were previously marked out will not be marked back in when they start`
},
noout: {
code: 'noout',
- name: this.i18n('No Out'),
+ name: $localize`No Out`,
value: false,
- description: this.i18n(
- 'OSDs will not automatically be marked out after the configured interval'
- )
+ description: $localize`OSDs will not automatically be marked out after the configured interval`
},
noup: {
code: 'noup',
- name: this.i18n('No Up'),
+ name: $localize`No Up`,
value: false,
- description: this.i18n('OSDs are not allowed to start')
+ description: $localize`OSDs are not allowed to start`
},
nodown: {
code: 'nodown',
- name: this.i18n('No Down'),
+ name: $localize`No Down`,
value: false,
- description: this.i18n(
- 'OSD failure reports are being ignored, such that the monitors will not mark OSDs down'
- )
+ description: $localize`OSD failure reports are being ignored, such that the monitors will not mark OSDs down`
},
pause: {
code: 'pause',
- name: this.i18n('Pause'),
+ name: $localize`Pause`,
value: false,
- description: this.i18n('Pauses reads and writes')
+ description: $localize`Pauses reads and writes`
},
noscrub: {
code: 'noscrub',
- name: this.i18n('No Scrub'),
+ name: $localize`No Scrub`,
value: false,
- description: this.i18n('Scrubbing is disabled')
+ description: $localize`Scrubbing is disabled`
},
'nodeep-scrub': {
code: 'nodeep-scrub',
- name: this.i18n('No Deep Scrub'),
+ name: $localize`No Deep Scrub`,
value: false,
- description: this.i18n('Deep Scrubbing is disabled')
+ description: $localize`Deep Scrubbing is disabled`
},
nobackfill: {
code: 'nobackfill',
- name: this.i18n('No Backfill'),
+ name: $localize`No Backfill`,
value: false,
- description: this.i18n('Backfilling of PGs is suspended')
+ description: $localize`Backfilling of PGs is suspended`
},
norebalance: {
code: 'norebalance',
- name: this.i18n('No Rebalance'),
+ name: $localize`No Rebalance`,
value: false,
- description: this.i18n('OSD will choose not to backfill unless PG is also degraded')
+ description: $localize`OSD will choose not to backfill unless PG is also degraded`
},
norecover: {
code: 'norecover',
- name: this.i18n('No Recover'),
+ name: $localize`No Recover`,
value: false,
- description: this.i18n('Recovery of PGs is suspended')
+ description: $localize`Recovery of PGs is suspended`
},
sortbitwise: {
code: 'sortbitwise',
- name: this.i18n('Bitwise Sort'),
+ name: $localize`Bitwise Sort`,
value: false,
- description: this.i18n('Use bitwise sort'),
+ description: $localize`Use bitwise sort`,
disabled: true
},
purged_snapdirs: {
code: 'purged_snapdirs',
- name: this.i18n('Purged Snapdirs'),
+ name: $localize`Purged Snapdirs`,
value: false,
- description: this.i18n('OSDs have converted snapsets'),
+ description: $localize`OSDs have converted snapsets`,
disabled: true
},
recovery_deletes: {
code: 'recovery_deletes',
- name: this.i18n('Recovery Deletes'),
+ name: $localize`Recovery Deletes`,
value: false,
- description: this.i18n('Deletes performed during recovery instead of peering'),
+ description: $localize`Deletes performed during recovery instead of peering`,
disabled: true
},
pglog_hardlimit: {
code: 'pglog_hardlimit',
- name: this.i18n('PG Log Hard Limit'),
+ name: $localize`PG Log Hard Limit`,
value: false,
- description: this.i18n('Puts a hard limit on pg log length'),
+ description: $localize`Puts a hard limit on pg log length`,
disabled: true
}
};
public activeModal: NgbActiveModal,
private authStorageService: AuthStorageService,
private osdService: OsdService,
- private notificationService: NotificationService,
- private i18n: I18n
+ private notificationService: NotificationService
) {
this.permissions = this.authStorageService.getPermissions();
}
this.osdService.updateFlags(newFlags).subscribe(
() => {
- this.notificationService.show(NotificationType.success, this.i18n('Updated OSD Flags'));
+ this.notificationService.show(NotificationType.success, $localize`Updated OSD Flags`);
this.activeModal.close();
},
() => {
import {
configureTestBed,
FixtureHelper,
- FormHelper,
- i18nProviders
+ FormHelper
} from '../../../../../testing/unit-test-helper';
import { OrchestratorService } from '../../../../shared/api/orchestrator.service';
import { CdFormGroup } from '../../../../shared/forms/cd-form-group';
ReactiveFormsModule,
ToastrModule.forRoot()
],
- providers: [i18nProviders],
declarations: [OsdFormComponent, OsdDevicesSelectionGroupsComponent, InventoryDevicesComponent]
});
import { FormControl, Validators } from '@angular/forms';
import { Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { OrchestratorService } from '../../../../shared/api/orchestrator.service';
constructor(
public actionLabels: ActionLabelsI18n,
private authStorageService: AuthStorageService,
- private i18n: I18n,
private orchService: OrchestratorService,
private router: Router,
private modalService: ModalService
) {
super();
- this.resource = this.i18n('OSDs');
+ this.resource = $localize`OSDs`;
this.action = this.actionLabels.CREATE;
this.features = {
encrypted: {
key: 'encrypted',
- desc: this.i18n('Encryption')
+ desc: $localize`Encryption`
}
};
this.featureList = _.map(this.features, (o, key) => Object.assign(o, { key: key }));
import { ToastrModule } from 'ngx-toastr';
import { EMPTY, of } from 'rxjs';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../../testing/unit-test-helper';
import { CoreModule } from '../../../../core/core.module';
import { OrchestratorService } from '../../../../shared/api/orchestrator.service';
import { OsdService } from '../../../../shared/api/osd.service';
CoreModule,
RouterTestingModule
],
- declarations: [],
providers: [
{ provide: AuthStorageService, useValue: fakeAuthStorageService },
TableActionsComponent,
- ModalService,
- i18nProviders
+ ModalService
]
});
import { Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin as observableForkJoin, Observable } from 'rxjs';
private osdService: OsdService,
private dimlessBinaryPipe: DimlessBinaryPipe,
private modalService: ModalService,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
private router: Router,
private depCheckerService: DepCheckerService,
click: () => {
this.depCheckerService.checkOrchestratorOrModal(
this.actionLabels.CREATE,
- this.i18n('OSD'),
+ $localize`OSD`,
() => {
this.router.navigate([this.urlBuilder.getCreate()]);
}
{
name: this.actionLabels.MARK_OUT,
permission: 'update',
- click: () => this.showConfirmationModal(this.i18n('out'), this.osdService.markOut),
+ click: () => this.showConfirmationModal($localize`out`, this.osdService.markOut),
disable: () => this.isNotSelectedOrInState('out'),
icon: Icons.left
},
{
name: this.actionLabels.MARK_IN,
permission: 'update',
- click: () => this.showConfirmationModal(this.i18n('in'), this.osdService.markIn),
+ click: () => this.showConfirmationModal($localize`in`, this.osdService.markIn),
disable: () => this.isNotSelectedOrInState('in'),
icon: Icons.right
},
{
name: this.actionLabels.MARK_DOWN,
permission: 'update',
- click: () => this.showConfirmationModal(this.i18n('down'), this.osdService.markDown),
+ click: () => this.showConfirmationModal($localize`down`, this.osdService.markDown),
disable: () => this.isNotSelectedOrInState('down'),
icon: Icons.down
},
permission: 'delete',
click: () =>
this.showCriticalConfirmationModal(
- this.i18n('Mark'),
- this.i18n('OSD lost'),
- this.i18n('marked lost'),
+ $localize`Mark`,
+ $localize`OSD lost`,
+ $localize`marked lost`,
(ids: number[]) => {
return this.osdService.safeToDestroy(JSON.stringify(ids));
},
permission: 'delete',
click: () =>
this.showCriticalConfirmationModal(
- this.i18n('Purge'),
- this.i18n('OSD'),
- this.i18n('purged'),
+ $localize`Purge`,
+ $localize`OSD`,
+ $localize`purged`,
(ids: number[]) => {
return this.osdService.safeToDestroy(JSON.stringify(ids));
},
permission: 'delete',
click: () =>
this.showCriticalConfirmationModal(
- this.i18n('destroy'),
- this.i18n('OSD'),
- this.i18n('destroyed'),
+ $localize`destroy`,
+ $localize`OSD`,
+ $localize`destroyed`,
(ids: number[]) => {
return this.osdService.safeToDestroy(JSON.stringify(ids));
},
ngOnInit() {
this.clusterWideActions = [
{
- name: this.i18n('Flags'),
+ name: $localize`Flags`,
icon: Icons.flag,
click: () => this.configureFlagsAction(),
permission: 'read',
visible: () => this.permissions.osd.read
},
{
- name: this.i18n('Recovery Priority'),
+ name: $localize`Recovery Priority`,
icon: Icons.deepCheck,
click: () => this.configureQosParamsAction(),
permission: 'read',
visible: () => this.permissions.configOpt.read
},
{
- name: this.i18n('PG scrub'),
+ name: $localize`PG scrub`,
icon: Icons.analyse,
click: () => this.configurePgScrubAction(),
permission: 'read',
}
];
this.columns = [
- { prop: 'host.name', name: this.i18n('Host') },
- { prop: 'id', name: this.i18n('ID'), flexGrow: 1, cellTransformation: CellTemplate.bold },
+ { prop: 'host.name', name: $localize`Host` },
+ { prop: 'id', name: $localize`ID`, flexGrow: 1, cellTransformation: CellTemplate.bold },
{
prop: 'collectedStates',
- name: this.i18n('Status'),
+ name: $localize`Status`,
flexGrow: 1,
cellTransformation: CellTemplate.badge,
customTemplateConfig: {
},
{
prop: 'tree.device_class',
- name: this.i18n('Device class'),
+ name: $localize`Device class`,
flexGrow: 1.2,
cellTransformation: CellTemplate.badge,
customTemplateConfig: {
},
{
prop: 'stats.numpg',
- name: this.i18n('PGs'),
+ name: $localize`PGs`,
flexGrow: 1
},
{
prop: 'stats.stat_bytes',
- name: this.i18n('Size'),
+ name: $localize`Size`,
flexGrow: 1,
pipe: this.dimlessBinaryPipe
},
- { prop: 'stats.usage', name: this.i18n('Usage'), cellTemplate: this.osdUsageTpl },
+ { prop: 'stats.usage', name: $localize`Usage`, cellTemplate: this.osdUsageTpl },
{
prop: 'stats_history.out_bytes',
- name: this.i18n('Read bytes'),
+ name: $localize`Read bytes`,
cellTransformation: CellTemplate.sparkline
},
{
prop: 'stats_history.in_bytes',
- name: this.i18n('Write bytes'),
+ name: $localize`Write bytes`,
cellTransformation: CellTemplate.sparkline
},
{
prop: 'stats.op_r',
- name: this.i18n('Read ops'),
+ name: $localize`Read ops`,
cellTransformation: CellTemplate.perSecond
},
{
prop: 'stats.op_w',
- name: this.i18n('Write ops'),
+ name: $localize`Write ops`,
cellTransformation: CellTemplate.perSecond
}
];
const selectedOsd = _.filter(this.osds, ['id', this.selection.first().id]).pop();
this.modalService.show(FormModalComponent, {
- titleText: this.i18n('Edit OSD: {{id}}', {
- id: selectedOsd.id
- }),
+ titleText: $localize`Edit OSD: ${selectedOsd.id}`,
fields: [
{
type: 'text',
name: 'deviceClass',
value: selectedOsd.tree.device_class,
- label: this.i18n('Device class'),
+ label: $localize`Device class`,
required: true
}
],
- submitButtonText: this.i18n('Edit OSD'),
+ submitButtonText: $localize`Edit OSD`,
onSubmit: (values: any) => {
this.osdService.update(selectedOsd.id, values.deviceClass).subscribe(() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Updated OSD '{{id}}'`, {
- id: selectedOsd.id
- })
+ $localize`Updated OSD '${selectedOsd.id}'`
);
this.getOsdList();
});
showConfirmationModal(markAction: string, onSubmit: (id: number) => Observable<any>) {
this.bsModalRef = this.modalService.show(ConfirmationModalComponent, {
- titleText: this.i18n('Mark OSD {{markAction}}', { markAction: markAction }),
- buttonText: this.i18n('Mark {{markAction}}', { markAction: markAction }),
+ titleText: $localize`Mark OSD ${markAction}`,
+ buttonText: $localize`Mark ${markAction}`,
bodyTpl: this.markOsdConfirmationTpl,
bodyContext: {
markActionDescription: markAction
this.depCheckerService.checkOrchestratorOrModal(
this.actionLabels.DELETE,
- this.i18n('OSD'),
+ $localize`OSD`,
() => {
this.showCriticalConfirmationModal(
- this.i18n('delete'),
- this.i18n('OSD'),
- this.i18n('deleted'),
+ $localize`delete`,
+ $localize`OSD`,
+ $localize`deleted`,
(ids: number[]) => {
return this.osdService.safeToDelete(JSON.stringify(ids));
},
import { ToastrModule } from 'ngx-toastr';
import { of as observableOf } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { ConfigurationService } from '../../../../shared/api/configuration.service';
import { NotificationType } from '../../../../shared/enum/notification-type.enum';
import { NotificationService } from '../../../../shared/services/notification.service';
ToastrModule.forRoot()
],
declarations: [OsdPgScrubModalComponent],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { Component, ViewChild } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { forkJoin as observableForkJoin } from 'rxjs';
import { ConfigOptionComponent } from '../../../../shared/components/config-option/config-option.component';
public activeModal: NgbActiveModal,
private authStorageService: AuthStorageService,
private notificationService: NotificationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
this.osdPgScrubForm = new CdFormGroup({});
- this.resource = this.i18n('PG scrub options');
+ this.resource = $localize`PG scrub options`;
this.action = this.actionLabels.EDIT;
this.permissions = this.authStorageService.getPermissions();
}
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n('Updated PG scrub options')
+ $localize`Updated PG scrub options`
);
this.activeModal.close();
},
import { ToastrModule } from 'ngx-toastr';
import { of as observableOf } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { ConfigurationService } from '../../../../shared/api/configuration.service';
import { SharedModule } from '../../../../shared/shared.module';
import { OsdRecvSpeedModalComponent } from './osd-recv-speed-modal.component';
ToastrModule.forRoot()
],
declarations: [OsdRecvSpeedModalComponent],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
let configOptions: any[] = [];
import { FormControl, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ConfigurationService } from '../../../../shared/api/configuration.service';
private authStorageService: AuthStorageService,
private configService: ConfigurationService,
private notificationService: NotificationService,
- private i18n: I18n,
private osdService: OsdService
) {
this.permissions = this.authStorageService.getPermissions();
});
this.priorityAttrs = {
osd_max_backfills: {
- text: this.i18n('Max Backfills'),
+ text: $localize`Max Backfills`,
desc: '',
patternHelpText: '',
maxValue: undefined,
minValue: undefined
},
osd_recovery_max_active: {
- text: this.i18n('Recovery Max Active'),
+ text: $localize`Recovery Max Active`,
desc: '',
patternHelpText: '',
maxValue: undefined,
minValue: undefined
},
osd_recovery_max_single_start: {
- text: this.i18n('Recovery Max Single Start'),
+ text: $localize`Recovery Max Single Start`,
desc: '',
patternHelpText: '',
maxValue: undefined,
minValue: undefined
},
osd_recovery_sleep: {
- text: this.i18n('Recovery Sleep'),
+ text: $localize`Recovery Sleep`,
desc: '',
patternHelpText: '',
maxValue: undefined,
if (Object.entries(configOptionValues).length === 4) {
this.osdRecvSpeedForm.controls.customizePriority.setValue(true);
return callbackFn(
- Object({ name: 'custom', text: this.i18n('Custom'), values: configOptionValues })
+ Object({ name: 'custom', text: $localize`Custom`, values: configOptionValues })
);
}
if (this.osdRecvSpeedForm.getValue('customizePriority')) {
const customPriority = {
name: 'custom',
- text: this.i18n('Custom'),
+ text: $localize`Custom`,
values: values
};
this.setPriority(customPriority);
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Updated OSD recovery speed priority '{{value}}'`, {
- value: this.osdRecvSpeedForm.getValue('priority')
- })
+ $localize`Updated OSD recovery speed priority '${this.osdRecvSpeedForm.getValue(
+ 'priority'
+ )}'`
);
this.activeModal.close();
},
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { OsdService } from '../../../../shared/api/osd.service';
import { BackButtonComponent } from '../../../../shared/components/back-button/back-button.component';
import { ModalComponent } from '../../../../shared/components/modal/modal.component';
SubmitButtonComponent,
BackButtonComponent
],
- providers: [OsdService, NgbActiveModal, CdFormBuilder, i18nProviders]
+ providers: [OsdService, NgbActiveModal, CdFormBuilder]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { OsdService } from '../../../../shared/api/osd.service';
import { JoinPipe } from '../../../../shared/pipes/join.pipe';
import { NotificationService } from '../../../../shared/services/notification.service';
NgbActiveModal,
JoinPipe,
{ provide: OsdService, useValue: fakeService },
- { provide: NotificationService, useValue: fakeService },
- i18nProviders
+ { provide: NotificationService, useValue: fakeService }
]
});
import { FormGroup } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { forkJoin } from 'rxjs';
import { OsdService } from '../../../../shared/api/osd.service';
public activeModal: NgbActiveModal,
private osdService: OsdService,
private notificationService: NotificationService,
- private i18n: I18n,
private joinPipe: JoinPipe
) {}
this.notificationService.show(
NotificationType.success,
- this.i18n('{{operation}} was initialized in the following OSD(s): {{id}}', {
- operation: operation,
- id: this.joinPipe.transform(this.selected)
- })
+ $localize`${operation} was initialized in the following OSD(s): ${this.joinPipe.transform(
+ this.selected
+ )}`
);
this.activeModal.close();
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../../testing/unit-test-helper';
import { CoreModule } from '../../../../core/core.module';
import { TableActionsComponent } from '../../../../shared/datatable/table-actions/table-actions.component';
import { SharedModule } from '../../../../shared/shared.module';
DashboardModule,
CephModule,
CoreModule
- ],
- declarations: [],
- providers: [i18nProviders]
+ ]
});
beforeEach(() => {
import { Component, Inject, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { PrometheusService } from '../../../../shared/api/prometheus.service';
import { CellTemplate } from '../../../../shared/enum/cell-template.enum';
import { Icons } from '../../../../shared/enum/icons.enum';
private authStorageService: AuthStorageService,
public prometheusAlertService: PrometheusAlertService,
private urlBuilder: URLBuilderService,
- private i18n: I18n,
private cdDatePipe: CdDatePipe,
@Inject(PrometheusService) prometheusService: PrometheusService,
@Inject(SummaryService) summaryService: SummaryService,
icon: Icons.add,
routerLink: () =>
'/monitoring' + this.urlBuilder.getCreateFrom(this.selection.first().fingerprint),
- name: this.i18n('Create Silence')
+ name: $localize`Create Silence`
}
];
}
super.ngOnInit();
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'labels.alertname',
flexGrow: 2
},
{
- name: this.i18n('Job'),
+ name: $localize`Job`,
prop: 'labels.job',
flexGrow: 2
},
{
- name: this.i18n('Severity'),
+ name: $localize`Severity`,
prop: 'labels.severity'
},
{
- name: this.i18n('State'),
+ name: $localize`State`,
prop: 'status.state',
cellTransformation: CellTemplate.classAdding
},
{
- name: this.i18n('Started'),
+ name: $localize`Started`,
prop: 'startsAt',
pipe: this.cdDatePipe
},
{
- name: this.i18n('URL'),
+ name: $localize`URL`,
prop: 'generatorURL',
sortable: false,
cellTemplate: this.externalLinkTpl
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { PrometheusService } from '../../../../shared/api/prometheus.service';
import { SettingsService } from '../../../../shared/api/settings.service';
import { SharedModule } from '../../../../shared/shared.module';
RouterTestingModule,
ToastrModule.forRoot()
],
- providers: [PrometheusService, SettingsService, i18nProviders]
+ providers: [PrometheusService, SettingsService]
});
beforeEach(() => {
import { Component, Inject, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { PrometheusService } from '../../../../shared/api/prometheus.service';
import { CdTableColumn } from '../../../../shared/models/cd-table-column';
import { PrometheusRule } from '../../../../shared/models/prometheus-alerts';
hideKeys = ['alerts', 'type'];
constructor(
- private i18n: I18n,
public prometheusAlertService: PrometheusAlertService,
@Inject(PrometheusService) prometheusService: PrometheusService,
@Inject(SummaryService) summaryService: SummaryService,
ngOnInit() {
super.ngOnInit();
this.columns = [
- { prop: 'name', name: this.i18n('Name') },
- { prop: 'labels.severity', name: this.i18n('Severity') },
- { prop: 'group', name: this.i18n('Group') },
- { prop: 'duration', name: this.i18n('Duration'), pipe: new DurationPipe() },
- { prop: 'query', name: this.i18n('Query'), isHidden: true },
- { prop: 'annotations.description', name: this.i18n('Description') }
+ { prop: 'name', name: $localize`Name` },
+ { prop: 'labels.severity', name: $localize`Severity` },
+ { prop: 'group', name: $localize`Group` },
+ { prop: 'duration', name: $localize`Duration`, pipe: new DurationPipe() },
+ { prop: 'query', name: $localize`Query`, isHidden: true },
+ { prop: 'annotations.description', name: $localize`Description` }
];
}
}
configureTestBed,
FixtureHelper,
FormHelper,
- i18nProviders,
PrometheusHelper
} from '../../../../../testing/unit-test-helper';
import { NotFoundComponent } from '../../../../core/not-found/not-found.component';
ReactiveFormsModule
],
providers: [
- i18nProviders,
{
provide: ActivatedRoute,
useValue: { params: { subscribe: (fn: Function) => fn(params) } }
import { Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import * as moment from 'moment';
id: string;
action: string;
- resource = this.i18n('silence');
+ resource = $localize`silence`;
matchers: AlertmanagerSilenceMatcher[] = [];
matcherMatch: AlertmanagerSilenceMatcherMatch = undefined;
matcherConfig = [
{
- tooltip: this.i18n('Attribute name'),
+ tooltip: $localize`Attribute name`,
icon: this.icons.paragraph,
attribute: 'name'
},
{
- tooltip: this.i18n('Value'),
+ tooltip: $localize`Value`,
icon: this.icons.terminal,
attribute: 'value'
},
{
- tooltip: this.i18n('Regular expression'),
+ tooltip: $localize`Regular expression`,
icon: this.icons.magic,
attribute: 'isRegex'
}
datetimeFormat = 'YYYY-MM-DD HH:mm';
constructor(
- private i18n: I18n,
private router: Router,
private authStorageService: AuthStorageService,
private formBuilder: CdFormBuilder,
this.rules = [];
this.notificationService.show(
NotificationType.info,
- this.i18n(
- 'Please add your Prometheus host to the dashboard configuration and refresh the page'
- ),
+ $localize`Please add your Prometheus host to the dashboard configuration and refresh the page`,
undefined,
undefined,
'Prometheus'
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../../testing/unit-test-helper';
import { PrometheusService } from '../../../../shared/api/prometheus.service';
import { CriticalConfirmationModalComponent } from '../../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
import { TableActionsComponent } from '../../../../shared/datatable/table-actions/table-actions.component';
HttpClientTestingModule,
NgbNavModule
],
- declarations: [SilenceListComponent, PrometheusTabsComponent],
- providers: [i18nProviders]
+ declarations: [SilenceListComponent, PrometheusTabsComponent]
});
beforeEach(() => {
import { Component, Inject } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { SortDirection, SortPropDir } from '@swimlane/ngx-datatable';
import { Observable, Subscriber } from 'rxjs';
constructor(
private authStorageService: AuthStorageService,
- private i18n: I18n,
private cdDatePipe: CdDatePipe,
private modalService: ModalService,
private notificationService: NotificationService,
];
this.columns = [
{
- name: this.i18n('ID'),
+ name: $localize`ID`,
prop: 'id',
flexGrow: 3
},
{
- name: this.i18n('Created by'),
+ name: $localize`Created by`,
prop: 'createdBy',
flexGrow: 2
},
{
- name: this.i18n('Started'),
+ name: $localize`Started`,
prop: 'startsAt',
pipe: this.cdDatePipe
},
{
- name: this.i18n('Updated'),
+ name: $localize`Updated`,
prop: 'updatedAt',
pipe: this.cdDatePipe
},
{
- name: this.i18n('Ends'),
+ name: $localize`Ends`,
prop: 'endsAt',
pipe: this.cdDatePipe
},
{
- name: this.i18n('Status'),
+ name: $localize`Status`,
prop: 'status.state',
cellTransformation: CellTemplate.classAdding
}
expireSilence() {
const id = this.selection.first().id;
- const i18nSilence = this.i18n('Silence');
+ const i18nSilence = $localize`Silence`;
const applicationName = 'Prometheus';
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
itemDescription: i18nSilence,
configureTestBed,
FixtureHelper,
FormHelper,
- i18nProviders,
PrometheusHelper
} from '../../../../../testing/unit-test-helper';
import { SharedModule } from '../../../../shared/shared.module';
RouterTestingModule,
ReactiveFormsModule
],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import * as _ from 'lodash';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { CoreModule } from '../../../../core/core.module';
import { CephServiceService } from '../../../../shared/api/ceph-service.service';
import { HostService } from '../../../../shared/api/host.service';
};
configureTestBed({
- imports: [HttpClientTestingModule, CephModule, CoreModule, SharedModule],
- declarations: [],
- providers: [i18nProviders]
+ imports: [HttpClientTestingModule, CephModule, CoreModule, SharedModule]
});
beforeEach(() => {
ViewChildren
} from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Observable, Subscription } from 'rxjs';
private daemonsTableTplsSub: Subscription;
constructor(
- private i18n: I18n,
private hostService: HostService,
private cephServiceService: CephServiceService,
private orchService: OrchestratorService
ngOnInit() {
this.columns = [
{
- name: this.i18n('Hostname'),
+ name: $localize`Hostname`,
prop: 'hostname',
flexGrow: 1,
filterable: true
},
{
- name: this.i18n('Daemon type'),
+ name: $localize`Daemon type`,
prop: 'daemon_type',
flexGrow: 1,
filterable: true
},
{
- name: this.i18n('Daemon ID'),
+ name: $localize`Daemon ID`,
prop: 'daemon_id',
flexGrow: 1,
filterable: true
},
{
- name: this.i18n('Container ID'),
+ name: $localize`Container ID`,
prop: 'container_id',
flexGrow: 3,
filterable: true,
}
},
{
- name: this.i18n('Container Image name'),
+ name: $localize`Container Image name`,
prop: 'container_image_name',
flexGrow: 3,
filterable: true
},
{
- name: this.i18n('Container Image ID'),
+ name: $localize`Container Image ID`,
prop: 'container_image_id',
flexGrow: 3,
filterable: true,
}
},
{
- name: this.i18n('Version'),
+ name: $localize`Version`,
prop: 'version',
flexGrow: 1,
filterable: true
},
{
- name: this.i18n('Status'),
+ name: $localize`Status`,
prop: 'status_desc',
flexGrow: 1,
filterable: true,
cellTemplate: this.statusTpl
},
{
- name: this.i18n('Last Refreshed'),
+ name: $localize`Last Refreshed`,
prop: 'last_refresh',
flexGrow: 2
}
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../../testing/unit-test-helper';
import { CdTableSelection } from '../../../../shared/models/cd-table-selection';
import { SummaryService } from '../../../../shared/services/summary.service';
import { SharedModule } from '../../../../shared/shared.module';
configureTestBed({
imports: [HttpClientTestingModule, RouterTestingModule, SharedModule, NgbNavModule],
declarations: [ServiceDetailsComponent, ServiceDaemonListComponent],
- providers: [
- i18nProviders,
- {
- provide: SummaryService,
- useValue: {
- subscribeOnce: jest.fn()
- }
- }
- ]
+ providers: [{ provide: SummaryService, useValue: { subscribeOnce: jest.fn() } }]
});
beforeEach(() => {
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CoreModule } from '../../../core/core.module';
import { CephServiceService } from '../../../shared/api/ceph-service.service';
import { OrchestratorService } from '../../../shared/api/orchestrator.service';
HttpClientTestingModule,
RouterTestingModule
],
- providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }, i18nProviders],
- declarations: []
+ providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { CephServiceService } from '../../../shared/api/ceph-service.service';
import { OrchestratorService } from '../../../shared/api/orchestrator.service';
import { ListWithDetails } from '../../../shared/classes/list-with-details.class';
constructor(
private authStorageService: AuthStorageService,
- private i18n: I18n,
private orchService: OrchestratorService,
private cephServiceService: CephServiceService
) {
ngOnInit() {
const columns = [
{
- name: this.i18n('Service'),
+ name: $localize`Service`,
prop: 'service_name',
flexGrow: 1
},
{
- name: this.i18n('Container image name'),
+ name: $localize`Container image name`,
prop: 'status.container_image_name',
flexGrow: 3
},
{
- name: this.i18n('Container image ID'),
+ name: $localize`Container image ID`,
prop: 'status.container_image_id',
flexGrow: 3,
cellTransformation: CellTemplate.truncate,
}
},
{
- name: this.i18n('Running'),
+ name: $localize`Running`,
prop: 'status.running',
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
- name: this.i18n('Size'),
+ name: $localize`Size`,
prop: 'status.size',
flexGrow: 1
},
{
- name: this.i18n('Last Refreshed'),
+ name: $localize`Last Refreshed`,
prop: 'status.last_refresh',
flexGrow: 1
}
import { ToastrModule } from 'ngx-toastr';
import { of as observableOf } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { MgrModuleService } from '../../../shared/api/mgr-module.service';
import { TelemetryService } from '../../../shared/api/telemetry.service';
import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
RouterTestingModule,
SharedModule,
ToastrModule.forRoot()
- ],
- providers: i18nProviders
+ ]
},
[LoadingPanelComponent]
);
import { ValidatorFn, Validators } from '@angular/forms';
import { Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin as observableForkJoin } from 'rxjs';
private notificationService: NotificationService,
private router: Router,
private telemetryService: TelemetryService,
- private i18n: I18n,
private textToDownloadService: TextToDownloadService,
private telemetryNotificationService: TelemetryNotificationService
) {
this.mgrModuleService.updateConfig('telemetry', config).subscribe(
() => {
this.disableModule(
- this.i18n(
- `Your settings have been applied successfully. \
-Due to privacy/legal reasons the Telemetry module is now disabled until you \
-complete the next step and accept the license.`
- ),
+ $localize`Your settings have been applied successfully. \
+ Due to privacy/legal reasons the Telemetry module is now disabled until you \
+ complete the next step and accept the license.`,
() => {
this.getReport();
}
this.telemetryNotificationService.setVisibility(false);
this.notificationService.show(
NotificationType.success,
- this.i18n('The Telemetry module has been configured and activated successfully.')
+ $localize`The Telemetry module has been configured and activated successfully.`
);
this.router.navigate(['']);
});
import * as _ from 'lodash';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { HealthService } from '../../../shared/api/health.service';
import { Permissions } from '../../../shared/models/permissions';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
],
schemas: [NO_ERRORS_SCHEMA],
providers: [
- i18nProviders,
{ provide: AuthStorageService, useValue: fakeAuthStorageService },
PgCategoryService,
RefreshIntervalService
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Subscription } from 'rxjs';
constructor(
private healthService: HealthService,
- private i18n: I18n,
private authStorageService: AuthStorageService,
private pgCategoryService: PgCategoryService,
private featureToggles: FeatureTogglesService,
this.healthData.client_perf.write_op_per_sec + this.healthData.client_perf.read_op_per_sec;
ratioLabels.push(
- `${this.i18n('Writes')} (${this.calcPercentage(
+ `${$localize`Writes`} (${this.calcPercentage(
this.healthData.client_perf.write_op_per_sec,
total
)}%)`
);
ratioData.push(this.healthData.client_perf.write_op_per_sec);
ratioLabels.push(
- `${this.i18n('Reads')} (${this.calcPercentage(
+ `${$localize`Reads`} (${this.calcPercentage(
this.healthData.client_perf.read_op_per_sec,
total
)}%)`
chart.dataset[0].data = [data.df.stats.total_used_raw_bytes, data.df.stats.total_avail_bytes];
chart.labels = [
- `${this.dimlessBinary.transform(data.df.stats.total_used_raw_bytes)} ${this.i18n(
- 'Used'
- )} (${percentUsed}%)`,
- `${this.dimlessBinary.transform(
+ $localize`${this.dimlessBinary.transform(
+ data.df.stats.total_used_raw_bytes
+ )} Used (${percentUsed}%)`,
+ $localize`${this.dimlessBinary.transform(
data.df.stats.total_bytes - data.df.stats.total_used_raw_bytes
- )} ${this.i18n('Avail.')} (${percentAvailable}%)`
+ )} Avail. (${percentAvailable}%)`
];
chart.options.title.text = `${this.dimlessBinary.transform(
data.df.stats.total_bytes
- )} ${this.i18n('total')}`;
+ )} ${$localize`total`}`;
}
preparePgStatus(chart: Record<string, any>, data: Record<string, any>) {
.map((categoryType) => categoryPgAmount[categoryType]);
chart.labels = [
- `${this.i18n('Clean')} (${this.calcPercentage(categoryPgAmount['clean'], totalPgs)}%)`,
- `${this.i18n('Working')} (${this.calcPercentage(categoryPgAmount['working'], totalPgs)}%)`,
- `${this.i18n('Warning')} (${this.calcPercentage(categoryPgAmount['warning'], totalPgs)}%)`,
- `${this.i18n('Unknown')} (${this.calcPercentage(categoryPgAmount['unknown'], totalPgs)}%)`
+ `${$localize`Clean`} (${this.calcPercentage(categoryPgAmount['clean'], totalPgs)}%)`,
+ `${$localize`Working`} (${this.calcPercentage(categoryPgAmount['working'], totalPgs)}%)`,
+ `${$localize`Warning`} (${this.calcPercentage(categoryPgAmount['warning'], totalPgs)}%)`,
+ `${$localize`Unknown`} (${this.calcPercentage(categoryPgAmount['unknown'], totalPgs)}%)`
];
}
data.pg_info.object_stats.num_objects_unfound;
chart.labels = [
- `${this.i18n('Healthy')} (${this.calcPercentage(healthy, totalReplicas)}%)`,
- `${this.i18n('Misplaced')} (${this.calcPercentage(
+ `${$localize`Healthy`} (${this.calcPercentage(healthy, totalReplicas)}%)`,
+ `${$localize`Misplaced`} (${this.calcPercentage(
data.pg_info.object_stats.num_objects_misplaced,
totalReplicas
)}%)`,
- `${this.i18n('Degraded')} (${this.calcPercentage(
+ `${$localize`Degraded`} (${this.calcPercentage(
data.pg_info.object_stats.num_objects_degraded,
totalReplicas
)}%)`,
- `${this.i18n('Unfound')} (${this.calcPercentage(
+ `${$localize`Unfound`} (${this.calcPercentage(
data.pg_info.object_stats.num_objects_unfound,
totalReplicas
)}%)`
chart.options.title.text = `${this.dimless.transform(
data.pg_info.object_stats.num_objects
- )} ${this.i18n('total')} (${this.dimless.transform(totalReplicas)} ${this.i18n('replicas')})`;
+ )} ${$localize`total`} (${this.dimless.transform(totalReplicas)} ${$localize`replicas`})`;
chart.options.maintainAspectRatio = window.innerWidth >= 375;
}
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { MdsSummaryPipe } from './mds-summary.pipe';
describe('MdsSummaryPipe', () => {
let pipe: MdsSummaryPipe;
configureTestBed({
- providers: [MdsSummaryPipe, i18nProviders]
+ providers: [MdsSummaryPipe]
});
beforeEach(() => {
import { Pipe, PipeTransform } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
@Pipe({
name: 'mdsSummary'
})
export class MdsSummaryPipe implements PipeTransform {
- constructor(private i18n: I18n) {}
-
transform(value: any): any {
if (!value) {
return '';
});
if (value.standbys && !value.filesystems) {
- contentLine1 = `${standbys} ${this.i18n('up')}`;
- contentLine2 = this.i18n('no filesystems');
+ contentLine1 = `${standbys} ${$localize`up`}`;
+ contentLine2 = $localize`no filesystems`;
} else if (value.filesystems.length === 0) {
- contentLine1 = this.i18n('no filesystems');
+ contentLine1 = $localize`no filesystems`;
} else {
_.each(value.filesystems, (fs) => {
_.each(fs.mdsmap.info, (mds) => {
});
});
- contentLine1 = `${active} ${this.i18n('active')}`;
- contentLine2 = `${standbys + standbyReplay} ${this.i18n('standby')}`;
+ contentLine1 = `${active} ${$localize`active`}`;
+ contentLine2 = `${standbys + standbyReplay} ${$localize`standby`}`;
}
const standbyHoverText = value.standbys.map((s: any): string => s.name).join(', ');
const standbyTitleText = !standbyHoverText
? ''
- : `${this.i18n('standby daemons')}: ${standbyHoverText}`;
+ : `${$localize`standby daemons`}: ${standbyHoverText}`;
const fsLength = value.filesystems ? value.filesystems.length : 0;
const infoObject = fsLength > 0 ? value.filesystems[0].mdsmap.info : {};
const activeHoverText = Object.values(infoObject)
.map((info: any): string => info.name)
.join(', ');
- let activeTitleText = !activeHoverText
- ? ''
- : `${this.i18n('active daemon')}: ${activeHoverText}`;
+ let activeTitleText = !activeHoverText ? '' : `${$localize`active daemon`}: ${activeHoverText}`;
// There is always one standbyreplay to replace active daemon, if active one is down
if (!active && fsLength > 0) {
- activeTitleText = `${standbyReplay} ${this.i18n('standbyReplay')}`;
+ activeTitleText = `${standbyReplay} ${$localize`standbyReplay`}`;
}
const mgrSummary = [
{
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { MgrSummaryPipe } from './mgr-summary.pipe';
describe('MgrSummaryPipe', () => {
let pipe: MgrSummaryPipe;
configureTestBed({
- providers: [MgrSummaryPipe, i18nProviders]
+ providers: [MgrSummaryPipe]
});
beforeEach(() => {
import { Pipe, PipeTransform } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
@Pipe({
name: 'mgrSummary'
})
export class MgrSummaryPipe implements PipeTransform {
- constructor(private i18n: I18n) {}
-
transform(value: any): any {
if (!value) {
return '';
}
- let activeCount = this.i18n('n/a');
+ let activeCount = $localize`n/a`;
const activeTitleText = _.isUndefined(value.active_name)
? ''
- : `${this.i18n('active daemon')}: ${value.active_name}`;
+ : `${$localize`active daemon`}: ${value.active_name}`;
// There is always one standbyreplay to replace active daemon, if active one is down
if (activeTitleText.length > 0) {
activeCount = '1';
const standbyHoverText = value.standbys.map((s: any): string => s.name).join(', ');
const standbyTitleText = !standbyHoverText
? ''
- : `${this.i18n('standby daemons')}: ${standbyHoverText}`;
+ : `${$localize`standby daemons`}: ${standbyHoverText}`;
const standbyCount = value.standbys.length;
const mgrSummary = [
{
- content: `${activeCount} ${this.i18n('active')}`,
+ content: `${activeCount} ${$localize`active`}`,
class: 'popover-info',
titleText: activeTitleText
}
titleText: ''
});
mgrSummary.push({
- content: `${standbyCount} ${this.i18n('standby')}`,
+ content: `${standbyCount} ${$localize`standby`}`,
class: 'popover-info',
titleText: standbyTitleText
});
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { MonSummaryPipe } from './mon-summary.pipe';
describe('MonSummaryPipe', () => {
let pipe: MonSummaryPipe;
configureTestBed({
- providers: [MonSummaryPipe, i18nProviders]
+ providers: [MonSummaryPipe]
});
beforeEach(() => {
import { Pipe, PipeTransform } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
@Pipe({
name: 'monSummary'
})
export class MonSummaryPipe implements PipeTransform {
- constructor(private i18n: I18n) {}
-
transform(value: any): any {
if (!value) {
return '';
}
- const result = `${value.monmap.mons.length.toString()} (${this.i18n(
- 'quorum'
- )} ${value.quorum.join(', ')})`;
+ const result = $localize`${value.monmap.mons.length.toString()} (quorum \
+${value.quorum.join(', ')})`;
return result;
}
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { OsdSummaryPipe } from './osd-summary.pipe';
describe('OsdSummaryPipe', () => {
let pipe: OsdSummaryPipe;
configureTestBed({
- providers: [OsdSummaryPipe, i18nProviders]
+ providers: [OsdSummaryPipe]
});
beforeEach(() => {
import { Pipe, PipeTransform } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
@Pipe({
name: 'osdSummary'
})
export class OsdSummaryPipe implements PipeTransform {
- constructor(private i18n: I18n) {}
-
transform(value: any): any {
if (!value) {
return '';
const osdSummary = [
{
- content: `${value.osds.length} ${this.i18n('total')}`,
+ content: `${value.osds.length} ${$localize`total`}`,
class: ''
}
];
class: 'card-text-line-break'
});
osdSummary.push({
- content: `${upCount} ${this.i18n('up')}, ${inCount} ${this.i18n('in')}`,
+ content: `${upCount} ${$localize`up`}, ${inCount} ${$localize`in`}`,
class: ''
});
class: 'card-text-line-break'
});
- const downText = downCount > 0 ? `${downCount} ${this.i18n('down')}` : '';
+ const downText = downCount > 0 ? `${downCount} ${$localize`down`}` : '';
const separator = downCount > 0 && outCount > 0 ? ', ' : '';
- const outText = outCount > 0 ? `${outCount} ${this.i18n('out')}` : '';
+ const outText = outCount > 0 ? `${outCount} ${$localize`out`}` : '';
osdSummary.push({
content: `${downText}${separator}${outText}`,
class: 'card-text-error'
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { Nfs501Component } from './nfs-501.component';
configureTestBed({
declarations: [Nfs501Component],
- imports: [HttpClientTestingModule, RouterTestingModule, SharedModule],
- providers: i18nProviders
+ imports: [HttpClientTestingModule, RouterTestingModule, SharedModule]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
import { SummaryService } from '../../../shared/services/summary.service';
})
export class Nfs501Component implements OnInit, OnDestroy {
docsUrl: string;
- message = this.i18n('The NFS Ganesha service is not configured.');
+ message = $localize`The NFS Ganesha service is not configured.`;
routeParamsSubscribe: any;
constructor(
private route: ActivatedRoute,
private summaryService: SummaryService,
- private cephReleaseNamePipe: CephReleaseNamePipe,
- private i18n: I18n
+ private cephReleaseNamePipe: CephReleaseNamePipe
) {}
ngOnInit() {
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import * as _ from 'lodash';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { NfsDetailsComponent } from './nfs-details.component';
configureTestBed({
declarations: [NfsDetailsComponent],
- imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, NgbNavModule],
- providers: i18nProviders
+ imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, NgbNavModule]
});
beforeEach(() => {
import { Component, Input, OnChanges } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { CdTableColumn } from '../../../shared/models/cd-table-column';
@Component({
clientsColumns: CdTableColumn[];
clients: any[] = [];
- constructor(private i18n: I18n) {
+ constructor() {
this.clientsColumns = [
{
- name: this.i18n('Addresses'),
+ name: $localize`Addresses`,
prop: 'addresses',
flexGrow: 2
},
{
- name: this.i18n('Access Type'),
+ name: $localize`Access Type`,
prop: 'access_type',
flexGrow: 1
},
{
- name: this.i18n('Squash'),
+ name: $localize`Squash`,
prop: 'squash',
flexGrow: 1
}
this.clients = this.selectedItem.clients;
this.data = {};
- this.data[this.i18n('Cluster')] = this.selectedItem.cluster_id;
- this.data[this.i18n('Daemons')] = this.selectedItem.daemons;
- this.data[this.i18n('NFS Protocol')] = this.selectedItem.protocols.map(
+ this.data[$localize`Cluster`] = this.selectedItem.cluster_id;
+ this.data[$localize`Daemons`] = this.selectedItem.daemons;
+ this.data[$localize`NFS Protocol`] = this.selectedItem.protocols.map(
(protocol: string) => 'NFSv' + protocol
);
- this.data[this.i18n('Pseudo')] = this.selectedItem.pseudo;
- this.data[this.i18n('Access Type')] = this.selectedItem.access_type;
- this.data[this.i18n('Squash')] = this.selectedItem.squash;
- this.data[this.i18n('Transport')] = this.selectedItem.transports;
- this.data[this.i18n('Path')] = this.selectedItem.path;
+ this.data[$localize`Pseudo`] = this.selectedItem.pseudo;
+ this.data[$localize`Access Type`] = this.selectedItem.access_type;
+ this.data[$localize`Squash`] = this.selectedItem.squash;
+ this.data[$localize`Transport`] = this.selectedItem.transports;
+ this.data[$localize`Path`] = this.selectedItem.path;
if (this.selectedItem.fsal.name === 'CEPH') {
- this.data[this.i18n('Storage Backend')] = this.i18n('CephFS');
- this.data[this.i18n('CephFS User')] = this.selectedItem.fsal.user_id;
- this.data[this.i18n('CephFS Filesystem')] = this.selectedItem.fsal.fs_name;
- this.data[this.i18n('Security Label')] = this.selectedItem.fsal.sec_label_xattr;
+ this.data[$localize`Storage Backend`] = $localize`CephFS`;
+ this.data[$localize`CephFS User`] = this.selectedItem.fsal.user_id;
+ this.data[$localize`CephFS Filesystem`] = this.selectedItem.fsal.fs_name;
+ this.data[$localize`Security Label`] = this.selectedItem.fsal.sec_label_xattr;
} else {
- this.data[this.i18n('Storage Backend')] = this.i18n('Object Gateway');
- this.data[this.i18n('Object Gateway User')] = this.selectedItem.fsal.rgw_user_id;
+ this.data[$localize`Storage Backend`] = $localize`Object Gateway`;
+ this.data[$localize`Object Gateway User`] = this.selectedItem.fsal.rgw_user_id;
}
}
}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CdFormBuilder } from '../../../shared/forms/cd-form-builder';
import { CdFormGroup } from '../../../shared/forms/cd-form-group';
import { SharedModule } from '../../../shared/shared.module';
configureTestBed({
declarations: [NfsFormClientComponent],
- imports: [ReactiveFormsModule, SharedModule, HttpClientTestingModule],
- providers: i18nProviders
+ imports: [ReactiveFormsModule, SharedModule, HttpClientTestingModule]
});
beforeEach(() => {
import { Component, Input, OnInit } from '@angular/core';
import { FormArray, FormControl, NgForm, Validators } from '@angular/forms';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { NfsService } from '../../../shared/api/nfs.service';
nfsAccessType: any[] = this.nfsService.nfsAccessType;
icons = Icons;
- constructor(private nfsService: NfsService, private i18n: I18n) {}
+ constructor(private nfsService: NfsService) {}
ngOnInit() {
_.forEach(this.clients, (client) => {
getNoAccessTypeDescr() {
if (this.form.getValue('access_type')) {
- return `${this.form.getValue('access_type')} ${this.i18n('(inherited from global config)')}`;
+ return `${this.form.getValue('access_type')} ${$localize`(inherited from global config)`}`;
}
- return this.i18n('-- Select the access type --');
+ return $localize`-- Select the access type --`;
}
getAccessTypeHelp(index: number) {
getNoSquashDescr() {
if (this.form.getValue('squash')) {
- return `${this.form.getValue('squash')} (${this.i18n('inherited from global config')})`;
+ return `${this.form.getValue('squash')} (${$localize`inherited from global config`})`;
}
- return this.i18n('-- Select what kind of user id squashing is performed --');
+ return $localize`-- Select what kind of user id squashing is performed --`;
}
addClient() {
import { of } from 'rxjs';
import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
import { SummaryService } from '../../../shared/services/summary.service';
provide: ActivatedRoute,
useValue: new ActivatedRouteStub({ cluster_id: undefined, export_id: undefined })
},
- i18nProviders,
SummaryService,
CephReleaseNamePipe
]
import { FormControl, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin, Observable, of } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, mergeMap } from 'rxjs/operators';
docsUrl: string;
daemonsSelections: SelectOption[] = [];
- daemonsMessages = new SelectMessages(
- { noOptions: this.i18n('There are no daemons available.') },
- this.i18n
- );
+ daemonsMessages = new SelectMessages({ noOptions: $localize`There are no daemons available.` });
pathDataSource = (text$: Observable<string>) => {
return text$.pipe(
private cephReleaseNamePipe: CephReleaseNamePipe,
private taskWrapper: TaskWrapperService,
private cdRef: ChangeDetectorRef,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
this.permission = this.authStorageService.getPermissions().pool;
- this.resource = this.i18n('NFS export');
+ this.resource = $localize`NFS export`;
this.createForm();
}
import {
configureTestBed,
expectItemTasks,
- i18nProviders,
PermissionHelper
} from '../../../../testing/unit-test-helper';
import { NfsService } from '../../../shared/api/nfs.service';
NgbNavModule,
ToastrModule.forRoot()
],
- providers: [TaskListService, i18nProviders]
+ providers: [TaskListService]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Subscription } from 'rxjs';
constructor(
private authStorageService: AuthStorageService,
- private i18n: I18n,
private modalService: ModalService,
private nfsService: NfsService,
private taskListService: TaskListService,
ngOnInit() {
this.columns = [
{
- name: this.i18n('Path'),
+ name: $localize`Path`,
prop: 'path',
flexGrow: 2,
cellTransformation: CellTemplate.executing
},
{
- name: this.i18n('Pseudo'),
+ name: $localize`Pseudo`,
prop: 'pseudo',
flexGrow: 2
},
{
- name: this.i18n('Cluster'),
+ name: $localize`Cluster`,
prop: 'cluster_id',
flexGrow: 2
},
{
- name: this.i18n('Daemons'),
+ name: $localize`Daemons`,
prop: 'daemons',
flexGrow: 2
},
{
- name: this.i18n('Storage Backend'),
+ name: $localize`Storage Backend`,
prop: 'fsal',
flexGrow: 2,
cellTemplate: this.nfsFsal
},
{
- name: this.i18n('Access Type'),
+ name: $localize`Access Type`,
prop: 'access_type',
flexGrow: 2
}
const export_id = this.selection.first().export_id;
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.i18n('NFS export'),
+ itemDescription: $localize`NFS export`,
itemNames: [`${cluster_id}:${export_id}`],
submitActionObservable: () =>
this.taskWrapper.wrapTaskAroundCall({
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { TablePerformanceCounterComponent } from '../table-performance-counter/table-performance-counter.component';
import { PerformanceCounterComponent } from './performance-counter.component';
configureTestBed({
declarations: [PerformanceCounterComponent, TablePerformanceCounterComponent],
- imports: [RouterTestingModule, SharedModule, HttpClientTestingModule, BrowserAnimationsModule],
- providers: i18nProviders
+ imports: [RouterTestingModule, SharedModule, HttpClientTestingModule, BrowserAnimationsModule]
});
beforeEach(() => {
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { AppModule } from '../../../app.module';
import { CdTableFetchDataContext } from '../../../shared/models/cd-table-fetch-data-context';
import { TablePerformanceCounterComponent } from './table-performance-counter.component';
let httpTesting: HttpTestingController;
configureTestBed({
- imports: [AppModule, HttpClientTestingModule],
- providers: i18nProviders
+ imports: [AppModule, HttpClientTestingModule]
});
beforeEach(() => {
import { Component, Input, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { PerformanceCounterService } from '../../../shared/api/performance-counter.service';
import { CdTableColumn } from '../../../shared/models/cd-table-column';
import { CdTableFetchDataContext } from '../../../shared/models/cd-table-fetch-data-context';
@Input()
serviceId: string;
- constructor(private performanceCounterService: PerformanceCounterService, private i18n: I18n) {}
+ constructor(private performanceCounterService: PerformanceCounterService) {}
ngOnInit() {
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
flexGrow: 1
},
{
- name: this.i18n('Description'),
+ name: $localize`Description`,
prop: 'description',
flexGrow: 1
},
{
- name: this.i18n('Value'),
+ name: $localize`Value`,
prop: 'value',
cellTemplate: this.valueTpl,
flexGrow: 1
configureTestBed,
FixtureHelper,
FormHelper,
- i18nProviders,
Mocks
} from '../../../../testing/unit-test-helper';
import { CrushRuleService } from '../../../shared/api/crush-rule.service';
PoolModule,
NgBootstrapFormValidationModule.forRoot()
],
- providers: [CrushRuleService, NgbActiveModal, i18nProviders]
+ providers: [CrushRuleService, NgbActiveModal]
});
beforeEach(() => {
import { Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { CrushRuleService } from '../../../shared/api/crush-rule.service';
public activeModal: NgbActiveModal,
private taskWrapper: TaskWrapperService,
private crushRuleService: CrushRuleService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
this.action = this.actionLabels.CREATE;
- this.resource = this.i18n('Crush Rule');
+ this.resource = $localize`Crush Rule`;
this.createForm();
}
configureTestBed,
FixtureHelper,
FormHelper,
- i18nProviders,
Mocks
} from '../../../../testing/unit-test-helper';
import { ErasureCodeProfileService } from '../../../shared/api/erasure-code-profile.service';
PoolModule,
NgBootstrapFormValidationModule.forRoot()
],
- providers: [ErasureCodeProfileService, NgbActiveModal, i18nProviders]
+ providers: [ErasureCodeProfileService, NgbActiveModal]
});
beforeEach(() => {
import { Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { ErasureCodeProfileService } from '../../../shared/api/erasure-code-profile.service';
import { CrushNodeSelectionClass } from '../../../shared/classes/crush.node.selection.class';
public activeModal: NgbActiveModal,
private taskWrapper: TaskWrapperService,
private ecpService: ErasureCodeProfileService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
this.action = this.actionLabels.CREATE;
- this.resource = this.i18n('EC Profile');
+ this.resource = $localize`EC Profile`;
this.createForm();
this.setJerasureDefaults();
}
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders, TabHelper } from '../../../../testing/unit-test-helper';
+import { configureTestBed, TabHelper } from '../../../../testing/unit-test-helper';
import { Permissions } from '../../../shared/models/permissions';
import { SharedModule } from '../../../shared/shared.module';
import { RbdConfigurationListComponent } from '../../block/rbd-configuration-list/rbd-configuration-list.component';
HttpClientTestingModule,
RouterTestingModule
],
- declarations: [PoolDetailsComponent, RbdConfigurationListComponent],
- providers: [i18nProviders]
+ declarations: [PoolDetailsComponent, RbdConfigurationListComponent]
});
beforeEach(() => {
import { Component, Input, OnChanges } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { PoolService } from '../../../shared/api/pool.service';
cacheTiers: any[];
selectedPoolConfiguration: RbdConfigurationEntry[];
- constructor(private i18n: I18n, private poolService: PoolService) {
+ constructor(private poolService: PoolService) {
this.cacheTierColumns = [
{
prop: 'pool_name',
- name: this.i18n('Name'),
+ name: $localize`Name`,
flexGrow: 3
},
{
prop: 'cache_mode',
- name: this.i18n('Cache Mode'),
+ name: $localize`Cache Mode`,
flexGrow: 2
},
{
prop: 'cache_min_evict_age',
- name: this.i18n('Min Evict Age'),
+ name: $localize`Min Evict Age`,
flexGrow: 2
},
{
prop: 'cache_min_flush_age',
- name: this.i18n('Min Flush Age'),
+ name: $localize`Min Flush Age`,
flexGrow: 2
},
{
prop: 'target_max_bytes',
- name: this.i18n('Target Max Bytes'),
+ name: $localize`Target Max Bytes`,
flexGrow: 2
},
{
prop: 'target_max_objects',
- name: this.i18n('Target Max Objects'),
+ name: $localize`Target Max Objects`,
flexGrow: 2
}
];
import { Validators } from '@angular/forms';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { SelectMessages } from '../../../shared/components/select/select-messages.model';
import { Pool } from '../pool';
crushInfo = false;
applications: any;
- constructor(i18n: I18n) {
+ constructor() {
this.poolTypes = ['erasure', 'replicated'];
this.applications = {
selected: [],
default: ['cephfs', 'rbd', 'rgw'],
available: [], // Filled during runtime
validators: [Validators.pattern('[A-Za-z0-9_]+'), Validators.maxLength(128)],
- messages: new SelectMessages(
- {
- empty: i18n('No applications added'),
- selectionLimit: {
- text: i18n('Applications limit reached'),
- tooltip: i18n('A pool can only have up to four applications definitions.')
- },
- customValidations: {
- pattern: i18n(`Allowed characters '_a-zA-Z0-9'`),
- maxlength: i18n('Maximum length is 128 characters')
- },
- filter: i18n('Filter or add applications'),
- add: i18n('Add application')
+ messages: new SelectMessages({
+ empty: $localize`No applications added`,
+ selectionLimit: {
+ text: $localize`Applications limit reached`,
+ tooltip: $localize`A pool can only have up to four applications definitions.`
+ },
+ customValidations: {
+ pattern: $localize`Allowed characters '_a-zA-Z0-9'`,
+ maxlength: $localize`Maximum length is 128 characters`
},
- i18n
- )
+ filter: $localize`Filter or add applications'`,
+ add: $localize`Add application`
+ })
};
}
configureTestBed,
FixtureHelper,
FormHelper,
- i18nProviders,
Mocks,
modalServiceShow
} from '../../../../testing/unit-test-helper';
ErasureCodeProfileService,
NgbActiveModal,
SelectBadgesComponent,
- { provide: ActivatedRoute, useValue: { params: of({ name: 'somePoolName' }) } },
- i18nProviders
+ { provide: ActivatedRoute, useValue: { params: of({ name: 'somePoolName' }) } }
]
},
[CriticalConfirmationModalComponent]
import { ActivatedRoute, Router } from '@angular/router';
import { NgbNav, NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Observable, Subscription } from 'rxjs';
editing = false;
isReplicated = false;
isErasure = false;
- data = new PoolFormData(this.i18n);
+ data = new PoolFormData();
externalPgChange = false;
current: Record<string, any> = {
rules: []
private taskWrapper: TaskWrapperService,
private ecpService: ErasureCodeProfileService,
private crushRuleService: CrushRuleService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
this.editing = this.router.url.startsWith(`/pool/${URLVerbs.EDIT}`);
this.action = this.editing ? this.actionLabels.EDIT : this.actionLabels.CREATE;
- this.resource = this.i18n('pool');
+ this.resource = $localize`pool`;
this.authenticate();
this.createForm();
}
getTabs: () => this.ecpInfoTabs,
tabPosition: 'used-by-pools',
nameAttribute: 'name',
- itemDescription: this.i18n('erasure code profile'),
+ itemDescription: $localize`erasure code profile`,
reloadFn: () => this.reloadECPs(),
deleteFn: (name) => this.ecpService.delete(name),
taskName: 'ecp/delete'
getTabs: () => this.crushInfoTabs,
tabPosition: 'used-by-pools',
nameAttribute: 'rule_name',
- itemDescription: this.i18n('crush rule'),
+ itemDescription: $localize`crush rule`,
reloadFn: () => this.reloadCrushRules(),
deleteFn: (name) => this.crushRuleService.delete(name),
taskName: 'crushRule/delete'
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import {
- configureTestBed,
- expectItemTasks,
- i18nProviders
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, expectItemTasks } from '../../../../testing/unit-test-helper';
import { ConfigurationService } from '../../../shared/api/configuration.service';
import { PoolService } from '../../../shared/api/pool.service';
import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
NgbNavModule,
HttpClientTestingModule
],
- providers: [i18nProviders, PgCategoryService]
+ providers: [PgCategoryService]
});
beforeEach(() => {
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ConfigurationService } from '../../../shared/api/configuration.service';
private authStorageService: AuthStorageService,
private taskListService: TaskListService,
private modalService: ModalService,
- private i18n: I18n,
private pgCategoryService: PgCategoryService,
private dimlessPipe: DimlessPipe,
private urlBuilder: URLBuilderService,
this.columns = [
{
prop: 'pool_name',
- name: this.i18n('Name'),
+ name: $localize`Name`,
flexGrow: 4,
cellTransformation: CellTemplate.executing
},
{
prop: 'type',
- name: this.i18n('Type'),
+ name: $localize`Type`,
flexGrow: 2
},
{
prop: 'application_metadata',
- name: this.i18n('Applications'),
+ name: $localize`Applications`,
flexGrow: 3
},
{
prop: 'pg_status',
- name: this.i18n('PG Status'),
+ name: $localize`PG Status`,
flexGrow: 3,
cellClass: ({ row, column, value }): any => {
return this.getPgStatusCellClass(row, column, value);
},
{
prop: 'size',
- name: this.i18n('Replica Size'),
+ name: $localize`Replica Size`,
flexGrow: 2,
cellClass: 'text-right'
},
{
prop: 'last_change',
- name: this.i18n('Last Change'),
+ name: $localize`Last Change`,
flexGrow: 2,
cellClass: 'text-right'
},
{
prop: 'erasure_code_profile',
- name: this.i18n('Erasure Coded Profile'),
+ name: $localize`Erasure Coded Profile`,
flexGrow: 2
},
{
prop: 'crush_rule',
- name: this.i18n('Crush Ruleset'),
+ name: $localize`Crush Ruleset`,
flexGrow: 3
},
{
- name: this.i18n('Usage'),
+ name: $localize`Usage`,
prop: 'usage',
cellTemplate: this.poolUsageTpl,
flexGrow: 3
},
{
prop: 'stats.rd_bytes.rates',
- name: this.i18n('Read bytes'),
+ name: $localize`Read bytes`,
comparator: (_valueA: any, _valueB: any, rowA: Pool, rowB: Pool) =>
compare('stats.rd_bytes.latest', rowA, rowB),
cellTransformation: CellTemplate.sparkline,
},
{
prop: 'stats.wr_bytes.rates',
- name: this.i18n('Write bytes'),
+ name: $localize`Write bytes`,
comparator: (_valueA: any, _valueB: any, rowA: Pool, rowB: Pool) =>
compare('stats.wr_bytes.latest', rowA, rowB),
cellTransformation: CellTemplate.sparkline,
},
{
prop: 'stats.rd.rate',
- name: this.i18n('Read ops'),
+ name: $localize`Read ops`,
flexGrow: 1,
pipe: this.dimlessPipe,
cellTransformation: CellTemplate.perSecond
},
{
prop: 'stats.wr.rate',
- name: this.i18n('Write ops'),
+ name: $localize`Write ops`,
flexGrow: 1,
pipe: this.dimlessPipe,
cellTransformation: CellTemplate.perSecond
getDisableDesc(): string | undefined {
if (!this.monAllowPoolDelete) {
- return this.i18n(
- 'Pool deletion is disabled by the mon_allow_pool_delete configuration setting.'
- );
+ return $localize`Pool deletion is disabled by the mon_allow_pool_delete configuration setting.`;
}
return undefined;
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { Rgw501Component } from './rgw-501.component';
configureTestBed({
declarations: [Rgw501Component],
- imports: [HttpClientTestingModule, RouterTestingModule, SharedModule],
- providers: i18nProviders
+ imports: [HttpClientTestingModule, RouterTestingModule, SharedModule]
});
beforeEach(() => {
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CdTableSelection } from '../../../shared/models/cd-table-selection';
import { SharedModule } from '../../../shared/shared.module';
import { RgwBucketDetailsComponent } from './rgw-bucket-details.component';
configureTestBed({
declarations: [RgwBucketDetailsComponent],
- imports: [SharedModule],
- providers: [i18nProviders]
+ imports: [SharedModule]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
import { of as observableOf } from 'rxjs';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { RgwBucketService } from '../../../shared/api/rgw-bucket.service';
import { RgwSiteService } from '../../../shared/api/rgw-site.service';
import { RgwUserService } from '../../../shared/api/rgw-user.service';
RouterTestingModule,
SharedModule,
ToastrModule.forRoot()
- ],
- providers: [i18nProviders]
+ ]
});
beforeEach(() => {
component.submit();
expect(notificationService.show).toHaveBeenCalledWith(
NotificationType.success,
- `Created Object Gateway bucket ''`
+ `Created Object Gateway bucket 'null'`
);
});
component.submit();
expect(notificationService.show).toHaveBeenCalledWith(
NotificationType.success,
- `Updated Object Gateway bucket ''.`
+ `Updated Object Gateway bucket 'null'.`
);
});
});
import { AbstractControl, AsyncValidatorFn, ValidationErrors, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin } from 'rxjs';
private rgwSiteService: RgwSiteService,
private rgwUserService: RgwUserService,
private notificationService: NotificationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
this.editing = this.router.url.startsWith(`/rgw/bucket/${URLVerbs.EDIT}`);
this.action = this.editing ? this.actionLabels.EDIT : this.actionLabels.CREATE;
- this.resource = this.i18n('bucket');
+ this.resource = $localize`bucket`;
this.createForm();
}
const placementTargets = data['getPlacementTargets'];
this.zonegroup = placementTargets['zonegroup'];
_.forEach(placementTargets['placement_targets'], (placementTarget) => {
- placementTarget['description'] = `${placementTarget['name']} (${this.i18n('pool')}: ${
+ placementTarget['description'] = `${placementTarget['name']} (${$localize`pool`}: ${
placementTarget['data_pool']
})`;
this.placementTargets.push(placementTarget);
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Updated Object Gateway bucket '{{bid}}'.`, values)
+ $localize`Updated Object Gateway bucket '${values.bid}'.`
);
this.goToListView();
},
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Created Object Gateway bucket '{{bid}}'`, values)
+ $localize`Created Object Gateway bucket '${values.bid}'`
);
this.goToListView();
},
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { of } from 'rxjs';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
import { RgwBucketService } from '../../../shared/api/rgw-bucket.service';
import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
import { SharedModule } from '../../../shared/shared.module';
SharedModule,
NgbNavModule,
HttpClientTestingModule
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
ViewChild
} from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin as observableForkJoin, Observable, Subscriber } from 'rxjs';
private dimlessPipe: DimlessPipe,
private rgwBucketService: RgwBucketService,
private modalService: ModalService,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
public actionLabels: ActionLabelsI18n,
private ngZone: NgZone,
ngOnInit() {
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'bid',
flexGrow: 2
},
{
- name: this.i18n('Owner'),
+ name: $localize`Owner`,
prop: 'owner',
flexGrow: 2.5
},
{
- name: this.i18n('Used Capacity'),
+ name: $localize`Used Capacity`,
prop: 'bucket_size',
flexGrow: 0.6,
pipe: this.dimlessBinaryPipe
},
{
- name: this.i18n('Capacity Limit %'),
+ name: $localize`Capacity Limit %`,
prop: 'size_usage',
cellTemplate: this.bucketSizeTpl,
flexGrow: 0.8
},
{
- name: this.i18n('Objects'),
+ name: $localize`Objects`,
prop: 'num_objects',
flexGrow: 0.6,
pipe: this.dimlessPipe
},
{
- name: this.i18n('Object Limit %'),
+ name: $localize`Object Limit %`,
prop: 'object_usage',
cellTemplate: this.bucketObjectTpl,
flexGrow: 0.8
deleteAction() {
this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.selection.hasSingleSelection
- ? this.i18n('bucket')
- : this.i18n('buckets'),
+ itemDescription: this.selection.hasSingleSelection ? $localize`bucket` : $localize`buckets`,
itemNames: this.selection.selected.map((bucket: any) => bucket['bid']),
submitActionObservable: () => {
return new Observable((observer: Subscriber<any>) => {
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders, TabHelper } from '../../../../testing/unit-test-helper';
+import { configureTestBed, TabHelper } from '../../../../testing/unit-test-helper';
import { RgwSiteService } from '../../../shared/api/rgw-site.service';
import { Permissions } from '../../../shared/models/permissions';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
PerformanceCounterModule,
SharedModule,
RouterTestingModule
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { Component, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { RgwDaemonService } from '../../../shared/api/rgw-daemon.service';
import { RgwSiteService } from '../../../shared/api/rgw-site.service';
import { ListWithDetails } from '../../../shared/classes/list-with-details.class';
private rgwDaemonService: RgwDaemonService,
private authStorageService: AuthStorageService,
private cephShortVersionPipe: CephShortVersionPipe,
- private i18n: I18n,
private rgwSiteService: RgwSiteService
) {
super();
this.grafanaPermission = this.authStorageService.getPermissions().grafana;
this.columns = [
{
- name: this.i18n('ID'),
+ name: $localize`ID`,
prop: 'id',
flexGrow: 2
},
{
- name: this.i18n('Hostname'),
+ name: $localize`Hostname`,
prop: 'server_hostname',
flexGrow: 2
},
{
- name: this.i18n('Version'),
+ name: $localize`Version`,
prop: 'version',
flexGrow: 1,
pipe: this.cephShortVersionPipe
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RgwUserCapabilityModalComponent } from './rgw-user-capability-modal.component';
configureTestBed({
declarations: [RgwUserCapabilityModalComponent],
imports: [ReactiveFormsModule, SharedModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
constructor(
private formBuilder: CdFormBuilder,
public activeModal: NgbActiveModal,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
- this.resource = this.i18n('capability');
+ this.resource = $localize`capability`;
this.createForm();
}
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders, TabHelper } from '../../../../testing/unit-test-helper';
+import { configureTestBed, TabHelper } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RgwUserS3Key } from '../models/rgw-user-s3-key';
import { RgwUserDetailsComponent } from './rgw-user-details.component';
configureTestBed({
declarations: [RgwUserDetailsComponent],
- imports: [BrowserAnimationsModule, HttpClientTestingModule, SharedModule, NgbNavModule],
- providers: [i18nProviders]
+ imports: [BrowserAnimationsModule, HttpClientTestingModule, SharedModule, NgbNavModule]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { RgwUserService } from '../../../shared/api/rgw-user.service';
icons = Icons;
- constructor(
- private rgwUserService: RgwUserService,
- private modalService: ModalService,
- private i18n: I18n
- ) {}
+ constructor(private rgwUserService: RgwUserService, private modalService: ModalService) {}
ngOnInit() {
this.keysColumns = [
{
- name: this.i18n('Username'),
+ name: $localize`Username`,
prop: 'username',
flexGrow: 1
},
{
- name: this.i18n('Type'),
+ name: $localize`Type`,
prop: 'type',
flexGrow: 1
}
];
this.maxBucketsMap = {
- '-1': this.i18n('Disabled'),
- 0: this.i18n('Unlimited')
+ '-1': $localize`Disabled`,
+ 0: $localize`Unlimited`
};
}
import { ToastrModule } from 'ngx-toastr';
import { of as observableOf } from 'rxjs';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { RgwUserService } from '../../../shared/api/rgw-user.service';
import { NotificationType } from '../../../shared/enum/notification-type.enum';
import { NotificationService } from '../../../shared/services/notification.service';
SharedModule,
ToastrModule.forRoot(),
NgbTooltipModule
- ],
- providers: [i18nProviders]
+ ]
});
beforeEach(() => {
component.onSubmit();
expect(notificationService.show).toHaveBeenCalledWith(
NotificationType.success,
- `Created Object Gateway user ''`
+ `Created Object Gateway user 'null'`
);
});
component.onSubmit();
expect(notificationService.show).toHaveBeenCalledWith(
NotificationType.success,
- `Updated Object Gateway user ''`
+ `Updated Object Gateway user 'null'`
);
});
});
import { AbstractControl, ValidationErrors, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { concat as observableConcat, forkJoin as observableForkJoin, Observable } from 'rxjs';
private rgwUserService: RgwUserService,
private modalService: ModalService,
private notificationService: NotificationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
- this.resource = this.i18n('user');
- this.subuserLabel = this.i18n('subuser');
- this.s3keyLabel = this.i18n('S3 Key');
- this.capabilityLabel = this.i18n('capability');
+ this.resource = $localize`user`;
+ this.subuserLabel = $localize`subuser`;
+ this.s3keyLabel = $localize`S3 Key`;
+ this.capabilityLabel = $localize`capability`;
this.createForm();
}
const args = this._getUpdateArgs();
this.submitObservables.push(this.rgwUserService.update(uid, args));
}
- notificationTitle = this.i18n(`Updated Object Gateway user '{{uid}}'`, { uid: uid });
+ notificationTitle = $localize`Updated Object Gateway user '${uid}'`;
} else {
// Add
const args = this._getCreateArgs();
this.submitObservables.push(this.rgwUserService.create(args));
- notificationTitle = this.i18n(`Created Object Gateway user '{{uid}}'`, { uid: uid });
+ notificationTitle = $localize`Created Object Gateway user '${uid}'`;
}
// Check if user quota has been modified.
if (this._isUserQuotaDirty()) {
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
import { SharedModule } from '../../../shared/shared.module';
import { RgwUserListComponent } from './rgw-user-list.component';
configureTestBed({
declarations: [RgwUserListComponent],
imports: [BrowserAnimationsModule, RouterTestingModule, HttpClientTestingModule, SharedModule],
- schemas: [NO_ERRORS_SCHEMA],
- providers: i18nProviders
+ schemas: [NO_ERRORS_SCHEMA]
});
beforeEach(() => {
import { Component, NgZone, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { forkJoin as observableForkJoin, Observable, Subscriber } from 'rxjs';
import { RgwUserService } from '../../../shared/api/rgw-user.service';
private authStorageService: AuthStorageService,
private rgwUserService: RgwUserService,
private modalService: ModalService,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
public actionLabels: ActionLabelsI18n,
private ngZone: NgZone
this.permission = this.authStorageService.getPermissions().rgw;
this.columns = [
{
- name: this.i18n('Username'),
+ name: $localize`Username`,
prop: 'uid',
flexGrow: 1
},
{
- name: this.i18n('Full name'),
+ name: $localize`Full name`,
prop: 'display_name',
flexGrow: 1
},
{
- name: this.i18n('Email address'),
+ name: $localize`Email address`,
prop: 'email',
flexGrow: 1
},
{
- name: this.i18n('Suspended'),
+ name: $localize`Suspended`,
prop: 'suspended',
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
- name: this.i18n('Max. buckets'),
+ name: $localize`Max. buckets`,
prop: 'max_buckets',
flexGrow: 1,
cellTransformation: CellTemplate.map,
customTemplateConfig: {
- '-1': this.i18n('Disabled'),
- 0: this.i18n('Unlimited')
+ '-1': $localize`Disabled`,
+ 0: $localize`Unlimited`
}
}
];
deleteAction() {
this.modalService.show(CriticalConfirmationModalComponent, {
- itemDescription: this.selection.hasSingleSelection ? this.i18n('user') : this.i18n('users'),
+ itemDescription: this.selection.hasSingleSelection ? $localize`user` : $localize`users`,
itemNames: this.selection.selected.map((user: any) => user['uid']),
submitActionObservable: (): Observable<any> => {
return new Observable((observer: Subscriber<any>) => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RgwUserS3KeyModalComponent } from './rgw-user-s3-key-modal.component';
configureTestBed({
declarations: [RgwUserS3KeyModalComponent],
imports: [ReactiveFormsModule, SharedModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
constructor(
private formBuilder: CdFormBuilder,
public activeModal: NgbActiveModal,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
- this.resource = this.i18n('S3 Key');
+ this.resource = $localize`S3 Key`;
this.createForm();
}
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RgwUserSubuserModalComponent } from './rgw-user-subuser-modal.component';
configureTestBed({
declarations: [RgwUserSubuserModalComponent],
imports: [ReactiveFormsModule, SharedModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { AbstractControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
constructor(
private formBuilder: CdFormBuilder,
public bsModalRef: NgbActiveModal,
- private i18n: I18n,
private actionLabels: ActionLabelsI18n
) {
- this.resource = this.i18n('Subuser');
+ this.resource = $localize`Subuser`;
this.createForm();
}
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RgwUserSwiftKeyModalComponent } from './rgw-user-swift-key-modal.component';
configureTestBed({
declarations: [RgwUserSwiftKeyModalComponent],
imports: [ToastrModule.forRoot(), FormsModule, SharedModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { Component } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
resource: string;
action: string;
- constructor(
- public activeModal: NgbActiveModal,
- private i18n: I18n,
- public actionLabels: ActionLabelsI18n
- ) {
- this.resource = this.i18n('Swift Key');
+ constructor(public activeModal: NgbActiveModal, public actionLabels: ActionLabelsI18n) {
+ this.resource = $localize`Swift Key`;
this.action = this.actionLabels.SHOW;
}
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { DeviceListComponent } from './device-list.component';
configureTestBed({
declarations: [DeviceListComponent],
- imports: [SharedModule, HttpClientTestingModule],
- providers: [i18nProviders]
+ imports: [SharedModule, HttpClientTestingModule]
});
beforeEach(() => {
import { DatePipe } from '@angular/common';
import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { HostService } from '../../../shared/api/host.service';
import { OsdService } from '../../../shared/api/osd.service';
import { CellTemplate } from '../../../shared/enum/cell-template.enum';
constructor(
private hostService: HostService,
- private i18n: I18n,
private datePipe: DatePipe,
private osdService: OsdService
) {}
ngOnInit() {
this.columns = [
- { prop: 'devid', name: this.i18n('Device ID'), minWidth: 200 },
+ { prop: 'devid', name: $localize`Device ID`, minWidth: 200 },
{
prop: 'state',
- name: this.i18n('State of Health'),
+ name: $localize`State of Health`,
flexGrow: 1,
cellTransformation: CellTemplate.badge,
customTemplateConfig: {
map: {
- good: { value: this.i18n('Good'), class: 'badge-success' },
- warning: { value: this.i18n('Warning'), class: 'badge-warning' },
- bad: { value: this.i18n('Bad'), class: 'badge-danger' },
- stale: { value: this.i18n('Stale'), class: 'badge-info' },
- unknown: { value: this.i18n('Unknown'), class: 'badge-dark' }
+ good: { value: $localize`Good`, class: 'badge-success' },
+ warning: { value: $localize`Warning`, class: 'badge-warning' },
+ bad: { value: $localize`Bad`, class: 'badge-danger' },
+ stale: { value: $localize`Stale`, class: 'badge-info' },
+ unknown: { value: $localize`Unknown`, class: 'badge-dark' }
}
}
},
{
prop: 'life_expectancy_weeks',
- name: this.i18n('Life Expectancy'),
+ name: $localize`Life Expectancy`,
cellTemplate: this.lifeExpectancyTemplate
},
{
prop: 'life_expectancy_stamp',
- name: this.i18n('Prediction Creation Date'),
+ name: $localize`Prediction Creation Date`,
cellTemplate: this.lifeExpectancyTimestampTemplate,
pipe: this.datePipe,
isHidden: true
},
- { prop: 'location', name: this.i18n('Device Name'), cellTemplate: this.locationTemplate },
- { prop: 'readableDaemons', name: this.i18n('Daemons') }
+ { prop: 'location', name: $localize`Device Name`, cellTemplate: this.locationTemplate },
+ { prop: 'readableDaemons', name: $localize`Daemons` }
];
}
import * as _ from 'lodash';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { OsdService } from '../../../shared/api/osd.service';
import { HddSmartDataV1, NvmeSmartDataV1, SmartDataResult } from '../../../shared/models/smart';
import { SharedModule } from '../../../shared/shared.module';
configureTestBed({
declarations: [SmartListComponent],
- imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, NgbNavModule],
- providers: [i18nProviders]
+ imports: [BrowserAnimationsModule, SharedModule, HttpClientTestingModule, NgbNavModule]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { HostService } from '../../../shared/api/host.service';
smartDataColumns: CdTableColumn[];
- constructor(
- private i18n: I18n,
- private osdService: OsdService,
- private hostService: HostService
- ) {}
+ constructor(private osdService: OsdService, private hostService: HostService) {}
isSmartError(data: any): data is SmartError {
return _.get(data, 'error') !== undefined;
if (this.isSmartError(smartData)) {
let userMessage = '';
if (smartData.smartctl_error_code === -22) {
- userMessage = this.i18n(
- `Smartctl has received an unknown argument (error code {{code}}). \
+ userMessage = $localize`Smartctl has received an unknown argument \
+(error code ${smartData.smartctl_error_code}). \
You may be using an incompatible version of smartmontools. Version >= 7.0 of \
-smartmontools is required to successfully retrieve data.`,
- { code: smartData.smartctl_error_code }
- );
+smartmontools is required to successfully retrieve data.`;
} else {
- userMessage = this.i18n('An error with error code {{code}} occurred.', {
- code: smartData.smartctl_error_code
- });
+ userMessage = $localize`An error with error code ${smartData.smartctl_error_code} occurred.`;
}
const _result: SmartErrorResult = {
error: smartData.error,
ngOnInit() {
this.smartDataColumns = [
- { prop: 'id', name: this.i18n('ID') },
- { prop: 'name', name: this.i18n('Name') },
- { prop: 'raw.value', name: this.i18n('Raw') },
- { prop: 'thresh', name: this.i18n('Threshold') },
- { prop: 'value', name: this.i18n('Value') },
- { prop: 'when_failed', name: this.i18n('When Failed') },
- { prop: 'worst', name: this.i18n('Worst') }
+ { prop: 'id', name: $localize`ID` },
+ { prop: 'name', name: $localize`Name` },
+ { prop: 'raw.value', name: $localize`Raw` },
+ { prop: 'thresh', name: $localize`Threshold` },
+ { prop: 'value', name: $localize`Value` },
+ { prop: 'when_failed', name: $localize`When Failed` },
+ { prop: 'worst', name: $localize`Worst` }
];
}
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { AuthService } from '../../../shared/api/auth.service';
import { ComponentsModule } from '../../../shared/components/components.module';
import { CdFormGroup } from '../../../shared/forms/cd-form-group';
ToastrModule.forRoot(),
SharedModule
],
- declarations: [LoginPasswordFormComponent],
- providers: i18nProviders
+ declarations: [LoginPasswordFormComponent]
});
beforeEach(() => {
import { Component } from '@angular/core';
import { Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { AuthService } from '../../../shared/api/auth.service';
import { UserService } from '../../../shared/api/user.service';
import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
})
export class LoginPasswordFormComponent extends UserPasswordFormComponent {
constructor(
- public i18n: I18n,
public actionLabels: ActionLabelsI18n,
public notificationService: NotificationService,
public userService: UserService,
public authService: AuthService
) {
super(
- i18n,
actionLabels,
notificationService,
userService,
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SharedModule } from '../../../shared/shared.module';
import { RoleDetailsComponent } from './role-details.component';
configureTestBed({
imports: [SharedModule, RouterTestingModule, HttpClientTestingModule, NgbNavModule],
- declarations: [RoleDetailsComponent],
- providers: i18nProviders
+ declarations: [RoleDetailsComponent]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { CellTemplate } from '../../../shared/enum/cell-template.enum';
columns: CdTableColumn[];
scopes_permissions: Array<any> = [];
- constructor(private i18n: I18n) {}
-
ngOnInit() {
this.columns = [
{
prop: 'scope',
- name: this.i18n('Scope'),
+ name: $localize`Scope`,
flexGrow: 2
},
{
prop: 'read',
- name: this.i18n('Read'),
+ name: $localize`Read`,
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
prop: 'create',
- name: this.i18n('Create'),
+ name: $localize`Create`,
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
prop: 'update',
- name: this.i18n('Update'),
+ name: $localize`Update`,
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
},
{
prop: 'delete',
- name: this.i18n('Delete'),
+ name: $localize`Delete`,
flexGrow: 1,
cellClass: 'text-center',
cellTransformation: CellTemplate.checkIcon
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { RoleService } from '../../../shared/api/role.service';
import { ScopeService } from '../../../shared/api/scope.service';
import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
ToastrModule.forRoot(),
SharedModule
],
- declarations: [RoleFormComponent, FakeComponent],
- providers: i18nProviders
+ declarations: [RoleFormComponent, FakeComponent]
},
[LoadingPanelComponent]
);
import { FormControl, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { forkJoin as observableForkJoin } from 'rxjs';
private roleService: RoleService,
private scopeService: ScopeService,
private notificationService: NotificationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n
) {
super();
- this.resource = this.i18n('role');
+ this.resource = $localize`role`;
this.createForm();
this.listenToChanges();
}
this.columns = [
{
prop: 'scope',
- name: this.i18n('All'),
+ name: $localize`All`,
flexGrow: 2,
cellTemplate: this.cellScopeCheckboxTpl,
headerTemplate: this.headerPermissionCheckboxTpl
},
{
prop: 'read',
- name: this.i18n('Read'),
+ name: $localize`Read`,
flexGrow: 1,
cellClass: 'text-center',
cellTemplate: this.cellPermissionCheckboxTpl,
},
{
prop: 'create',
- name: this.i18n('Create'),
+ name: $localize`Create`,
flexGrow: 1,
cellClass: 'text-center',
cellTemplate: this.cellPermissionCheckboxTpl,
},
{
prop: 'update',
- name: this.i18n('Update'),
+ name: $localize`Update`,
flexGrow: 1,
cellClass: 'text-center',
cellTemplate: this.cellPermissionCheckboxTpl,
},
{
prop: 'delete',
- name: this.i18n('Delete'),
+ name: $localize`Delete`,
flexGrow: 1,
cellClass: 'text-center',
cellTemplate: this.cellPermissionCheckboxTpl,
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Created role '{{role_name}}'`, { role_name: roleFormModel.name })
+ $localize`Created role '${roleFormModel.name}'`
);
this.router.navigate(['/user-management/roles']);
},
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Updated role '{{role_name}}'`, { role_name: roleFormModel.name })
+ $localize`Updated role '${roleFormModel.name}'`
);
this.router.navigate(['/user-management/roles']);
},
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
import { SharedModule } from '../../../shared/shared.module';
import { RoleDetailsComponent } from '../role-details/role-details.component';
NgbNavModule,
RouterTestingModule,
HttpClientTestingModule
- ],
- providers: i18nProviders
+ ]
});
beforeEach(() => {
import { Component, OnInit } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { forkJoin } from 'rxjs';
import { RoleService } from '../../../shared/api/role.service';
private authStorageService: AuthStorageService,
private modalService: ModalService,
private notificationService: NotificationService,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
public actionLabels: ActionLabelsI18n
) {
ngOnInit() {
this.columns = [
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
flexGrow: 3
},
{
- name: this.i18n('Description'),
+ name: $localize`Description`,
prop: 'description',
flexGrow: 5,
pipe: this.emptyPipe
},
{
- name: this.i18n('System Role'),
+ name: $localize`System Role`,
prop: 'system',
cellClass: 'text-center',
flexGrow: 1,
() => {
this.getRoles();
this.modalRef.close();
- this.notificationService.show(
- NotificationType.success,
- this.i18n(`Deleted role '{{role_name}}'`, { role_name: role })
- );
+ this.notificationService.show(NotificationType.success, $localize`Deleted role '${role}'`);
},
() => {
this.modalRef.componentInstance.stopLoadingSpinner();
type: 'text',
name: 'newName',
value: `${name}_clone`,
- label: this.i18n('New name'),
+ label: $localize`New name`,
required: true
}
],
- titleText: this.i18n('Clone Role'),
- submitButtonText: this.i18n('Clone Role'),
+ titleText: $localize`Clone Role`,
+ submitButtonText: $localize`Clone Role`,
onSubmit: (values: object) => {
this.roleService.clone(name, values['newName']).subscribe(() => {
this.getRoles();
this.notificationService.show(
NotificationType.success,
- this.i18n(`Cloned role '{{dst_name}}' from '{{src_name}}'`, {
- src_name: name,
- dst_name: values['newName']
- })
+ $localize`Cloned role '${values['newName']}' from '${name}'`
);
});
}
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { RoleService } from '../../../shared/api/role.service';
import { SettingsService } from '../../../shared/api/settings.service';
import { UserService } from '../../../shared/api/user.service';
SharedModule,
NgbPopoverModule
],
- declarations: [UserFormComponent, FakeComponent],
- providers: i18nProviders
+ declarations: [UserFormComponent, FakeComponent]
},
[LoadingPanelComponent]
);
import { ActivatedRoute, Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import * as moment from 'moment';
import { forkJoin as observableForkJoin } from 'rxjs';
userFormMode = UserFormMode;
mode: UserFormMode;
allRoles: Array<UserFormRoleModel>;
- messages = new SelectMessages({ empty: this.i18n('There are no roles.') }, this.i18n);
+ messages = new SelectMessages({ empty: $localize`There are no roles.` });
action: string;
resource: string;
passwordPolicyHelpText = '';
private roleService: RoleService,
private userService: UserService,
private notificationService: NotificationService,
- private i18n: I18n,
public actionLabels: ActionLabelsI18n,
private passwordPolicyService: PasswordPolicyService,
private formBuilder: CdFormBuilder,
private settingsService: SettingsService
) {
super();
- this.resource = this.i18n('user');
+ this.resource = $localize`user`;
this.createForm();
- this.messages = new SelectMessages({ empty: this.i18n('There are no roles.') }, this.i18n);
+ this.messages = new SelectMessages({ empty: $localize`There are no roles.` });
}
createForm() {
() => {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Created user '{{username}}'`, { username: userFormModel.username })
+ $localize`Created user '${userFormModel.username}'`
);
this.router.navigate(['/user-management/users']);
},
editAction() {
if (this.isUserRemovingNeededRolePermissions()) {
const initialState = {
- titleText: this.i18n('Update user'),
- buttonText: this.i18n('Continue'),
+ titleText: $localize`Update user`,
+ buttonText: $localize`Continue`,
bodyTpl: this.removeSelfUserReadUpdatePermissionTpl,
onSubmit: () => {
this.modalRef.close();
this.authService.logout(() => {
this.notificationService.show(
NotificationType.info,
- this.i18n('You were automatically logged out because your roles have been changed.')
+ $localize`You were automatically logged out because your roles have been changed.`
);
});
} else {
this.notificationService.show(
NotificationType.success,
- this.i18n(`Updated user '{{username}}'`, { username: userFormModel.username })
+ $localize`Updated user '${userFormModel.username}'`
);
this.router.navigate(['/user-management/users']);
}
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- i18nProviders,
- PermissionHelper
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
import { SharedModule } from '../../../shared/shared.module';
import { UserTabsComponent } from '../user-tabs/user-tabs.component';
RouterTestingModule,
HttpClientTestingModule
],
- declarations: [UserListComponent, UserTabsComponent],
- providers: i18nProviders
+ declarations: [UserListComponent, UserTabsComponent]
});
beforeEach(() => {
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { UserService } from '../../../shared/api/user.service';
import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
private modalService: ModalService,
private notificationService: NotificationService,
private authStorageService: AuthStorageService,
- private i18n: I18n,
private urlBuilder: URLBuilderService,
private cdDatePipe: CdDatePipe,
public actionLabels: ActionLabelsI18n
ngOnInit() {
this.columns = [
{
- name: this.i18n('Username'),
+ name: $localize`Username`,
prop: 'username',
flexGrow: 1
},
{
- name: this.i18n('Name'),
+ name: $localize`Name`,
prop: 'name',
flexGrow: 1,
pipe: this.emptyPipe
},
{
- name: this.i18n('Email'),
+ name: $localize`Email`,
prop: 'email',
flexGrow: 1,
pipe: this.emptyPipe
},
{
- name: this.i18n('Roles'),
+ name: $localize`Roles`,
prop: 'roles',
flexGrow: 1,
cellTemplate: this.userRolesTpl
},
{
- name: this.i18n('Enabled'),
+ name: $localize`Enabled`,
prop: 'enabled',
flexGrow: 1,
cellTransformation: CellTemplate.checkIcon
},
{
- name: this.i18n('Password expiration date'),
+ name: $localize`Password expiration date`,
prop: 'pwdExpirationDate',
flexGrow: 1,
pipe: this.cdDatePipe
this.modalRef.close();
this.notificationService.show(
NotificationType.success,
- this.i18n(`Deleted user '{{username}}'`, { username: username })
+ $localize`Deleted user '${username}'`
);
},
() => {
if (sessionUsername === username) {
this.notificationService.show(
NotificationType.error,
- this.i18n(`Failed to delete user '{{username}}'`, { username: username }),
- this.i18n(`You are currently logged in as '{{username}}'.`, { username: username })
+ $localize`Failed to delete user '${username}'`,
+ $localize`You are currently logged in as '${username}'.`
);
return;
}
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '../../../../testing/unit-test-helper';
import { ComponentsModule } from '../../../shared/components/components.module';
import { CdFormGroup } from '../../../shared/forms/cd-form-group';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
ToastrModule.forRoot(),
SharedModule
],
- declarations: [UserPasswordFormComponent],
- providers: i18nProviders
+ declarations: [UserPasswordFormComponent]
});
beforeEach(() => {
import { Validators } from '@angular/forms';
import { Router } from '@angular/router';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { UserService } from '../../../shared/api/user.service';
icons = Icons;
constructor(
- public i18n: I18n,
public actionLabels: ActionLabelsI18n,
public notificationService: NotificationService,
public userService: UserService,
public passwordPolicyService: PasswordPolicyService
) {
this.action = this.actionLabels.CHANGE;
- this.resource = this.i18n('password');
+ this.resource = $localize`password`;
this.createForm();
}
* Override this in derived classes to change the behaviour.
*/
onPasswordChange() {
- this.notificationService.show(NotificationType.success, this.i18n('Updated user password"'));
+ this.notificationService.show(NotificationType.success, $localize`Updated user password"`);
this.router.navigate(['/login']);
}
}
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { RbdService } from '../../../shared/api/rbd.service';
import { PipesModule } from '../../../shared/pipes/pipes.module';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
imports: [RouterTestingModule, ToastrModule.forRoot(), PipesModule, HttpClientTestingModule],
declarations: [WorkbenchLayoutComponent],
schemas: [NO_ERRORS_SCHEMA],
- providers: [AuthStorageService, i18nProviders, RbdService]
+ providers: [AuthStorageService, RbdService]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { ExecutingTask } from '../../../shared/models/executing-task';
import { SummaryService } from '../../../shared/services/summary.service';
import { SharedModule } from '../../../shared/shared.module';
configureTestBed({
imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), RouterTestingModule],
- declarations: [NotificationsComponent],
- providers: i18nProviders
+ declarations: [NotificationsComponent]
});
beforeEach(() => {
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { CrushRuleService } from './crush-rule.service';
describe('CrushRuleService', () => {
configureTestBed({
imports: [HttpClientTestingModule],
- providers: [CrushRuleService, i18nProviders]
+ providers: [CrushRuleService]
});
beforeEach(() => {
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { CrushRuleConfig } from '../models/crush-rule';
@Injectable({
formTooltips = {
// Copied from /doc/rados/operations/crush-map.rst
- root: this.i18n(`The name of the node under which data should be placed.`),
- failure_domain: this.i18n(`The type of CRUSH nodes across which we should separate replicas.`),
- device_class: this.i18n(`The device class data should be placed on.`)
+ root: $localize`The name of the node under which data should be placed.`,
+ failure_domain: $localize`The type of CRUSH nodes across which we should separate replicas.`,
+ device_class: $localize`The device class data should be placed on.`
};
- constructor(private http: HttpClient, private i18n: I18n) {}
+ constructor(private http: HttpClient) {}
create(rule: CrushRuleConfig) {
return this.http.post(this.apiPath, rule, { observe: 'response' });
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { ErasureCodeProfile } from '../models/erasure-code-profile';
import { ErasureCodeProfileService } from './erasure-code-profile.service';
configureTestBed({
imports: [HttpClientTestingModule],
- providers: [ErasureCodeProfileService, i18nProviders]
+ providers: [ErasureCodeProfileService]
});
beforeEach(() => {
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { Observable } from 'rxjs';
import { ErasureCodeProfile } from '../models/erasure-code-profile';
formTooltips = {
// Copied from /doc/rados/operations/erasure-code.*.rst
- k: this.i18n(`Each object is split in data-chunks parts, each stored on a different OSD.`),
+ k: $localize`Each object is split in data-chunks parts, each stored on a different OSD.`,
- m: this.i18n(`Compute coding chunks for each object and store them on different OSDs.
- The number of coding chunks is also the number of OSDs that can be down without losing data.`),
+ m: $localize`Compute coding chunks for each object and store them on different OSDs.
+ The number of coding chunks is also the number of OSDs that can be down without losing data.`,
plugins: {
jerasure: {
- description: this.i18n(`The jerasure plugin is the most generic and flexible plugin,
- it is also the default for Ceph erasure coded pools.`),
- technique: this.i18n(`The more flexible technique is reed_sol_van : it is enough to set k
+ description: $localize`The jerasure plugin is the most generic and flexible plugin,
+ it is also the default for Ceph erasure coded pools.`,
+ technique: $localize`The more flexible technique is reed_sol_van : it is enough to set k
and m. The cauchy_good technique can be faster but you need to chose the packetsize
carefully. All of reed_sol_r6_op, liberation, blaum_roth, liber8tion are RAID6 equivalents
- in the sense that they can only be configured with m=2.`),
- packetSize: this.i18n(`The encoding will be done on packets of bytes size at a time.
+ in the sense that they can only be configured with m=2.`,
+ packetSize: $localize`The encoding will be done on packets of bytes size at a time.
Chosing the right packet size is difficult.
- The jerasure documentation contains extensive information on this topic.`)
+ The jerasure documentation contains extensive information on this topic.`
},
lrc: {
- description: this.i18n(`With the jerasure plugin, when an erasure coded object is stored on
+ description: $localize`With the jerasure plugin, when an erasure coded object is stored on
multiple OSDs, recovering from the loss of one OSD requires reading from all the others.
For instance if jerasure is configured with k=8 and m=4, losing one OSD requires reading
from the eleven others to repair.
The lrc erasure code plugin creates local parity chunks to be able to recover using
less OSDs. For instance if lrc is configured with k=8, m=4 and l=4, it will create
an additional parity chunk for every four OSDs. When a single OSD is lost, it can be
- recovered with only four OSDs instead of eleven.`),
- l: this.i18n(`Group the coding and data chunks into sets of size locality. For instance,
+ recovered with only four OSDs instead of eleven.`,
+ l: $localize`Group the coding and data chunks into sets of size locality. For instance,
for k=4 and m=2, when locality=3 two groups of three are created. Each set can
- be recovered without reading chunks from another set.`),
- crushLocality: this.i18n(`The type of the crush bucket in which each set of chunks defined
+ be recovered without reading chunks from another set.`,
+ crushLocality: $localize`The type of the crush bucket in which each set of chunks defined
by l will be stored. For instance, if it is set to rack, each group of l chunks will be
placed in a different rack. It is used to create a CRUSH rule step such as step choose
- rack. If it is not set, no such grouping is done.`)
+ rack. If it is not set, no such grouping is done.`
},
isa: {
- description: this.i18n(
- `The isa plugin encapsulates the ISA library. It only runs on Intel processors.`
- ),
- technique: this.i18n(`The ISA plugin comes in two Reed Solomon forms.
- If reed_sol_van is set, it is Vandermonde, if cauchy is set, it is Cauchy.`)
+ description: $localize`The isa plugin encapsulates the ISA library. It only runs on Intel processors.`,
+ technique: $localize`The ISA plugin comes in two Reed Solomon forms.
+ If reed_sol_van is set, it is Vandermonde, if cauchy is set, it is Cauchy.`
},
shec: {
- description: this.i18n(`The shec plugin encapsulates the multiple SHEC library.
- It allows ceph to recover data more efficiently than Reed Solomon codes.`),
- c: this.i18n(`The number of parity chunks each of which includes each data chunk in its
+ description: $localize`The shec plugin encapsulates the multiple SHEC library.
+ It allows ceph to recover data more efficiently than Reed Solomon codes.`,
+ c: $localize`The number of parity chunks each of which includes each data chunk in its
calculation range. The number is used as a durability estimator. For instance, if c=2,
- 2 OSDs can be down without losing data.`)
+ 2 OSDs can be down without losing data.`
}
},
- crushRoot: this.i18n(`The name of the crush bucket used for the first step of the CRUSH rule.
- For instance step take default.`),
+ crushRoot: $localize`The name of the crush bucket used for the first step of the CRUSH rule.
+ For instance step take default.`,
- crushFailureDomain: this.i18n(`Ensure that no two chunks are in a bucket with the same failure
+ crushFailureDomain: $localize`Ensure that no two chunks are in a bucket with the same failure
domain. For instance, if the failure domain is host no two chunks will be stored on the same
- host. It is used to create a CRUSH rule step such as step chooseleaf host.`),
+ host. It is used to create a CRUSH rule step such as step chooseleaf host.`,
- crushDeviceClass: this.i18n(`Restrict placement to devices of a specific class
- (e.g., ssd or hdd), using the crush device class names in the CRUSH map.`),
+ crushDeviceClass: $localize`Restrict placement to devices of a specific class
+ (e.g., ssd or hdd), using the crush device class names in the CRUSH map.`,
- directory: this.i18n(`Set the directory name from which the erasure code plugin is loaded.`)
+ directory: $localize`Set the directory name from which the erasure code plugin is loaded.`
};
- constructor(private http: HttpClient, private i18n: I18n) {}
+ constructor(private http: HttpClient) {}
list(): Observable<ErasureCodeProfile[]> {
return this.http.get<ErasureCodeProfile[]>(this.apiPath);
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { NfsService } from './nfs.service';
describe('NfsService', () => {
let httpTesting: HttpTestingController;
configureTestBed({
- providers: [NfsService, i18nProviders],
+ providers: [NfsService],
imports: [HttpClientTestingModule]
});
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
@Injectable({
providedIn: 'root'
})
nfsAccessType = [
{
value: 'RW',
- help: this.i18n('Allows all operations')
+ help: $localize`Allows all operations`
},
{
value: 'RO',
- help: this.i18n('Allows only operations that do not modify the server')
+ help: $localize`Allows only operations that do not modify the server`
},
{
value: 'MDONLY',
- help: this.i18n('Does not allow read or write operations, but allows any other operation')
+ help: $localize`Does not allow read or write operations, but allows any other operation`
},
{
value: 'MDONLY_RO',
- help: this.i18n(
- 'Does not allow read, write, or any operation that modifies file \
- attributes or directory content'
- )
+ help: $localize`Does not allow read, write, or any operation that modifies file attributes or directory content`
},
{
value: 'NONE',
- help: this.i18n('Allows no access at all')
+ help: $localize`Allows no access at all`
}
];
nfsFsal = [
{
value: 'CEPH',
- descr: this.i18n('CephFS')
+ descr: $localize`CephFS`
},
{
value: 'RGW',
- descr: this.i18n('Object Gateway')
+ descr: $localize`Object Gateway`
}
];
nfsSquash = ['no_root_squash', 'root_id_squash', 'root_squash', 'all_squash'];
- constructor(private http: HttpClient, private i18n: I18n) {}
+ constructor(private http: HttpClient) {}
list() {
return this.http.get(`${this.apiPath}/export`);
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { OrchestratorService } from './orchestrator.service';
describe('OrchestratorService', () => {
const apiPath = 'api/orchestrator';
configureTestBed({
- providers: [OrchestratorService, i18nProviders],
+ providers: [OrchestratorService],
imports: [HttpClientTestingModule]
});
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { OsdService } from './osd.service';
describe('OsdService', () => {
let httpTesting: HttpTestingController;
configureTestBed({
- providers: [OsdService, i18nProviders],
+ providers: [OsdService],
imports: [HttpClientTestingModule]
});
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { map } from 'rxjs/operators';
KNOWN_PRIORITIES: [
{
name: null,
- text: this.i18n('-- Select the priority --'),
+ text: $localize`-- Select the priority --`,
values: {
osd_max_backfills: null,
osd_recovery_max_active: null,
},
{
name: 'low',
- text: this.i18n('Low'),
+ text: $localize`Low`,
values: {
osd_max_backfills: 1,
osd_recovery_max_active: 1,
},
{
name: 'default',
- text: this.i18n('Default'),
+ text: $localize`Default`,
values: {
osd_max_backfills: 1,
osd_recovery_max_active: 3,
},
{
name: 'high',
- text: this.i18n('High'),
+ text: $localize`High`,
values: {
osd_max_backfills: 4,
osd_recovery_max_active: 4,
]
};
- constructor(private http: HttpClient, private i18n: I18n, private deviceService: DeviceService) {}
+ constructor(private http: HttpClient, private deviceService: DeviceService) {}
create(driveGroups: Object[]) {
const request = {
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { RbdConfigurationSourceField } from '../models/configuration';
import { RbdConfigurationService } from '../services/rbd-configuration.service';
import { PoolService } from './pool.service';
const apiPath = 'api/pool';
configureTestBed({
- providers: [PoolService, RbdConfigurationService, i18nProviders],
+ providers: [PoolService, RbdConfigurationService],
imports: [HttpClientTestingModule]
});
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { ImageSpec } from '../models/image-spec';
import { RbdConfigurationService } from '../services/rbd-configuration.service';
import { RbdService } from './rbd.service';
let httpTesting: HttpTestingController;
configureTestBed({
- providers: [RbdService, RbdConfigurationService, i18nProviders],
+ providers: [RbdService, RbdConfigurationService],
imports: [HttpClientTestingModule]
});
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { AlertPanelComponent } from './alert-panel.component';
describe('AlertPanelComponent', () => {
configureTestBed({
declarations: [AlertPanelComponent],
- imports: [NgbAlertModule],
- providers: [i18nProviders]
+ imports: [NgbAlertModule]
});
beforeEach(() => {
import { Component, Input, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { Icons } from '../../enum/icons.enum';
@Component({
icons = Icons;
- constructor(private i18n: I18n) {}
-
ngOnInit() {
switch (this.type) {
case 'warning':
- this.title = this.title || this.i18n('Warning');
+ this.title = this.title || $localize`Warning`;
this.typeIcon = this.typeIcon || Icons.warning;
this.bootstrapClass = this.bootstrapClass || 'warning';
break;
case 'error':
- this.title = this.title || this.i18n('Error');
+ this.title = this.title || $localize`Error`;
this.typeIcon = this.typeIcon || Icons.destroyCircle;
this.bootstrapClass = this.bootstrapClass || 'danger';
break;
case 'info':
- this.title = this.title || this.i18n('Information');
+ this.title = this.title || $localize`Information`;
this.typeIcon = this.typeIcon || Icons.infoCircle;
this.bootstrapClass = this.bootstrapClass || 'info';
break;
case 'success':
- this.title = this.title || this.i18n('Success');
+ this.title = this.title || $localize`Success`;
this.typeIcon = this.typeIcon || Icons.check;
this.bootstrapClass = this.bootstrapClass || 'success';
break;
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { BackButtonComponent } from './back-button.component';
describe('BackButtonComponent', () => {
configureTestBed({
imports: [RouterTestingModule],
- declarations: [BackButtonComponent],
- providers: [i18nProviders]
+ declarations: [BackButtonComponent]
});
beforeEach(() => {
import { NgbActiveModal, NgbModalModule, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
-import {
- configureTestBed,
- FixtureHelper,
- i18nProviders
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, FixtureHelper } from '../../../../testing/unit-test-helper';
import { ModalService } from '../../services/modal.service';
import { BackButtonComponent } from '../back-button/back-button.component';
import { ModalComponent } from '../modal/modal.component';
],
schemas: [NO_ERRORS_SCHEMA],
imports: [ReactiveFormsModule, MockModule, RouterTestingModule, NgbModalModule],
- providers: [NgbActiveModal, i18nProviders, SubmitButtonComponent]
+ providers: [NgbActiveModal, SubmitButtonComponent]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation';
-import {
- configureTestBed,
- FixtureHelper,
- FormHelper,
- i18nProviders
-} from '../../../../testing/unit-test-helper';
+import { configureTestBed, FixtureHelper, FormHelper } from '../../../../testing/unit-test-helper';
import { CdValidators } from '../../forms/cd-validators';
import { SharedModule } from '../../shared.module';
import { FormModalComponent } from './form-modal.component';
ReactiveFormsModule,
SharedModule
],
- providers: [i18nProviders, NgbActiveModal]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { FormControl, ValidatorFn, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { CdFormBuilder } from '../../forms/cd-form-builder';
public activeModal: NgbActiveModal,
private formBuilder: CdFormBuilder,
private formatter: FormatterService,
- private dimlessBinaryPipe: DimlessBinaryPipe,
- private i18n: I18n
+ private dimlessBinaryPipe: DimlessBinaryPipe
) {}
ngOnInit() {
if (['binaryMin', 'binaryMax'].includes(error)) {
// binaryMin and binaryMax return a function that take I18n to
// provide a translated error message.
- return errorContext(this.i18n);
+ return errorContext();
}
if (error === 'required') {
- return this.i18n('This field is required.');
+ return $localize`This field is required.`;
}
- return this.i18n('An error occurred.');
+ return $localize`An error occurred.`;
}
onSubmitForm(values: any) {
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SummaryService } from '../../../shared/services/summary.service';
import { SettingsService } from '../../api/settings.service';
import { CephReleaseNamePipe } from '../../pipes/ceph-release-name.pipe';
configureTestBed({
declarations: [GrafanaComponent, AlertPanelComponent, LoadingPanelComponent],
imports: [NgbAlertModule, HttpClientTestingModule, RouterTestingModule, FormsModule],
- providers: [CephReleaseNamePipe, SettingsService, SummaryService, i18nProviders]
+ providers: [CephReleaseNamePipe, SettingsService, SummaryService]
});
beforeEach(() => {
import { Component, Input, OnChanges, OnInit } from '@angular/core';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { Icons } from '../../../shared/enum/icons.enum';
import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
import { SummaryService } from '../../../shared/services/summary.service';
private summaryService: SummaryService,
private sanitizer: DomSanitizer,
private settingsService: SettingsService,
- private cephReleaseNamePipe: CephReleaseNamePipe,
- private i18n: I18n
+ private cephReleaseNamePipe: CephReleaseNamePipe
) {
this.grafanaTimes = [
{
- name: this.i18n('Last 5 minutes'),
+ name: $localize`Last 5 minutes`,
value: 'from=now-5m&to=now'
},
{
- name: this.i18n('Last 15 minutes'),
+ name: $localize`Last 15 minutes`,
value: 'from=now-15m&to=now'
},
{
- name: this.i18n('Last 30 minutes'),
+ name: $localize`Last 30 minutes`,
value: 'from=now-30m&to=now'
},
{
- name: this.i18n('Last 1 hour (Default)'),
+ name: $localize`Last 1 hour (Default)`,
value: 'from=now-1h&to=now'
},
{
- name: this.i18n('Last 3 hours'),
+ name: $localize`Last 3 hours`,
value: 'from=now-3h&to=now'
},
{
- name: this.i18n('Last 6 hours'),
+ name: $localize`Last 6 hours`,
value: 'from=now-6h&to=now'
},
{
- name: this.i18n('Last 12 hours'),
+ name: $localize`Last 12 hours`,
value: 'from=now-12h&to=now'
},
{
- name: this.i18n('Last 24 hours'),
+ name: $localize`Last 24 hours`,
value: 'from=now-24h&to=now'
},
{
- name: this.i18n('Yesterday'),
+ name: $localize`Yesterday`,
value: 'from=now-1d%2Fd&to=now-1d%2Fd'
},
{
- name: this.i18n('Today'),
+ name: $localize`Today`,
value: 'from=now%2Fd&to=now%2Fd'
},
{
- name: this.i18n('Today so far'),
+ name: $localize`Today so far`,
value: 'from=now%2Fd&to=now'
},
{
- name: this.i18n('Day before yesterday'),
+ name: $localize`Day before yesterday`,
value: 'from=now-2d%2Fd&to=now-2d%2Fd'
},
{
- name: this.i18n('Last 2 days'),
+ name: $localize`Last 2 days`,
value: 'from=now-2d&to=now'
},
{
- name: this.i18n('This day last week'),
+ name: $localize`This day last week`,
value: 'from=now-7d%2Fd&to=now-7d%2Fd'
},
{
- name: this.i18n('Previous week'),
+ name: $localize`Previous week`,
value: 'from=now-1w%2Fw&to=now-1w%2Fw'
},
{
- name: this.i18n('This week'),
+ name: $localize`This week`,
value: 'from=now%2Fw&to=now%2Fw'
},
{
- name: this.i18n('This week so far'),
+ name: $localize`This week so far`,
value: 'from=now%2Fw&to=now'
},
{
- name: this.i18n('Last 7 days'),
+ name: $localize`Last 7 days`,
value: 'from=now-7d&to=now'
},
{
- name: this.i18n('Previous month'),
+ name: $localize`Previous month`,
value: 'from=now-1M%2FM&to=now-1M%2FM'
},
{
- name: this.i18n('This month'),
+ name: $localize`This month`,
value: 'from=now%2FM&to=now%2FM'
},
{
- name: this.i18n('This month so far'),
+ name: $localize`This month so far`,
value: 'from=now%2FM&to=now'
},
{
- name: this.i18n('Last 30 days'),
+ name: $localize`Last 30 days`,
value: 'from=now-30d&to=now'
},
{
- name: this.i18n('Last 90 days'),
+ name: $localize`Last 90 days`,
value: 'from=now-90d&to=now'
},
{
- name: this.i18n('Last 6 months'),
+ name: $localize`Last 6 months`,
value: 'from=now-6M&to=now'
},
{
- name: this.i18n('Last 1 year'),
+ name: $localize`Last 1 year`,
value: 'from=now-1y&to=now'
},
{
- name: this.i18n('Previous year'),
+ name: $localize`Previous year`,
value: 'from=now-1y%2Fy&to=now-1y%2Fy'
},
{
- name: this.i18n('This year'),
+ name: $localize`This year`,
value: 'from=now%2Fy&to=now%2Fy'
},
{
- name: this.i18n('This year so far'),
+ name: $localize`This year so far`,
value: 'from=now%2Fy&to=now'
},
{
- name: this.i18n('Last 2 years'),
+ name: $localize`Last 2 years`,
value: 'from=now-2y&to=now'
},
{
- name: this.i18n('Last 5 years'),
+ name: $localize`Last 5 years`,
value: 'from=now-5y&to=now'
}
];
import { ToastrModule } from 'ngx-toastr';
import { SimplebarAngularModule } from 'simplebar-angular';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { PrometheusService } from '../../api/prometheus.service';
import { RbdService } from '../../api/rbd.service';
import { SettingsService } from '../../api/settings.service';
ClickOutsideModule
],
declarations: [NotificationsSidebarComponent],
- providers: [
- i18nProviders,
- PrometheusService,
- SettingsService,
- SummaryService,
- NotificationService,
- RbdService
- ]
+ providers: [PrometheusService, SettingsService, SummaryService, NotificationService, RbdService]
});
beforeEach(() => {
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { ComponentsModule } from '../components.module';
import { OrchestratorDocModalComponent } from './orchestrator-doc-modal.component';
configureTestBed({
imports: [ComponentsModule, HttpClientTestingModule, RouterTestingModule],
- providers: [NgbActiveModal, i18nProviders]
+ providers: [NgbActiveModal]
});
beforeEach(() => {
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CephReleaseNamePipe } from '../../pipes/ceph-release-name.pipe';
import { SummaryService } from '../../services/summary.service';
import { ComponentsModule } from '../components.module';
configureTestBed({
imports: [ComponentsModule, HttpClientTestingModule, RouterTestingModule],
- providers: [CephReleaseNamePipe, SummaryService, i18nProviders]
+ providers: [CephReleaseNamePipe, SummaryService]
});
beforeEach(() => {
import { ReactiveFormsModule, Validators } from '@angular/forms';
import { NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SelectMessages } from '../select/select-messages.model';
import { SelectComponent } from '../select/select.component';
import { SelectBadgesComponent } from './select-badges.component';
configureTestBed({
declarations: [SelectBadgesComponent, SelectComponent],
- imports: [NgbPopoverModule, NgbTooltipModule, ReactiveFormsModule],
- providers: i18nProviders
+ imports: [NgbPopoverModule, NgbTooltipModule, ReactiveFormsModule]
});
beforeEach(() => {
{ name: 'option1', description: '', selected: false, enabled: true },
{ name: 'option2', description: '', selected: false, enabled: true }
];
- const i18n = TestBed.inject(I18n);
- const messages = new SelectMessages({ empty: 'foo bar' }, i18n);
+ const messages = new SelectMessages({ empty: 'foo bar' });
const selectionLimit = 2;
const customBadges = true;
const customBadgeValidators = [Validators.required];
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { ValidatorFn } from '@angular/forms';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { Icons } from '../../../shared/enum/icons.enum';
import { SelectMessages } from '../select/select-messages.model';
import { SelectOption } from '../select/select-option.model';
@Input()
options: Array<SelectOption> = [];
@Input()
- messages = new SelectMessages({}, this.i18n);
+ messages = new SelectMessages({});
@Input()
selectionLimit: number;
@Input()
cdSelect: SelectComponent;
icons = Icons;
-
- constructor(private i18n: I18n) {}
}
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
export class SelectMessages {
- i18n: I18n;
-
empty: string;
selectionLimit: any;
customValidations = {};
add: string;
noOptions: string;
- constructor(messages: {}, i18n: I18n) {
- this.i18n = i18n;
-
- this.empty = this.i18n('No items selected.');
+ constructor(messages: {}) {
+ this.empty = $localize`No items selected.`;
this.selectionLimit = {
- tooltip: this.i18n('Deselect item to select again'),
- text: this.i18n('Selection limit reached')
+ tooltip: $localize`Deselect item to select again`,
+ text: $localize`Selection limit reached`
};
- this.filter = this.i18n('Filter tags');
- this.add = this.i18n('Add badge'); // followed by " '{{filter.value}}'"
- this.noOptions = this.i18n('There are no items available.');
+ this.filter = $localize`Filter tags`;
+ this.add = $localize`Add badge`; // followed by " '{{filter.value}}'"
+ this.noOptions = $localize`There are no items available.`;
_.merge(this, messages);
}
import { NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { SelectOption } from './select-option.model';
import { SelectComponent } from './select.component';
configureTestBed({
declarations: [SelectComponent],
- imports: [NgbPopoverModule, NgbTooltipModule, ReactiveFormsModule],
- providers: i18nProviders
+ imports: [NgbPopoverModule, NgbTooltipModule, ReactiveFormsModule]
});
beforeEach(() => {
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
import { FormControl, ValidatorFn } from '@angular/forms';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Icons } from '../../../shared/enum/icons.enum';
@Input()
options: Array<SelectOption> = [];
@Input()
- messages = new SelectMessages({}, this.i18n);
+ messages = new SelectMessages({});
@Input()
selectionLimit: number;
@Input()
filteredOptions: Array<SelectOption> = [];
icons = Icons;
- constructor(private i18n: I18n) {}
-
ngOnInit() {
this.initFilter();
if (this.data.length > 0) {
configureTestBed({
declarations: [SparklineComponent],
schemas: [NO_ERRORS_SCHEMA],
- imports: [],
providers: [DimlessBinaryPipe, FormatterService]
});
import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { UserFormModel } from '../../../core/auth/user-form/user-form.model';
import { MgrModuleService } from '../../api/mgr-module.service';
import { UserService } from '../../api/user.service';
configureTestBed({
declarations: [TelemetryNotificationComponent],
imports: [NgbAlertModule, HttpClientTestingModule, ToastrModule.forRoot(), PipesModule],
- providers: [MgrModuleService, UserService, i18nProviders]
+ providers: [MgrModuleService, UserService]
});
beforeEach(() => {
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { UserFormModel } from '../../../core/auth/user-form/user-form.model';
import { MgrModuleService } from '../../api/mgr-module.service';
import { UserService } from '../../api/user.service';
private authStorageService: AuthStorageService,
private userService: UserService,
private notificationService: NotificationService,
- private telemetryNotificationService: TelemetryNotificationService,
- private i18n: I18n
+ private telemetryNotificationService: TelemetryNotificationService
) {}
ngOnInit() {
localStorage.setItem('telemetry_notification_hidden', 'true');
this.notificationService.show(
NotificationType.success,
- this.i18n('Telemetry activation reminder muted'),
- this.i18n(
- 'You can activate the module on the Telemetry configuration page (<b>Dashboard Settings</b> -> <b>Telemetry configuration</b>) at any time.'
- )
+ $localize`Telemetry activation reminder muted`,
+ $localize`You can activate the module on the Telemetry configuration \
+page (<b>Dashboard Settings</b> -> <b>Telemetry configuration</b>) at any time.`
);
}
}
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
export class AppConstants {
public static readonly organization = 'ceph';
public static readonly projectName = 'Ceph Dashboard';
UNSET: string;
UPDATE: string;
- constructor(private i18n: I18n) {
+ constructor() {
/* Create a new item */
- this.CREATE = this.i18n('Create');
+ this.CREATE = $localize`Create`;
/* Destroy an existing item */
- this.DELETE = this.i18n('Delete');
+ this.DELETE = $localize`Delete`;
/* Add an existing item to a container */
- this.ADD = this.i18n('Add');
- this.SET = this.i18n('Set');
+ this.ADD = $localize`Add`;
+ this.SET = $localize`Set`;
/* Remove an item from a container WITHOUT deleting it */
- this.REMOVE = this.i18n('Remove');
- this.UNSET = this.i18n('Unset');
+ this.REMOVE = $localize`Remove`;
+ this.UNSET = $localize`Unset`;
/* Make changes to an existing item */
- this.EDIT = this.i18n('Edit');
- this.UPDATE = this.i18n('Update');
- this.CANCEL = this.i18n('Cancel');
+ this.EDIT = $localize`Edit`;
+ this.UPDATE = $localize`Update`;
+ this.CANCEL = $localize`Cancel`;
/* Non-standard actions */
- this.CLONE = this.i18n('Clone');
- this.COPY = this.i18n('Copy');
- this.DEEP_SCRUB = this.i18n('Deep Scrub');
- this.DESTROY = this.i18n('Destroy');
- this.EVICT = this.i18n('Evict');
- this.FLATTEN = this.i18n('Flatten');
- this.MARK_DOWN = this.i18n('Mark Down');
- this.MARK_IN = this.i18n('Mark In');
- this.MARK_LOST = this.i18n('Mark Lost');
- this.MARK_OUT = this.i18n('Mark Out');
- this.PROTECT = this.i18n('Protect');
- this.PURGE = this.i18n('Purge');
- this.RENAME = this.i18n('Rename');
- this.RESTORE = this.i18n('Restore');
- this.REWEIGHT = this.i18n('Reweight');
- this.ROLLBACK = this.i18n('Rollback');
- this.SCRUB = this.i18n('Scrub');
- this.SHOW = this.i18n('Show');
- this.TRASH = this.i18n('Move to Trash');
- this.UNPROTECT = this.i18n('Unprotect');
- this.CHANGE = this.i18n('Change');
+ 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`;
/* Prometheus wording */
- this.RECREATE = this.i18n('Recreate');
- this.EXPIRE = this.i18n('Expire');
+ this.RECREATE = $localize`Recreate`;
+ this.EXPIRE = $localize`Expire`;
}
}
RECREATED: string;
EXPIRED: string;
- constructor(private i18n: I18n) {
+ constructor() {
/* Create a new item */
- this.CREATED = this.i18n('Created');
+ this.CREATED = $localize`Created`;
/* Destroy an existing item */
- this.DELETED = this.i18n('Deleted');
+ this.DELETED = $localize`Deleted`;
/* Add an existing item to a container */
- this.ADDED = this.i18n('Added');
+ this.ADDED = $localize`Added`;
/* Remove an item from a container WITHOUT deleting it */
- this.REMOVED = this.i18n('Removed');
+ this.REMOVED = $localize`Removed`;
/* Make changes to an existing item */
- this.EDITED = this.i18n('Edited');
- this.CANCELED = this.i18n('Canceled');
+ this.EDITED = $localize`Edited`;
+ this.CANCELED = $localize`Canceled`;
/* Non-standard actions */
- this.CLONED = this.i18n('Cloned');
- this.COPIED = this.i18n('Copied');
- this.DEEP_SCRUBBED = this.i18n('Deep Scrubbed');
- this.DESTROYED = this.i18n('Destroyed');
- this.FLATTENED = this.i18n('Flattened');
- this.MARKED_DOWN = this.i18n('Marked Down');
- this.MARKED_IN = this.i18n('Marked In');
- this.MARKED_LOST = this.i18n('Marked Lost');
- this.MARKED_OUT = this.i18n('Marked Out');
- this.PROTECTED = this.i18n('Protected');
- this.PURGED = this.i18n('Purged');
- this.RENAMED = this.i18n('Renamed');
- this.RESTORED = this.i18n('Restored');
- this.REWEIGHTED = this.i18n('Reweighted');
- this.ROLLED_BACK = this.i18n('Rolled back');
- this.SCRUBBED = this.i18n('Scrubbed');
- this.SHOWED = this.i18n('Showed');
- this.TRASHED = this.i18n('Moved to Trash');
- this.UNPROTECTED = this.i18n('Unprotected');
- this.CHANGE = this.i18n('Change');
+ 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 = this.i18n('Recreated');
- this.EXPIRED = this.i18n('Expired');
+ this.RECREATED = $localize`Recreated`;
+ this.EXPIRED = $localize`Expired`;
}
}
-import { TestBed } from '@angular/core/testing';
-
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
import { Copy2ClipboardButtonDirective } from './copy2clipboard-button.directive';
describe('Copy2clipboardButtonDirective', () => {
- configureTestBed({
- providers: [i18nProviders]
- });
-
it('should create an instance', () => {
- const i18n = TestBed.inject(I18n);
- const directive = new Copy2ClipboardButtonDirective(null, null, null, i18n);
+ const directive = new Copy2ClipboardButtonDirective(null, null, null);
expect(directive).toBeTruthy();
});
});
import { Directive, ElementRef, HostListener, Input, OnInit, Renderer2 } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { ToastrService } from 'ngx-toastr';
@Directive({
constructor(
private elementRef: ElementRef,
private renderer: Renderer2,
- private toastr: ToastrService,
- private i18n: I18n
+ private toastr: ToastrService
) {}
ngOnInit() {
const iElement = this.renderer.createElement('i');
this.renderer.addClass(iElement, 'fa');
this.renderer.addClass(iElement, 'fa-clipboard');
- this.renderer.setAttribute(iElement, 'title', this.i18n('Copy to clipboard'));
+ this.renderer.setAttribute(iElement, 'title', $localize`Copy to clipboard`);
this.renderer.appendChild(this.elementRef.nativeElement, iElement);
}
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { AlertPanelComponent } from '../components/alert-panel/alert-panel.component';
import { LoadingPanelComponent } from '../components/loading-panel/loading-panel.component';
import { CdForm } from '../forms/cd-form';
configureTestBed(
{
declarations: [TestComponent],
- imports: [SharedModule, NgbAlertModule],
- providers: [i18nProviders]
+ imports: [SharedModule, NgbAlertModule]
},
[LoadingPanelComponent, AlertPanelComponent]
);
});
it('should create an instance', () => {
- const directive = new FormLoadingDirective(null, null, null, null);
+ const directive = new FormLoadingDirective(null, null, null);
expect(directive).toBeTruthy();
});
ViewContainerRef
} from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { AlertPanelComponent } from '../components/alert-panel/alert-panel.component';
import { LoadingPanelComponent } from '../components/loading-panel/loading-panel.component';
import { LoadingStatus } from '../forms/cd-form';
constructor(
private templateRef: TemplateRef<any>,
private viewContainer: ViewContainerRef,
- private componentFactoryResolver: ComponentFactoryResolver,
- private i18n: I18n
+ private componentFactoryResolver: ComponentFactoryResolver
) {}
@Input('cdFormLoading') set cdFormLoading(condition: LoadingStatus) {
switch (condition) {
case LoadingStatus.Loading:
factory = this.componentFactoryResolver.resolveComponentFactory(LoadingPanelComponent);
- content = this.resolveNgContent(this.i18n(`Loading form data...`));
+ content = this.resolveNgContent($localize`Loading form data...`);
this.viewContainer.createComponent(factory, null, null, content);
break;
case LoadingStatus.Ready:
break;
case LoadingStatus.Error:
factory = this.componentFactoryResolver.resolveComponentFactory(AlertPanelComponent);
- content = this.resolveNgContent(this.i18n(`Form data could not be loaded.`));
+ content = this.resolveNgContent($localize`Form data could not be loaded.`);
const componentRef = this.viewContainer.createComponent(factory, null, null, content);
(<AlertPanelComponent>componentRef.instance).type = 'error';
break;
Validators
} from '@angular/forms';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Observable, of as observableOf, timer as observableTimer } from 'rxjs';
import { map, switchMapTo, take } from 'rxjs/operators';
* be called in a static one.
*/
static binaryMin(bytes: number): ValidatorFn {
- return (control: AbstractControl): { [key: string]: (i18n: I18n) => string } | null => {
+ return (control: AbstractControl): { [key: string]: () => string } | null => {
const formatterService = new FormatterService();
const currentBytes = new FormatterService().toBytes(control.value);
if (bytes <= currentBytes) {
}
const value = new DimlessBinaryPipe(formatterService).transform(bytes);
return {
- binaryMin: (i18n: I18n) => i18n(`Size has to be at least {{value}} or more`, { value })
+ binaryMin: () => $localize`Size has to be at least ${value} or more`
};
};
}
* be called in a static one.
*/
static binaryMax(bytes: number): ValidatorFn {
- return (control: AbstractControl): { [key: string]: (i18n: I18n) => string } | null => {
+ return (control: AbstractControl): { [key: string]: () => string } | null => {
const formatterService = new FormatterService();
const currentBytes = formatterService.toBytes(control.value);
if (bytes >= currentBytes) {
}
const value = new DimlessBinaryPipe(formatterService).transform(bytes);
return {
- binaryMax: (i18n: I18n) => i18n(`Size has to be at most {{value}} or less`, { value })
+ binaryMax: () => $localize`Size has to be at most ${value} or less`
};
};
}
-import { TestBed } from '@angular/core/testing';
-
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
import { BooleanTextPipe } from './boolean-text.pipe';
describe('BooleanTextPipe', () => {
let pipe: BooleanTextPipe;
- configureTestBed({
- providers: [i18nProviders]
- });
-
beforeEach(() => {
- const i18n = TestBed.inject(I18n);
- pipe = new BooleanTextPipe(i18n);
+ pipe = new BooleanTextPipe();
});
it('create an instance', () => {
import { Pipe, PipeTransform } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
@Pipe({
name: 'booleanText'
})
export class BooleanTextPipe implements PipeTransform {
- constructor(private i18n: I18n) {}
-
transform(
value: any,
- truthyText: string = this.i18n('Yes'),
- falsyText: string = this.i18n('No')
+ truthyText: string = $localize`Yes`,
+ falsyText: string = $localize`No`
): string {
return Boolean(value) ? truthyText : falsyText;
}
-import { TestBed } from '@angular/core/testing';
-
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
import { NotAvailablePipe } from './not-available.pipe';
describe('NotAvailablePipe', () => {
let pipe: NotAvailablePipe;
- configureTestBed({
- providers: [i18nProviders]
- });
-
beforeEach(() => {
- const i18n = TestBed.inject(I18n);
- pipe = new NotAvailablePipe(i18n);
+ pipe = new NotAvailablePipe();
});
it('create an instance', () => {
import { Pipe, PipeTransform } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
@Pipe({
name: 'notAvailable'
})
export class NotAvailablePipe implements PipeTransform {
- constructor(private i18n: I18n) {}
transform(value: any): any {
if (value === '') {
- return this.i18n('n/a');
+ return $localize`n/a`;
}
return value;
}
import { ToastrService } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { AppModule } from '../../app.module';
import { NotificationType } from '../enum/notification-type.enum';
import { CdNotification, CdNotificationConfig } from '../models/cd-notification';
imports: [AppModule, HttpClientTestingModule],
providers: [
NotificationService,
- i18nProviders,
{
provide: ToastrService,
useValue: {
import * as _ from 'lodash';
import { ToastrService } from 'ngx-toastr';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { RbdService } from '../api/rbd.service';
import { NotificationType } from '../enum/notification-type.enum';
import { CdNotificationConfig } from '../models/cd-notification';
TaskMessageService,
{ provide: ToastrService, useValue: toastFakeService },
{ provide: CdDatePipe, useValue: { transform: (d: any) => d } },
- i18nProviders,
RbdService
],
imports: [HttpClientTestingModule]
import { of as observableOf } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { SettingsService } from '../api/settings.service';
import { SharedModule } from '../shared.module';
import { PasswordPolicyService } from './password-policy.service';
};
configureTestBed({
- imports: [HttpClientTestingModule, SharedModule],
- providers: [i18nProviders]
+ imports: [HttpClientTestingModule, SharedModule]
});
beforeEach(() => {
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
providedIn: 'root'
})
export class PasswordPolicyService {
- constructor(private i18n: I18n, private settingsService: SettingsService) {}
+ constructor(private settingsService: SettingsService) {}
getHelpText(): Observable<string> {
return this.settingsService.getStandardSettings().pipe(
const settings = new CdPwdPolicySettings(resp);
let helpText: string[] = [];
if (settings.pwdPolicyEnabled) {
- helpText.push(this.i18n('Required rules for passwords:'));
+ helpText.push($localize`Required rules for passwords:`);
const i18nHelp: { [key: string]: string } = {
- pwdPolicyCheckLengthEnabled: this.i18n('Must contain at least {{length}} characters', {
- length: settings.pwdPolicyMinLength
- }),
- pwdPolicyCheckOldpwdEnabled: this.i18n('Must not be the same as the previous one'),
- pwdPolicyCheckUsernameEnabled: this.i18n('Cannot contain the username'),
- pwdPolicyCheckExclusionListEnabled: this.i18n('Cannot contain any configured keyword'),
- pwdPolicyCheckRepetitiveCharsEnabled: this.i18n(
- 'Cannot contain any repetitive characters e.g. "aaa"'
- ),
- pwdPolicyCheckSequentialCharsEnabled: this.i18n(
- 'Cannot contain any sequential characters e.g. "abc"'
- ),
- pwdPolicyCheckComplexityEnabled: this.i18n(
- `Must consist of characters from the following groups:
+ pwdPolicyCheckLengthEnabled: $localize`Must contain at least ${settings.pwdPolicyMinLength} characters`,
+ pwdPolicyCheckOldpwdEnabled: $localize`Must not be the same as the previous one`,
+ pwdPolicyCheckUsernameEnabled: $localize`Cannot contain the username`,
+ pwdPolicyCheckExclusionListEnabled: $localize`Cannot contain any configured keyword`,
+ pwdPolicyCheckRepetitiveCharsEnabled: $localize`Cannot contain any repetitive characters e.g. "aaa"`,
+ pwdPolicyCheckSequentialCharsEnabled: $localize`Cannot contain any sequential characters e.g. "abc"`,
+ pwdPolicyCheckComplexityEnabled: $localize`Must consist of characters from the following groups:
* Alphabetic a-z, A-Z
* Numbers 0-9
* Special chars: !"#$%& '()*+,-./:;<=>?@[\\]^_\`{{|}}~
* Any other characters (signs)`
- )
};
helpText = helpText.concat(
_.keys(i18nHelp)
import { ToastrModule } from 'ngx-toastr';
-import {
- configureTestBed,
- i18nProviders,
- PrometheusHelper
-} from '../../../testing/unit-test-helper';
+import { configureTestBed, PrometheusHelper } from '../../../testing/unit-test-helper';
import { NotificationType } from '../enum/notification-type.enum';
import { CdNotificationConfig } from '../models/cd-notification';
import { PrometheusCustomAlert } from '../models/prometheus-alerts';
configureTestBed({
imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule],
- providers: [PrometheusAlertFormatter, i18nProviders]
+ providers: [PrometheusAlertFormatter]
});
beforeEach(() => {
import { ToastrModule } from 'ngx-toastr';
import { Observable, of } from 'rxjs';
-import {
- configureTestBed,
- i18nProviders,
- PrometheusHelper
-} from '../../../testing/unit-test-helper';
+import { configureTestBed, PrometheusHelper } from '../../../testing/unit-test-helper';
import { PrometheusService } from '../api/prometheus.service';
import { NotificationType } from '../enum/notification-type.enum';
import { CdNotificationConfig } from '../models/cd-notification';
configureTestBed({
imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule],
- providers: [PrometheusAlertService, PrometheusAlertFormatter, i18nProviders]
+ providers: [PrometheusAlertService, PrometheusAlertFormatter]
});
beforeEach(() => {
import { ToastrModule, ToastrService } from 'ngx-toastr';
import { of, throwError } from 'rxjs';
-import {
- configureTestBed,
- i18nProviders,
- PrometheusHelper
-} from '../../../testing/unit-test-helper';
+import { configureTestBed, PrometheusHelper } from '../../../testing/unit-test-helper';
import { PrometheusService } from '../api/prometheus.service';
import { NotificationType } from '../enum/notification-type.enum';
import { CdNotificationConfig } from '../models/cd-notification';
providers: [
PrometheusNotificationService,
PrometheusAlertFormatter,
- i18nProviders,
{ provide: ToastrService, useValue: toastFakeService }
]
});
import { TestBed } from '@angular/core/testing';
-import {
- configureTestBed,
- i18nProviders,
- PrometheusHelper
-} from '../../../testing/unit-test-helper';
+import { configureTestBed, PrometheusHelper } from '../../../testing/unit-test-helper';
import { PrometheusRule } from '../models/prometheus-alerts';
import { SharedModule } from '../shared.module';
import { PrometheusSilenceMatcherService } from './prometheus-silence-matcher.service';
let rules: PrometheusRule[];
configureTestBed({
- imports: [SharedModule],
- providers: [i18nProviders]
+ imports: [SharedModule]
});
const addMatcher = (name: string, value: any) => ({
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import * as _ from 'lodash';
import {
severity: 'labels.severity'
};
- constructor(private i18n: I18n) {}
-
singleMatch(
matcher: AlertmanagerSilenceMatcher,
rules: PrometheusRule[]
private getMatchText(rules: number, alerts: number): string {
const msg = {
- noRule: this.i18n('Your matcher seems to match no currently defined rule or active alert.'),
- noAlerts: this.i18n('no active alerts'),
- alert: this.i18n('1 active alert'),
- alerts: this.i18n('{{n}} active alerts', { n: alerts }),
- rule: this.i18n('Matches 1 rule'),
- rules: this.i18n('Matches {{n}} rules', { n: rules })
+ noRule: $localize`Your matcher seems to match no currently defined rule or active alert.`,
+ noAlerts: $localize`no active alerts`,
+ alert: $localize`1 active alert`,
+ alerts: $localize`${alerts} active alerts`,
+ rule: $localize`Matches 1 rule`,
+ rules: $localize`Matches ${rules} rules`
};
- return rules
- ? this.i18n('{{rules}} with {{alerts}}.', {
- rules: rules > 1 ? msg.rules : msg.rule,
- alerts: alerts ? (alerts > 1 ? msg.alerts : msg.alert) : msg.noAlerts
- })
- : msg.noRule;
+
+ const rule = rules > 1 ? msg.rules : msg.rule;
+ const alert = alerts ? (alerts > 1 ? msg.alerts : msg.alert) : msg.noAlerts;
+
+ return rules ? $localize`${rule} with ${alert}.` : msg.noRule;
}
}
import { TestBed } from '@angular/core/testing';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { RbdConfigurationType } from '../models/configuration';
import { RbdConfigurationService } from './rbd-configuration.service';
let service: RbdConfigurationService;
configureTestBed({
- providers: [RbdConfigurationService, i18nProviders]
+ providers: [RbdConfigurationService]
});
beforeEach(() => {
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import {
RbdConfigurationExtraField,
RbdConfigurationSection,
export class RbdConfigurationService {
readonly sections: RbdConfigurationSection[];
- constructor(private i18n: I18n) {
+ constructor() {
this.sections = [
{
- heading: this.i18n('Quality of Service'),
+ heading: $localize`Quality of Service`,
class: 'quality-of-service',
options: [
{
name: 'rbd_qos_bps_limit',
- displayName: this.i18n('BPS Limit'),
- description: this.i18n('The desired limit of IO bytes per second.'),
+ displayName: $localize`BPS Limit`,
+ description: $localize`The desired limit of IO bytes per second.`,
type: RbdConfigurationType.bps
},
{
name: 'rbd_qos_iops_limit',
- displayName: this.i18n('IOPS Limit'),
- description: this.i18n('The desired limit of IO operations per second.'),
+ displayName: $localize`IOPS Limit`,
+ description: $localize`The desired limit of IO operations per second.`,
type: RbdConfigurationType.iops
},
{
name: 'rbd_qos_read_bps_limit',
- displayName: this.i18n('Read BPS Limit'),
- description: this.i18n('The desired limit of read bytes per second.'),
+ displayName: $localize`Read BPS Limit`,
+ description: $localize`The desired limit of read bytes per second.`,
type: RbdConfigurationType.bps
},
{
name: 'rbd_qos_read_iops_limit',
- displayName: this.i18n('Read IOPS Limit'),
- description: this.i18n('The desired limit of read operations per second.'),
+ displayName: $localize`Read IOPS Limit`,
+ description: $localize`The desired limit of read operations per second.`,
type: RbdConfigurationType.iops
},
{
name: 'rbd_qos_write_bps_limit',
- displayName: this.i18n('Write BPS Limit'),
- description: this.i18n('The desired limit of write bytes per second.'),
+ displayName: $localize`Write BPS Limit`,
+ description: $localize`The desired limit of write bytes per second.`,
type: RbdConfigurationType.bps
},
{
name: 'rbd_qos_write_iops_limit',
- displayName: this.i18n('Write IOPS Limit'),
- description: this.i18n('The desired limit of write operations per second.'),
+ displayName: $localize`Write IOPS Limit`,
+ description: $localize`The desired limit of write operations per second.`,
type: RbdConfigurationType.iops
},
{
name: 'rbd_qos_bps_burst',
- displayName: this.i18n('BPS Burst'),
- description: this.i18n('The desired burst limit of IO bytes.'),
+ displayName: $localize`BPS Burst`,
+ description: $localize`The desired burst limit of IO bytes.`,
type: RbdConfigurationType.bps
},
{
name: 'rbd_qos_iops_burst',
- displayName: this.i18n('IOPS Burst'),
- description: this.i18n('The desired burst limit of IO operations.'),
+ displayName: $localize`IOPS Burst`,
+ description: $localize`The desired burst limit of IO operations.`,
type: RbdConfigurationType.iops
},
{
name: 'rbd_qos_read_bps_burst',
- displayName: this.i18n('Read BPS Burst'),
- description: this.i18n('The desired burst limit of read bytes.'),
+ displayName: $localize`Read BPS Burst`,
+ description: $localize`The desired burst limit of read bytes.`,
type: RbdConfigurationType.bps
},
{
name: 'rbd_qos_read_iops_burst',
- displayName: this.i18n('Read IOPS Burst'),
- description: this.i18n('The desired burst limit of read operations.'),
+ displayName: $localize`Read IOPS Burst`,
+ description: $localize`The desired burst limit of read operations.`,
type: RbdConfigurationType.iops
},
{
name: 'rbd_qos_write_bps_burst',
- displayName: this.i18n('Write BPS Burst'),
- description: this.i18n('The desired burst limit of write bytes.'),
+ displayName: $localize`Write BPS Burst`,
+ description: $localize`The desired burst limit of write bytes.`,
type: RbdConfigurationType.bps
},
{
name: 'rbd_qos_write_iops_burst',
- displayName: this.i18n('Write IOPS Burst'),
- description: this.i18n('The desired burst limit of write operations.'),
+ displayName: $localize`Write IOPS Burst`,
+ description: $localize`The desired burst limit of write operations.`,
type: RbdConfigurationType.iops
}
] as RbdConfigurationExtraField[]
let service: RefreshIntervalService;
configureTestBed({
- imports: [],
providers: [RefreshIntervalService]
});
import { of } from 'rxjs';
-import {
- configureTestBed,
- expectItemTasks,
- i18nProviders
-} from '../../../testing/unit-test-helper';
+import { configureTestBed, expectItemTasks } from '../../../testing/unit-test-helper';
import { RbdService } from '../api/rbd.service';
import { ExecutingTask } from '../models/executing-task';
import { SummaryService } from './summary.service';
};
configureTestBed({
- providers: [TaskListService, TaskMessageService, SummaryService, i18nProviders, RbdService],
+ providers: [TaskListService, TaskMessageService, SummaryService, RbdService],
imports: [HttpClientTestingModule, RouterTestingModule]
});
import * as _ from 'lodash';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { RbdService } from '../api/rbd.service';
import { FinishedTask } from '../models/finished-task';
import { TaskException } from '../models/task-exception';
let finishedTask: FinishedTask;
configureTestBed({
- providers: [TaskMessageService, i18nProviders, RbdService],
+ providers: [TaskMessageService, RbdService],
imports: [HttpClientTestingModule]
});
finishedTask.name = 'rbd/trash/restore';
testMessages(
new TaskMessageOperation('Restoring', 'restore', 'Restored'),
- `image '${metadata.image_id_spec}' ` + `into '${metadata.new_image_name}'`
+ `image '${metadata.image_id_spec}' into '${metadata.new_image_name}'`
);
testErrorCode(17, `Image name '${metadata.new_image_name}' is already in use.`);
});
import { Injectable } from '@angular/core';
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
import { Components } from '../enum/components.enum';
import { FinishedTask } from '../models/finished-task';
import { ImageSpec } from '../models/image-spec';
}
class TaskMessage {
- i18n: I18n;
-
operation: TaskMessageOperation;
involves: (object: any) => string;
errors: (metadata: any) => object;
failure(metadata: any): string {
- return this.i18n('Failed to {{failure}} {{metadata}}', {
- failure: this.operation.failure,
- metadata: this.involves(metadata)
- });
+ return $localize`Failed to ${this.operation.failure} ${this.involves(metadata)}`;
}
running(metadata: any): string {
}
constructor(
- i18n: I18n,
operation: TaskMessageOperation,
involves: (metadata: any) => string,
errors?: (metadata: any) => object
) {
- this.i18n = i18n;
this.operation = operation;
this.involves = involves;
this.errors = errors || (() => ({}));
providedIn: 'root'
})
export class TaskMessageService {
- constructor(private i18n: I18n) {}
-
defaultMessage = this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Executing'), this.i18n('execute'), this.i18n('Executed')),
+ new TaskMessageOperation($localize`Executing`, $localize`execute`, $localize`Executed`),
(metadata) => {
return (
(metadata && (Components[metadata.component] || metadata.component)) ||
- this.i18n('unknown task')
+ $localize`unknown task`
);
},
() => {
);
commonOperations = {
- create: new TaskMessageOperation(
- this.i18n('Creating'),
- this.i18n('create'),
- this.i18n('Created')
- ),
- update: new TaskMessageOperation(
- this.i18n('Updating'),
- this.i18n('update'),
- this.i18n('Updated')
- ),
- delete: new TaskMessageOperation(
- this.i18n('Deleting'),
- this.i18n('delete'),
- this.i18n('Deleted')
- ),
- add: new TaskMessageOperation(this.i18n('Adding'), this.i18n('add'), this.i18n('Added')),
- remove: new TaskMessageOperation(
- this.i18n('Removing'),
- this.i18n('remove'),
- this.i18n('Removed')
- ),
- import: new TaskMessageOperation(
- this.i18n('Importing'),
- this.i18n('import'),
- this.i18n('Imported')
- )
+ create: new TaskMessageOperation($localize`Creating`, $localize`create`, $localize`Created`),
+ update: new TaskMessageOperation($localize`Updating`, $localize`update`, $localize`Updated`),
+ delete: new TaskMessageOperation($localize`Deleting`, $localize`delete`, $localize`Deleted`),
+ add: new TaskMessageOperation($localize`Adding`, $localize`add`, $localize`Added`),
+ remove: new TaskMessageOperation($localize`Removing`, $localize`remove`, $localize`Removed`),
+ import: new TaskMessageOperation($localize`Importing`, $localize`import`, $localize`Imported`)
};
rbd = {
- default: (metadata: any) =>
- this.i18n(`RBD '{{id}}'`, {
- id: `${metadata.image_spec}`
- }),
+ default: (metadata: any) => $localize`RBD '${metadata.image_spec}'`,
create: (metadata: any) => {
const id = new ImageSpec(
metadata.pool_name,
metadata.namespace,
metadata.image_name
).toString();
- return this.i18n(`RBD '{{id}}'`, {
- id: id
- });
+ return $localize`RBD '${id}'`;
},
child: (metadata: any) => {
const id = new ImageSpec(
metadata.child_namespace,
metadata.child_image_name
).toString();
- return this.i18n(`RBD '{{id}}'`, {
- id: id
- });
+ return $localize`RBD '${id}'`;
},
destination: (metadata: any) => {
const id = new ImageSpec(
metadata.dest_namespace,
metadata.dest_image_name
).toString();
- return this.i18n(`RBD '{{id}}'`, {
- id: id
- });
+ return $localize`RBD '${id}'`;
},
snapshot: (metadata: any) =>
- this.i18n(`RBD snapshot '{{id}}'`, {
- id: `${metadata.image_spec}@${metadata.snapshot_name}`
- })
+ $localize`RBD snapshot '${metadata.image_spec}@${metadata.snapshot_name}'`
};
rbd_mirroring = {
- site_name: () => this.i18n('mirroring site name'),
- bootstrap: () => this.i18n('bootstrap token'),
- pool: (metadata: any) =>
- this.i18n(`mirror mode for pool '{{id}}'`, {
- id: `${metadata.pool_name}`
- }),
- pool_peer: (metadata: any) =>
- this.i18n(`mirror peer for pool '{{id}}'`, {
- id: `${metadata.pool_name}`
- })
+ site_name: () => $localize`mirroring site name`,
+ bootstrap: () => $localize`bootstrap token`,
+ pool: (metadata: any) => $localize`mirror mode for pool '${metadata.pool_name}'`,
+ pool_peer: (metadata: any) => $localize`mirror peer for pool '${metadata.pool_name}'`
};
grafana = {
- update_dashboards: () => this.i18n('all dashboards')
+ update_dashboards: () => $localize`all dashboards`
};
messages = {
this.host(metadata)
),
// OSD tasks
- 'osd/create': this.newTaskMessage(this.commonOperations.create, (metadata) =>
- this.i18n(`OSDs (DriveGroups: {{tracking_id}})`, {
- tracking_id: metadata.tracking_id
- })
+ 'osd/create': this.newTaskMessage(
+ this.commonOperations.create,
+ (metadata) => $localize`OSDs (DriveGroups: ${metadata.tracking_id})`
),
'osd/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
this.osd(metadata)
this.commonOperations.create,
(metadata) => this.pool(metadata),
(metadata) => ({
- '17': this.i18n('Name is already used by {{pool_name}}.', {
- pool_name: this.pool(metadata)
- })
+ '17': $localize`Name is already used by ${this.pool(metadata)}.`
})
),
'pool/edit': this.newTaskMessage(
this.commonOperations.update,
(metadata) => this.pool(metadata),
(metadata) => ({
- '17': this.i18n('Name is already used by {{pool_name}}.', {
- pool_name: this.pool(metadata)
- })
+ '17': $localize`Name is already used by ${this.pool(metadata)}.`
})
),
'pool/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
this.commonOperations.create,
(metadata) => this.ecp(metadata),
(metadata) => ({
- '17': this.i18n('Name is already used by {{name}}.', {
- name: this.ecp(metadata)
- })
+ '17': $localize`Name is already used by ${this.ecp(metadata)}.`
})
),
'ecp/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
this.commonOperations.create,
(metadata) => this.crushRule(metadata),
(metadata) => ({
- '17': this.i18n('Name is already used by {{name}}.', {
- name: this.crushRule(metadata)
- })
+ '17': $localize`Name is already used by ${this.crushRule(metadata)}.`
})
),
'crushRule/delete': this.newTaskMessage(this.commonOperations.delete, (metadata) =>
this.commonOperations.create,
this.rbd.create,
(metadata) => ({
- '17': this.i18n('Name is already used by {{rbd_name}}.', {
- rbd_name: this.rbd.create(metadata)
- })
+ '17': $localize`Name is already used by ${this.rbd.create(metadata)}.`
})
),
'rbd/edit': this.newTaskMessage(this.commonOperations.update, this.rbd.default, (metadata) => ({
- '17': this.i18n('Name is already used by {{rbd_name}}.', {
- rbd_name: this.rbd.default(metadata)
- })
+ '17': $localize`Name is already used by ${this.rbd.default(metadata)}.`
})),
'rbd/delete': this.newTaskMessage(
this.commonOperations.delete,
this.rbd.default,
(metadata) => ({
- '16': this.i18n('{{rbd_name}} is busy.', {
- rbd_name: this.rbd.default(metadata)
- }),
- '39': this.i18n('{{rbd_name}} contains snapshots.', {
- rbd_name: this.rbd.default(metadata)
- })
+ '16': $localize`${this.rbd.default(metadata)} is busy.`,
+ '39': $localize`${this.rbd.default(metadata)} contains snapshots.`
})
),
'rbd/clone': this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Cloning'), this.i18n('clone'), this.i18n('Cloned')),
+ new TaskMessageOperation($localize`Cloning`, $localize`clone`, $localize`Cloned`),
this.rbd.child,
(metadata) => ({
- '17': this.i18n('Name is already used by {{rbd_name}}.', {
- rbd_name: this.rbd.child(metadata)
- }),
- '22': this.i18n('Snapshot of {{rbd_name}} must be protected.', {
- rbd_name: this.rbd.child(metadata)
- })
+ '17': $localize`Name is already used by ${this.rbd.child(metadata)}.`,
+ '22': $localize`Snapshot of ${this.rbd.child(metadata)} must be protected.`
})
),
'rbd/copy': this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Copying'), this.i18n('copy'), this.i18n('Copied')),
+ new TaskMessageOperation($localize`Copying`, $localize`copy`, $localize`Copied`),
this.rbd.destination,
(metadata) => ({
- '17': this.i18n('Name is already used by {{rbd_name}}.', {
- rbd_name: this.rbd.destination(metadata)
- })
+ '17': $localize`Name is already used by ${this.rbd.destination(metadata)}.`
})
),
'rbd/flatten': this.newTaskMessage(
- new TaskMessageOperation(
- this.i18n('Flattening'),
- this.i18n('flatten'),
- this.i18n('Flattened')
- ),
+ new TaskMessageOperation($localize`Flattening`, $localize`flatten`, $localize`Flattened`),
this.rbd.default
),
// RBD snapshot tasks
this.commonOperations.create,
this.rbd.snapshot,
(metadata) => ({
- '17': this.i18n('Name is already used by {{snap_name}}.', {
- snap_name: this.rbd.snapshot(metadata)
- })
+ '17': $localize`Name is already used by ${this.rbd.snapshot(metadata)}.`
})
),
'rbd/snap/edit': this.newTaskMessage(
this.commonOperations.update,
this.rbd.snapshot,
(metadata) => ({
- '16': this.i18n('Cannot unprotect {{snap_name}} because it contains child images.', {
- snap_name: this.rbd.snapshot(metadata)
- })
+ '16': $localize`Cannot unprotect ${this.rbd.snapshot(
+ metadata
+ )} because it contains child images.`
})
),
'rbd/snap/delete': this.newTaskMessage(
this.commonOperations.delete,
this.rbd.snapshot,
(metadata) => ({
- '16': this.i18n(`Cannot delete {{snap_name}} because it's protected.`, {
- snap_name: this.rbd.snapshot(metadata)
- })
+ '16': $localize`Cannot delete ${this.rbd.snapshot(metadata)} because it's protected.`
})
),
'rbd/snap/rollback': this.newTaskMessage(
new TaskMessageOperation(
- this.i18n('Rolling back'),
- this.i18n('rollback'),
- this.i18n('Rolled back')
+ $localize`Rolling back`,
+ $localize`rollback`,
+ $localize`Rolled back`
),
this.rbd.snapshot
),
// RBD trash tasks
'rbd/trash/move': this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Moving'), this.i18n('move'), this.i18n('Moved')),
- (metadata) =>
- this.i18n(`image '{{id}}' to trash`, {
- id: metadata.image_spec
- }),
+ new TaskMessageOperation($localize`Moving`, $localize`move`, $localize`Moved`),
+ (metadata) => $localize`image '${metadata.image_spec}' to trash`,
() => ({
- 2: this.i18n('Could not find image.')
+ 2: $localize`Could not find image.`
})
),
'rbd/trash/restore': this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Restoring'), this.i18n('restore'), this.i18n('Restored')),
- (metadata) =>
- this.i18n(`image '{{id}}' into '{{new_id}}'`, {
- id: metadata.image_id_spec,
- new_id: metadata.new_image_name
- }),
+ new TaskMessageOperation($localize`Restoring`, $localize`restore`, $localize`Restored`),
+ (metadata) => $localize`image '${metadata.image_id_spec}' into '${metadata.new_image_name}'`,
(metadata) => ({
- 17: this.i18n(`Image name '{{id}}' is already in use.`, {
- id: metadata.new_image_name
- })
+ 17: $localize`Image name '${metadata.new_image_name}' is already in use.`
})
),
'rbd/trash/remove': this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Deleting'), this.i18n('delete'), this.i18n('Deleted')),
- (metadata) =>
- this.i18n(`image '{{id}}'`, {
- id: `${metadata.image_id_spec}`
- })
+ new TaskMessageOperation($localize`Deleting`, $localize`delete`, $localize`Deleted`),
+ (metadata) => $localize`image '${metadata.image_id_spec}'`
),
'rbd/trash/purge': this.newTaskMessage(
- new TaskMessageOperation(this.i18n('Purging'), this.i18n('purge'), this.i18n('Purged')),
+ new TaskMessageOperation($localize`Purging`, $localize`purge`, $localize`Purged`),
(metadata) => {
- let message = this.i18n('all pools');
+ let message = $localize`all pools`;
if (metadata.pool_name) {
message = `'${metadata.pool_name}'`;
}
- return this.i18n('images from {{message}}', {
- message: message
- });
+ return $localize`images from ${message}`;
}
),
// RBD mirroring tasks
this.commonOperations.update,
this.rbd_mirroring.pool,
() => ({
- 16: this.i18n('Cannot disable mirroring because it contains a peer.')
+ 16: $localize`Cannot disable mirroring because it contains a peer.`
})
),
'rbd/mirroring/peer/add': this.newTaskMessage(
),
// Orchestrator tasks
'orchestrator/identify_device': this.newTaskMessage(
- new TaskMessageOperation(
- this.i18n('Identifying'),
- this.i18n('identify'),
- this.i18n('Identified')
- ),
- (metadata) => this.i18n(`device '{{device}}' on host '{{hostname}}'`, metadata)
+ new TaskMessageOperation($localize`Identifying`, $localize`identify`, $localize`Identified`),
+ (metadata) => $localize`device '${metadata.device}' on host '${metadata.hostname}'`
)
};
involves: (metadata: any) => string,
errors?: (metadata: any) => object
) {
- return new TaskMessage(this.i18n, operation, involves, errors);
+ return new TaskMessage(operation, involves, errors);
}
host(metadata: any) {
- return this.i18n(`host '{{hostname}}'`, {
- hostname: metadata.hostname
- });
+ return $localize`host '${metadata.hostname}'`;
}
osd(metadata: any) {
- return this.i18n(`OSD '{{svc_id}}'`, {
- svc_id: metadata.svc_id
- });
+ return $localize`OSD '${metadata.svc_id}'`;
}
pool(metadata: any) {
- return this.i18n(`pool '{{pool_name}}'`, {
- pool_name: metadata.pool_name
- });
+ return $localize`pool '${metadata.pool_name}'`;
}
ecp(metadata: any) {
- return this.i18n(`erasure code profile '{{name}}'`, { name: metadata.name });
+ return $localize`erasure code profile '${metadata.name}'`;
}
crushRule(metadata: any) {
- return this.i18n(`crush rule '{{name}}'`, { name: metadata.name });
+ return $localize`crush rule '${metadata.name}'`;
}
iscsiTarget(metadata: any) {
- return this.i18n(`target '{{target_iqn}}'`, { target_iqn: metadata.target_iqn });
+ return $localize`target '${metadata.target_iqn}'`;
}
nfs(metadata: any) {
- return this.i18n(`NFS {{nfs_id}}`, {
- nfs_id: `'${metadata.cluster_id}:${metadata.export_id ? metadata.export_id : metadata.path}'`
- });
+ return $localize`NFS '${metadata.cluster_id}\:${
+ metadata.export_id ? metadata.export_id : metadata.path
+ }'`;
}
_getTaskTitle(task: Task) {
import { ToastrModule } from 'ngx-toastr';
import { Observable } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../testing/unit-test-helper';
import { FinishedTask } from '../models/finished-task';
import { SharedModule } from '../shared.module';
import { NotificationService } from './notification.service';
configureTestBed({
imports: [HttpClientTestingModule, ToastrModule.forRoot(), SharedModule, RouterTestingModule],
- providers: [TaskWrapperService, i18nProviders]
+ providers: [TaskWrapperService]
});
beforeEach(inject([TaskWrapperService], (wrapper: TaskWrapperService) => {
+import '@angular/localize/init';
+
import 'jest-preset-angular';
import './jestGlobalMocks';
-import { DebugElement, LOCALE_ID, TRANSLATIONS, TRANSLATIONS_FORMAT, Type } from '@angular/core';
+import { DebugElement, Type } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AbstractControl } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
import { NgbModal, NgbNav, NgbNavItem } from '@ng-bootstrap/ng-bootstrap';
-import { I18n } from '@ngx-translate/i18n-polyfill';
import { configureTestSuite } from 'ng-bullet';
import { InventoryDevice } from '../app/ceph/cluster/inventory/inventory-devices/inventory-device.model';
}
}
-const XLIFF = `<?xml version="1.0" encoding="UTF-8" ?>
-<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
- <file source-language="en" datatype="plaintext" original="ng2.template">
- <body>
- </body>
- </file>
-</xliff>
-`;
-
-const i18nProviders = [
- { provide: TRANSLATIONS_FORMAT, useValue: 'xlf' },
- { provide: TRANSLATIONS, useValue: XLIFF },
- { provide: LOCALE_ID, useValue: 'en' },
- I18n
-];
-
-export { i18nProviders };
-
export function expectItemTasks(item: any, executing: string, percentage?: number) {
if (executing) {
executing = executing + '...';