From 9ae6c7d3edca9e5158df6b2095a06035ed00a280 Mon Sep 17 00:00:00 2001 From: theocerutti Date: Fri, 23 Jul 2021 11:50:03 +0200 Subject: [PATCH 1/3] ui: Update Button to ButtonV2 Core-UI --- shell-ui/package-lock.json | 4 +-- shell-ui/package.json | 2 +- ui/package-lock.json | 4 +-- ui/package.json | 2 +- ui/src/components/DashboardMetrics.js | 16 +++++----- ui/src/components/NodeListTable.js | 10 +++---- ui/src/components/NodePageOverviewTab.js | 10 ++++--- ui/src/components/NodePagePartitionTab.js | 21 ++++++------- ui/src/components/NodePageVolumesTable.js | 11 ++++--- ui/src/components/VolumeListTable.js | 9 +++--- ui/src/components/VolumeMetricsTab.js | 18 +++++++----- ui/src/components/VolumeOverviewTab.js | 36 ++++++++++------------- ui/src/containers/CreateVolume.js | 28 +++++++----------- ui/src/containers/Login.js | 6 ++-- ui/src/containers/NodeCreateForm.js | 11 +++---- ui/src/containers/NodeList.js | 14 +++++---- ui/src/containers/NodePageMetricsTab.js | 17 ++++++----- 17 files changed, 110 insertions(+), 109 deletions(-) diff --git a/shell-ui/package-lock.json b/shell-ui/package-lock.json index 5d877f82ff..6e01c3db1a 100644 --- a/shell-ui/package-lock.json +++ b/shell-ui/package-lock.json @@ -1958,8 +1958,8 @@ "dev": true }, "@scality/core-ui": { - "version": "github:scality/core-ui#e2bd0bdd1bb9f7ec67682f1340ec60c3659aaf0c", - "from": "github:scality/core-ui#v0.19.2" + "version": "github:scality/core-ui#d2c02f9cd9c24fe46a364f64d53b4984017c3199", + "from": "github:scality/core-ui#v0.19.3" }, "@scality/module-federation": { "version": "github:scality/module-federation#a4f1cf882646c8d859b9081dc8b66e5647962456", diff --git a/shell-ui/package.json b/shell-ui/package.json index dff70245e0..0534c98ee4 100644 --- a/shell-ui/package.json +++ b/shell-ui/package.json @@ -46,7 +46,7 @@ "webpack-dev-server": "^3.11.2" }, "dependencies": { - "@scality/core-ui": "github:scality/core-ui.git#v0.19.2", + "@scality/core-ui": "github:scality/core-ui.git#v0.19.3", "@scality/module-federation": "github:scality/module-federation.git#1.0.0", "oidc-client": "^1.11.3", "oidc-react": "^1.1.5", diff --git a/ui/package-lock.json b/ui/package-lock.json index a45d2fdccb..ec62b4ae8e 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -3004,8 +3004,8 @@ } }, "@scality/core-ui": { - "version": "github:scality/core-ui#e2bd0bdd1bb9f7ec67682f1340ec60c3659aaf0c", - "from": "github:scality/core-ui#v0.19.2" + "version": "github:scality/core-ui#d2c02f9cd9c24fe46a364f64d53b4984017c3199", + "from": "github:scality/core-ui#v0.19.3" }, "@scality/module-federation": { "version": "github:scality/module-federation#a4f1cf882646c8d859b9081dc8b66e5647962456", diff --git a/ui/package.json b/ui/package.json index 442811332c..3524637fd0 100644 --- a/ui/package.json +++ b/ui/package.json @@ -10,7 +10,7 @@ "@fortawesome/react-fontawesome": "^0.1.14", "@kubernetes/client-node": "github:scality/kubernetes-client-javascript.git#browser-0.10.2-63-g579d066", "@scality/module-federation": "github:scality/module-federation.git#1.0.0", - "@scality/core-ui": "github:scality/core-ui.git#v0.19.2", + "@scality/core-ui": "github:scality/core-ui.git#v0.19.3", "axios": "^0.21.1", "formik": "2.2.5", "jest-environment-jsdom-sixteen": "^1.0.3", diff --git a/ui/src/components/DashboardMetrics.js b/ui/src/components/DashboardMetrics.js index 51f3cfd7ed..7cfe72d92a 100644 --- a/ui/src/components/DashboardMetrics.js +++ b/ui/src/components/DashboardMetrics.js @@ -1,7 +1,7 @@ import React from 'react'; import styled, { useTheme } from 'styled-components'; import { useQuery } from 'react-query'; -import { Button } from '@scality/core-ui'; +import { Button } from '@scality/core-ui/dist/next'; import { padding } from '@scality/core-ui/dist/style/theme'; import { lighten, darken } from 'polished'; import { useIntl } from 'react-intl'; @@ -163,16 +163,18 @@ const DashboardMetrics = () => { {intl.formatMessage({ id: 'metrics' })} {configQuery.isSuccess && configQuery.data.url_grafana && ( - + /> } > diff --git a/ui/src/containers/CreateVolume.js b/ui/src/containers/CreateVolume.js index c7a4c7820e..177ae04d40 100644 --- a/ui/src/containers/CreateVolume.js +++ b/ui/src/containers/CreateVolume.js @@ -11,14 +11,8 @@ import { } from 'formik'; import * as yup from 'yup'; import styled from 'styled-components'; -import { - Input, - Button, - Banner, - Tooltip, - Checkbox, - Loader, -} from '@scality/core-ui'; +import { Input, Banner, Tooltip, Checkbox, Loader } from '@scality/core-ui'; +import { Button } from '@scality/core-ui/dist/next'; import isEmpty from 'lodash.isempty'; import { fetchStorageClassAction, @@ -501,8 +495,9 @@ const CreateVolume = (props) => { if (hasLabelPrefix) { const prefix = value.split('/')[0]; - const isLabelPrefixMatched = - labelNamePrefixRegex.test(prefix); + const isLabelPrefixMatched = labelNamePrefixRegex.test( + prefix, + ); error = intl.formatMessage( isLabelPrefixMatched ? { id: 'label_name_error' } @@ -745,11 +740,11 @@ const CreateVolume = (props) => { onChange={handleChange('labelValue')} />