mirror of
https://github.com/go-gitea/gitea
synced 2024-08-18 05:10:41 +02:00
new UI on admin/monitor
This commit is contained in:
parent
6fdc881bd4
commit
81b8427438
11
cmd/web.go
11
cmd/web.go
@ -12,7 +12,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/fcgi"
|
"net/http/fcgi"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -531,16 +530,6 @@ func runWeb(ctx *cli.Context) {
|
|||||||
// Not found handler.
|
// Not found handler.
|
||||||
m.NotFound(routers.NotFound)
|
m.NotFound(routers.NotFound)
|
||||||
|
|
||||||
// Detect kill signal.
|
|
||||||
c := make(chan os.Signal, 1)
|
|
||||||
signal.Notify(c, os.Interrupt)
|
|
||||||
go func() {
|
|
||||||
for _ = range c {
|
|
||||||
fmt.Println("Kill signal detected, exiting now...")
|
|
||||||
os.Exit(0)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
// Flag for port number in case first time run conflict.
|
// Flag for port number in case first time run conflict.
|
||||||
if ctx.IsSet("port") {
|
if ctx.IsSet("port") {
|
||||||
setting.AppUrl = strings.Replace(setting.AppUrl, setting.HttpPort, ctx.String("port"), 1)
|
setting.AppUrl = strings.Replace(setting.AppUrl, setting.HttpPort, ctx.String("port"), 1)
|
||||||
|
@ -235,6 +235,26 @@
|
|||||||
"outputPathIsSetByUser": 0,
|
"outputPathIsSetByUser": 0,
|
||||||
"processed": 1
|
"processed": 1
|
||||||
},
|
},
|
||||||
|
"\/public\/less\/_admin.less": {
|
||||||
|
"allowInsecureImports": 0,
|
||||||
|
"createSourceMap": 0,
|
||||||
|
"disableJavascript": 0,
|
||||||
|
"fileType": 1,
|
||||||
|
"ieCompatibility": 1,
|
||||||
|
"ignore": 1,
|
||||||
|
"ignoreWasSetByUser": 0,
|
||||||
|
"inputAbbreviatedPath": "\/public\/less\/_admin.less",
|
||||||
|
"outputAbbreviatedPath": "\/public\/css\/_admin.css",
|
||||||
|
"outputPathIsOutsideProject": 0,
|
||||||
|
"outputPathIsSetByUser": 0,
|
||||||
|
"outputStyle": 0,
|
||||||
|
"relativeURLS": 0,
|
||||||
|
"shouldRunAutoprefixer": 0,
|
||||||
|
"shouldRunBless": 0,
|
||||||
|
"strictImports": 0,
|
||||||
|
"strictMath": 0,
|
||||||
|
"strictUnits": 0
|
||||||
|
},
|
||||||
"\/public\/less\/_base.less": {
|
"\/public\/less\/_base.less": {
|
||||||
"allowInsecureImports": 0,
|
"allowInsecureImports": 0,
|
||||||
"createSourceMap": 0,
|
"createSourceMap": 0,
|
||||||
|
@ -59,3 +59,7 @@ checkVersion()] [E] Binary and template file version does not match
|
|||||||
```
|
```
|
||||||
|
|
||||||
Run `rm -fr /var/gogs/gogs/templates/` should fix this it. Just remember to backup templates file if you have made modifications youself.
|
Run `rm -fr /var/gogs/gogs/templates/` should fix this it. Just remember to backup templates file if you have made modifications youself.
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
- [Use ctrl+c when clone through SSH makes Docker exit unexpectedly](https://github.com/gogits/gogs/issues/1499)
|
2
public/css/gogs.min.css
vendored
2
public/css/gogs.min.css
vendored
File diff suppressed because one or more lines are too long
18
public/less/_admin.less
Normal file
18
public/less/_admin.less
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
.admin {
|
||||||
|
padding-top: 15px;
|
||||||
|
padding-bottom: @footer-margin * 3;
|
||||||
|
|
||||||
|
.table.segment {
|
||||||
|
padding: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
th {
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
th, td {
|
||||||
|
&:first-child {
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -5,3 +5,4 @@
|
|||||||
@import "_install";
|
@import "_install";
|
||||||
@import "_form";
|
@import "_form";
|
||||||
@import "_repository";
|
@import "_repository";
|
||||||
|
@import "_admin";
|
@ -1,19 +1,15 @@
|
|||||||
{{template "ng/base/head" .}}
|
{{template "base/head" .}}
|
||||||
{{template "ng/base/header" .}}
|
<div class="admin monitor">
|
||||||
<div id="admin-wrapper">
|
<div class="ui container">
|
||||||
<div id="setting-wrapper" class="main-wrapper">
|
<div class="ui grid">
|
||||||
<div id="admin-setting" class="container clear">
|
{{template "admin/navbar" .}}
|
||||||
{{template "admin/nav" .}}
|
<div class="twelve wide column content">
|
||||||
<div class="grid-4-5 left">
|
{{template "base/alert" .}}
|
||||||
<div class="setting-content">
|
<h4 class="ui top attached header">
|
||||||
{{template "ng/base/alert" .}}
|
{{.i18n.Tr "admin.monitor.cron"}}
|
||||||
<div id="setting-content">
|
</h4>
|
||||||
<div class="panel panel-radius">
|
<div class="ui attached table segment">
|
||||||
<div class="panel-header">
|
<table class="ui very basic striped table">
|
||||||
<strong>{{.i18n.Tr "admin.monitor.cron"}}</strong>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body admin-panel">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||||
@ -28,22 +24,20 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{.Description}}</td>
|
<td>{{.Description}}</td>
|
||||||
<td>{{.Spec}}</td>
|
<td>{{.Spec}}</td>
|
||||||
<td>{{.Next}}</td>
|
<td>{{DateFmtLong .Next}}</td>
|
||||||
<td>{{.Prev}}</td>
|
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||||
<td>{{.ExecTimes}}</td>
|
<td>{{.ExecTimes}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<br>
|
<h4 class="ui top attached header">
|
||||||
<div class="panel panel-radius">
|
{{.i18n.Tr "admin.monitor.process"}}
|
||||||
<div class="panel-header">
|
</h4>
|
||||||
<strong>{{.i18n.Tr "admin.monitor.process"}}</strong>
|
<div class="ui attached table segment">
|
||||||
</div>
|
<table class="ui very basic striped table">
|
||||||
<div class="panel-body admin-panel">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Pid</th>
|
<th>Pid</th>
|
||||||
@ -57,7 +51,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{.Pid}}</td>
|
<td>{{.Pid}}</td>
|
||||||
<td>{{.Description}}</td>
|
<td>{{.Description}}</td>
|
||||||
<td>{{.Start}}</td>
|
<td>{{DateFmtLong .Start}}</td>
|
||||||
<td>{{TimeSince .Start $.Lang}}</td>
|
<td>{{TimeSince .Start $.Lang}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -68,7 +62,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{template "base/footer" .}}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{template "ng/base/footer" .}}
|
|
29
templates/admin/navbar.tmpl
Normal file
29
templates/admin/navbar.tmpl
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<div class="four wide column">
|
||||||
|
<div class="ui vertical menu">
|
||||||
|
<div class="header item">{{.i18n.Tr "admin_panel"}}</div>
|
||||||
|
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||||
|
{{.i18n.Tr "admin.dashboard"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
||||||
|
{{.i18n.Tr "admin.users"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
||||||
|
{{.i18n.Tr "admin.organizations"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
||||||
|
{{.i18n.Tr "admin.repositories"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||||
|
{{.i18n.Tr "admin.authentication"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||||
|
{{.i18n.Tr "admin.config"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
||||||
|
{{.i18n.Tr "admin.notices"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
||||||
|
{{.i18n.Tr "admin.monitor"}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user