Skip to content

Commit d67cbd3

Browse files
authored
Closes #1507 - Update minor versions, patches and some major versions of Config Server UI dependencies (#1510)
* update patches * update minor versions * update eslint dependencies * update @babel/core dependency * re-update eslint * update primeinons * update primeflex * update react-timeago * update react-syntax-highligter * update react-redux * update jwt-decode * Merge branch 'master' of https://github.com/inspectIT/inspectit-ocelot into dependencies-update * Closes #1507 : Update minor versions, patches and some major versions(#1507) Highlight enums with String values correctly (#1488) * Treat enums with values-field differently * Fix default config exporters.yml * Fix order of possible values in test * Use toString instead of getName * Fix JSON parsing of Maps in test Using toString, empty values could not be parsed correctly by gson update patches update minor versions update eslint dependencies update @babel/core dependency re-update eslint update primeinons update primeflex update react-timeago update react-syntax-highligter update react-redux * update jwt-decode * Add settings and info for developing UI in IntelliJ (#1496) * Activate formatter tags by default * Add indentation settings for JS * Add to CONTRIBUTING regarding JavaScript linting * Fix eol linting of .js files on Windows * Add yarn lint and format:write to README * Add section in CONTRIBUTING.md * Add to CONTRIBUTING based on comments * Fix linting command in README Co-authored-by: Heiko Holz <heiko.holz@novatec-gmbh.de> * [skip ci] Publish documentation v2.1.0 * Fix release notes links (#1503) * Closes #1507 - Update minor versions, patches and some major versions * Closes #1507 - Update minor versions, patches and some major versions * Delete package-lock.json Only one lock-file should be in project, which is yarn.lock in our case. * Small fix to next.config * Fix license string * Change parser to babel/eslint-parser * Add peer dependencies * Merge branch 'master' into dependencies-update * Fix linting errors * Move babel eslint to devdependencies, remove old version * Add helper-string-parser to devdependencies
1 parent 5fb430e commit d67cbd3

File tree

12 files changed

+5338
-28180
lines changed

12 files changed

+5338
-28180
lines changed

components/inspectit-ocelot-configurationserver-ui/.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313
"plugin:react/recommended",
1414
"plugin:prettier/recommended"
1515
],
16-
"parser": "babel-eslint",
16+
"parser": "@babel/eslint-parser",
1717
"parserOptions": {
1818
"sourceType": "module",
1919
"ecmaVersion": 2018,
2020
"ecmaFeatures": {
2121
"jsx": true
22+
},
23+
"requireConfigFile": false,
24+
"babelOptions": {
25+
"presets": ["@babel/preset-react"]
2226
}
2327
},
2428
"settings": {

components/inspectit-ocelot-configurationserver-ui/next.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = withCSS({
55
distDir: '../.next',
66

77
// Each page will be exported as a directory
8-
exportTrailingSlash: true,
8+
trailingSlash: true,
99

1010
assetPrefix: isProduction ? '/ui' : '',
1111

@@ -39,4 +39,4 @@ module.exports = withCSS({
3939
VERSION: process.env.CIRCLE_TAG || "SNAPSHOT",
4040
BUILD_DATE: new Date().toUTCString()
4141
}
42-
})
42+
})

components/inspectit-ocelot-configurationserver-ui/package-lock.json

Lines changed: 0 additions & 20528 deletions
This file was deleted.

