From d5251c5fc848e425258fe298655fc27cbd4035d0 Mon Sep 17 00:00:00 2001 From: idanovinda Date: Fri, 27 Jan 2023 12:47:30 +0100 Subject: [PATCH] Update UI library dependencies (#2191) * Update UI library dependencies * change to node v14 * update js-yaml load and dump function --- ui/Makefile | 4 ++-- ui/app/package.json | 37 ++++++++++++++--------------- ui/app/src/edit.tag.pug | 10 ++++---- ui/app/src/new.tag.pug | 2 +- ui/app/src/postgresql.tag.pug | 2 +- ui/operator_ui/cluster_discovery.py | 2 +- ui/requirements.txt | 16 ++++++------- 7 files changed, 36 insertions(+), 37 deletions(-) diff --git a/ui/Makefile b/ui/Makefile index 29c8d9409..7d86b2df6 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -21,8 +21,8 @@ test: tox appjs: - docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:10.1.0-alpine npm install - docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:10.1.0-alpine npm run build + docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:14.21.2-alpine npm install + docker run $(TTYFLAGS) -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:14.21.2-alpine npm run build docker: appjs echo `(env)` diff --git a/ui/app/package.json b/ui/app/package.json index c0e497f0b..d4542ff68 100644 --- a/ui/app/package.json +++ b/ui/app/package.json @@ -26,29 +26,28 @@ }, "homepage": "https://github.com/zalando/postgres-operator.git#readme", "dependencies": { - "@babel/core": "^7.0.0-beta.46", - "@babel/polyfill": "^7.0.0-beta.46", - "@babel/runtime": "^7.0.0-beta.46", - "pixi.js": "^4.7.3" + "@babel/core": "^7.20.12", + "@babel/polyfill": "^7.12.1", + "@babel/runtime": "^7.20.13", + "pixi.js": "^7.1.1" }, "devDependencies": { - "@babel/plugin-transform-runtime": "^7.0.0-beta.46", - "@babel/preset-env": "^7.0.0-beta.46", - "babel-loader": "^8.0.0-beta.2", - "brfs": "^1.6.1", + "@babel/plugin-transform-runtime": "^7.19.6", + "@babel/preset-env": "^7.20.2", + "babel-loader": "^8.2.5", + "brfs": "^2.0.2", "dedent-js": "1.0.1", - "eslint": "^4.19.1", - "eslint-loader": "^1.6.1", - "js-yaml": "3.13.1", - "pug": "^2.0.3", - "rimraf": "^2.5.4", - "riot": "^3.9.5", + "eslint": "^8.32.0", + "js-yaml": "4.1.0", + "pug": "^3.0.2", + "rimraf": "^4.1.2", + "riot": "^3.13.2", "riot-hot-reload": "1.0.0", - "riot-route": "^3.1.3", - "riot-tag-loader": "2.0.2", + "riot-route": "^3.1.4", + "riot-tag-loader": "2.1.0", "sort-by": "^1.2.0", - "transform-loader": "^0.2.3", - "webpack": "^4.28.2", - "webpack-cli": "^3.1.2" + "transform-loader": "^0.2.4", + "webpack": "^4.46.0", + "webpack-cli": "^4.10.0" } } diff --git a/ui/app/src/edit.tag.pug b/ui/app/src/edit.tag.pug index 5b03c06da..d3064ab9f 100644 --- a/ui/app/src/edit.tag.pug +++ b/ui/app/src/edit.tag.pug @@ -71,8 +71,8 @@ edit this.updateEditable = e => { if (this.refs.changedProperties.value) { - this.editablePropertiesPreview = yamlParser.safeDump( - yamlParser.safeLoad( + this.editablePropertiesPreview = yamlParser.dump( + yamlParser.load( this.refs.changedProperties.value, ), ) @@ -85,7 +85,7 @@ edit this.saveMessage = '' jsonPayload = JSON.stringify( - yamlParser.safeLoad( + yamlParser.load( this.refs.changedProperties.value, ), ) @@ -129,7 +129,7 @@ edit if (i.metadata.managedFields) { delete i.metadata.managedFields } this.update() - this.refs.yamlNice.innerHTML = yamlParser.safeDump(i.postgresql, {sortKeys: true}) + this.refs.yamlNice.innerHTML = yamlParser.dump(i.postgresql, {sortKeys: true}) // Output data: const o = this.editableProperties = { spec: {} } @@ -192,7 +192,7 @@ edit this.editablePropertiesText = ( yamlParser - .safeDump(this.editableProperties) + .dump(this.editableProperties) .slice(0, -1) ) this.editablePropertiesPreview = this.editablePropertiesText diff --git a/ui/app/src/new.tag.pug b/ui/app/src/new.tag.pug index 5c21f93c7..d4ff3d311 100644 --- a/ui/app/src/new.tag.pug +++ b/ui/app/src/new.tag.pug @@ -793,7 +793,7 @@ new } this.requestCreate = e => { - jsonPayload = JSON.stringify(yamlParser.safeLoad(this.getYAML())) + jsonPayload = JSON.stringify(yamlParser.load(this.getYAML())) this.creating = true this.update() diff --git a/ui/app/src/postgresql.tag.pug b/ui/app/src/postgresql.tag.pug index e40315bb5..1091d32fa 100644 --- a/ui/app/src/postgresql.tag.pug +++ b/ui/app/src/postgresql.tag.pug @@ -220,7 +220,7 @@ postgresql delete manifest.status if (this.refs.yamlNice) { - this.refs.yamlNice.innerHTML = yamlParser.safeDump( + this.refs.yamlNice.innerHTML = yamlParser.dump( this.progress.postgresqlManifest, { sortKeys: true, diff --git a/ui/operator_ui/cluster_discovery.py b/ui/operator_ui/cluster_discovery.py index 9c89735ac..6bb211646 100644 --- a/ui/operator_ui/cluster_discovery.py +++ b/ui/operator_ui/cluster_discovery.py @@ -73,7 +73,7 @@ class StaticClusterDiscoverer: cluster = Cluster(generate_cluster_id(DEFAULT_CLUSTERS), DEFAULT_CLUSTERS) else: logger.info("in cluster configuration failed") - config = kubernetes.client.configuration + config = kubernetes.client.Configuration() cluster = Cluster( generate_cluster_id(config.host), config.host, diff --git a/ui/requirements.txt b/ui/requirements.txt index 7e33ea5ba..790bc6cdd 100644 --- a/ui/requirements.txt +++ b/ui/requirements.txt @@ -1,15 +1,15 @@ Flask-OAuthlib==0.9.6 -Flask==2.2.1 -backoff==2.1.2 -boto3==1.24.46 +Flask==2.2.2 +backoff==2.2.1 +boto3==1.26.51 boto==2.49.0 click==8.1.3 furl==2.1.3 -gevent==21.12.0 -jq==1.2.2 +gevent==22.10.2 +jq==1.4.0 json_delta>=2.0.2 -kubernetes==3.0.0 -requests==2.28.1 +kubernetes==11.0.0 +requests==2.28.2 stups-tokens>=1.1.19 wal_e==1.1.1 -werkzeug==2.2.1 +werkzeug==2.2.2