Skip to content

Commit 8112987

Browse files
Timmy38odain-cbd
authored andcommitted
N°8763 Halt setup if non-uninstallable extension is missing (#781)
* N°8763 Halt setup if an installed & non-uninstallable extension is missing from disk
1 parent 5eafb69 commit 8112987

File tree

10 files changed

+229
-842
lines changed

10 files changed

+229
-842
lines changed

css/setup.css

Lines changed: 3 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/setup.scss

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -311,29 +311,35 @@ fieldset {
311311
}
312312

313313
.module-selection-body {
314-
overflow: auto;
315-
box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important;
316-
background-color: #F7FAFC;
317-
padding: 10px;
318-
319-
.wiz-choice:checked ~ .description {
320-
#itop-ticket-mgmt-simple-ticket-enhanced-portal:not(:checked),
321-
#itop-ticket-mgmt-itil-enhanced-portal:not(:checked) {
322-
~ .description::after {
323-
content: "Legacy portal is no longer part of iTop, by leaving this option unchecked your portal users won't be able to access iTop anymore.";
324-
display: block;
325-
margin-top: 0.5em;
326-
font-weight: bold;
327-
color: $legacy-portal-removal-text-color;
328-
}
329-
}
330-
}
314+
overflow: auto;
315+
box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .06) !important;
316+
background-color: #F7FAFC;
317+
padding: 10px;
318+
.wiz-choice{
319+
&:checked ~ .description {
320+
#itop-ticket-mgmt-simple-ticket-enhanced-portal:not(:checked),
321+
#itop-ticket-mgmt-itil-enhanced-portal:not(:checked) {
322+
~ .description::after {
323+
content: "Legacy portal is no longer part of iTop, by leaving this option unchecked your portal users won't be able to access iTop anymore.";
324+
display: block;
325+
margin-top: 0.5em;
326+
font-weight: bold;
327+
color: $legacy-portal-removal-text-color;
328+
}
329+
}
330+
}
331+
&:not(:checked) ~ label .setup-extension-tag.checked{
332+
display:none;
333+
}
334+
&:checked ~ label .setup-extension-tag.unchecked{
335+
display:none;
336+
}
337+
}
331338
}
332339

333340

334341

335342

336-
337343
body {
338344
font-size: 1.17rem;
339345
font-family: "Raleway";
@@ -595,6 +601,35 @@ body {
595601
color: $ibo-color-blue-700;
596602
font-size: $ibo-font-size-200;
597603
}
604+
.setup-extension--missing .setup-extension--icon{
605+
color:#a00000;
606+
}
607+
.setup-extension-tag {
608+
background-color: grey;
609+
border-radius: 8px;
610+
padding-left: 3px;
611+
padding-right: 3px;
612+
margin-right: 3px;
613+
&.installed{
614+
background-color:#9eff9e
615+
}
616+
&.notinstalled{
617+
background-color:#ed9eff
618+
}
619+
&.tobeinstalled{
620+
background-color:#9ef0ff
621+
}
622+
&.tobeuninstalled{
623+
background-color:#ff9e9e
624+
}
625+
&.notuninstallable{
626+
background-color:#ffc98c
627+
}
628+
&.removed{
629+
background-color: #969594
630+
}
631+
}
632+
598633
.setup--wizard-choice--label + .setup--wizard-choice--more-info {
599634
margin-left: 0.5rem;
600635
}

datamodels/2.x/itop-hub-connector/land.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function DisplayStatus(WebPage $oPage)
2020
if (is_dir($sPath)) {
2121
$aExtraDirs[] = $sPath; // Also read the extra downloaded-modules directory
2222
}
23-
$oExtensionsMap = new iTopExtensionsMap('production', true, $aExtraDirs);
23+
$oExtensionsMap = new iTopExtensionsMap('production', $aExtraDirs);
2424
$oExtensionsMap->LoadChoicesFromDatabase(MetaModel::GetConfig());
2525

2626
foreach ($oExtensionsMap->GetAllExtensions() as $oExtension) {
@@ -154,7 +154,7 @@ function DoInstall(WebPage $oPage)
154154
if (is_dir($sPath)) {
155155
$aExtraDirs[] = $sPath; // Also read the extra downloaded-modules directory
156156
}
157-
$oExtensionsMap = new iTopExtensionsMap('production', true, $aExtraDirs);
157+
$oExtensionsMap = new iTopExtensionsMap('production', $aExtraDirs);
158158
$oExtensionsMap->LoadChoicesFromDatabase(MetaModel::GetConfig());
159159

160160
foreach ($oExtensionsMap->GetAllExtensions() as $oExtension) {

0 commit comments

Comments
 (0)