components/inspectit-ocelot-configurationserver-ui/package.json

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,53 +26,57 @@
2626
},
2727
"dependencies": {
2828
"@zeit/next-css": "^1.0.1",
29-
"ace-builds": "^1.4.5",
30-
"axios": "^0.26.1",
31-
"classnames": "^2.2.6",
29+
"ace-builds": "^1.7.1",
30+
"axios": "^0.27.2",
31+
"classnames": "^2.3.1",
3232
"dateformat": "^3.0.3",
3333
"file-saver": "^2.0.5",
34-
"js-yaml": "^3.13.1",
35-
"jszip": "^3.9.1",
36-
"jwt-decode": "^2.2.0",
34+
"js-yaml": "^4.1.0",
35+
"jszip": "^3.10.0",
36+
"jwt-decode": "^3.1.2",
3737
"lodash": "^4.17.21",
38-
"next": "^9.3.2",
39-
"primeflex": "^1.3.1",
40-
"primeicons": "^1.0.0",
41-
"primereact": "^4.2.1",
42-
"prop-types": "^15.7.2",
38+
"next": "^9.5.5",
39+
"primeflex": "^3.2.1",
40+
"primeicons": "^5.0.0",
41+
"primereact": "^4.2.2",
42+
"prop-types": "^15.8.1",
4343
"randexp": "^0.5.3",
44-
"react": "^16.13.1",
44+
"react": "^16.14.0",
4545
"react-diff-viewer": "^3.1.1",
46-
"react-dom": "^16.13.1",
47-
"react-redux": "^7.2.0",
48-
"react-syntax-highlighter": "^12.2.1",
49-
"react-timeago": "^4.4.0",
46+
"react-dom": "^16.14.0",
47+
"react-redux": "^8.0.2",
48+
"react-syntax-highlighter": "^15.5.0",
49+
"react-timeago": "^7.1.0",
5050
"react-tooltip": "^4.2.21",
51-
"react-transition-group": "^4.2.1",
52-
"redux": "^4.0.5",
51+
"react-transition-group": "^4.4.2",
52+
"redux": "^4.2.0",
5353
"redux-devtools-extension": "^2.13.2",
5454
"redux-persist": "^6.0.0",
55-
"redux-thunk": "^2.3.0",
56-
"reselect": "^4.0.0",
57-
"uuid": "^8.3.2"
55+
"redux-thunk": "^2.4.1",
56+
"require-from-string": "2.0.2",
57+
"reselect": "^4.1.6",
58+
"uuid": "^8.3.2",
59+
"webpack": "4.46.0"
5860
},
59-
"license": "apache-2.0",
61+
"license": "Apache-2.0",
6062
"devDependencies": {
61-
"@babel/core": "^7.14.3",
62-
"@storybook/addon-actions": "^6.2.9",
63-
"@storybook/addon-essentials": "^6.2.9",
64-
"@storybook/addon-links": "^6.2.9",
65-
"@storybook/react": "^6.2.9",
66-
"babel-eslint": "^10.1.0",
63+
"@babel/core": "^7.18.9",
64+
"@babel/eslint-parser": "^7.18.9",
65+
"@babel/helper-string-parser": "^7.18.10",
66+
"@babel/preset-react": "^7.18.6",
67+
"@storybook/addon-actions": "^6.5.9",
68+
"@storybook/addon-essentials": "^6.5.9",
69+
"@storybook/addon-links": "^6.5.9",
70+
"@storybook/react": "^6.5.9",
6771
"babel-loader": "^8.2.5",
68-
"eslint": "^6.8.0",
69-
"eslint-config-prettier": "^6.10.1",
70-
"eslint-import-resolver-webpack": "^0.12.1",
71-
"eslint-plugin-import": "^2.22.0",
72-
"eslint-plugin-prettier": "^3.1.2",
73-
"eslint-plugin-react": "^7.20.1",
74-
"file-loader": "^4.0.0",
75-
"prettier": "^2.0.4",
76-
"url-loader": "^2.0.1"
72+
"eslint": "^8.20.0",
73+
"eslint-config-prettier": "^8.5.0",
74+
"eslint-import-resolver-webpack": "^0.13.2",
75+
"eslint-plugin-import": "^2.26.0",
76+
"eslint-plugin-prettier": "^4.2.1",
77+
"eslint-plugin-react": "^7.30.1",
78+
"file-loader": "^4.3.0",
79+
"prettier": "^2.7.1",
80+
"url-loader": "^2.3.0"
7781
}
7882
}

