From e53c7b3c8ae75dc4d55bc3685cde04c927dac264 Mon Sep 17 00:00:00 2001 From: LinkinStars Date: Fri, 22 Mar 2024 17:30:15 +0800 Subject: [PATCH] docs(asf): add ASF header --- cmd/wire_gen.go | 24 +++++++++++++++++-- docs/docs.go | 19 +++++++++++++++ docs/swagger.yaml | 17 +++++++++++++ internal/base/constant/reason.go | 19 +++++++++++++++ internal/base/constant/revision.go | 19 +++++++++++++++ internal/schema/review_schema.go | 19 +++++++++++++++ internal/schema/search_schema_test.go | 19 +++++++++++++++ pkg/checker/url.go | 19 +++++++++++++++ plugin/reviewer.go | 19 +++++++++++++++ ui/pnpm-lock.yaml | 17 +++++++++++++ ui/src/behaviour/useLegalClick.tsx | 19 +++++++++++++++ .../components/ApproveDropdown/index.tsx | 19 +++++++++++++++ .../components/EditPostModal/index.scss | 19 +++++++++++++++ .../Review/components/EditPostModal/index.tsx | 19 +++++++++++++++ .../Review/components/FlagContent/index.tsx | 19 +++++++++++++++ .../Review/components/QueuedContent/index.tsx | 19 +++++++++++++++ .../Review/components/ReviewType/index.tsx | 19 +++++++++++++++ ui/src/pages/Review/components/index.ts | 19 +++++++++++++++ ui/src/pages/Review/utils/generateData.ts | 19 +++++++++++++++ ui/src/services/client/review.ts | 1 + 20 files changed, 361 insertions(+), 2 deletions(-) diff --git a/cmd/wire_gen.go b/cmd/wire_gen.go index a2027d285..7ed904d05 100644 --- a/cmd/wire_gen.go +++ b/cmd/wire_gen.go @@ -1,8 +1,28 @@ +//go:build !wireinject +// +build !wireinject + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + // Code generated by Wire. DO NOT EDIT. //go:generate go run github.com/google/wire/cmd/wire -//go:build !wireinject -// +build !wireinject package answercmd diff --git a/docs/docs.go b/docs/docs.go index 30a8e1bc0..3b8e51e3f 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + // Code generated by swaggo/swag. DO NOT EDIT. package docs diff --git a/docs/swagger.yaml b/docs/swagger.yaml index e9bb895e3..8c094f863 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + definitions: constant.NotificationChannelKey: enum: diff --git a/internal/base/constant/reason.go b/internal/base/constant/reason.go index 53b298f3a..cf29e4d11 100644 --- a/internal/base/constant/reason.go +++ b/internal/base/constant/reason.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + package constant const ( diff --git a/internal/base/constant/revision.go b/internal/base/constant/revision.go index 0d7dc586e..87f3feae9 100644 --- a/internal/base/constant/revision.go +++ b/internal/base/constant/revision.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + package constant type ReviewingType string diff --git a/internal/schema/review_schema.go b/internal/schema/review_schema.go index 8c5ba0d6f..6fe9025ac 100644 --- a/internal/schema/review_schema.go +++ b/internal/schema/review_schema.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + package schema import ( diff --git a/internal/schema/search_schema_test.go b/internal/schema/search_schema_test.go index 50ffdf14b..fa8305342 100644 --- a/internal/schema/search_schema_test.go +++ b/internal/schema/search_schema_test.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + package schema import ( diff --git a/pkg/checker/url.go b/pkg/checker/url.go index 1ec97a595..b096d8ada 100644 --- a/pkg/checker/url.go +++ b/pkg/checker/url.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + package checker import ( diff --git a/plugin/reviewer.go b/plugin/reviewer.go index 95569d390..4c9165c68 100644 --- a/plugin/reviewer.go +++ b/plugin/reviewer.go @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + package plugin type Reviewer interface { diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml index 83bdc9e24..0369458a5 100644 --- a/ui/pnpm-lock.yaml +++ b/ui/pnpm-lock.yaml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + lockfileVersion: '6.0' settings: diff --git a/ui/src/behaviour/useLegalClick.tsx b/ui/src/behaviour/useLegalClick.tsx index a098b3e8e..599c9957c 100644 --- a/ui/src/behaviour/useLegalClick.tsx +++ b/ui/src/behaviour/useLegalClick.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { MouseEvent, useCallback } from 'react'; import { useLegalPrivacy, useLegalTos } from '@/services/client/legal'; diff --git a/ui/src/pages/Review/components/ApproveDropdown/index.tsx b/ui/src/pages/Review/components/ApproveDropdown/index.tsx index 7474d8e1e..f6a624716 100644 --- a/ui/src/pages/Review/components/ApproveDropdown/index.tsx +++ b/ui/src/pages/Review/components/ApproveDropdown/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { FC, useState } from 'react'; import { Dropdown, Button } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; diff --git a/ui/src/pages/Review/components/EditPostModal/index.scss b/ui/src/pages/Review/components/EditPostModal/index.scss index 550155b25..254660876 100644 --- a/ui/src/pages/Review/components/EditPostModal/index.scss +++ b/ui/src/pages/Review/components/EditPostModal/index.scss @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + .edit-post-modal { max-width: 746px; width: 58.3333% !important; diff --git a/ui/src/pages/Review/components/EditPostModal/index.tsx b/ui/src/pages/Review/components/EditPostModal/index.tsx index 4190240cf..0eefd311d 100644 --- a/ui/src/pages/Review/components/EditPostModal/index.tsx +++ b/ui/src/pages/Review/components/EditPostModal/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { FC, useState, useEffect } from 'react'; import { Modal, Button, Form } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; diff --git a/ui/src/pages/Review/components/FlagContent/index.tsx b/ui/src/pages/Review/components/FlagContent/index.tsx index 2b07bddb2..fd1b0abdf 100644 --- a/ui/src/pages/Review/components/FlagContent/index.tsx +++ b/ui/src/pages/Review/components/FlagContent/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { FC, useEffect, useState, useRef } from 'react'; import { Card, Alert, Stack, Button } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; diff --git a/ui/src/pages/Review/components/QueuedContent/index.tsx b/ui/src/pages/Review/components/QueuedContent/index.tsx index e111cb8bc..16778323e 100644 --- a/ui/src/pages/Review/components/QueuedContent/index.tsx +++ b/ui/src/pages/Review/components/QueuedContent/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { FC, useEffect, useState, useRef } from 'react'; import { Card, Alert, Stack, Button } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; diff --git a/ui/src/pages/Review/components/ReviewType/index.tsx b/ui/src/pages/Review/components/ReviewType/index.tsx index 16a392e2b..f887d2cde 100644 --- a/ui/src/pages/Review/components/ReviewType/index.tsx +++ b/ui/src/pages/Review/components/ReviewType/index.tsx @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { FC } from 'react'; import { Card, Form } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; diff --git a/ui/src/pages/Review/components/index.ts b/ui/src/pages/Review/components/index.ts index 0e02a69bd..b28ec1823 100644 --- a/ui/src/pages/Review/components/index.ts +++ b/ui/src/pages/Review/components/index.ts @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 ReviewType from './ReviewType'; import ApproveDropdown from './ApproveDropdown'; import EditPostModal from './EditPostModal'; diff --git a/ui/src/pages/Review/utils/generateData.ts b/ui/src/pages/Review/utils/generateData.ts index d086ff635..f61d28280 100644 --- a/ui/src/pages/Review/utils/generateData.ts +++ b/ui/src/pages/Review/utils/generateData.ts @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 { pathFactory } from '@/router/pathFactory'; export default (data: any) => { diff --git a/ui/src/services/client/review.ts b/ui/src/services/client/review.ts index 303b029c8..311418c32 100644 --- a/ui/src/services/client/review.ts +++ b/ui/src/services/client/review.ts @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + // import useSWR from 'swr'; import request from '@/utils/request';