Skip to content

Commit

Permalink
small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarzlichtbezirk committed Mar 2, 2023
1 parent 729534b commit 03ff2e9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) schwarzlichtbezirk, 2021
Copyright (c) schwarzlichtbezirk, 2020-2023

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions frontend/build/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
<!-- Vue.js release version -->
<script src="/plug/vue.global.prod.js?3.2.47"></script>
<!-- application bundle: leaflet, sha256 -->
<script src="/relm/app.bundle.js?0.9.2"></script>
<script src="/relm/app.bundle.js?0.9.3"></script>
<!-- page bundle -->
<script src="/relm/main.bundle.js?0.9.2"></script>
<script src="/relm/main.bundle.js?0.9.3"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion frontend/devmode/devmode.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is included only for developer mode linkage

const buildvers = "0.9.3";
const builddate = "2023.02.23";
const builddate = "2023.03.02";
console.info("version: %s, builton: %s", buildvers, builddate);
console.info("starts in developer mode");

Expand Down
2 changes: 1 addition & 1 deletion frontend/devmode/relmode.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is included for release mode linkage

const buildvers = "0.9.2";
const builddate = "2023.02.08";
const builddate = "2023.03.02";
const devmode = false;

const traceajax = () => undefined;
Expand Down
2 changes: 1 addition & 1 deletion frontend/devmode/statpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ const VueUsercCard = {
},
computed: {
usrlstnum() {
return Math.ceil(this.usrlst.total / this.usrlstsize);
return Math.ceil(this.usrlst.uanum / this.usrlstsize);
},

clsupdate() {
Expand Down
3 changes: 2 additions & 1 deletion frontend/tmpl/card-stat/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<div v-bind:id="'card'+iid" class="collapse">
<div class="card-body">
<div>
<span class="field-name">total clients:</span><span class="field-value mx-2">{{usrlst.total}}</span>
<span class="field-name">original user number:</span><span class="field-value mx-2">{{usrlst.cnum}}</span>,
<span class="field-name">user agents number:</span><span class="field-value mx-2">{{usrlst.uanum}}</span>
</div>
<template v-for="user in usrlst.list">
<user-tag v-bind:user="user" />
Expand Down
9 changes: 7 additions & 2 deletions users.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ func usrlstAPI(w http.ResponseWriter, r *http.Request) {
var ret struct {
XMLName xml.Name `json:"-" yaml:"-" xml:"ret"`

Total int64 `json:"total" yaml:"total" xml:"total"`
CNum int `json:"cnum" yaml:"cnum" xml:"cnum"`
UANum int `json:"uanum" yaml:"uanum" xml:"uanum"`
List []item `json:"list" yaml:"list" xml:"list>item"`
}

Expand Down Expand Up @@ -173,13 +174,17 @@ func usrlstAPI(w http.ResponseWriter, r *http.Request) {
return
}
if is {
ui.File = post.Path
ui.Path = post.Path
ui.AID = post.AID
ui.UID = post.UID
}

ret.List[i] = ui
}
uamux.Lock()
ret.CNum = int(maxcid)
ret.UANum = len(UaMap)
uamux.Unlock()

WriteOK(w, r, &ret)
}
Expand Down

0 comments on commit 03ff2e9

Please sign in to comment.