Skip to content

Commit 4d0ba38

Browse files
committed
chore: bug fixes
1 parent f44c44c commit 4d0ba38

File tree

8 files changed

+39
-35
lines changed

8 files changed

+39
-35
lines changed

app/src/components/NodeIndicator/NodeIndicator.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ async function clear_node() {
1313
settingsStore.clear_node()
1414
}
1515
16-
const is_local = computed(() => {
16+
const isLocal = computed(() => {
1717
return node.value.id === 0
1818
})
1919
20-
const node_id = computed(() => node.value.id)
20+
const nodeId = computed(() => node.value.id)
2121
22-
watch(node_id, async () => {
22+
watch(nodeId, async () => {
2323
await router.push('/dashboard')
2424
location.reload()
2525
})
@@ -32,7 +32,7 @@ const { server_name } = storeToRefs(useSettingsStore())
3232
<div class="container">
3333
<DatabaseOutlined />
3434
<span
35-
v-if="is_local"
35+
v-if="isLocal"
3636
class="node-name"
3737
>
3838
{{ server_name || $gettext('Local') }}
@@ -44,7 +44,7 @@ const { server_name } = storeToRefs(useSettingsStore())
4444
{{ node.name }}
4545
</span>
4646
<ATag @click="clear_node">
47-
<DashboardOutlined v-if="is_local" />
47+
<DashboardOutlined v-if="isLocal" />
4848
<CloseOutlined v-else />
4949
</ATag>
5050
</div>

app/src/pinia/moudule/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const useSettingsStore = defineStore('settings', {
3838
{
3939
key: `LOCAL_${window.name || 'main'}`,
4040
storage: localStorage,
41-
pick: ['environment', 'server_name', 'route_path'],
41+
pick: ['node', 'server_name', 'route_path'],
4242
},
4343
{
4444
storage: localStorage,

app/src/views/dashboard/Nodes.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,16 @@ onMounted(() => {
108108
})
109109
})
110110
111-
const { node: env } = useSettingsStore()
111+
const settingsStore = useSettingsStore()
112+
const { node } = storeToRefs(settingsStore)
112113
113-
function linkStart(node: Node) {
114-
env.id = node.id
115-
env.name = node.name
114+
function linkStart(n: Node) {
115+
node.value.id = n.id
116+
node.value.name = n.name
116117
}
117118
118119
const visible = computed(() => {
119-
if (env.id > 0)
120+
if (node.value.id > 0)
120121
return false
121122
else
122123
return data.value?.length
@@ -185,7 +186,7 @@ const visible = computed(() => {
185186
<div class="env-description">
186187
<NodeAnalyticItem
187188
:item="item"
188-
:current-env-id="env.id"
189+
:current-node-id="node.id"
189190
:local-version="version"
190191
:on-link-start="linkStart"
191192
class="node-analytic"

app/src/views/dashboard/components/NodeAnalyticItem.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface ExtendedNode extends Node {
2727
2828
defineProps<{
2929
item: ExtendedNode
30-
currentEnvId?: number
30+
currentNodeId?: number
3131
localVersion?: string
3232
onLinkStart?: (item: ExtendedNode) => void
3333
}>()
@@ -87,14 +87,14 @@ defineProps<{
8787
<AButton
8888
v-if="item.version === localVersion"
8989
type="primary"
90-
:disabled="!item.status || currentEnvId === item.id"
90+
:disabled="!item.status || currentNodeId === item.id"
9191
ghost
9292
class="link-btn"
9393
@click="onLinkStart?.(item)"
9494
>
9595
<SendOutlined />
9696
<span class="link-btn-text">
97-
{{ currentEnvId !== item.id ? $gettext('Link') : $gettext('Connected') }}
97+
{{ currentNodeId !== item.id ? $gettext('Link') : $gettext('Connected') }}
9898
</span>
9999
</AButton>
100100
<ATooltip

app/src/views/nginx_log/NginxLog.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ const isErrorLog = computed(() => {
2626
})
2727
2828
const autoRefresh = ref(true)
29+
30+
watch(logType, v => {
31+
if (v === 'error') {
32+
viewMode.value = 'raw'
33+
}
34+
else {
35+
viewMode.value = 'structured'
36+
}
37+
}, { immediate: true })
2938
</script>
3039

3140
<template>

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ require (
4747
github.com/stretchr/testify v1.10.0
4848
github.com/tufanbarisyildirim/gonginx v0.0.0-20250620092546-c3e307e36701
4949
github.com/ulikunitz/xz v0.5.12
50-
github.com/uozi-tech/cosy v1.25.8
50+
github.com/uozi-tech/cosy v1.25.6
5151
github.com/uozi-tech/cosy-driver-sqlite v0.2.1
5252
github.com/urfave/cli/v3 v3.4.1
5353
golang.org/x/crypto v0.41.0
@@ -271,6 +271,7 @@ require (
271271
github.com/peterhellberg/link v1.2.0 // indirect
272272
github.com/philhofer/fwd v1.2.0 // indirect
273273
github.com/pierrec/lz4/v4 v4.1.22 // indirect
274+
github.com/pires/go-proxyproto v0.8.1 // indirect
274275
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
275276
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
276277
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
@@ -369,7 +370,7 @@ require (
369370
)
370371

371372
replace (
372-
code.pfad.fr/risefront => github.com/nginxui/risefront v1.3.0
373+
code.pfad.fr/risefront => github.com/nginxui/risefront v1.3.1
373374
github.com/minio/selfupdate => github.com/nginxui/selfupdate v0.0.0-20250508140228-a7dab39cec4a
374375
github.com/nikoksr/notify => github.com/nginxui/notify v0.0.0-20250509000747-c76622723eb1
375376
)

go.sum

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,6 @@ github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F9
891891
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
892892
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
893893
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
894-
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
895894
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
896895
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
897896
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -949,8 +948,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
949948
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
950949
github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE=
951950
github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA=
952-
github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM=
953-
github.com/dgraph-io/ristretto/v2 v2.2.0/go.mod h1:RZrm63UmcBAaYWC1DotLYBmTvgkrs0+XhBd7Npn7/zI=
954951
github.com/dgraph-io/ristretto/v2 v2.3.0 h1:qTQ38m7oIyd4GAed/QkUZyPFNMnvVWyazGXRwvOt5zk=
955952
github.com/dgraph-io/ristretto/v2 v2.3.0/go.mod h1:gpoRV3VzrEY1a9dWAYV6T1U7YzfgttXdd/ZzL1s9OZM=
956953
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
@@ -1658,9 +1655,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS
16581655
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
16591656
github.com/nginxui/notify v0.0.0-20250509000747-c76622723eb1 h1:tTFu+N3ukz73Lv4LKLdNAL6EItcdn31vpy12SLwLjlU=
16601657
github.com/nginxui/notify v0.0.0-20250509000747-c76622723eb1/go.mod h1:5xiIPJd5HveRkca2gA8K//HLdupJuB7uHHBdzDQQN6g=
1661-
github.com/nginxui/risefront v1.2.3 h1:UXVt+yzGtWyFHQsnLG3HJNv+RHllVyUEG7zHZryOpxE=
1662-
github.com/nginxui/risefront v1.2.3/go.mod h1:QX3OyvazX3Mi/X2NZKl9ylDrFVUeaogwSMKyEsnRCHE=
1663-
github.com/nginxui/risefront v1.3.0/go.mod h1:G2J7TdMAyBuzfWD1fCGkmPATbXElUCs+yeVJfrPXfPQ=
1658+
github.com/nginxui/risefront v1.3.1 h1:etNTt95Sq8vlvsdsJD4wQrDsp8/z13giub+75DsIJ2I=
1659+
github.com/nginxui/risefront v1.3.1/go.mod h1:G2J7TdMAyBuzfWD1fCGkmPATbXElUCs+yeVJfrPXfPQ=
16641660
github.com/nginxui/selfupdate v0.0.0-20250508140228-a7dab39cec4a h1:KNDT8WAMtclTjmHtlqvy02sXUPNxErKNcyB3bjTRsEM=
16651661
github.com/nginxui/selfupdate v0.0.0-20250508140228-a7dab39cec4a/go.mod h1:bO02GTIPCMQFTEvE5h4DjYB58bCoZ35XLeBf0buTDdM=
16661662
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
@@ -1749,11 +1745,12 @@ github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2
17491745
github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
17501746
github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
17511747
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
1752-
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
17531748
github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
17541749
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
17551750
github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
17561751
github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
1752+
github.com/pires/go-proxyproto v0.8.1 h1:9KEixbdJfhrbtjpz/ZwCdWDD2Xem0NZ38qMYaASJgp0=
1753+
github.com/pires/go-proxyproto v0.8.1/go.mod h1:ZKAAyp3cgy5Y5Mo4n9AlScrkCZwUy0g3Jf+slqQVcuU=
17571754
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
17581755
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
17591756
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
@@ -2001,8 +1998,6 @@ github.com/ultradns/ultradns-go-sdk v1.8.1-20250722213956-faef419 h1:/VaznPrb/b6
20011998
github.com/ultradns/ultradns-go-sdk v1.8.1-20250722213956-faef419/go.mod h1:QN0/PdenvYWB0GRMz6JJbPeZz2Lph2iys1p8AFVHm2c=
20021999
github.com/uozi-tech/cosy v1.25.6 h1:a0wrGIGrDmEbXpxL85XC5J81nFjoIn5KNrj3oBS6M1A=
20032000
github.com/uozi-tech/cosy v1.25.6/go.mod h1:eQ1upugkrOcNzwie9Ug8GRvPhU3vgGPGl3Be9lHjVh0=
2004-
github.com/uozi-tech/cosy v1.25.8 h1:rsYFDFZmfRRzgvZQAilS38fHgizaDsno/Jfvrd0GUAI=
2005-
github.com/uozi-tech/cosy v1.25.8/go.mod h1:eQ1upugkrOcNzwie9Ug8GRvPhU3vgGPGl3Be9lHjVh0=
20062001
github.com/uozi-tech/cosy-driver-mysql v0.2.2 h1:22S/XNIvuaKGqxQPsYPXN8TZ8hHjCQdcJKVQ83Vzxoo=
20072002
github.com/uozi-tech/cosy-driver-mysql v0.2.2/go.mod h1:EZnRIbSj1V5U0gEeTobrXai/d1SV11lkl4zP9NFEmyE=
20082003
github.com/uozi-tech/cosy-driver-postgres v0.2.1 h1:OICakGuT+omva6QOJCxTJ5Lfr7CGXLmk/zD+aS51Z2o=
@@ -2666,6 +2661,8 @@ gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJ
26662661
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
26672662
gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0=
26682663
gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA=
2664+
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
2665+
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
26692666
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
26702667
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
26712668
gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY=
@@ -2918,8 +2915,6 @@ google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v
29182915
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
29192916
google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g=
29202917
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
2921-
google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
2922-
google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
29232918
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
29242919
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
29252920
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
@@ -2940,8 +2935,6 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
29402935
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
29412936
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
29422937
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
2943-
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
2944-
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
29452938
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
29462939
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
29472940
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=

internal/nginx_log/indexer_file_indexing.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (li *LogIndexer) IndexLogFile(filePath string) error {
2424

2525
// IndexLogFileIncremental performs incremental indexing of a log file
2626
func (li *LogIndexer) IndexLogFileIncremental(filePath string) error {
27-
logger.Infof("Starting incremental index of log file: %s", filePath)
27+
logger.Debugf("Starting incremental index of log file: %s", filePath)
2828

2929
// Note: Global indexing status is managed at the rebuild level
3030
// Individual file notifications are not needed as they cause excessive status changes
@@ -47,17 +47,17 @@ func (li *LogIndexer) IndexLogFileIncremental(filePath string) error {
4747

4848
// Check if file needs indexing
4949
if !logIndex.NeedsIndexing(currentInfo.ModTime(), totalSize) {
50-
logger.Infof("Skipping %s - file group hasn't changed since last index", filePath)
50+
logger.Debugf("Skipping %s - file group hasn't changed since last index", filePath)
5151
return nil
5252
}
5353

5454
// Check if we need full reindex instead
5555
if logIndex.ShouldFullReindex(currentInfo.ModTime(), totalSize) {
56-
logger.Infof("File %s needs full reindex instead of incremental", filePath)
56+
logger.Debugf("File %s needs full reindex instead of incremental", filePath)
5757
return li.IndexLogFileFull(filePath)
5858
}
5959

60-
logger.Infof("Incremental indexing log file: %s from position %d", filePath, logIndex.LastPosition)
60+
logger.Debugf("Incremental indexing log file: %s from position %d", filePath, logIndex.LastPosition)
6161

6262
// Index from last position
6363
return li.indexFileFromPosition(filePath, logIndex.LastPosition, logIndex)
@@ -118,4 +118,4 @@ func (li *LogIndexer) ForceReindexFileGroup(mainLogPath string, wg *sync.WaitGro
118118
statusManager.UpdateIndexingStatus()
119119

120120
return nil
121-
}
121+
}

0 commit comments

Comments
 (0)