From 426260ecaebe104033a2bdebe2ec8a03eef3d248 Mon Sep 17 00:00:00 2001 From: Sahan Randika Date: Fri, 19 Jan 2024 14:49:23 +0530 Subject: [PATCH] fix formatting issues --- .../src/app/components/APISettings/ApisTableContent.jsx | 8 +------- .../src/app/components/APISettings/ApisTableHead.jsx | 2 +- .../source/src/app/components/APISettings/ListApis.jsx | 2 +- .../src/main/webapp/source/src/app/data/APIValidation.js | 4 ++-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx index 026f2be5f99..9297233a146 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableContent.jsx @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. +* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -20,7 +20,6 @@ import React, { useState } from 'react'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableRow from '@material-ui/core/TableRow'; -import ResourceNotFound from 'AppComponents/Base/Errors/ResourceNotFound'; import PropTypes from 'prop-types'; import API from 'AppData/api'; import { makeStyles, withStyles } from '@material-ui/core/styles'; @@ -113,17 +112,12 @@ const StyledTableRow = withStyles((theme) => ({ }))(TableRow); const ApisTableContent = ({ apis, updateApiList }) => { - const [notFound] = useState(false); const restApi = new API(); const [provider, setProvider] = useState(''); const [editableRows, setEditableRows] = useState(new Set()); const classes = useStyles(); - if (notFound) { - return ; - } - const handleEditClick = (apiId) => { setEditableRows((prevRows) => { const newRows = new Set(prevRows); diff --git a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableHead.jsx b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableHead.jsx index 7521fd994d7..b7222e1b3b1 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableHead.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ApisTableHead.jsx @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. +* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except diff --git a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx index 7e6d0583526..517434daf9d 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APISettings/ListApis.jsx @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. +* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except diff --git a/portals/publisher/src/main/webapp/source/src/app/data/APIValidation.js b/portals/publisher/src/main/webapp/source/src/app/data/APIValidation.js index 360ce277755..964d4242914 100644 --- a/portals/publisher/src/main/webapp/source/src/app/data/APIValidation.js +++ b/portals/publisher/src/main/webapp/source/src/app/data/APIValidation.js @@ -32,9 +32,9 @@ function getMessage(errorType, isApiName, maxLength) { case 'any.empty': return 'should not be empty'; case 'string.regex.base': - if(isApiName){ + if (isApiName) { return 'should not contain trailing or leading spaces, special characters, and consecutive spaces'; - }else{ + } else { return 'should not contain spaces or special characters'; } case 'string.max':