mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
🚚 from p14yground to naiba
This commit is contained in:
parent
66a4bf0c5c
commit
4083a42978
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -11,8 +11,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DockerPassword: ${{ secrets.PACKAGE_TOKEN }}
|
DockerPassword: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
docker build --no-cache -t docker.pkg.github.com/p14yground/nezha/agent -f Dockerfile.agent .
|
docker build --no-cache -t docker.pkg.github.com/naiba/nezha/agent -f Dockerfile.agent .
|
||||||
docker build --no-cache -t docker.pkg.github.com/p14yground/nezha/dashboard -f Dockerfile.dashboard .
|
docker build --no-cache -t docker.pkg.github.com/naiba/nezha/dashboard -f Dockerfile.dashboard .
|
||||||
docker login -u naiba -p $DockerPassword docker.pkg.github.com
|
docker login -u naiba -p $DockerPassword docker.pkg.github.com
|
||||||
docker push docker.pkg.github.com/p14yground/nezha/agent
|
docker push docker.pkg.github.com/naiba/nezha/agent
|
||||||
docker push docker.pkg.github.com/p14yground/nezha/dashboard
|
docker push docker.pkg.github.com/naiba/nezha/dashboard
|
||||||
|
@ -3,7 +3,7 @@ RUN apk --no-cache --no-progress add \
|
|||||||
gcc git musl-dev
|
gcc git musl-dev
|
||||||
WORKDIR /agent
|
WORKDIR /agent
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cd cmd/agent && go build -o app -ldflags="-s -w -X github.com/p14yground/nezha/service/dao.Version=$(git rev-parse HEAD)"
|
RUN cd cmd/agent && go build -o app -ldflags="-s -w -X github.com/naiba/nezha/service/dao.Version=$(git rev-parse HEAD)"
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
RUN apk --no-cache --no-progress add \
|
RUN apk --no-cache --no-progress add \
|
||||||
|
@ -3,7 +3,7 @@ RUN apk --no-cache --no-progress add \
|
|||||||
gcc git musl-dev
|
gcc git musl-dev
|
||||||
WORKDIR /dashboard
|
WORKDIR /dashboard
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cd cmd/dashboard && go build -o app -ldflags="-s -w -X github.com/p14yground/nezha/service/dao.Version=$(git rev-parse HEAD)"
|
RUN cd cmd/dashboard && go build -o app -ldflags="-s -w -X github.com/naiba/nezha/service/dao.Version=$(git rev-parse HEAD)"
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
RUN apk --no-cache --no-progress add \
|
RUN apk --no-cache --no-progress add \
|
||||||
|
@ -34,7 +34,7 @@ C/S 采用 gRPC 通信,客户端通过添加主机生成的单独 Token 上报
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
dashboard:
|
dashboard:
|
||||||
image: docker.pkg.github.com/p14yground/nezha/dashboard
|
image: docker.pkg.github.com/naiba/nezha/dashboard
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/dashboard/data
|
- ./data:/dashboard/data
|
||||||
@ -42,7 +42,7 @@ C/S 采用 gRPC 通信,客户端通过添加主机生成的单独 Token 上报
|
|||||||
- 8008:80
|
- 8008:80
|
||||||
- 5555:5555
|
- 5555:5555
|
||||||
agent:
|
agent:
|
||||||
image: docker.pkg.github.com/p14yground/nezha/agent
|
image: docker.pkg.github.com/naiba/nezha/agent
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- dashboard
|
- dashboard
|
||||||
@ -123,7 +123,7 @@ C/S 采用 gRPC 通信,客户端通过添加主机生成的单独 Token 上报
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
agent:
|
agent:
|
||||||
image: docker.pkg.github.com/p14yground/nezha/agent
|
image: docker.pkg.github.com/naiba/nezha/agent
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- ID=1 #节点ID,启动后在管理后台添加后显示
|
- ID=1 #节点ID,启动后在管理后台添加后显示
|
||||||
|
@ -11,11 +11,11 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
"github.com/p14yground/nezha/service/monitor"
|
"github.com/naiba/nezha/service/monitor"
|
||||||
"github.com/p14yground/nezha/service/rpc"
|
"github.com/naiba/nezha/service/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/pkg/mygin"
|
"github.com/naiba/nezha/pkg/mygin"
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
type commonPage struct {
|
type commonPage struct {
|
||||||
|
@ -8,8 +8,8 @@ import (
|
|||||||
"code.cloudfoundry.org/bytefmt"
|
"code.cloudfoundry.org/bytefmt"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/pkg/mygin"
|
"github.com/naiba/nezha/pkg/mygin"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServeWeb ..
|
// ServeWeb ..
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/p14yground/nezha/pkg/mygin"
|
"github.com/naiba/nezha/pkg/mygin"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"golang.org/x/oauth2/github"
|
"golang.org/x/oauth2/github"
|
||||||
)
|
)
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/naiba/com"
|
"github.com/naiba/com"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/pkg/mygin"
|
"github.com/naiba/nezha/pkg/mygin"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memberAPI struct {
|
type memberAPI struct {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/p14yground/nezha/pkg/mygin"
|
"github.com/naiba/nezha/pkg/mygin"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memberPage struct {
|
type memberPage struct {
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
GitHubAPI "github.com/google/go-github/v28/github"
|
GitHubAPI "github.com/google/go-github/v28/github"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/pkg/mygin"
|
"github.com/naiba/nezha/pkg/mygin"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
type oauth2controller struct {
|
type oauth2controller struct {
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
"github.com/patrickmn/go-cache"
|
"github.com/patrickmn/go-cache"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/cmd/dashboard/controller"
|
"github.com/naiba/nezha/cmd/dashboard/controller"
|
||||||
"github.com/p14yground/nezha/cmd/dashboard/rpc"
|
"github.com/naiba/nezha/cmd/dashboard/rpc"
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
rpcService "github.com/p14yground/nezha/service/rpc"
|
rpcService "github.com/naiba/nezha/service/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServeRPC ...
|
// ServeRPC ...
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/p14yground/nezha
|
module github.com/naiba/nezha
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package model
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -3,7 +3,7 @@ package model
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Server ..
|
// Server ..
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthorizeOption ..
|
// AuthorizeOption ..
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrInfo ..
|
// ErrInfo ..
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CommonEnvironment ..
|
// CommonEnvironment ..
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{define "common/footer"}}
|
{{define "common/footer"}}
|
||||||
<div class="ui inverted vertical footer segment">
|
<div class="ui inverted vertical footer segment">
|
||||||
<div class="ui center aligned text container">
|
<div class="ui center aligned text container">
|
||||||
本系统由 <a href="https://github.com/p14yground/nezha" target="_blank">哪吒面板</a> <small>build · {{.Version}}</small> 强力驱动
|
本系统由 <a href="https://github.com/naiba/nezha" target="_blank">哪吒面板</a> <small>build · {{.Version}}</small> 强力驱动
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdnjs.loli.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
<script src="https://cdnjs.loli.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<a class="item{{if eq .MatchedPath "/server"}} active{{end}}" href="/server">服务器</a>
|
<a class="item{{if eq .MatchedPath "/server"}} active{{end}}" href="/server">服务器</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="right menu">
|
<div class="right menu">
|
||||||
<a class="item" href="https://github.com/p14yground/nezha/issues" target="_blank">反馈</a>
|
<a class="item" href="https://github.com/naiba/nezha/issues" target="_blank">反馈</a>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
{{if .Admin}}
|
{{if .Admin}}
|
||||||
<div class="ui simple dropdown">
|
<div class="ui simple dropdown">
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
"github.com/patrickmn/go-cache"
|
"github.com/patrickmn/go-cache"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Conf ..
|
// Conf ..
|
||||||
|
@ -15,8 +15,8 @@ import (
|
|||||||
"github.com/shirou/gopsutil/mem"
|
"github.com/shirou/gopsutil/mem"
|
||||||
"github.com/shirou/gopsutil/net"
|
"github.com/shirou/gopsutil/net"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ipDotSbGeoIP struct {
|
type ipDotSbGeoIP struct {
|
||||||
|
@ -3,7 +3,7 @@ package rpc
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/p14yground/nezha/model"
|
"github.com/naiba/nezha/model"
|
||||||
pb "github.com/p14yground/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
"github.com/p14yground/nezha/service/dao"
|
"github.com/naiba/nezha/service/dao"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NezhaHandler ..
|
// NezhaHandler ..
|
||||||
|
Loading…
Reference in New Issue
Block a user