components/inspectit-ocelot-configurationserver-ui/src/components/editor/method-configuration-editor/MethodConfigurationEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const MethodConfigurationEditor = ({ yamlConfiguration }) => {
5555
useEffect(() => {
5656
// parse configuration
5757
try {
58-
setConfiguration(yaml.safeLoad(yamlConfiguration));
58+
setConfiguration(yaml.load(yamlConfiguration));
5959
} catch (error) {
6060
setConfigurationError(error);
6161
setConfiguration(null);

components/inspectit-ocelot-configurationserver-ui/src/components/editor/visual-editor/YamlParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class YamlParserCache {
3232
} else {
3333
let config;
3434
try {
35-
config = yaml.safeLoad(yamlString);
35+
config = yaml.load(yamlString);
3636
} catch (error) {
3737
config = null;
3838
}

components/inspectit-ocelot-configurationserver-ui/src/components/views/alerting/rules/editor/VariableView.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ const ValueEditor = ({ type, value, options, readOnly, onDataChanged }) => {
204204
* Simple value display component.
205205
*/
206206
const SimpleDataView = ({ value, isDefault, error }) => {
207-
const style = {};
208207
return (
209208
<>
210209
<style jsx>{`

components/inspectit-ocelot-configurationserver-ui/src/components/views/configuration/ConfigurationView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class ConfigurationView extends React.Component {
295295

296296
const getYamlError = (content) => {
297297
try {
298-
yaml.safeLoad(content);
298+
yaml.load(content);
299299
return null;
300300
} catch (error) {
301301
if (error.message) {

components/inspectit-ocelot-configurationserver-ui/src/components/views/configuration/FileTree.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -147,46 +147,46 @@ class FileTree extends React.Component {
147147
return (
148148
<div className="this" onContextMenu={readOnly ? undefined : this.showContextMenu} onKeyDown={readOnly ? undefined : this.onKeyDown}>
149149
<style jsx>{`
150-
.this {
151-
overflow: auto;
152-
flex-grow: 1;
153-
display: flex;
154-
flex-direction: column;
155-
}
150+
.this {
151+
overflow: auto;
152+
flex-grow: 1;
153+
display: flex;
154+
flex-direction: column;
155+
}
156156
157-
.this :global(.cm-tree-icon) {
158-
width: 1.3rem;
159-
height: 1.3rem;
160-
}
157+
.this :global(.cm-tree-icon) {
158+
width: 1.3rem;
159+
height: 1.3rem;
160+
}
161161
162-
.this :global(.cm-tree-label) {
163-
color: #aaa;
164-
}
165-
166-
.this :global(.cm-hidden-file-tree-label){
167-
color: #aaa;
168-
}
169-
170-
.this :global(.ocelot-tree-head-orange) {
171-
background: url("${linkPrefix}/static/images/inspectit-ocelot-head_orange.svg") center no-repeat;
172-
background-size: 1rem 1rem;
173-
}
162+
.this :global(.cm-tree-label) {
163+
color: #aaa;
164+
}
174165
175-
.this :global(.ocelot-tree-head-white) {
176-
background: url("${linkPrefix}/static/images/inspectit-ocelot-head_white.svg") center no-repeat;
177-
background-size: 1rem 1rem;
178-
}
166+
.this :global(.cm-hidden-file-tree-label) {
167+
color: #aaa;
168+
}
179169
180-
.tree-container {
181-
overflow: auto;
182-
}
170+
.this :global(.ocelot-tree-head-orange) {
171+
background: url('${linkPrefix}/static/images/inspectit-ocelot-head_orange.svg') center no-repeat;
172+
background-size: 1rem 1rem;
173+
}
183174
184-
.version-banner {
185-
background-color: #ffcc80;
186-
height: 2.45rem;
187-
border-bottom: 1px solid #dddddd;
188-
}
189-
`}</style>
175+
.this :global(.ocelot-tree-head-white) {
176+
background: url('${linkPrefix}/static/images/inspectit-ocelot-head_white.svg') center no-repeat;
177+
background-size: 1rem 1rem;
178+
}
179+
180+
.tree-container {
181+
overflow: auto;
182+
}
183+
184+
.version-banner {
185+
background-color: #ffcc80;
186+
height: 2.45rem;
187+
border-bottom: 1px solid #dddddd;
188+
}
189+
`}</style>
190190
{selectedVersion && <div className="version-banner" />}
191191
<div className="tree-container">
192192
<ContextMenu model={this.state.contextMenuModel} ref={this.contextMenuRef} />

components/inspectit-ocelot-configurationserver-ui/src/redux/middlewares/logger.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@ const STARTED = ['background: darkorange', 'color: white'].join(';');
77

88
const FAILURE = ['background: red', 'color: white'].join(';');
99

10-
const createLogger = (active = true) => (store) => (next) => (action) => {
11-
if (!active || typeof action === 'function') {
12-
return next(action);
13-
}
14-
15-
const prevState = store.getState();
16-
const result = next(action);
17-
const nextState = store.getState();
18-
logGroupCollapsed(`%c ${action.type} `, determineStyle(action));
19-
logInfo('%cprev state', 'color: darkorange', prevState);
20-
logInfo('%caction payload', 'color: blue', action.payload);
21-
logInfo('%cnext state', 'color: darkgreen', nextState);
22-
logGroupEnd();
23-
return result;
24-
};
10+
const createLogger =
11+
(active = true) =>
12+
(store) =>
13+
(next) =>
14+
(action) => {
15+
if (!active || typeof action === 'function') {
16+
return next(action);
17+
}
18+
19+
const prevState = store.getState();
20+
const result = next(action);
21+
const nextState = store.getState();
22+
logGroupCollapsed(`%c ${action.type} `, determineStyle(action));
23+
logInfo('%cprev state', 'color: darkorange', prevState);
24+
logInfo('%caction payload', 'color: blue', action.payload);
25+
logInfo('%cnext state', 'color: darkgreen', nextState);
26+
logGroupEnd();
27+
return result;
28+
};
2529

2630
export default createLogger;
2731

0 commit comments

Comments
 (0)