Compare commits

...

8 Commits

Author SHA1 Message Date
a624669980
40617185e9 Task modified to remote acquisition
token modified to no expiration time
2021-09-29 19:49:34 +08:00
link
c3dba45e17 Update casa.yml
change path
2021-09-29 18:02:22 +08:00
link
83f58366a6 Fix pack error 2021-09-29 17:43:59 +08:00
link
3fa09dad8e add workflows 2021-09-29 17:33:58 +08:00
jerrykuku
f0f0eb2ef0 🦄 refactor:
Change submodule UI to branch main
2021-09-29 13:50:16 +08:00
jerrykuku
436b87f8a8 🦄 refactor: Change submoudle
Change Frontend submoudle to UI
2021-09-29 13:38:03 +08:00
jerrykuku
f0888ef2ac Remove UI submodule. 2021-09-29 13:33:08 +08:00
Lauren
03e23ec203 Update README.md 2021-09-28 22:48:40 +08:00
24 changed files with 135 additions and 5514 deletions

102
.github/workflows/casa.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
# This is a basic workflow to help you get started with Actions
name: Build CasaOS
on:
release:
types:
- created
env:
REPO_URL: https://github.com/IceWhaleTech/CasaOS.git
REPO_BRANCH: main
PACK_SH_URL: https://raw.githubusercontent.com/jerrykuku/actions-casa/main/pack.sh
PACK_SH: pack.sh
TZ: Asia/Shanghai
jobs:
xgo:
strategy:
fail-fast: false
matrix:
go_version:
- 1.17.1
runs-on: ubuntu-latest
steps:
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.3
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /workdir
sudo chown $USER:$GROUPS /workdir
- name: Clone source code
working-directory: /workdir
run: |
df -hT $PWD
git clone $REPO_URL -b $REPO_BRANCH --recursive casa
ln -sf /workdir/casa $GITHUB_WORKSPACE/casa
ls
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build frontend with nodejs and yarn
run: |
cd casa/UI
ls
yarn install
yarn build
- name: Build with xgo
uses: crazy-max/ghaction-xgo@v1
with:
working_dir: /workdir/casa
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: casa
targets: linux/amd64,linux/arm64
v: true
x: false
race: false
ldflags: -s -w
buildmode: default
- name: List Files
run: |
ls
cd casa/build
ls
echo "::set-output name=status::success"
- name: Pack builds
run: |
cd /workdir
wget $PACK_SH_URL
chmod +x $PACK_SH
./$PACK_SH
echo "::set-output name=status::success"
- name: Upload linux-amd64-casaos.tar.gz
id: upload_assets_amd64
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: /workdir/casa/upload/linux-amd64-casaos.tar.gz
- name: Upload linux-arm64-casaos.tar.gz
id: upload_assets_arm64
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: /workdir/casa/upload/linux-arm64-casaos.tar.gz

5
.gitmodules vendored
View File

@@ -1,3 +1,4 @@
[submodule "CasaOS-UI"]
path = CasaOS-UI
[submodule "UI"]
path = UI
url = https://github.com/IceWhaleTech/CasaOS-UI.git
branch = main

Submodule CasaOS-UI deleted from 6139d87e80

View File

