Modify Claim Screen (Windows Installer) (#19132)
thiagoftsm committed
Dec 6, 2024 at 14:50 UTC
e4f9a5a51ea6699c3e9a2f4628dc0622e5e7a187
1 file changed
+19
-16
packaging/windows/netdata.wxs.in
+19
-16
@@ -1,3 +1,5 @@
1
+<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
2
+
3
<Wix
4
xmlns="http://wixtoolset.org/schemas/v4/wxs"
5
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"
@@ -68,12 +70,6 @@
70
</Directory>
71
</StandardDirectory>
72
71
- <!-- Property Id="OS_HAS_FILE" Secure="yes">
72
- <DirectorySearch Id="NetCoreDirectoryFoundx64" Path="[ETCDIRNETDATA]" AssignToProperty="yes" >
73
- <FileSearch Id="NetdataClaim" Name="claim.conf"/>
74
- </DirectorySearch>
75
- </Property -->
76
-
73
<UI Id="FeatureTree_ViewLicense_X64">
74
</UI>
75
<UIRef Id="FeatureTree_ViewLicense" />
@@ -275,6 +271,13 @@
271
</Fragment>
272
273
<Fragment>
274
+ <Property Id="OS_HAS_FILE">
275
+ <!-- Our variables are not defined during startup so we have to use this -->
276
+ <DirectorySearch Id="NetCoreDirectoryFoundx64" Path="C:\Program Files\Netdata\etc\netdata\">
277
+ <FileSearch Name="claim.conf" />
278
+ </DirectorySearch>
279
+ </Property>
280
+
281
<UI>
282
<Dialog Id="NDConfigDialog" Width="370" Height="270" Title="Netdata Cloud">
283
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
@@ -283,21 +286,21 @@
286
<Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="Enter your Space's Claim Token and the Room IDs where you want to add the Agent." />
287
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Connect to the Cloud" />
288
286
- <Control Id="WarningLabelOld" Type="Text" X="10" Y="60" Width="350" Height="15" Text="Agent already claimed? Click Next." />
289
+ <Control Id="WarningLabel" Type="Text" X="10" Y="60" Width="350" Height="15" Text="Agent already claimed! Click Next." HideCondition="NOT OS_HAS_FILE" />
290
288
- <Control Id="TokenLabel" Type="Text" X="10" Y="100" Width="55" Height="15" Text="Claim Token:" />
289
- <Control Id="Token" Type="Edit" X="65" Y="100" Width="290" Height="18" Property="TOKEN" Text="{135}" />
291
+ <Control Id="TokenLabel" Type="Text" X="10" Y="100" Width="55" Height="15" Text="Claim Token:" HideCondition="OS_HAS_FILE" />
292
+ <Control Id="Token" Type="Edit" X="65" Y="100" Width="290" Height="18" Property="TOKEN" Text="{135}" HideCondition="OS_HAS_FILE" />
293
291
- <Control Id="RoomsLabel" Type="Text" X="10" Y="115" Width="55" Height="15" Text="Rooms ID(s):" />
292
- <Control Id="Rooms" Type="Edit" X="65" Y="115" Width="290" Height="18" Property="ROOMS" />
294
+ <Control Id="RoomsLabel" Type="Text" X="10" Y="115" Width="55" Height="15" Text="Rooms ID(s):" HideCondition="OS_HAS_FILE" />
295
+ <Control Id="Rooms" Type="Edit" X="65" Y="115" Width="290" Height="18" Property="ROOMS" HideCondition="OS_HAS_FILE" />
296
294
- <Control Id="ProxyLabel" Type="Text" X="10" Y="130" Width="55" Height="15" Text="Proxy URL:" />
295
- <Control Id="Proxy" Type="Edit" X="65" Y="130" Width="290" Height="18" Property="PROXY" />
297
+ <Control Id="ProxyLabel" Type="Text" X="10" Y="130" Width="55" Height="15" Text="Proxy URL:" HideCondition="OS_HAS_FILE" />
298
+ <Control Id="Proxy" Type="Edit" X="65" Y="130" Width="290" Height="18" Property="PROXY" HideCondition="OS_HAS_FILE" />
299
297
- <Control Id="URLLabel" Type="Text" X="10" Y="145" Width="55" Height="15" Text="Cloud URL:" />
298
- <Control Id="URL" Type="Edit" X="65" Y="145" Width="290" Height="18" Property="URL" />
300
+ <Control Id="URLLabel" Type="Text" X="10" Y="145" Width="55" Height="15" Text="Cloud URL:" HideCondition="OS_HAS_FILE" />
301
+ <Control Id="URL" Type="Edit" X="65" Y="145" Width="290" Height="18" Property="URL" HideCondition="OS_HAS_FILE" />
302
300
- <Control Id="InsecureCheckbox" Type="CheckBox" X="10" Y="160" Width="290" Height="15" Property="INSECURE" CheckBoxValue="0" Text="Insecure" />
303
+ <Control Id="InsecureCheckbox" Type="CheckBox" X="10" Y="160" Width="290" Height="15" Property="INSECURE" CheckBoxValue="0" Text="Insecure" HideCondition="OS_HAS_FILE" />
304
305
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
306
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />