New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
several changes to emphasize setup and use of auto-archiving rather than real-time processing #16603
Conversation
…han real-time processing
@@ -27,6 +27,10 @@ | |||
</p> | |||
{% endif %} | |||
|
|||
<h3>Performance Settings</h3> | |||
<p>{{ 'Installation_PerformanceSettingsDesc1'|translate('<a href="https://matomo.org/docs/setup-auto-archiving/" rel="noreferrer noopener">', '</a>')|raw }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we add a target _blank here for both links @diosmosis ? That be great as when I clicked on it I left the installer
// we require view access only when only pre processed can be created | ||
Piwik::checkUserHasViewAccess($idSite); | ||
} | ||
Piwik::checkUserHasViewAccess($idSite); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be possible to set autoArchive=1
only when browser archiving is disabled? Otherwise the segment would be never archived?
We'll also need to adjust the config text in enable_create_realtime_segments
as it no longer restricts which kinds of users can create segments to be archived on-demand. Could later if needed add a new setting like require_admin_access_for_preprocessed_segments=0
but not needed for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be possible to set autoArchive=1 only when browser archiving is disabled?
I think you mean when cron archiving isn't set up, but I don't think there's a good way to check for that? If browser archiving is enabled and cli archiving is enabled, then it should be possible to use auto archive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should see having both browser archiving and cli archiving enabled as a use case? Of course few users might do it (eg because they forget to disable browser archiving) but it should be rather edge cause and most of the times there wouldn't be much of a benefit of having both running AFAIK. Unless there would be some?
@@ -131,7 +131,7 @@ | |||
"SystemCheckWriteDirs": "Directories with write access", | |||
"SystemCheckWriteDirsHelp": "To fix this error on your GNU\/Linux system, try typing in the following command(s)", | |||
"SystemCheckZlibHelp": "You need to configure and rebuild PHP with \"zlib\" support enabled, --with-zlib.", | |||
"SystemCheckCronArchiveProcess": "Archive Cron", | |||
"SystemCheckCronArchiveProcess": "Setup Cron", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still finding it useful if it could be a bit more clear what the outcome/result is of fixing this warning so users will pay more attention to it as "Setup cron" you would likely simply ignore. Like "Setup Cron (faster report loading)" or something. Not too important but I think it will get the attention of users a lot more
plugins/CoreHome/lang/en.json
Outdated
@@ -82,7 +82,7 @@ | |||
"PivotBySubtable": "This report is not pivoted %1$s Pivot by %2$s", | |||
"SystemSummaryWidget": "System Summary", | |||
"SystemSummaryNWebsites": "%d websites", | |||
"SystemSummaryNSegments": "%d segments", | |||
"SystemSummaryNSegments": "%1$d segments (%2$s pre-processed, %3$s processed in real-time)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
54 segments (7 pre-processed, 47 processed in real-time)
could we maybe rename %2$s pre-processed
to something like %2$s processed in background
or so? Although I reckon that doesn't make it much more clear what it means either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about processed periodically
? Or reports generated periodically
vs reports generated in real-time
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon we can actually just leave it as it is. I don't think any other wording makes it more clear. Same for processed via cron
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diosmosis I reckon the only remaining change needed is to set in segment editor "pre-processed" as default when browser archiving is disabled. For me so far it still always shows real time as default
I also created a follow up issue #16646 to eventually improve segment editor as the option is barely visible depending on the resolution and people currently wouldn't know what to select when.
plugins/SegmentEditor/API.php
Outdated
// we require view access only when only pre processed can be created | ||
Piwik::checkUserHasViewAccess($idSite); | ||
if (Rules::isBrowserTriggerEnabled()) { | ||
throw new Exception("Pre-processed segments can only be created if browser triggered archiving is disabled."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a link to https://matomo.org/docs/setup-auto-archiving/ if it's a super user? Like To disable browser archiving follow the instructions in https://matomo.org/docs/setup-auto-archiving/ .
Just to give them an idea of what to do next.
@tsteur applied some changes |
@@ -56,10 +56,10 @@ | |||
</strong></div> | |||
{{ 'General_And'|translate }} <div class="auto_archive"><strong> | |||
<select class="auto_archive_select"> | |||
{% if createRealTimeSegmentsIsEnabled %} | |||
{% if createRealTimeSegmentsIsEnabled or isBrowserArchivingEnabled %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diosmosis not sure this change is actually needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsteur you said:
I reckon the only remaining change needed is to set in segment editor "pre-processed" as default when browser archiving is disabled.
<option selected="1" value="0">{{ 'SegmentEditor_AutoArchiveRealTime'|translate }} {{ 'General_DefaultAppended'|translate }}</option> | ||
{% endif %} | ||
<option {% if not createRealTimeSegmentsIsEnabled %}selected="1"{% endif %} value="1">{{ 'SegmentEditor_AutoArchivePreProcessed'|translate }} </option> | ||
<option {% if not createRealTimeSegmentsIsEnabled and not isBrowserArchivingEnabled %}selected="1"{% endif %} value="1">{{ 'SegmentEditor_AutoArchivePreProcessed'|translate }} </option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw probably not an issue but do we maybe need to remove selected="1"
from the previous option when selecting this one by default? I suppose the browser in this case automatically selects the later one?
I'm thinking maybe it needs to use an or
and not an and
? Like we want to preselect this one either when browser archiving is disabled or when real time segment is not allowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be mutually exclusive conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diosmosis I just disabled browser archiving but real time was still the default. It could alternatively be simplified to if not isBrowserArchivingEnabled
.
Otherwise it would be only the default if someone was to disable real time segments but only few people would do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsteur that may be because browser archiving of segments is still enabled. Can you check that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's possible. I think we'd want to still enable it though by default in that case see #6210 (comment)
and then in #6210 (comment)
It wasn't really meant in relation to the segment specific archive setting but just the general browser archiving setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will ignore segment specific archiving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsteur changed.
@@ -56,10 +56,10 @@ | |||
</strong></div> | |||
{{ 'General_And'|translate }} <div class="auto_archive"><strong> | |||
<select class="auto_archive_select"> | |||
{% if createRealTimeSegmentsIsEnabled %} | |||
{% if isBrowserArchivingEnabled %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be reverted to the original if createRealTimeSegmentsIsEnabled
? If browser archiving is disabled, then you might still want to create a segment for "real time" if you use the segment for example only for the "visits log" or if you view it very rarely. It should just not be selected by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one more comment @diosmosis and then feel free to merge once the tests pass.
@tsteur updated again, will merge if tests pass and no further comments |
Great. Thanks @diosmosis |
Fixes #6210
Changes:
TODO:
Screenshots:
System Check Dash
Installation
System Summary