From 4f8d29456baf3742b751ece8b874014ba0fd8387 Mon Sep 17 00:00:00 2001 From: anjula-sack Date: Sun, 28 Jun 2020 14:19:23 +0530 Subject: [PATCH] Migrate APPM Publisher UI from antd v3 to v4 --- .../react-app/package.json | 3 +- .../scenes/Home/components/Logout/index.js | 5 +-- .../react-app/src/scenes/Home/index.js | 36 ++++++++++++------- .../components/NewAppDetailsForm/index.js | 4 ++- .../components/NewAppUploadForm/index.js | 13 +++---- .../components/AddNewAppForm/index.js | 4 ++- .../scenes/AddNewApp/scenes/Custom/index.js | 5 +-- .../AddNewApp/scenes/Enterprise/index.js | 5 +-- .../scenes/AddNewApp/scenes/Public/index.js | 5 +-- .../scenes/AddNewApp/scenes/WebClip/index.js | 5 +-- .../components/AddNewReleaseForm/index.js | 4 ++- .../scenes/Home/scenes/AddNewRelease/index.js | 5 +-- .../ApssTable/AppDetailsDrawer/index.js | 19 +++++----- .../AppList/components/ApssTable/index.js | 9 ++--- .../AppList/components/Filters/index.js | 25 ++++++------- .../Apps/components/DetailedRating/index.js | 5 +-- .../components/lifeCycleDetailsModal/index.js | 7 +++- .../Release/components/LifeCycle/index.js | 4 +-- .../components/DeleteRelease/index.js | 5 +-- .../components/EditRelease/index.js | 20 +++++++---- .../Release/components/ReleaseView/index.js | 17 +++------ .../Manage/components/Categories/index.js | 11 +++--- .../scenes/Manage/components/Tags/index.js | 11 +++--- .../src/scenes/Home/scenes/Manage/index.js | 5 +-- .../components/Pages/index.js | 6 ++-- .../components/SyncAndroidApps/index.js | 3 +- .../Manage/scenes/AndroidEnterprise/index.js | 5 +-- .../components/AddAppsToClusterModal/index.js | 5 +-- .../scenes/Page/components/Cluster/index.js | 21 +++++++---- .../AndroidEnterprise/scenes/Page/index.js | 6 ++-- .../react-app/src/scenes/Login/index.js | 9 ++--- 31 files changed, 164 insertions(+), 123 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json index df1743f096..593c3c385d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json @@ -10,11 +10,12 @@ }, "license": "Apache License 2.0", "dependencies": { + "@ant-design/compatible": "^1.0.0", "@ant-design/dark-theme": "^0.2.2", "@ant-design/icons": "^4.0.6", "@babel/polyfill": "^7.6.0", "acorn": "^6.2.0", - "antd": "^3.23.6", + "antd": "^4.0.0", "axios": "^0.19.0", "babel-eslint": "^9.0.0", "d3": "^5.9.7", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/components/Logout/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/components/Logout/index.js index 1d94718fd1..f41e654bcc 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/components/Logout/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/components/Logout/index.js @@ -17,7 +17,8 @@ */ import React from 'react'; -import { notification, Menu, Icon } from 'antd'; +import { LogoutOutlined } from '@ant-design/icons'; +import { notification, Menu } from 'antd'; import axios from 'axios'; import { withConfigContext } from '../../../../components/ConfigContext'; @@ -70,7 +71,7 @@ class Logout extends React.Component { return ( - + Logout diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/index.js index 983e74c07b..e585f75b5f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/scenes/Home/index.js @@ -17,7 +17,18 @@ */ import React from 'react'; -import { Layout, Menu, Icon, Drawer, Button } from 'antd'; + +import { + AndroidFilled, + AppstoreOutlined, + ControlOutlined, + PlusOutlined, + SettingOutlined, + UserOutlined, +} from '@ant-design/icons'; + +import { Icon as LegacyIcon } from '@ant-design/compatible'; +import { Layout, Menu, Drawer, Button } from 'antd'; import { Switch, Link } from 'react-router-dom'; import RouteWithSubRoutes from '../../components/RouteWithSubRoutes'; import { Redirect } from 'react-router'; @@ -81,7 +92,7 @@ class Dashboard extends React.Component { > - + Apps @@ -92,7 +103,7 @@ class Dashboard extends React.Component { - + Add New App } @@ -118,21 +129,20 @@ class Dashboard extends React.Component { - + Manage } > - General + General {this.config.androidEnterpriseToken != null && ( - Android - Enterprise + Android Enterprise )} @@ -142,7 +152,7 @@ class Dashboard extends React.Component { className="profile" title={ - + {this.config.username} } @@ -157,7 +167,7 @@ class Dashboard extends React.Component {
)} , @@ -577,7 +578,7 @@ class NewAppUploadForm extends React.Component {