@@ -13,18 +13,17 @@ CasaOS is an open-source home server system based on the Docker ecosystem and de
IceWhale team believes that through community-driven collaborative innovation and open communication with global developers, we can reshape the digital home experience like never before.
## Features
## Key Features
- UI designed for home scenarios - simple, elegant, and easy-to-use
- Quick Docker app installation with only three steps
- Automatic Docker application management
- Quick Docker app installation with only three steps, plus automatic management
- App Store for private cloud 🚧
- Home data/digital asset management 🚧
- Smart home manager 🚧
🚧 is under development.
We are actively moving forward with development, and you are more than welcome to share any idea in the [Discord server](https://discord.gg/Gx4BCEtHjx)!
We are actively moving forward with development, and you are more than welcome to share any idea with us!
## Community
@@ -84,4 +83,4 @@ curl -fsSL https://get.icewhale.io/casaos.sh | bash
- Ober Zhang
- Zyaire Ann
- John Guan
- More seats vacant for the right person
- Right here, waiting for YOU!

1
UI Submodule

Submodule UI added at 1f2ebd05fa

View File

@@ -1,8 +1,7 @@
[app]
PAGE_SIZE = 10
RuntimeRootPath = runtime/
;LogSavePath = /casaOS/logs/server/
LogSavePath = /oasis/logs/server/
LogSavePath = /casaOS/logs/server/
LogSaveName = log
LogFileExt = log
; 必须的格式
@@ -10,17 +9,13 @@ DateStrFormat = 20060102
DateTimeFormat = 2006-01-02 15:04:05
TimeFormat = 15:04:05
DateFormat = 2006-01-02
;ProjectPath = /casaOS/server
ProjectPath = /oasis/server
ProjectPath = /casaOS/server
[server]
HttpPort = 8089
RunMode = debug
;ServerApi = http://113.52.135.30:8090
;ServerApi = https://casaos.zimaboard.com
;ServerApi = http://192.168.2.167:8090
ServerApi = http://192.168.2.142:8090
RunMode = release
ServerApi = https://api.casaos.zimaboard.com
[user]
UserName = admin
@@ -47,6 +42,5 @@ SearchSwitch = true
WidgetsSwitch = false
ShortcutsSwitch = true
SearchEngine = baidu
Background = http://baidu.com1
BackgroundType = d
Background = http://google.com
BackgroundType = d

View File

@@ -44,12 +44,12 @@ func main() {
//model.Setup()
//gredis.Setup()
r := route.InitRouter(swagHandler)
service.SyncTask(sqliteDB)
//service.SyncTask(sqliteDB)
cron2 := cron.New() //创建一个cron实例
//执行定时任务每5秒执行一次
err := cron2.AddFunc("0 0 0 1/1 * *", func() {
//service.UpdataDDNSList(mysqldb)
service.SyncTask(sqliteDB)
//service.SyncTask(sqliteDB)
})
if err != nil {
fmt.Println(err)

View File

@@ -7,7 +7,6 @@ import (
oasis_err2 "github.com/IceWhaleTech/CasaOS/pkg/utils/oasis_err"
"github.com/gin-gonic/gin"
"net/http"
"time"
)
func JWT(swagHandler gin.HandlerFunc) gin.HandlerFunc {
@@ -22,13 +21,15 @@ func JWT(swagHandler gin.HandlerFunc) gin.HandlerFunc {
code = oasis_err2.INVALID_PARAMS
}
if swagHandler == nil {
claims, err := ParseToken(token)
//claims, err := ParseToken(token)
_, err := ParseToken(token)
if err != nil {
code = oasis_err2.ERROR_AUTH_TOKEN
} else if time.Now().Unix() > claims.ExpiresAt {
code = oasis_err2.ERROR_AUTH_TOKEN
}
//else if time.Now().Unix() > claims.ExpiresAt {
// code = oasis_err2.ERROR_AUTH_TOKEN
//}
}
if code != oasis_err2.SUCCESS {

View File

@@ -80,12 +80,12 @@ func (s *taskService) GetServerTasks() []model.TaskDBModel {
list := []model.TaskDBModel{}
json2.Unmarshal([]byte(gjson.Get(listS, "data").String()), &list)
go func(list []model.TaskDBModel) {
for _, dbModel := range list {
dbModel.Id = 0
s.db.Create(&dbModel)
}
}(list)
//go func(list []model.TaskDBModel) {
// for _, dbModel := range list {
// dbModel.Id = 0
// s.db.Create(&dbModel)
// }
//}(list)
return list
}
func (s *taskService) SyncTaskService() {
@@ -133,12 +133,12 @@ func SyncTask(db *gorm.DB) {
list := []model.TaskDBModel{}
json2.Unmarshal([]byte(gjson.Get(listS, "data").String()), &list)
//go func(list []model.TaskDBModel) {
// for _, dbModel := range list {
// dbModel.Id = 0
// db.Create(&dbModel)
// }
//}(list)
go func(list []model.TaskDBModel) {
for _, dbModel := range list {
dbModel.Id = 0
db.Create(&dbModel)
}
}(list)
}
func NewTaskService(db *gorm.DB, log loger2.OLog) TaskService {
return &taskService{db: db, log: log}

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/ui/img/icon/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="200.000000pt" height="200.000000pt" viewBox="0 0 200.000000 200.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,200.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M875 1894 c-11 -2 -51 -11 -88 -20 -341 -78 -610 -364 -673 -714 -82
-459 197 -902 647 -1030 94 -27 277 -37 378 -21 303 47 575 261 690 540 55
133 66 192 65 361 -1 136 -4 165 -27 235 -36 116 -62 170 -123 261 -123 186
-347 336 -566 379 -42 8 -276 15 -303 9z m250 -168 c11 -2 42 -9 70 -16 131
-30 288 -135 387 -260 160 -201 198 -506 93 -745 l-22 -50 2 80 c3 180 -64
351 -184 476 -209 216 -544 260 -807 105 -201 -117 -326 -347 -319 -587 l2
-74 -19 44 c-63 140 -80 332 -44 476 24 94 87 219 147 292 109 133 290 238
448 259 25 3 47 7 49 9 5 4 173 -3 197 -9z m8 -501 c33 -8 85 -31 116 -50 227
-137 305 -418 183 -651 l-21 -39 -1 35 c-9 251 -245 439 -490 389 -186 -38
-323 -200 -330 -389 l-1 -35 -23 45 c-101 194 -61 429 99 578 130 122 292 162
468 117z m-27 -499 c182 -85 183 -345 1 -438 -53 -27 -161 -26 -215 1 -146 75
-180 267 -69 390 63 69 190 90 283 47z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:2;}
</style>
<path class="st0" d="M12,22c5.5,0,10-4.5,10-10S17.5,2,12,2S2,6.5,2,12S6.5,22,12,22z"/>
<path class="st0" d="M12,22c3.9,0,7-3.1,7-7s-3.1-7-7-7s-7,3.1-7,7S8.1,22,12,22z"/>
<path class="st0" d="M12,22c2.2,0,4-1.8,4-4s-1.8-4-4-4s-4,1.8-4,4S9.8,22,12,22z"/>
</svg>

Before

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="/ui/img/icon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/ui/img/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/ui/img/icon/favicon-16x16.png">
<link rel="manifest" href="/ui/site.webmanifest">
<link rel="mask-icon" href="/ui/img/icon/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/ui/favicon.ico">
<link rel="stylesheet" href="//cdn.materialdesignicons.com/2.0.46/css/materialdesignicons.min.css">
<script src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/js/all.js"
integrity="sha256-GaerX2a/DuOnPrxn/4vH13dobiFUe/27LO6gCZDNauA=" crossorigin="anonymous"></script>
<title>
CasaOS
</title>
<link href="/ui/js/app.js" rel="preload" as="script"><link href="/ui/js/chunk-vendors.js" rel="preload" as="script"></head>
<body>
<noscript>
<strong>We're sorry but CasaOS doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="text/javascript" src="/ui/js/chunk-vendors.js"></script><script type="text/javascript" src="/ui/js/app.js"></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +0,0 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/ui/img/icon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}