Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!4673
Issue
#3384272
: Allow to validate Apache/Nginx configuration requirement for aggregation folder before enabling aggregation.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3384272
: Allow to validate Apache/Nginx configuration requirement for aggregation folder before enabling aggregation.
issue/drupal-3384272:3384272-allow-to-validate
into
11.x
Overview
1
Commits
7
Pipelines
4
Changes
3
1 unresolved thread
Hide all comments
Open
Oleh Vehera
requested to merge
issue/drupal-3384272:3384272-allow-to-validate
into
11.x
1 year ago
Overview
1
Commits
7
Pipelines
4
Changes
3
1 unresolved thread
Hide all comments
Expand
0
0
Merge request reports
Compare
11.x
version 6
1f46aa90
1 year ago
version 5
fa7549cb
1 year ago
version 4
851abd73
1 year ago
version 3
d6d399cc
1 year ago
version 2
2645c549
1 year ago
version 1
2bf533ce
1 year ago
11.x (HEAD)
and
latest version
latest version
d04b193f
7 commits,
1 year ago
version 6
1f46aa90
6 commits,
1 year ago
version 5
fa7549cb
5 commits,
1 year ago
version 4
851abd73
4 commits,
1 year ago
version 3
d6d399cc
3 commits,
1 year ago
version 2
2645c549
2 commits,
1 year ago
version 1
2bf533ce
1 commit,
1 year ago
3 files
+
99
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
core/modules/system/js/assets.validate.js
0 → 100644
+
75
−
0
Options
((
Drupal
,
once
)
=>
{
Drupal
.
behaviors
.
systemPerformanceAssetsValidate
=
{
attach
:
(
context
,
settings
)
=>
{
const
getAssetsValidationMessenger
=
()
=>
{
return
new
Drupal
.
Message
(
context
.
querySelector
(
'
[data-assets-validate-messages]
'
),
);
};
const
validate
=
(
e
)
=>
{
const
el
=
e
.
currentTarget
;
if
(
!
el
.
checked
)
{
return
;
}
const
validateUrl
=
el
.
dataset
.
performanceAssetsValidatePath
;
getAssetsValidationMessenger
().
clear
();
try
{
fetch
(
validateUrl
)
.
then
((
response
)
=>
{
if
(
response
.
status
===
404
)
{
getAssetsValidationMessenger
().
add
(
Drupal
.
t
(
'
Your server is not configured properly to access @name assets. Review Drupal server requirements.
'
,
{
'
@name
'
:
el
.
name
,
},
),
{
type
:
'
error
'
,
},
);
}
else
{
getAssetsValidationMessenger
().
add
(
Drupal
.
t
(
'
Your server is configured properly to access @name assets.
'
,
{
'
@name
'
:
el
.
name
,
},
),
);
}
})
.
catch
((
error
)
=>
{
getAssetsValidationMessenger
().
add
(
Drupal
.
t
(
'
Unable to check server requirements for @name assets.
'
,
{
'
@name
'
:
el
.
name
,
},
),
{
type
:
'
warning
'
,
},
);
});
}
catch
(
err
)
{
getAssetsValidationMessenger
().
add
(
Drupal
.
t
(
'
Unable to check server requirements for @name assets.
'
,
{
'
@name
'
:
el
.
name
,
}),
{
type
:
'
warning
'
,
},
);
}
};
once
(
'
performance-assets-validate
'
,
document
.
body
).
forEach
(()
=>
{
context
.
querySelectorAll
(
'
[data-performance-assets-validate-path]
'
)
.
forEach
((
chb
)
=>
{
chb
.
addEventListener
(
'
change
'
,
validate
);
});
});
},
};
})(
Drupal
,
once
);
Loading