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

Commit ec51aa7

Browse files
authored
Merge pull request #6 from xpunch/dev
1.2.0
2 parents 27b5a6b + a2e5f4e commit ec51aa7

35 files changed

+135
-85
lines changed

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
docs
2-
frontend
1+
**

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "time"
44

55
const (
66
Name = "go.micro.dashboard"
7-
Version = "1.1.0"
7+
Version = "1.2.0"
88
)
99

1010
const (

docs/docs.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1+
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
22
// This file was generated by swaggo/swag
3-
43
package docs
54

65
import (
76
"bytes"
87
"encoding/json"
98
"strings"
9+
"text/template"
1010

11-
"github.com/alecthomas/template"
1211
"github.com/swaggo/swag"
1312
)
1413

1514
var doc = `{
1615
"schemes": {{ marshal .Schemes }},
1716
"swagger": "2.0",
1817
"info": {
19-
"description": "{{.Description}}",
18+
"description": "{{escape .Description}}",
2019
"title": "{{.Title}}",
2120
"termsOfService": "http://swagger.io/terms/",
2221
"contact": {},
@@ -763,7 +762,7 @@ type swaggerInfo struct {
763762

764763
// SwaggerInfo holds exported Swagger Info so clients can modify it
765764
var SwaggerInfo = swaggerInfo{
766-
Version: "1.1.0",
765+
Version: "1.2.0",
767766
Host: "",
768767
BasePath: "/",
769768
Schemes: []string{},
@@ -782,6 +781,13 @@ func (s *s) ReadDoc() string {
782781
a, _ := json.Marshal(v)
783782
return string(a)
784783
},
784+
"escape": func(v interface{}) string {
785+
// escape tabs
786+
str := strings.Replace(v.(string), "\t", "\\t", -1)
787+
// replace " with \", and if that results in \\", replace that with \\\"
788+
str = strings.Replace(str, "\"", "\\\"", -1)
789+
return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1)
790+
},
785791
}).Parse(doc)
786792
if err != nil {
787793
return doc
@@ -796,5 +802,5 @@ func (s *s) ReadDoc() string {
796802
}
797803

798804
func init() {
799-
swag.Register(swag.Name, &s{})
805+
swag.Register("swagger", &s{})
800806
}

docs/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"title": "Go Micro Dashboard",
66
"termsOfService": "http://swagger.io/terms/",
77
"contact": {},
8-
"version": "1.1.0"
8+
"version": "1.2.0"
99
},
1010
"basePath": "/",
1111
"paths": {

docs/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ info:
187187
description: go micro dashboard restful-api
188188
termsOfService: http://swagger.io/terms/
189189
title: Go Micro Dashboard
190-
version: 1.1.0
190+
version: 1.2.0
191191
paths:
192192
/api/account/login:
193193
post:

frontend/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "go-micro-dashboard",
3-
"version": "1.0.0",
3+
"version": "1.2.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng s -o",

frontend/src/app/core/net/default.interceptor.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from '@angular/common/http';
1010
import { Injectable, Injector } from '@angular/core';
1111
import { Router } from '@angular/router';
12-
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
1312
import { ALAIN_I18N_TOKEN, _HttpClient } from '@delon/theme';
1413
import { NzNotificationService } from 'ng-zorro-antd/notification';
1514
import { Observable, of, throwError } from 'rxjs';
@@ -63,10 +62,6 @@ export class DefaultInterceptor implements HttpInterceptor {
6362
if (!headers?.has('Accept-Language') && lang) {
6463
res['Accept-Language'] = lang;
6564
}
66-
const token = this.injector.get<ITokenService>(DA_SERVICE_TOKEN).get()?.token
67-
if (token) {
68-
res['Authorization'] = 'Bearer ' + token;
69-
}
7065
return res;
7166
}
7267

frontend/src/app/global-config.module.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ const alainConfig: AlainConfig = {
1818
license: `A59B099A586B3851E0F0D7FDBF37B603`,
1919
licenseA: `C94CEE276DB2187AE6B65D56B3FC2848`
2020
},
21-
auth: { login_url: '/passport/login' }
21+
auth: {
22+
login_url: '/passport/login',
23+
token_send_key: 'Authorization',
24+
token_send_template: 'Bearer ${token}',
25+
ignores: [/\/login/, /assets\//, /passport\//, /\/version/,],
26+
}
2227
};
2328

2429
const alainModules: any[] = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()];

frontend/src/app/layout/passport/passport.component.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
<div class="wrap">
33
<div class="top">
44
<div class="head">
5-
<span class="title" >Go Micro Dashboard</span>
5+
<img class="logo" src="./assets/logo-color.png">
6+
<p class="title">Go Micro Dashboard</p>
67
</div>
78
</div>
89
<router-outlet></router-outlet>
10+
<global-footer>
11+
<a href="https://github.com/xpunch" target="_blank">X Punch</a>
12+
<p>{{version}}</p>
13+
</global-footer>
914
</div>
10-
</div>
15+
</div>

0 commit comments

Comments
 (0)