Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Calamares
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
Calamares
Commits
0c292330
Commit
0c292330
authored
Sep 16, 2016
by
Teo Mrnjavac
Browse files
Options
Downloads
Patches
Plain Diff
Warning in debug output when the RequirementsChecker is misconfigured.
CAL-390 #close
parent
1c3d5c67
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/modules/welcome/WelcomeViewStep.cpp
+4
-0
4 additions, 0 deletions
src/modules/welcome/WelcomeViewStep.cpp
src/modules/welcome/checker/RequirementsChecker.cpp
+21
-0
21 additions, 0 deletions
src/modules/welcome/checker/RequirementsChecker.cpp
with
25 additions
and
0 deletions
src/modules/welcome/WelcomeViewStep.cpp
+
4
−
0
View file @
0c292330
...
...
@@ -20,6 +20,7 @@
#include
"WelcomePage.h"
#include
"checker/RequirementsChecker.h"
#include
"utils/Logger.h"
#include
<QVariant>
...
...
@@ -128,5 +129,8 @@ WelcomeViewStep::setConfigurationMap( const QVariantMap& configurationMap )
if
(
configurationMap
.
contains
(
"requirements"
)
&&
configurationMap
.
value
(
"requirements"
).
type
()
==
QVariant
::
Map
)
m_requirementsChecker
->
setConfigurationMap
(
configurationMap
.
value
(
"requirements"
).
toMap
()
);
else
cDebug
()
<<
"WARNING: no valid requirements map found in welcome "
"module configuration."
;
}
This diff is collapsed.
Click to expand it.
src/modules/welcome/checker/RequirementsChecker.cpp
+
21
−
0
View file @
0c292330
...
...
@@ -185,6 +185,7 @@ RequirementsChecker::widget() const
void
RequirementsChecker
::
setConfigurationMap
(
const
QVariantMap
&
configurationMap
)
{
bool
incompleteConfiguration
=
false
;
if
(
configurationMap
.
contains
(
"requiredStorage"
)
&&
(
configurationMap
.
value
(
"requiredStorage"
).
type
()
==
QVariant
::
Double
||
configurationMap
.
value
(
"requiredStorage"
).
type
()
==
QVariant
::
Int
)
)
...
...
@@ -199,6 +200,7 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
else
{
m_requiredStorageGB
=
3.
;
incompleteConfiguration
=
true
;
}
if
(
configurationMap
.
contains
(
"requiredRam"
)
&&
...
...
@@ -208,11 +210,15 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
bool
ok
=
false
;
m_requiredRamGB
=
configurationMap
.
value
(
"requiredRam"
).
toDouble
(
&
ok
);
if
(
!
ok
)
{
m_requiredRamGB
=
1.
;
incompleteConfiguration
=
true
;
}
}
else
{
m_requiredRamGB
=
1.
;
incompleteConfiguration
=
true
;
}
if
(
configurationMap
.
contains
(
"check"
)
&&
...
...
@@ -221,6 +227,8 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
m_entriesToCheck
.
clear
();
m_entriesToCheck
.
append
(
configurationMap
.
value
(
"check"
).
toStringList
()
);
}
else
incompleteConfiguration
=
true
;
if
(
configurationMap
.
contains
(
"required"
)
&&
configurationMap
.
value
(
"required"
).
type
()
==
QVariant
::
List
)
...
...
@@ -228,6 +236,19 @@ RequirementsChecker::setConfigurationMap( const QVariantMap& configurationMap )
m_entriesToRequire
.
clear
();
m_entriesToRequire
.
append
(
configurationMap
.
value
(
"required"
).
toStringList
()
);
}
else
incompleteConfiguration
=
true
;
if
(
incompleteConfiguration
)
{
cDebug
()
<<
"WARNING: The RequirementsChecker configuration map provided by "
"the welcome module configuration file is incomplete or "
"incorrect.
\n
"
"Startup will continue for debugging purposes, but one or "
"more checks might not function correctly.
\n
"
"RequirementsChecker configuration map:
\n
"
<<
configurationMap
;
}
}
...
...
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
sign in
to comment