diff --git a/README.md b/README.md index 9b862d3..5d45fe3 100644 --- a/README.md +++ b/README.md @@ -1,94 +1,94 @@ -

📦⚡️ Casvisor

+

📦⚡️ Caswire

An open-source logging and auditing system developed by Go and React.

semantic-release - - docker pull casbin/casvisor + + docker pull casbin/caswire - - GitHub Release + + GitHub Release - + Docker Image Version (latest semver)

- - Go Report Card + + Go Report Card - - license + + license - - GitHub issues + + GitHub issues - GitHub stars + GitHub stars - - GitHub forks + + GitHub forks

## Architecture -Casvisor contains 2 parts: +Caswire contains 2 parts: Name | Description | Language | Source code ----|------|----|---- -Frontend | Web frontend UI for Casvisor | Javascript + React | https://github.com/casbin/casvisor/tree/master/web -Backend | RESTful API backend for Casvisor | Golang + Beego + MySQL | https://github.com/casbin/casvisor +Frontend | Web frontend UI for Caswire | Javascript + React | https://github.com/casbin/caswire/tree/master/web +Backend | RESTful API backend for Caswire | Golang + Beego + MySQL | https://github.com/casbin/caswire ## Installation -Casvisor uses Casdoor to manage members. So you need to create an organization and an application for Casvisor in a Casdoor instance. +Caswire uses Casdoor to manage members. So you need to create an organization and an application for Caswire in a Casdoor instance. ### Necessary configuration #### Get the code ```bash go get github.com/casbin/casdoor -go get github.com/casbin/casvisor +go get github.com/casbin/caswire ``` or ```bash git clone https://github.com/casbin/casdoor -git clone https://github.com/casbin/casvisor +git clone https://github.com/casbin/caswire ``` #### Setup database -Casvisor will store its users, nodes and topics informations in a MySQL database named: `casvisor`, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/casvisor/blob/master/conf/app.conf +Caswire will store its users, nodes and topics informations in a MySQL database named: `caswire`, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/caswire/blob/master/conf/app.conf ```ini dataSourceName = root:123@tcp(localhost:3306)/ ``` -Casvisor uses XORM to connect to DB, so all DBs supported by XORM can also be used. +Caswire uses XORM to connect to DB, so all DBs supported by XORM can also be used. #### Configure Casdoor -After creating an organization and an application for Casvisor in a Casdoor, you need to update `clientID`, `clientSecret`, `casdoorOrganization` and `casdoorApplication` in app.conf. +After creating an organization and an application for Caswire in a Casdoor, you need to update `clientID`, `clientSecret`, `casdoorOrganization` and `casdoorApplication` in app.conf. -#### Run Casvisor +#### Run Caswire -- Configure and run Casvisor by yourself. If you want to learn more about casvisor. +- Configure and run Caswire by yourself. If you want to learn more about caswire. - Open browser: http://localhost:16001/ ### Optional configuration -#### Setup your Casvisor to enable some third-party login platform +#### Setup your Caswire to enable some third-party login platform - Casvisor uses Casdoor to manage members. If you want to log in with oauth, you should see [casdoor oauth configuration](https://casdoor.org/docs/provider/oauth/overview). + Caswire uses Casdoor to manage members. If you want to log in with oauth, you should see [casdoor oauth configuration](https://casdoor.org/docs/provider/oauth/overview). #### OSS, Mail, and SMS services - Casvisor uses Casdoor to upload files to cloud storage, send Emails and send SMSs. See Casdoor for more details. + Caswire uses Casdoor to upload files to cloud storage, send Emails and send SMSs. See Casdoor for more details. ## Contribute -For Casvisor, if you have any questions, you can give Issues, or you can also directly start Pull Requests(but we recommend giving issues first to communicate with the community). +For Caswire, if you have any questions, you can give Issues, or you can also directly start Pull Requests(but we recommend giving issues first to communicate with the community). ## License diff --git a/conf/app.conf b/conf/app.conf index 4bef10c..3fe99c9 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -1,11 +1,11 @@ -appname = casvisor -httpport = 19000 +appname = caswire +httpport = 20000 runmode = dev SessionOn = true copyrequestbody = true driverName = mysql dataSourceName = root:123@tcp(localhost:3306)/ -dbName = casvisor +dbName = caswire redisEndpoint = casdoorEndpoint = http://localhost:8000 clientId = af6b5aa958822fb9dc33 diff --git a/controllers/dataset.go b/controllers/dataset.go index bdfc59f..cc61148 100644 --- a/controllers/dataset.go +++ b/controllers/dataset.go @@ -17,7 +17,7 @@ package controllers import ( "encoding/json" - "github.com/casbin/casvisor/object" + "github.com/casbin/caswire/object" ) func (c *ApiController) GetGlobalDatasets() { diff --git a/go.mod b/go.mod index 9f63ab2..7f4ab49 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/casbin/casvisor +module github.com/casbin/caswire go 1.17 diff --git a/main.go b/main.go index 6ba26dd..ace4567 100644 --- a/main.go +++ b/main.go @@ -18,8 +18,8 @@ import ( "github.com/beego/beego" "github.com/beego/beego/plugins/cors" _ "github.com/beego/beego/session/redis" - "github.com/casbin/casvisor/object" - "github.com/casbin/casvisor/routers" + "github.com/casbin/caswire/object" + "github.com/casbin/caswire/routers" ) func main() { diff --git a/object/dataset.go b/object/dataset.go index a501425..fe7fec9 100644 --- a/object/dataset.go +++ b/object/dataset.go @@ -15,7 +15,7 @@ package object import ( - "github.com/casbin/casvisor/util" + "github.com/casbin/caswire/util" "xorm.io/core" ) diff --git a/routers/filter.go b/routers/filter.go index 2de60aa..2182d4e 100644 --- a/routers/filter.go +++ b/routers/filter.go @@ -19,7 +19,7 @@ import ( "strings" "github.com/beego/beego/context" - "github.com/casbin/casvisor/util" + "github.com/casbin/caswire/util" ) func TransparentStatic(ctx *context.Context) { diff --git a/routers/router.go b/routers/router.go index eabb820..19971cb 100644 --- a/routers/router.go +++ b/routers/router.go @@ -17,7 +17,7 @@ package routers import ( "github.com/beego/beego" - "github.com/casbin/casvisor/controllers" + "github.com/casbin/caswire/controllers" ) func init() { diff --git a/web/package.json b/web/package.json index 479bcad..3d57889 100644 --- a/web/package.json +++ b/web/package.json @@ -19,7 +19,7 @@ "react-scripts": "5.0.1" }, "scripts": { - "start": "set PORT=18001 && craco start", + "start": "set PORT=19001 && craco start", "build": "del build.zip 2>nul && set \"GENERATE_SOURCEMAP=false\" && set \"SKIP_PREFLIGHT_CHECK=true\" && craco build && 360zip.exe -ar build %cd%/build.zip || ECHO.", "test": "craco test", "eject": "craco eject", diff --git a/web/public/index.html b/web/public/index.html index a2cece3..f01d583 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - Casvisor + Caswire diff --git a/web/public/manifest.json b/web/public/manifest.json index 24198ad..84640d8 100644 --- a/web/public/manifest.json +++ b/web/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Casvisor", - "name": "Casvisor", + "short_name": "Caswire", + "name": "Caswire", "icons": [ { "src": "favicon.ico", diff --git a/web/src/App.js b/web/src/App.js index 44b557c..fa7d311 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -309,7 +309,7 @@ class App extends Component { textAlign: 'center', } }> - Made with ❤️ by Casvisor, { Setting.isMobile() ? "Mobile" : "Desktop" } View + Made with ❤️ by Caswire, { Setting.isMobile() ? "Mobile" : "Desktop" } View ) } diff --git a/web/src/Setting.js b/web/src/Setting.js index 9b60d44..98d31db 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -1,17 +1,17 @@ -// Copyright 2023 The casbin Authors. All Rights Reserved. -// -// Licensed 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 2023 The casbin Authors. All Rights Reserved. +// +// Licensed 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 {message} from "antd"; import {isMobile as isMobileDevice} from "react-device-detect"; import i18next from "i18next"; @@ -24,7 +24,7 @@ export let CasdoorSdk; export function initServerUrl() { const hostname = window.location.hostname; if (hostname === 'localhost') { - ServerUrl = `http://${hostname}:19000`; + ServerUrl = `http://${hostname}:20000`; } }