Skip to content

Commit bbcd13b

Browse files
authored
Merge pull request ceph#59334 from ivoalmeida/angular-upgrade
mgr/dashboard: upgrade angular Reviewed-by: Nizamudeen A <[email protected]>
2 parents c5cad5e + 3f16e0c commit bbcd13b

File tree

103 files changed

+19045
-18186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+19045
-18186
lines changed

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pybind/mgr/dashboard/frontend/angular.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -204,58 +204,58 @@
204204
"serve": {
205205
"builder": "@angular-devkit/build-angular:dev-server",
206206
"options": {
207-
"browserTarget": "ceph-dashboard:build",
208-
"proxyConfig": "proxy.conf.json"
207+
"proxyConfig": "proxy.conf.json",
208+
"buildTarget": "ceph-dashboard:build"
209209
},
210210
"configurations": {
211211
"production": {
212-
"browserTarget": "ceph-dashboard:build:production"
212+
"buildTarget": "ceph-dashboard:build:production"
213213
},
214214
"cs": {
215-
"browserTarget": "ceph-dashboard:build:cs"
215+
"buildTarget": "ceph-dashboard:build:cs"
216216
},
217217
"de": {
218-
"browserTarget": "ceph-dashboard:build:de"
218+
"buildTarget": "ceph-dashboard:build:de"
219219
},
220220
"en-US": {
221-
"browserTarget": "ceph-dashboard:build:en-US"
221+
"buildTarget": "ceph-dashboard:build:en-US"
222222
},
223223
"es": {
224-
"browserTarget": "ceph-dashboard:build:es"
224+
"buildTarget": "ceph-dashboard:build:es"
225225
},
226226
"fr": {
227-
"browserTarget": "ceph-dashboard:build:fr"
227+
"buildTarget": "ceph-dashboard:build:fr"
228228
},
229229
"id": {
230-
"browserTarget": "ceph-dashboard:build:id"
230+
"buildTarget": "ceph-dashboard:build:id"
231231
},
232232
"it": {
233-
"browserTarget": "ceph-dashboard:build:it"
233+
"buildTarget": "ceph-dashboard:build:it"
234234
},
235235
"ja": {
236-
"browserTarget": "ceph-dashboard:build:ja"
236+
"buildTarget": "ceph-dashboard:build:ja"
237237
},
238238
"ko": {
239-
"browserTarget": "ceph-dashboard:build:ko"
239+
"buildTarget": "ceph-dashboard:build:ko"
240240
},
241241
"pl": {
242-
"browserTarget": "ceph-dashboard:build:pl"
242+
"buildTarget": "ceph-dashboard:build:pl"
243243
},
244244
"pt": {
245-
"browserTarget": "ceph-dashboard:build:pt"
245+
"buildTarget": "ceph-dashboard:build:pt"
246246
},
247247
"zh-Hans": {
248-
"browserTarget": "ceph-dashboard:build:zh-Hans"
248+
"buildTarget": "ceph-dashboard:build:zh-Hans"
249249
},
250250
"zh-Hant": {
251-
"browserTarget": "ceph-dashboard:build:zh-Hant"
251+
"buildTarget": "ceph-dashboard:build:zh-Hant"
252252
}
253253
}
254254
},
255255
"extract-i18n": {
256256
"builder": "@angular-devkit/build-angular:extract-i18n",
257257
"options": {
258-
"browserTarget": "ceph-dashboard:build"
258+
"buildTarget": "ceph-dashboard:build"
259259
}
260260
},
261261
"lint": {

src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"plugins/index.js"
77
],
88
"compilerOptions": {
9+
"typeRoots": [
10+
"../node_modules",
11+
"../node_modules/@types"
12+
],
913
"sourceMap": false,
1014
"types": [
1115
"cypress",
@@ -14,4 +18,4 @@
1418
],
1519
"target": "es6"
1620
}
17-
}
21+
}

src/pybind/mgr/dashboard/frontend/jest.config.cjs

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,38 @@ const esModules = [
99
'@ng-bootstrap'
1010
];
1111
const jestConfig = {
12-
globals: {
13-
'ts-jest': {
14-
useESM: true,
15-
stringifyContentPathRegex: '\\.(html|svg)$',
16-
tsconfig: '<rootDir>/tsconfig.spec.json',
17-
isolatedModules: true
18-
}
19-
},
20-
globalSetup: 'jest-preset-angular/global-setup',
2112
moduleNameMapper: {
2213
'\\.scss$': 'identity-obj-proxy',
2314
'~/(.*)$': '<rootDir>/src/$1',
24-
'^@carbon/icons/es/(.*)$': '@carbon/icons/lib/$1.js',
15+
'^@carbon/icons/es/(.*)$': '@carbon/icons/lib/$1.js'
2516
},
2617
moduleFileExtensions: ['ts', 'html', 'js', 'json', 'mjs', 'cjs'],
2718
preset: 'jest-preset-angular',
2819
setupFilesAfterEnv: ['<rootDir>/src/setupJest.ts'],
2920
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|'.concat(esModules.join('|'), ')')],
3021
transform: {
31-
'^.+\\.(ts|html|mjs)$': 'jest-preset-angular',
22+
'^.+\\.(ts|html|mjs)$': [
23+
'jest-preset-angular',
24+
{
25+
useESM: true,
26+
stringifyContentPathRegex: '\\.(html|svg)$',
27+
tsconfig: '<rootDir>/tsconfig.spec.json',
28+
isolatedModules: true
29+
}
30+
],
3231
'^.+\\.(js)$': 'babel-jest'
3332
},
3433
setupFiles: ['jest-canvas-mock'],
3534
coverageReporters: ['cobertura', 'html'],
36-
modulePathIgnorePatterns: ['<rootDir>/coverage/', '<rootDir>/node_modules/simplebar-angular', '<rootDir>/cypress'],
35+
modulePathIgnorePatterns: [
36+
'<rootDir>/coverage/',
37+
'<rootDir>/node_modules/simplebar-angular',
38+
'<rootDir>/cypress'
39+
],
3740
testMatch: ['**/*.spec.ts'],
38-
testRunner: 'jest-jasmine2'
41+
testRunner: 'jest-jasmine2',
42+
testEnvironmentOptions: {
43+
detectOpenHandles: true
44+
}
3945
};
4046
module.exports = jestConfig;

0 commit comments

Comments
 (0)