Skip to content
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

Remove last traces of google analytics tracker #2584

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ DB_PASSWORD=secret
# daily updates are triggered (e.g. cron).
#DAILY_UPDATES=true

# Google Universal Analytics Tracking ID to use by default
# https://support.google.com/analytics/answer/7372977
#DEFAULT_GOOGLE_ANALYTICS=

# Should users be taken directly to a certain project when they arrive
# via index.php?
#DEFAULT_PROJECT=
Expand Down
2 changes: 0 additions & 2 deletions app/Http/Controllers/CoverageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ private static function get_cdash_dashboard_xml_by_name(string $projectname, $da
'cvsurl' => 'unknown',
'bugtrackerurl' => 'unknown',
'documentationurl' => 'unknown',
'googletracker' => 'unknonw',
'name' => $projectname,
'nightlytime' => '00:00:00',
];
Expand All @@ -223,7 +222,6 @@ private static function get_cdash_dashboard_xml_by_name(string $projectname, $da
<startdate>' . date('l, F d Y H:i:s', $currentstarttime) . '</startdate>
<svn>' . make_cdash_url(htmlentities($project_array['cvsurl'])) . '</svn>
<bugtracker>' . make_cdash_url(htmlentities($project_array['bugtrackerurl'])) . '</bugtracker>
<googletracker>' . htmlentities($project_array['googletracker']) . '</googletracker>
<documentation>' . make_cdash_url(htmlentities($project_array['documentationurl'])) . '</documentation>
<projectid>' . $projectid . '</projectid>
<projectname>' . $project_array['name'] . '</projectname>
Expand Down
2 changes: 0 additions & 2 deletions app/Models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* @property int $coveragethreshold
* @property string $testingdataurl
* @property string $nightlytime
* @property string $googletracker
* @property int $emaillowcoverage
* @property int $emailtesttimingchanged
* @property int $emailbrokensubmission
Expand Down Expand Up @@ -73,7 +72,6 @@ class Project extends Model
'coveragethreshold',
'testingdataurl',
'nightlytime',
'googletracker',
'emaillowcoverage',
'emailtesttimingchanged',
'emailbrokensubmission',
Expand Down
1 change: 0 additions & 1 deletion app/cdash/app/Controller/Api/ViewProjects.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function getResponse()

$response['title'] = 'Projects';
$response['subtitle'] = 'Projects';
$response['googletracker'] = config('cdash.default_google_analytics');

$response['showoldtoggle'] = true;
$this->activeProjectDays = (int) config('cdash.active_project_days');
Expand Down
3 changes: 0 additions & 3 deletions app/cdash/app/Model/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class Project
public $NightlyTime;
public $NightlyDateTime;
public $NightlyTimezone;
public $GoogleTracker;
public $EmailLowCoverage;
public $EmailTestTimingChanged;
public $EmailBrokenSubmission;
Expand Down Expand Up @@ -266,7 +265,6 @@ public function Save(): bool
'coveragethreshold' => (int) $this->CoverageThreshold,
'testingdataurl' => $this->TestingDataUrl ?? '',
'nightlytime' => $this->NightlyTime ?? '',
'googletracker' => $this->GoogleTracker ?? '',
'emaillowcoverage' => (int) $this->EmailLowCoverage,
'emailtesttimingchanged' => (int) $this->EmailTestTimingChanged,
'emailbrokensubmission' => (int) $this->EmailBrokenSubmission,
Expand Down Expand Up @@ -355,7 +353,6 @@ public function Fill(): void
$this->CoverageThreshold = $project->coveragethreshold;
$this->TestingDataUrl = $project->testingdataurl;
$this->SetNightlyTime($project->nightlytime);
$this->GoogleTracker = $project->googletracker;
$this->EmailLowCoverage = $project->emaillowcoverage;
$this->EmailTestTimingChanged = $project->emailtesttimingchanged;
$this->EmailBrokenSubmission = $project->emailbrokensubmission;
Expand Down
2 changes: 0 additions & 2 deletions app/cdash/include/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ function get_dashboard_JSON($projectname, $date, &$response)
$project_array['bugtrackerurl'] = $project->Id ? $project->BugTrackerUrl : 'unknown';
$project_array['documentationurl'] = $project->Id ? $project->DocumentationUrl : 'unknown';
$project_array['homeurl'] = $project->Id ? $project->HomeUrl : 'unknown';
$project_array['googletracker'] = $project->Id ? $project->GoogleTracker : 'unknown';
$project_array['name'] = $projectname;
$project_array['nightlytime'] = $project->Id ? $project->NightlyTime : '00:00:00';

Expand All @@ -704,7 +703,6 @@ function get_dashboard_JSON($projectname, $date, &$response)
$response['currentdate'] = TestingDay::get($project, gmdate(FMT_DATETIME));
$response['vcs'] = make_cdash_url(htmlentities($project_array['cvsurl']));
$response['bugtracker'] = make_cdash_url(htmlentities($project_array['bugtrackerurl']));
$response['googletracker'] = htmlentities($project_array['googletracker']);
$response['documentation'] = make_cdash_url(htmlentities($project_array['documentationurl']));
$response['projectid'] = $project->Id;
$response['projectname'] = $project_array['name'];
Expand Down
1 change: 0 additions & 1 deletion config/cdash.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
'curl_localhost_prefix' => env('CURL_LOCALHOST_PREFIX', ''),
'daily_updates' => env('DAILY_UPDATES', true),
'default_git_dir' => env('DEFAULT_GIT_DIRECTORY', '/cdash/_build'),
'default_google_analytics' => env('DEFAULT_GOOGLE_ANALYTICS', ''),
'default_project' => env('DEFAULT_PROJECT', null),
'delete_old_subprojects' => env('DELETE_OLD_SUBPROJECTS', true),
'google_map_api_key' => env('GOOGLE_MAP_API_KEY', null),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('project', function (Blueprint $table) {
$table->dropColumn('googletracker');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('project', function (Blueprint $table) {
$table->string('googletracker', 50)->nullable();
});
}
};
7 changes: 1 addition & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ parameters:

-
message: "#^Parameter \\#1 \\$string of function htmlentities expects string, mixed given\\.$#"
count: 5
count: 4
path: app/Http/Controllers/CoverageController.php

-
Expand Down Expand Up @@ -10894,11 +10894,6 @@ parameters:
count: 1
path: app/cdash/app/Model/Project.php

-
message: "#^Property CDash\\\\Model\\\\Project\\:\\:\\$GoogleTracker has no type specified\\.$#"
count: 1
path: app/cdash/app/Model/Project.php

-
message: "#^Property CDash\\\\Model\\\\Project\\:\\:\\$HomeUrl has no type specified\\.$#"
count: 1
Expand Down
38 changes: 0 additions & 38 deletions resources/js/vue/components/EditProject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1702,44 +1702,6 @@
</span>
</td>
</tr>
<tr>
<td />
<td>
<div align="right">
<strong>Google Analytics Tracker:</strong>
</div>
</td>
<td>
<input
id="googleTracker"
v-model="cdash.project.GoogleTracker"
name="googleTracker"
type="text"
size="30"
@change="cdash.changesmade = true"
@focus="showHelp('google_help')"
>
<a
href="http://www.cdash.org/Wiki/CDash:Administration#Creating_a_project"
target="blank"
>
<img
:src="$baseURL + '/img/help.gif'"
border="0"
@mouseover="showHelp('google_help')"
>
</a>
<span
id="google_help"
class="help_content"
>
<b>Google Analytics Tracker</b>
<br>
CDash supports visitor tracking through Google analytics.
See “Adding Google Analytics” for more information.
</span>
</td>
</tr>
<tr>
<td />
<td>
Expand Down