Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix license header #15

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-jars-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
---

Test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -157,7 +157,7 @@
);
const allowedScopes: string = useSelector((state: AppState) => state?.auth?.allowedScopes);

const dispatch = useDispatch();

Check warning on line 160 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected dispatch to have a type annotation

/**
* Delete a certificate
Expand All @@ -165,11 +165,11 @@
* @param certificate - Deleting certificate.
*/
const initDelete = (certificate: Certificate): void => {
retrieveCertificateAlias(certificate.alias, true).then(response => {

Check warning on line 168 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected response to have a type annotation
setDeleteCertificatePem(response);
setDeleteID(certificate.alias);
setDeleteConfirm(true);
}).catch(error => {

Check warning on line 172 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected error to have a type annotation
dispatch(addAlert({
description: error?.description
|| t("console:manage.features.certificates.keystore.notifications." +
Expand Down Expand Up @@ -214,9 +214,9 @@
}, [ certificateDisplay ]);

useEffect(() => {
retrievePublicCertificate(true).then(response => {

Check warning on line 217 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected response to have a type annotation
setTenantCertificate(decodeCertificate(response).serialNumber);
}).catch(error => {

Check warning on line 219 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected error to have a type annotation
dispatch(addAlert({
description: error?.description
?? t("console:manage.features.certificates.keystore.notifications." +
Expand Down Expand Up @@ -268,7 +268,7 @@
"deleteCertificate.success.message")
}));
update();
}).catch((error) => {

Check warning on line 271 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected error to have a type annotation
dispatch(addAlert({
description: error?.description
?? t("console:manage.features.certificates.keystore.notifications." +
Expand Down Expand Up @@ -326,12 +326,12 @@
* @param pem - The PEM encoded certificate content.
*/
const exportCertificate = (name: string, pem: string): void => {
const certificate = decodeCertificate(pem);

Check warning on line 329 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected certificate to have a type annotation
const hex = certificate.hex;

Check warning on line 330 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected hex to have a type annotation

const byteArray = new Uint8Array(hex.length / 2);

Check warning on line 332 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected byteArray to have a type annotation

for (let x = 0; x < byteArray.length; x++) {

Check warning on line 334 in apps/console/src/features/certificates/components/certificates-list.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected x to have a type annotation
byteArray[ x ] = parseInt(hex.substr(x * 2, 2), 16);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). 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
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { AlertLevels, Certificate, DisplayCertificate, TestableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
Expand Down Expand Up @@ -51,9 +51,8 @@ interface ImportCertificatePropsInterface extends TestableComponentInterface {
/**
* This renders the import certificate wizard.
*
* @param {ImportCertificatePropsInterface} props
* @param props - Props injected to the component.
*
* @returns {ReactElement}
*/
export const ImportCertificate: FunctionComponent<ImportCertificatePropsInterface> = (
props: ImportCertificatePropsInterface
Expand Down Expand Up @@ -129,7 +128,7 @@ export const ImportCertificate: FunctionComponent<ImportCertificatePropsInterfac
* 2. the state of the first step component
* so that they can be sent back if previous is clicked.
*
* @param {Certificate} data The alias and the PEM-encoded certificate string.
* @param data - The alias and the PEM-encoded certificate string.
* @param {string} name The alias of the certificate.
* @param {string} pem The PEM-encoded string.
* @param {string} fileDecoded The decoded `.cer` file content.
Expand Down
32 changes: 16 additions & 16 deletions apps/console/src/features/certificates/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). 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
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export * from "./certificates-list";
export * from "./wizard";
Expand Down
5 changes: 2 additions & 3 deletions apps/console/src/features/certificates/configs/endpoints.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand All @@ -21,8 +21,7 @@ import { CertificatesResourceEndpointsInterface } from "../models";
/**
* Get the resource endpoints for the certificates feature.
*
* @param {string} serverHost - Server Host.
* @return {CertificatesResourceEndpointsInterface}
* @param serverHost - Server Host.
*/
export const getCertificatesResourceEndpoints = (serverHost: string): CertificatesResourceEndpointsInterface => {
return {
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/features/certificates/configs/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the 'License'); you may not use this file except
Expand Down
Loading