Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from go-micro/dev
Browse files Browse the repository at this point in the history
fix: fixing frontend 404 error
  • Loading branch information
xpunch authored Sep 8, 2022
2 parents 21a33b3 + 3290c50 commit 0129be4
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 109 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "time"

const (
Name = "go.micro.dashboard"
Version = "1.4.0"
Version = "1.4.3"
)

const (
Expand Down
72 changes: 14 additions & 58 deletions docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag

package docs

import (
"bytes"
"encoding/json"
"strings"

"github.com/alecthomas/template"
"github.com/swaggo/swag"
)
import "github.com/swaggo/swag"

var doc = `{
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{.Description}}",
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {},
"license": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
Expand Down Expand Up @@ -730,11 +721,9 @@ var doc = `{
"type": "string"
},
"request": {
"type": "object",
"$ref": "#/definitions/registry.registryValue"
},
"response": {
"type": "object",
"$ref": "#/definitions/registry.registryValue"
},
"stream": {
Expand Down Expand Up @@ -883,11 +872,9 @@ var doc = `{
"type": "object",
"properties": {
"registry": {
"type": "object",
"$ref": "#/definitions/statistics.registrySummary"
},
"services": {
"type": "object",
"$ref": "#/definitions/statistics.servicesSummary"
}
}
Expand Down Expand Up @@ -927,49 +914,18 @@ var doc = `{
}
}`

type swaggerInfo struct {
Version string
Host string
BasePath string
Schemes []string
Title string
Description string
}

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "1.4.0",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "Go Micro Dashboard",
Description: "go micro dashboard restful-api",
}

type s struct{}

func (s *s) ReadDoc() string {
sInfo := SwaggerInfo
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)

t, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {
a, _ := json.Marshal(v)
return string(a)
},
}).Parse(doc)
if err != nil {
return doc
}

var tpl bytes.Buffer
if err := t.Execute(&tpl, sInfo); err != nil {
return doc
}

return tpl.String()
var SwaggerInfo = &swag.Spec{
Version: "1.4.0",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "Go Micro Dashboard",
Description: "go micro dashboard restful-api",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}

func init() {
swag.Register(swag.Name, &s{})
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
5 changes: 0 additions & 5 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"title": "Go Micro Dashboard",
"termsOfService": "http://swagger.io/terms/",
"contact": {},
"license": {},
"version": "1.4.0"
},
"basePath": "/",
Expand Down Expand Up @@ -714,11 +713,9 @@
"type": "string"
},
"request": {
"type": "object",
"$ref": "#/definitions/registry.registryValue"
},
"response": {
"type": "object",
"$ref": "#/definitions/registry.registryValue"
},
"stream": {
Expand Down Expand Up @@ -867,11 +864,9 @@
"type": "object",
"properties": {
"registry": {
"type": "object",
"$ref": "#/definitions/statistics.registrySummary"
},
"services": {
"type": "object",
"$ref": "#/definitions/statistics.servicesSummary"
}
}
Expand Down
5 changes: 0 additions & 5 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ definitions:
type: string
request:
$ref: '#/definitions/registry.registryValue'
type: object
response:
$ref: '#/definitions/registry.registryValue'
type: object
stream:
type: boolean
required:
Expand Down Expand Up @@ -219,10 +217,8 @@ definitions:
properties:
registry:
$ref: '#/definitions/statistics.registrySummary'
type: object
services:
$ref: '#/definitions/statistics.servicesSummary'
type: object
type: object
statistics.registrySummary:
properties:
Expand All @@ -243,7 +239,6 @@ definitions:
info:
contact: {}
description: go micro dashboard restful-api
license: {}
termsOfService: http://swagger.io/terms/
title: Go Micro Dashboard
version: 1.4.0
Expand Down
4 changes: 2 additions & 2 deletions web/ab0x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions web/b0xfile__449.fe5f02b3a65993ed3ea1.js.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:04.8294299 +0300 MSK m=+0.237776901" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.243485 +0300 MSK)
// original path: frontend\dist\449.fe5f02b3a65993ed3ea1.js
// Code generaTed by fileb0x at "2022-09-08 17:01:21.506438 +0800 CST m=+0.026283251" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.533399419 +0800 CST)
// original path: frontend/dist/449.fe5f02b3a65993ed3ea1.js

package web

Expand Down
8 changes: 4 additions & 4 deletions web/b0xfile__assets_color.less.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions web/b0xfile__assets_logo-color.png.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:04.7865792 +0300 MSK m=+0.194926201" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.263485 +0300 MSK)
// original path: frontend\dist\assets\logo-color.png
// Code generaTed by fileb0x at "2022-09-08 17:01:21.543424 +0800 CST m=+0.063270251" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.54430213 +0800 CST)
// original path: frontend/dist/assets/logo-color.png

package web

Expand Down
6 changes: 3 additions & 3 deletions web/b0xfile__assets_logo-full.png.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:05.0414017 +0300 MSK m=+0.449748701" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.263485 +0300 MSK)
// original path: frontend\dist\assets\logo-full.png
// Code generaTed by fileb0x at "2022-09-08 17:01:21.547372 +0800 CST m=+0.067218043" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.544549333 +0800 CST)
// original path: frontend/dist/assets/logo-full.png

package web

Expand Down
6 changes: 3 additions & 3 deletions web/b0xfile__assets_logo.png.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:04.7903515 +0300 MSK m=+0.198698501" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.263485 +0300 MSK)
// original path: frontend\dist\assets\logo.png
// Code generaTed by fileb0x at "2022-09-08 17:01:21.689075 +0800 CST m=+0.208924751" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.544945532 +0800 CST)
// original path: frontend/dist/assets/logo.png

package web

Expand Down
6 changes: 3 additions & 3 deletions web/b0xfile__assets_style.compact.css.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:05.0474268 +0300 MSK m=+0.455773801" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.263485 +0300 MSK)
// original path: frontend\dist\assets\style.compact.css
// Code generaTed by fileb0x at "2022-09-08 17:01:21.563633 +0800 CST m=+0.083479460" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.546251919 +0800 CST)
// original path: frontend/dist/assets/style.compact.css

package web

Expand Down
6 changes: 3 additions & 3 deletions web/b0xfile__assets_style.dark.css.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:04.7932918 +0300 MSK m=+0.201638801" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.273485 +0300 MSK)
// original path: frontend\dist\assets\style.dark.css
// Code generaTed by fileb0x at "2022-09-08 17:01:21.508276 +0800 CST m=+0.028120960" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.548464452 +0800 CST)
// original path: frontend/dist/assets/style.dark.css

package web

Expand Down
6 changes: 3 additions & 3 deletions web/b0xfile__favicon.ico.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generaTed by fileb0x at "2022-07-12 08:59:04.8511242 +0300 MSK m=+0.259471201" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-07-12 08:58:14.263485 +0300 MSK)
// original path: frontend\dist\favicon.ico
// Code generaTed by fileb0x at "2022-09-08 17:01:21.507047 +0800 CST m=+0.026892126" from config file "b0x.yaml" DO NOT EDIT.
// modified(2022-09-08 17:01:01.540678546 +0800 CST)
// original path: frontend/dist/favicon.ico

package web

Expand Down
Loading

0 comments on commit 0129be4

Please sign in to comment.