Merge remote-tracking branch 'origin/main'
2
.github/workflows/appmanage_docker.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
name: Build & push Docker image
|
name: Build & push Docker image
|
||||||
with:
|
with:
|
||||||
image: websoft9dev/appmanage
|
image: websoft9dev/appmanage
|
||||||
tags: 0.2.0
|
tags: 0.3.0
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
dockerfile: appmanage/Dockerfile
|
dockerfile: appmanage/Dockerfile
|
||||||
directory: appmanage
|
directory: appmanage
|
||||||
|
30
.github/workflows/getDatafromContentful.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Fetch data from contentful graphql
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fetch-data:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Fetch data from contentful graphql
|
||||||
|
env:
|
||||||
|
ACCESS_TOKEN: ${{ secrets.CONTENTFUL_GRAPHQLTOKEN }}
|
||||||
|
LOCALES: "en-US,zh-CN"
|
||||||
|
run: |
|
||||||
|
mkdir -p appmanage/static/json
|
||||||
|
IFS=',' read -ra LOCALE_ARRAY <<< "$LOCALES"
|
||||||
|
for LOCALE in "${LOCALE_ARRAY[@]}"; do
|
||||||
|
curl -X POST \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Bearer $ACCESS_TOKEN" \
|
||||||
|
--data '{"query":"query($locale: String){catalog(id: \"2Yp0TY3kBHgG6VDjsHZNpK\",locale:$locale) {linkedFrom(allowedLocales:[\"en-US\"]) {catalogCollection(limit:20) {items {key position title linkedFrom(allowedLocales:[\"en-US\"]) {catalogCollection(limit:20) {items {key title position}}}}}}}}","variables":{"locale":$LOCALE}}' \
|
||||||
|
https://graphql.contentful.com/content/v1/spaces/ffrhttfighww > appmanage/static/json/catalog_$LOCALE.json
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: Update catalog.json
|
31
.github/workflows/logo.yml
vendored
@ -13,7 +13,23 @@ jobs:
|
|||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
name: Check out code
|
name: Check out code
|
||||||
|
|
||||||
|
- name: delete photo
|
||||||
|
run: |
|
||||||
|
git config --global user.name "${{ github.actor }}"
|
||||||
|
git config --global user.email "xxx@websoft9.com"
|
||||||
|
files=$(ls /)
|
||||||
|
for file in ${files};do
|
||||||
|
if [ $file == *.png ];then
|
||||||
|
echo $file
|
||||||
|
git rm $file
|
||||||
|
git commit -m "delete"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
git push -u
|
||||||
|
|
||||||
- name: update logo
|
- name: update logo
|
||||||
|
if: contains('Hello world', 'abc')
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "${{ github.actor }}"
|
git config --global user.name "${{ github.actor }}"
|
||||||
git config --global user.email "xxx@websoft9.com"
|
git config --global user.email "xxx@websoft9.com"
|
||||||
@ -28,18 +44,6 @@ jobs:
|
|||||||
echo $applist
|
echo $applist
|
||||||
|
|
||||||
for app in ${applist};do
|
for app in ${applist};do
|
||||||
if [ "$app" = "customer-ibox" ];then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ "$app" = "kodcloud" ];then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ "$app" = "onlyoffice" ];then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ "$app" = "vendor-mingdao" ];then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ "$app" = null ];then
|
if [ "$app" = null ];then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@ -53,7 +57,7 @@ jobs:
|
|||||||
file=$(echo appmanage/static/images/${url##*/})
|
file=$(echo appmanage/static/images/${url##*/})
|
||||||
echo $file
|
echo $file
|
||||||
|
|
||||||
time=$(curl --connect-timeout 3 -s -w '%{time_total}\n' -o /dev/null $url)
|
wget --timeout=3 -q "$url" || continue
|
||||||
|
|
||||||
if [[ -f ${file} ]];then
|
if [[ -f ${file} ]];then
|
||||||
git rm $file
|
git rm $file
|
||||||
@ -63,6 +67,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: push logo
|
- name: push logo
|
||||||
|
if: contains('Hello world', 'abc')
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: update logo
|
commit_message: update logo
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
## 0.3.0 release on 2023-06-06
|
||||||
|
|
||||||
|
1. appmanage docker 镜像更新到 0.3.0
|
||||||
|
2. 修复 prestashop 无法访问的 bug
|
||||||
|
3. 修复 odoo 无法安装的 bug
|
||||||
|
|
||||||
## 0.2.0 release on 2023-06-03
|
## 0.2.0 release on 2023-06-03
|
||||||
|
|
||||||
1. appmanage docker 镜像更新到 0.2.0
|
1. appmanage docker 镜像更新到 0.2.0
|
||||||
|
@ -172,7 +172,7 @@ def check_app_url(customer_app_name):
|
|||||||
env_map = get_map(env_path)
|
env_map = get_map(env_path)
|
||||||
if env_map.get("APP_URL_REPLACE") == "true":
|
if env_map.get("APP_URL_REPLACE") == "true":
|
||||||
myLogger.info_logger(customer_app_name + "need to change app url...")
|
myLogger.info_logger(customer_app_name + "need to change app url...")
|
||||||
app_url = list(read_env(env_path, "APP_URL").values())[0]
|
app_url = list(read_env(env_path, "APP_URL=").values())[0]
|
||||||
ip = "localhost"
|
ip = "localhost"
|
||||||
url = ""
|
url = ""
|
||||||
try:
|
try:
|
||||||
|
@ -343,6 +343,30 @@ def AppDomainList(request: Request, app_id: Optional[str] = Query(default=None,
|
|||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
@router.api_route("/AppUpdateList", methods=["GET", "POST"], summary="查询更新內容", response_model=Response)
|
||||||
|
def AppUpdateList(request: Request):
|
||||||
|
|
||||||
|
try:
|
||||||
|
myLogger.info_logger("Receive request: /AppUpdateList")
|
||||||
|
get_headers(request)
|
||||||
|
ret = {}
|
||||||
|
ret['ResponseData'] = {}
|
||||||
|
ret['ResponseData']['Update_content'] = None
|
||||||
|
myLogger.info_logger(ret)
|
||||||
|
response = JSONResponse(content=ret)
|
||||||
|
except CommandException as ce:
|
||||||
|
ret = {}
|
||||||
|
ret['ResponseData'] = {}
|
||||||
|
ret['Error'] = manage.get_error_info(ce.code, ce.message, ce.detail)
|
||||||
|
response = JSONResponse(content=ret)
|
||||||
|
except Exception as e:
|
||||||
|
ret = {}
|
||||||
|
ret['ResponseData'] = {}
|
||||||
|
ret['Error'] = manage.get_error_info(const.ERROR_SERVER_SYSTEM, "system original error", str(e))
|
||||||
|
response = JSONResponse(content=ret)
|
||||||
|
|
||||||
|
return response
|
||||||
|
|
||||||
def get_headers(request):
|
def get_headers(request):
|
||||||
headers = request.headers
|
headers = request.headers
|
||||||
try:
|
try:
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 7.7 KiB |
BIN
appmanage/static/images/arangodb-websoft9.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 9.6 KiB |
BIN
appmanage/static/images/dockermailserver-websoft9.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 25 KiB |
BIN
appmanage/static/images/hasura-websoft9.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
appmanage/static/images/ibox-websoft9.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 8.0 KiB |
BIN
appmanage/static/images/mailu-websoft9.png
Normal file
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
BIN
appmanage/static/images/sscms-websoft9.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
appmanage/static/images/strapi-websoft9.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
appmanage/static/images/theia-websoft9.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
appmanage/static/images/tooljet-websoft9.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
appmanage/static/images/traefik-websoft9.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
appmanage/static/images/typesense-websoft9.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 10 KiB |
BIN
appmanage/static/images/umbraco-websoft9.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 13 KiB |
BIN
appmanage/static/images/zammad-websoft9.png
Normal file
After Width: | Height: | Size: 10 KiB |
1
appmanage/static/json/catalog_en-US.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"errors":[{"message":"Query execution error. Requested locale '$LOCALE' does not exist in the space","extensions":{"contentful":{"code":"UNKNOWN_LOCALE","documentationUrl":"https://ctfl.io/graphql-api-error-unknown-locale","requestId":"df27aeb8-8ca0-4080-b738-2b5d11ed6ad2","details":{"availableLocaleCodes":["en-US","zh-CN"]}}},"locations":[{"line":1,"column":24}],"path":["catalog"]}],"data":{"catalog":null}}
|
1
appmanage/static/json/catalog_zh-CN.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"errors":[{"message":"Query execution error. Requested locale '$LOCALE' does not exist in the space","extensions":{"contentful":{"code":"UNKNOWN_LOCALE","documentationUrl":"https://ctfl.io/graphql-api-error-unknown-locale","requestId":"df27aeb8-8ca0-4080-b738-2b5d11ed6ad2","details":{"availableLocaleCodes":["en-US","zh-CN"]}}},"locations":[{"line":1,"column":24}],"path":["catalog"]}],"data":{"catalog":null}}
|
18
apps/roles/kodbox/CHANGELOG.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# CHANGELOG
|
||||||
|
|
||||||
|
## To do
|
||||||
|
|
||||||
|
1. 可视化管理工具
|
||||||
|
2. AmazonLinux支持
|
||||||
|
|
||||||
|
## Logs
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 2020-02-14 redis-version版本输出
|
||||||
|
* 2020-02-13 redis-version版本输出
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 2020-02-14 增加GUI工具
|
||||||
|
* 2020-02-13 增加2.8版本
|
0
apps/roles/kodbox/Notes.md
Normal file
1
apps/roles/kodbox/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Template for create application
|
0
apps/roles/kodbox/defaults/main.yml
Normal file
0
apps/roles/kodbox/files/template.conf
Normal file
3
apps/roles/kodbox/handlers/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- name: check_kodbox_service
|
||||||
|
debug:
|
||||||
|
var: check_kodbox_service.stdout
|
21
apps/roles/kodbox/meta/main.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
|
allow_duplicates: true
|
||||||
|
|
||||||
|
galaxy_info:
|
||||||
|
author:
|
||||||
|
description:
|
||||||
|
company:
|
||||||
|
license:
|
||||||
|
min_ansible_version:
|
||||||
|
platforms:
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- 7
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- 18.04
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
|
0
apps/roles/kodbox/tasks/Debian.yml
Normal file
0
apps/roles/kodbox/tasks/RedHat.yml
Normal file
4
apps/roles/kodbox/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: Install {{appname}}
|
||||||
|
include_tasks: tasks/install.yml
|
||||||
|
vars:
|
||||||
|
app: "kodbox"
|
0
apps/roles/kodbox/templates/template.conf
Normal file
1
apps/roles/kodbox/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
nginx_reverse_proxy_port: "9001"
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"files": {
|
"files": {
|
||||||
"main.css": "./static/css/main.751babb1.css",
|
"main.css": "./static/css/main.751babb1.css",
|
||||||
"main.js": "./static/js/main.a27efeeb.js",
|
"main.js": "./static/js/main.8d3e5d4b.js",
|
||||||
"static/js/688.bf21350d.chunk.js": "./static/js/688.bf21350d.chunk.js",
|
"static/js/688.694c9b06.chunk.js": "./static/js/688.694c9b06.chunk.js",
|
||||||
"static/js/376.0505e571.chunk.js": "./static/js/376.0505e571.chunk.js",
|
"static/js/376.0505e571.chunk.js": "./static/js/376.0505e571.chunk.js",
|
||||||
"static/js/426.910887ac.chunk.js": "./static/js/426.910887ac.chunk.js",
|
"static/js/426.910887ac.chunk.js": "./static/js/426.910887ac.chunk.js",
|
||||||
"static/js/912.833f32c9.chunk.js": "./static/js/912.833f32c9.chunk.js",
|
"static/js/912.833f32c9.chunk.js": "./static/js/912.833f32c9.chunk.js",
|
||||||
@ -43,8 +43,8 @@
|
|||||||
"static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg",
|
"static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg",
|
||||||
"index.html": "./index.html",
|
"index.html": "./index.html",
|
||||||
"main.751babb1.css.map": "./static/css/main.751babb1.css.map",
|
"main.751babb1.css.map": "./static/css/main.751babb1.css.map",
|
||||||
"main.a27efeeb.js.map": "./static/js/main.a27efeeb.js.map",
|
"main.8d3e5d4b.js.map": "./static/js/main.8d3e5d4b.js.map",
|
||||||
"688.bf21350d.chunk.js.map": "./static/js/688.bf21350d.chunk.js.map",
|
"688.694c9b06.chunk.js.map": "./static/js/688.694c9b06.chunk.js.map",
|
||||||
"376.0505e571.chunk.js.map": "./static/js/376.0505e571.chunk.js.map",
|
"376.0505e571.chunk.js.map": "./static/js/376.0505e571.chunk.js.map",
|
||||||
"426.910887ac.chunk.js.map": "./static/js/426.910887ac.chunk.js.map",
|
"426.910887ac.chunk.js.map": "./static/js/426.910887ac.chunk.js.map",
|
||||||
"912.833f32c9.chunk.js.map": "./static/js/912.833f32c9.chunk.js.map",
|
"912.833f32c9.chunk.js.map": "./static/js/912.833f32c9.chunk.js.map",
|
||||||
@ -53,6 +53,6 @@
|
|||||||
},
|
},
|
||||||
"entrypoints": [
|
"entrypoints": [
|
||||||
"static/css/main.751babb1.css",
|
"static/css/main.751babb1.css",
|
||||||
"static/js/main.a27efeeb.js"
|
"static/js/main.8d3e5d4b.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><script type="text/javascript" src="../base1/cockpit.js"></script><script type="text/javascript" src="../*/po.js"></script><link rel="manifest" href="./manifest.json"/><title>App Store</title><script defer="defer" src="./static/js/main.a27efeeb.js"></script><link href="./static/css/main.751babb1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" style="height:100%"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><script type="text/javascript" src="../base1/cockpit.js"></script><script type="text/javascript" src="../*/po.js"></script><link rel="manifest" href="./manifest.json"/><title>App Store</title><script defer="defer" src="./static/js/main.8d3e5d4b.js"></script><link href="./static/css/main.751babb1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" style="height:100%"></div></body></html>
|
2
cockpit/appstore/build/static/js/688.694c9b06.chunk.js
Normal file
@ -26,6 +26,7 @@ const getContentfulData = gql`
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
key
|
key
|
||||||
|
hot
|
||||||
trademark
|
trademark
|
||||||
summary
|
summary
|
||||||
overview
|
overview
|
||||||
@ -39,11 +40,11 @@ const getContentfulData = gql`
|
|||||||
logo {
|
logo {
|
||||||
imageurl
|
imageurl
|
||||||
}
|
}
|
||||||
catalogCollection(limit:20) {
|
catalogCollection(limit:15) {
|
||||||
items {
|
items {
|
||||||
key
|
key
|
||||||
title
|
title
|
||||||
catalogCollection(limit:1){
|
catalogCollection(limit:5){
|
||||||
items{
|
items{
|
||||||
key
|
key
|
||||||
title
|
title
|
||||||
@ -58,12 +59,14 @@ const getContentfulData = gql`
|
|||||||
catalogCollection(limit:20) {
|
catalogCollection(limit:20) {
|
||||||
items {
|
items {
|
||||||
key
|
key
|
||||||
|
position
|
||||||
title
|
title
|
||||||
linkedFrom(allowedLocales:["en-US"]) {
|
linkedFrom(allowedLocales:["en-US"]) {
|
||||||
catalogCollection(limit:20) {
|
catalogCollection(limit:20) {
|
||||||
items {
|
items {
|
||||||
key
|
key
|
||||||
title
|
title
|
||||||
|
position
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -301,8 +304,18 @@ const AppStore = (): React$Element<React$FragmentType> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const mainCatalogs = allData?.catalog.linkedFrom.catalogCollection.items; //主目录数据
|
//主目录数据
|
||||||
//const apps = allData?.productCollection?.items;//所有应用数据
|
const mainCatalogs = allData?.catalog.linkedFrom.catalogCollection.items?.sort(function (a, b) {
|
||||||
|
if (a.position === null && b.position === null) {
|
||||||
|
return 0;
|
||||||
|
} else if (a.position === null) {
|
||||||
|
return 1;
|
||||||
|
} else if (b.position === null) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
return a.position - b.position;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const [apps, setApps] = useState(null); //用于存储通过目录筛选出来的数据
|
const [apps, setApps] = useState(null); //用于存储通过目录筛选出来的数据
|
||||||
const [appList, setAppList] = useState(null); //用于存储通过目录筛选出来的数据
|
const [appList, setAppList] = useState(null); //用于存储通过目录筛选出来的数据
|
||||||
@ -314,8 +327,20 @@ const AppStore = (): React$Element<React$FragmentType> => {
|
|||||||
skipCount += allData.productCollection.items.length;
|
skipCount += allData.productCollection.items.length;
|
||||||
// 调用fetchMoreProducts函数来获取更多的产品,如果有的话
|
// 调用fetchMoreProducts函数来获取更多的产品,如果有的话
|
||||||
fetchMoreProducts();
|
fetchMoreProducts();
|
||||||
setAppList(allData.productCollection?.items);
|
//对产品根据hot排序:降序
|
||||||
setApps(allData.productCollection?.items);
|
const data = allData.productCollection?.items?.sort(function (a, b) {
|
||||||
|
if (a.hot === null && b.hot === null) {
|
||||||
|
return 0;
|
||||||
|
} else if (a.hot === null) {
|
||||||
|
return 1;
|
||||||
|
} else if (b.hot === null) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
return b.hot - a.hot;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setAppList(data);
|
||||||
|
setApps(data);
|
||||||
}
|
}
|
||||||
}, [allData])
|
}, [allData])
|
||||||
|
|
||||||
@ -345,7 +370,18 @@ const AppStore = (): React$Element<React$FragmentType> => {
|
|||||||
selectedMainCatalog === 'All'
|
selectedMainCatalog === 'All'
|
||||||
? []
|
? []
|
||||||
: mainCatalogs.filter(c => c.key === selectedMainCatalog)?.[0]?.linkedFrom?.catalogCollection?.items;
|
: mainCatalogs.filter(c => c.key === selectedMainCatalog)?.[0]?.linkedFrom?.catalogCollection?.items;
|
||||||
setSubCatalogs(updatedData);
|
const data = updatedData.sort(function (a, b) {
|
||||||
|
if (a.position === null && b.position === null) {
|
||||||
|
return 0;
|
||||||
|
} else if (a.position === null) {
|
||||||
|
return 1;
|
||||||
|
} else if (b.position === null) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
return a.position - b.position;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setSubCatalogs(data);
|
||||||
|
|
||||||
//根据主目录过滤app数据
|
//根据主目录过滤app数据
|
||||||
let subCatalogApps = null;
|
let subCatalogApps = null;
|
||||||
@ -379,7 +415,7 @@ const AppStore = (): React$Element<React$FragmentType> => {
|
|||||||
updatedData =
|
updatedData =
|
||||||
searchString === ""
|
searchString === ""
|
||||||
? apps
|
? apps
|
||||||
: apps.filter(app => { return app.trademark.toLowerCase().includes(searchString) || app.key.toLowerCase().includes(searchString) });
|
: apps.filter(app => { return app.trademark.toLowerCase().includes(searchString) || app.key.toLowerCase().includes(searchString) || app.summary.toLowerCase().includes(searchString) });
|
||||||
|
|
||||||
setAppList(updatedData);
|
setAppList(updatedData);
|
||||||
setIsAllSelected(true);
|
setIsAllSelected(true);
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"files": {
|
"files": {
|
||||||
"main.css": "./static/css/main.751babb1.css",
|
"main.css": "./static/css/main.1e5ef24c.css",
|
||||||
"main.js": "./static/js/main.495e2b6f.js",
|
"main.js": "./static/js/main.bc6762b5.js",
|
||||||
"static/js/145.2fc71954.chunk.js": "./static/js/145.2fc71954.chunk.js",
|
"static/js/927.1961e223.chunk.js": "./static/js/927.1961e223.chunk.js",
|
||||||
"static/js/376.bc0e5568.chunk.js": "./static/js/376.bc0e5568.chunk.js",
|
"static/js/376.bc0e5568.chunk.js": "./static/js/376.bc0e5568.chunk.js",
|
||||||
"static/js/426.46c5e949.chunk.js": "./static/js/426.46c5e949.chunk.js",
|
"static/js/426.46c5e949.chunk.js": "./static/js/426.46c5e949.chunk.js",
|
||||||
"static/js/603.8e18e7fa.chunk.js": "./static/js/603.8e18e7fa.chunk.js",
|
"static/js/603.8e18e7fa.chunk.js": "./static/js/603.8e18e7fa.chunk.js",
|
||||||
"static/css/836.5576a615.chunk.css": "./static/css/836.5576a615.chunk.css",
|
"static/css/836.5576a615.chunk.css": "./static/css/836.5576a615.chunk.css",
|
||||||
"static/js/836.06772eb6.chunk.js": "./static/js/836.06772eb6.chunk.js",
|
"static/js/836.06772eb6.chunk.js": "./static/js/836.06772eb6.chunk.js",
|
||||||
"static/js/912.1f46d2af.chunk.js": "./static/js/912.1f46d2af.chunk.js",
|
"static/js/912.1f46d2af.chunk.js": "./static/js/912.1f46d2af.chunk.js",
|
||||||
"static/js/96.2a832dc4.chunk.js": "./static/js/96.2a832dc4.chunk.js",
|
"static/js/888.41d89770.chunk.js": "./static/js/888.41d89770.chunk.js",
|
||||||
"static/css/769.c11b83c2.chunk.css": "./static/css/769.c11b83c2.chunk.css",
|
"static/css/769.c11b83c2.chunk.css": "./static/css/769.c11b83c2.chunk.css",
|
||||||
"static/js/769.3b95354d.chunk.js": "./static/js/769.3b95354d.chunk.js",
|
"static/js/769.3b95354d.chunk.js": "./static/js/769.3b95354d.chunk.js",
|
||||||
"static/media/materialdesignicons-webfont.eot": "./static/media/materialdesignicons-webfont.e044ed23c047e571c550.eot",
|
"static/media/materialdesignicons-webfont.eot": "./static/media/materialdesignicons-webfont.e044ed23c047e571c550.eot",
|
||||||
@ -63,21 +63,21 @@
|
|||||||
"static/media/status-icon-sprite.svg": "./static/media/status-icon-sprite.4fee9fefc3971799d2dd.svg",
|
"static/media/status-icon-sprite.svg": "./static/media/status-icon-sprite.4fee9fefc3971799d2dd.svg",
|
||||||
"static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg",
|
"static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg",
|
||||||
"index.html": "./index.html",
|
"index.html": "./index.html",
|
||||||
"main.751babb1.css.map": "./static/css/main.751babb1.css.map",
|
"main.1e5ef24c.css.map": "./static/css/main.1e5ef24c.css.map",
|
||||||
"main.495e2b6f.js.map": "./static/js/main.495e2b6f.js.map",
|
"main.bc6762b5.js.map": "./static/js/main.bc6762b5.js.map",
|
||||||
"145.2fc71954.chunk.js.map": "./static/js/145.2fc71954.chunk.js.map",
|
"927.1961e223.chunk.js.map": "./static/js/927.1961e223.chunk.js.map",
|
||||||
"376.bc0e5568.chunk.js.map": "./static/js/376.bc0e5568.chunk.js.map",
|
"376.bc0e5568.chunk.js.map": "./static/js/376.bc0e5568.chunk.js.map",
|
||||||
"426.46c5e949.chunk.js.map": "./static/js/426.46c5e949.chunk.js.map",
|
"426.46c5e949.chunk.js.map": "./static/js/426.46c5e949.chunk.js.map",
|
||||||
"603.8e18e7fa.chunk.js.map": "./static/js/603.8e18e7fa.chunk.js.map",
|
"603.8e18e7fa.chunk.js.map": "./static/js/603.8e18e7fa.chunk.js.map",
|
||||||
"836.5576a615.chunk.css.map": "./static/css/836.5576a615.chunk.css.map",
|
"836.5576a615.chunk.css.map": "./static/css/836.5576a615.chunk.css.map",
|
||||||
"836.06772eb6.chunk.js.map": "./static/js/836.06772eb6.chunk.js.map",
|
"836.06772eb6.chunk.js.map": "./static/js/836.06772eb6.chunk.js.map",
|
||||||
"912.1f46d2af.chunk.js.map": "./static/js/912.1f46d2af.chunk.js.map",
|
"912.1f46d2af.chunk.js.map": "./static/js/912.1f46d2af.chunk.js.map",
|
||||||
"96.2a832dc4.chunk.js.map": "./static/js/96.2a832dc4.chunk.js.map",
|
"888.41d89770.chunk.js.map": "./static/js/888.41d89770.chunk.js.map",
|
||||||
"769.c11b83c2.chunk.css.map": "./static/css/769.c11b83c2.chunk.css.map",
|
"769.c11b83c2.chunk.css.map": "./static/css/769.c11b83c2.chunk.css.map",
|
||||||
"769.3b95354d.chunk.js.map": "./static/js/769.3b95354d.chunk.js.map"
|
"769.3b95354d.chunk.js.map": "./static/js/769.3b95354d.chunk.js.map"
|
||||||
},
|
},
|
||||||
"entrypoints": [
|
"entrypoints": [
|
||||||
"static/css/main.751babb1.css",
|
"static/css/main.1e5ef24c.css",
|
||||||
"static/js/main.495e2b6f.js"
|
"static/js/main.bc6762b5.js"
|
||||||
]
|
]
|
||||||
}
|
}
|