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

[Task][OSPP] HertzBeat Official Template Marketplace #2641

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

All-The-Best-for
Copy link

@All-The-Best-for All-The-Best-for commented Aug 30, 2024

What's changed?

#1792

I have done some work on the template market, built the front-end and back-end projects, implemented template upload, search, download, share, version management and related functions, and tested the key methods and functions.

The subsequent plan is to complete registration and login, authority authentication, template description information expansion, and background management.

home
search
version
upload
template-page

Checklist

  • Use Java17, springboot3 to write back-end code, Angular to write front-end code.
  • realize the user personal page registration, login, upload templates.
  • realize yml template file search, download, share function (no need to log in).
  • template page to display the downloads, classification, template version.

@github-actions github-actions bot added the doc Improvements or additions to documentation label Aug 30, 2024
@All-The-Best-for All-The-Best-for changed the title first [Task][OSPP] HertzBeat Official Template Marketplace:first Aug 30, 2024
Copy link
Contributor

@Calvin979 Calvin979 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add apache license header in each file.

@zqr10159 zqr10159 marked this pull request as draft September 4, 2024 08:49
@github-actions github-actions bot removed the doc Improvements or additions to documentation label Sep 29, 2024
@github-actions github-actions bot added the doc Improvements or additions to documentation label Sep 29, 2024
@All-The-Best-for All-The-Best-for changed the title [Task][OSPP] HertzBeat Official Template Marketplace:first [Task][OSPP] HertzBeat Official Template Marketplace Sep 29, 2024
@All-The-Best-for All-The-Best-for marked this pull request as ready for review September 29, 2024 18:17
@zqr10159
Copy link
Member

@All-The-Best-for https://github.com/apache/hertzbeat/actions/runs/11231101389/job/31219804763?pr=2641
Please add a license header to the files that need to add a license, and delete the extra font files

@zqr10159 zqr10159 self-requested a review October 12, 2024 06:51
Comment on lines +9 to +13
<style type="text/css">.preloader{position:fixed;top:0;left:0;width:100%;height:100%;overflow:hidden;background:#c192c7;z-index:9999;transition:opacity .65s}
.preloader-hidden-add{opacity:1;display:block}.preloader-hidden-add-active{opacity:0}
.preloader-hidden{display:none}.cs-loader{position:absolute;top:0;left:0;height:100%;width:100%}
.cs-loader-inner{transform:translateY(-50%);top:50%;position:absolute;width:100%;color:#fff;text-align:center}
.cs-loader-inner label{font-size:20px;opacity:0;display:inline-block}@keyframes lol{0%{opacity:0;transform:translateX(-300px)}33%{opacity:1;transform:translateX(0)}66%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(300px)}}.cs-loader-inner label:nth-child(6){animation:lol 3s infinite ease-in-out}.cs-loader-inner label:nth-child(5){animation:lol 3s .1s infinite ease-in-out}.cs-loader-inner label:nth-child(4){animation:lol 3s .2s infinite ease-in-out}.cs-loader-inner label:nth-child(3){animation:lol 3s .3s infinite ease-in-out}.cs-loader-inner label:nth-child(2){animation:lol 3s .4s infinite ease-in-out}.cs-loader-inner label:nth-child(1){animation:lol 3s .5s infinite ease-in-out}</style>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, is this file web-app/src/index.html overwritten by mistake?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, is this file web-app/src/index.html overwritten by mistake?

Sorry, I didn't modify the web app. I accidentally added a line break here

Comment on lines +16 to +47
server.address=localhost

spring.application.name=hetzbeat-template-hub

server.port=8080

server.servlet.context-path=/api

spring.datasource.url=jdbc:mysql://localhost:3306/hertzbeat_template_hub
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

# 配置使用的文件存储实现
file.storage.type=minio
#file.storage.type=local

address=http://localhost:8080

# 本地存储的路径
local.storage.path=/path/to/local/storage

# MinIO 配置
minio.endpoint=http://127.0.0.1:9000
minio.accessKey=CMULmgc3rfbnhmOCpXci
minio.secretKey=Mw9wnljHl4RtVBGcipcmDTArdCx75lAwaMJeLXGC
minio.bucketName=hertzbeat-data

spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.show-sql=true
spring.jpa.open-in-view=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, it is recommended to use the yml format consistent with other projects

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, it is recommended to use the yml format consistent with other projects

Ok, I got it.

public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
logger.info("SurenessFilterExample doFilter");
try {
SubjectSum subject = SurenessSecurityManager.getInstance().checkIn(servletRequest);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomsun28 The code encountered an exception here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem is need use the jakarta_servlet creator instead of servlet creator. But suggest use spring-boot3-starter-sureness to ignore this config.

* @date 22:40 2020-03-02
*/
@Configuration
public class SurenessConfiguration {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, suggest use the sureness springboot stater spring-boot3-starter-sureness and no need to config the custom SurenessConfiguration.
After import stater, need config in application.yml. Then you can use the jwt which system issue to access backend api.

sureness:
  container: jakarta_servlet
  auths:
    - jwt
  jwt:
    secret: 'CyaFv0bwq2Eik0jdrKUtsA6bx3sDJeFV643R
             LnfKefTjsIfJLBa2YkhEqEGtcHDTNe4CU6+9
             8tVt4bisXQ13r4N0oxhUZRd3M6EByXIO+SV5
             dKhaX0cs3OC5lCxq20yhmUea6H6JIpSE2Rwp'

Btw, suggest we fix this pr review and action failed first to meet ospp merge requirements. For login feature we can reopen a new branch pr later to code it.

Comment on lines +3 to +11
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title> 404 Not Found
</title></head>
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
<div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
<h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">404</h1>
<h2 style="margin-top:20px;font-size: 30px;">Not Found
</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, suggest use system default font instead of import new font file. eg: font-family: monospace, Menlo, Roboto, system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, are there have svg replacements for these png for logo pic? A little worried about that too many pngs will fill up the main repository size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Improvements or additions to documentation good first pull request Good for newcomers OSPP webapp
Projects
Development

Successfully merging this pull request may close these issues.

6 participants