Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai-simplesitestats-plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noblogs
ai-simplesitestats-plugin
Commits
f2d741fb
Commit
f2d741fb
authored
1 month ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Update phrasing and menu label
parent
58c85cf9
No related branches found
Branches containing commit
Tags
v0.0.6
Tags containing commit
No related merge requests found
Pipeline
#88500
passed
1 month ago
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ai-simplesitestats.php
+7
-5
7 additions, 5 deletions
ai-simplesitestats.php
with
7 additions
and
5 deletions
ai-simplesitestats.php
+
7
−
5
View file @
f2d741fb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Plugin Name: ai-simplesitestats
* Plugin Name: ai-simplesitestats
* Plugin URI: https://git.autistici.org/noblogs/ai-simplesitestats-plugin
* Plugin URI: https://git.autistici.org/noblogs/ai-simplesitestats-plugin
* Description: Show simple site statistics
* Description: Show simple site statistics
* Version: 0.0.1
1
* Version: 0.0.1
2
* Author: Autistici/Inventati
* Author: Autistici/Inventati
* Author URI: https://www.autistici.org/
* Author URI: https://www.autistici.org/
* License: MIT
* License: MIT
...
@@ -51,7 +51,7 @@ class StatisticsPage {
...
@@ -51,7 +51,7 @@ class StatisticsPage {
$timeseriesJSON
=
$this
->
getTimeseriesJSON
(
$site_name
,
$metric
,
$resolution
);
$timeseriesJSON
=
$this
->
getTimeseriesJSON
(
$site_name
,
$metric
,
$resolution
);
echo
'<div id="ai-sss-container" class="wrap">'
;
echo
'<div id="ai-sss-container" class="wrap">'
;
echo
'<h2>
S
tatistics for '
.
$site_name
.
'</h2>'
;
echo
'<h2>
Traffic s
tatistics for '
.
$site_name
.
'</h2>'
;
// Output the chart element along with the data.
// Output the chart element along with the data.
echo
'<div style="width:100%;"><canvas id="sssChart" class="simplesitestats-chart" data-timeseries-element-id="sssChartData"></canvas></div>'
;
echo
'<div style="width:100%;"><canvas id="sssChart" class="simplesitestats-chart" data-timeseries-element-id="sssChartData"></canvas></div>'
;
...
@@ -70,6 +70,8 @@ class StatisticsPage {
...
@@ -70,6 +70,8 @@ class StatisticsPage {
echo
'</td><td><button type="submit">Update</button></td></tr></table>'
;
echo
'</td><td><button type="submit">Update</button></td></tr></table>'
;
echo
'</form>'
;
echo
'</form>'
;
echo
'<p>These metrics are computed from server-side anonymized logs.</p>'
;
echo
'</div>'
;
echo
'</div>'
;
}
}
...
@@ -113,7 +115,7 @@ class StatisticsPage {
...
@@ -113,7 +115,7 @@ class StatisticsPage {
class
AiSSS
{
class
AiSSS
{
private
static
$version
=
'0.0.1
1
'
,
$blog_id
;
private
static
$version
=
'0.0.1
2
'
,
$blog_id
;
public
function
__construct
()
{
public
function
__construct
()
{
global
$blog_id
;
global
$blog_id
;
...
@@ -125,8 +127,8 @@ class AiSSS {
...
@@ -125,8 +127,8 @@ class AiSSS {
public
function
addStatsPage
()
{
public
function
addStatsPage
()
{
$statsPage
=
new
StatisticsPage
(
$this
);
$statsPage
=
new
StatisticsPage
(
$this
);
$statsPageId
=
add_dashboard_page
(
$statsPageId
=
add_dashboard_page
(
__
(
'
Statis
tics'
,
'ai-simplesitestats'
),
__
(
'
Analy
tics'
,
'ai-simplesitestats'
),
'
Stat
s'
,
'
Analytic
s'
,
'read'
,
// cap
'read'
,
// cap
'ai-sss_stats'
,
'ai-sss_stats'
,
array
(
$statsPage
,
'show'
));
array
(
$statsPage
,
'show'
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment