├── .gitignore ├── LICENSE ├── README.md ├── config └── config.js ├── fetchMetadata.js ├── installer ├── CustomActions │ ├── CustomAction.config │ ├── CustomAction.cs │ ├── CustomActions.csproj │ ├── Helpers │ │ ├── Crypto.cs │ │ ├── Helpers.cs │ │ └── RSAParameterTraits.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Resources │ │ └── Telemetry Dashboard.qvf │ └── packages.config ├── License.rtf ├── Product.wxs ├── WixUI_en-us.wxl ├── ca.wxs ├── dialog.bmp ├── installer.sln ├── installer.wixproj └── packages.config ├── lib ├── getApps.js ├── getAppsEngine.js ├── getCustomPropertiesForEntity.js ├── getCustomPropertyDefinitions.js ├── getLogLevels.js ├── getSheets.js ├── getSysInfo.js ├── getUsers.js ├── stringExtensions.js ├── writeCSV.js └── writeHeaders.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | # vscode settings 64 | .vscode/ 65 | 66 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 67 | [Bb]in/ 68 | [Oo]bj/ 69 | 70 | # mstest test results 71 | TestResults 72 | 73 | ## Ignore Visual Studio temporary files, build results, and 74 | ## files generated by popular Visual Studio add-ons. 75 | 76 | # User-specific files 77 | *.suo 78 | *.user 79 | *.sln.docstates 80 | 81 | # Build results 82 | [Dd]ebug/ 83 | [Rr]elease/ 84 | x64/ 85 | *_i.c 86 | *_p.c 87 | *.ilk 88 | *.meta 89 | *.obj 90 | *.pch 91 | *.pdb 92 | *.pgc 93 | *.pgd 94 | *.rsp 95 | *.sbr 96 | *.tlb 97 | *.tli 98 | *.tlh 99 | *.tmp 100 | *.log 101 | *.vspscc 102 | *.vssscc 103 | .builds 104 | 105 | # Visual C++ cache files 106 | ipch/ 107 | *.aps 108 | *.ncb 109 | *.opensdf 110 | *.sdf 111 | 112 | # Visual Studio profiler 113 | *.psess 114 | *.vsp 115 | *.vspx 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper* 122 | 123 | # NCrunch 124 | *.ncrunch* 125 | .*crunch*.local.xml 126 | 127 | # Installshield output folder 128 | [Ee]xpress 129 | 130 | # DocProject is a documentation generator add-in 131 | DocProject/buildhelp/ 132 | DocProject/Help/*.HxT 133 | DocProject/Help/*.HxC 134 | DocProject/Help/*.hhc 135 | DocProject/Help/*.hhk 136 | DocProject/Help/*.hhp 137 | DocProject/Help/Html2 138 | DocProject/Help/html 139 | 140 | # Click-Once directory 141 | publish 142 | 143 | # Publish Web Output 144 | *.Publish.xml 145 | 146 | # NuGet Packages Directory 147 | packages 148 | 149 | # Windows Azure Build Output 150 | csx 151 | *.build.csdef 152 | 153 | # Windows Store app package directory 154 | AppPackages/ 155 | 156 | # Others 157 | [Bb]in 158 | [Oo]bj 159 | sql 160 | TestResults 161 | [Tt]est[Rr]esult* 162 | *.Cache 163 | ClientBin 164 | [Ss]tyle[Cc]op.* 165 | ~$* 166 | *.dbmdl 167 | Generated_Code #added for RIA/Silverlight projects 168 | 169 | # Backup & report files from converting an old project file to a newer 170 | # Visual Studio version. Backup files are not needed, because we have git ;-) 171 | _UpgradeReport_Files/ 172 | Backup*/ 173 | UpgradeLog*.XML 174 | 175 | *.zip -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Status 2 | [![Project Status: Moved to https://github.com/eapowertools/qs-telemetry-dashboard – The project has been moved to a new location, and the version at that location should be considered authoritative.](https://www.repostatus.org/badges/latest/moved.svg)](https://www.repostatus.org/#moved) to [https://github.com/eapowertools/qs-telemetry-dashboard](https://github.com/eapowertools/qs-telemetry-dashboard) 3 | 4 | # Telemetry Dashboard for Qlik Sense 5 | #### Download Latest [Here](https://github.com/eapowertools/qs-telemetry-dashboard/releases/latest) 6 | With the February 2018 of Qlik Sense, it is possible to capture granular usage metrics from the QIX in-memory engine based on configurable thresholds. This provides the ability to capture CPU and RAM utilization of individual chart objects, CPU and RAM utilization of reload tasks, and more. 7 | 8 | ### Requirements 9 | - Qlik Sense Enterprise February 2018 or later 10 | - Enable Telemetry Logging, instructions can be found on the [wiki](https://github.com/eapowertools/qs-telemetry-dashboard/wiki) 11 | 12 | ### Documentation 13 | - All information (including installing, logging and uninstall) can be found the [wiki page](https://github.com/eapowertools/qs-telemetry-dashboard/wiki). The sidebar is used for navigation. 14 | -------------------------------------------------------------------------------- /config/config.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | global: { 3 | delimiter: '`', 4 | hostname: 'localhost', 5 | userDirectory: 'INTERNAL', 6 | userId: 'sa_api', 7 | certificatesPath: './certs/' 8 | }, 9 | engine: { 10 | port: 4747, 11 | schemaPath: 'enigma.js/schemas/12.20.0.json' 12 | }, 13 | repository: { 14 | port: 4242 15 | }, 16 | filenames: { 17 | outputDir: "outputFolderPlaceholder", 18 | outputStatus_table: "outputStatus.csv", 19 | apps_table: "apps.csv", 20 | sheets_table: "sheets.csv", 21 | users_table: "users.csv", 22 | visualizations_table: "visualizations.csv", 23 | customPropertyDefinitions_table: "customPropertyDefinitions.csv", 24 | entityCustomPropertyMap_table: "entity_customProperty.csv", 25 | logLevel_table: "logLevels.csv", 26 | systemInfo_table: "systemInfo.csv" 27 | } 28 | }; 29 | 30 | module.exports = config; -------------------------------------------------------------------------------- /fetchMetadata.js: -------------------------------------------------------------------------------- 1 | const enigma = require('enigma.js'); 2 | const WebSocket = require('ws'); 3 | const path = require('path'); 4 | const fs = require('fs') 5 | const promise = require('bluebird'); 6 | const qrsInteract = require('qrs-interact'); 7 | 8 | const config = require('./config/config.js'); 9 | 10 | // load libraries 11 | const schema = require(config.engine.schemaPath); 12 | const stringExtensions = require('./lib/stringExtensions'); 13 | const writeHeaders = require('./lib/writeHeaders'); 14 | const sysInfo = require('./lib/getSysInfo'); 15 | const customPropertyDefinitions = require('./lib/getCustomPropertyDefinitions'); 16 | const entityCustomPropertyValues = require('./lib/getCustomPropertiesForEntity'); 17 | const logLevels = require('./lib/getLogLevels'); 18 | const users = require('./lib/getUsers'); 19 | const sheets = require('./lib/getSheets'); 20 | const apps = require('./lib/getApps'); 21 | const appsEngine = require('./lib/getAppsEngine'); 22 | var writeCSV = require('./lib/writeCSV'); 23 | 24 | stringExtensions(); 25 | 26 | // repository connection setup 27 | var qrsConfig = { 28 | hostname: config.global.hostname, 29 | certificates: { 30 | certFile: (path.isAbsolute(config.global.certificatesPath) ? config.global.certificatesPath : path.join(__dirname, config.global.certificatesPath)) + "client.pem", 31 | keyFile: (path.isAbsolute(config.global.certificatesPath) ? config.global.certificatesPath : path.join(__dirname, config.global.certificatesPath)) + "client_key.pem" 32 | } 33 | } 34 | var qrsInteractInstance = new qrsInteract(qrsConfig); 35 | 36 | 37 | // Helper function to read the contents of the certificate files: 38 | const readCert = filename => fs.readFileSync((path.isAbsolute(config.global.certificatesPath) ? config.global.certificatesPath : path.join(__dirname, config.global.certificatesPath)) + filename); 39 | 40 | // App specific session func 41 | function createSession(appId) { 42 | return enigma.create({ 43 | schema, 44 | url: `wss://${config.global.hostname}:${config.engine.port}/app/${appId}`, 45 | createSocket: url => new WebSocket(url, { 46 | ca: [readCert('root.pem')], 47 | key: readCert('client_key.pem'), 48 | cert: readCert('client.pem'), 49 | headers: { 50 | 'X-Qlik-User': `UserDirectory=${encodeURIComponent(config.global.userDirectory)}; UserId=${encodeURIComponent(config.global.userId)}`, 51 | }, 52 | rejectUnauthorized: false 53 | }), 54 | }); 55 | } 56 | 57 | // session app object to reuse later 58 | var sessionObjectParams = { 59 | "qInfo": { 60 | "qType": "SheetList" 61 | }, 62 | "qAppObjectListDef": { 63 | "qType": "sheet", 64 | "qData": { 65 | "title": "/qMetaDef/title", 66 | "description": "/qMetaDef/description", 67 | "thumbnail": "/thumbnail", 68 | "cells": "/cells", 69 | "rank": "/rank", 70 | "columns": "/columns", 71 | "rows": "/rows" 72 | } 73 | } 74 | }; 75 | 76 | // Start making requests and building metadata files 77 | // create output folder if it doesn't exist 78 | try { 79 | fs.mkdirSync(config.filenames.outputDir); 80 | } catch (err) { 81 | console.log("Output folder already created."); 82 | } 83 | 84 | // delete all files in folder 85 | var files = fs.readdirSync(config.filenames.outputDir) 86 | files.forEach(function(file) { 87 | fs.unlinkSync(path.join(config.filenames.outputDir, file)); 88 | }); 89 | 90 | writeHeaders.writeAllHeaders(config.filenames.outputDir); 91 | 92 | var systemInfoPath = path.join(config.filenames.outputDir, config.filenames.systemInfo_table); 93 | sysInfo.writeToFile(qrsInteractInstance, systemInfoPath); 94 | 95 | var customPropertyDefinitionPath = path.join(config.filenames.outputDir, config.filenames.customPropertyDefinitions_table); 96 | customPropertyDefinitions.writeToFile(qrsInteractInstance, customPropertyDefinitionPath); 97 | 98 | var customPropertiesPath = path.join(config.filenames.outputDir, config.filenames.entityCustomPropertyMap_table); 99 | entityCustomPropertyValues.writeToFile(qrsInteractInstance, "app", customPropertiesPath); 100 | 101 | var logLevelsPath = path.join(config.filenames.outputDir, config.filenames.logLevel_table); 102 | logLevels.writeToFile(qrsInteractInstance, logLevelsPath); 103 | 104 | var usersPath = path.join(config.filenames.outputDir, config.filenames.users_table); 105 | users.writeToFile(qrsInteractInstance, usersPath).then(() => { 106 | var sheetsPath = path.join(config.filenames.outputDir, config.filenames.sheets_table); 107 | return sheets.writeToFile(qrsInteractInstance, sheetsPath).then(() => { 108 | var appsPath = path.join(config.filenames.outputDir, config.filenames.apps_table); 109 | return apps.writeToFile(qrsInteractInstance, appsPath).then(function(ids) { 110 | var visualizationsPath = path.join(config.filenames.outputDir, config.filenames.visualizations_table); 111 | var dataMatrix = []; 112 | return promise.each(ids, (element, index) => { 113 | console.log("Getting data for app: " + element); 114 | var appSession = createSession(element); 115 | var dataRow = []; 116 | dataRow.push(element); 117 | dataRow.push(new Date().toJSON()); 118 | return appsEngine.writeToFile(appSession, element, sessionObjectParams, visualizationsPath).then(function() { 119 | console.log("Done app " + (index + 1) + " of " + ids.length); 120 | dataRow.push("Success"); 121 | dataRow.push("OK"); 122 | }).catch(function(err) { 123 | dataRow.push("Fail"); 124 | dataRow.push(err); 125 | }).then(function() { 126 | dataMatrix.push(dataRow); 127 | }); 128 | }).then(function() { 129 | writeCSV.writeDataToFile(path.join(config.filenames.outputDir, config.filenames.outputStatus_table), dataMatrix); 130 | }); 131 | }); 132 | }); 133 | }).then(() => { 134 | console.log("Writing files is done."); 135 | }); -------------------------------------------------------------------------------- /installer/CustomActions/CustomAction.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /installer/CustomActions/CustomAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Security.Cryptography; 7 | using System.Security.Cryptography.X509Certificates; 8 | using System.Text; 9 | using System.Text.RegularExpressions; 10 | using System.Threading.Tasks; 11 | using CustomActions.Helpers; 12 | using Microsoft.Deployment.WindowsInstaller; 13 | using Newtonsoft.Json; 14 | using Newtonsoft.Json.Linq; 15 | 16 | namespace CustomActions 17 | { 18 | enum HTTPContentType 19 | { 20 | json, 21 | app 22 | } 23 | 24 | public class CustomActions 25 | { 26 | private static Lazy HOSTNAME = new Lazy(GetHostnameFromConfig); 27 | private static Lazy SENSE_CERT = new Lazy(SetTLSandGetCertificate); 28 | private static string OUTPUT_FOLDER = "TelemetryDashboard"; 29 | private static string JS_LIBRARY_FOLDER = "MetadataGenerater"; 30 | private static string METADATA_OUTPUT = "MetadataOutput"; 31 | 32 | private static Tuple MakeQrsRequest(string path, HttpMethod method, HTTPContentType contentType = HTTPContentType.json, byte[] body = null) 33 | { 34 | // Fix Path 35 | if (!path.StartsWith("/")) 36 | { 37 | path = '/' + path; 38 | } 39 | if (path.EndsWith("/")) 40 | { 41 | path = path.Substring(0, path.Length - 1); 42 | } 43 | int indexOfSlash = path.LastIndexOf('/'); 44 | int indexOfQuery = path.LastIndexOf('?'); 45 | if (indexOfQuery <= indexOfSlash) 46 | { 47 | path += "?"; 48 | } 49 | else 50 | { 51 | path += "&"; 52 | } 53 | 54 | string responseString = ""; 55 | HttpStatusCode responseCode = 0; 56 | string xrfkey = "0123456789abcdef"; 57 | 58 | ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; 59 | ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11; 60 | 61 | HttpRequestMessage req = new HttpRequestMessage(); 62 | req.RequestUri = new Uri(@"https://" + HOSTNAME.Value + ":4242/qrs" + path + "xrfkey=" + xrfkey); 63 | req.Method = method; 64 | req.Headers.Add("X-Qlik-xrfkey", xrfkey); 65 | req.Headers.Add("X-Qlik-User", @"UserDirectory=internal;UserId=sa_api"); 66 | 67 | WebRequestHandler handler = new WebRequestHandler(); 68 | handler.ClientCertificates.Add(SENSE_CERT.Value); 69 | 70 | if (method == HttpMethod.Post || method == HttpMethod.Put) 71 | { 72 | req.Content = new ByteArrayContent(body); 73 | 74 | // Set Headers 75 | if (contentType == HTTPContentType.json) 76 | { 77 | req.Content.Headers.Remove("Content-Type"); 78 | req.Content.Headers.Add("Content-Type", "application/json"); 79 | 80 | } 81 | else if (contentType == HTTPContentType.app) 82 | { 83 | req.Content.Headers.Remove("Content-Type"); 84 | req.Content.Headers.Add("Content-Type", "application/vnd.qlik.sense.app"); 85 | } 86 | else 87 | { 88 | throw new ArgumentException("Content type '" + contentType.ToString() + "' is not supported."); 89 | } 90 | } 91 | 92 | using (HttpClient client = new HttpClient(handler)) 93 | { 94 | client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); 95 | try 96 | { 97 | Task responseTask = client.SendAsync(req); 98 | responseTask.Wait(); 99 | responseTask.Result.EnsureSuccessStatusCode(); 100 | responseCode = responseTask.Result.StatusCode; 101 | Task responseBodyTask = responseTask.Result.Content.ReadAsStringAsync(); 102 | responseBodyTask.Wait(); 103 | responseString = responseBodyTask.Result; 104 | } 105 | catch (Exception e) 106 | { 107 | if (responseCode != 0) 108 | { 109 | return new Tuple(responseCode, e.Message); 110 | } 111 | else 112 | { 113 | return new Tuple(HttpStatusCode.InternalServerError, e.Message); 114 | 115 | } 116 | } 117 | } 118 | 119 | return new Tuple(responseCode, responseString); 120 | } 121 | 122 | [CustomAction] 123 | public static ActionResult ValidateInstallDir(Session session) 124 | { 125 | string installDir = session["INSTALLFOLDER"]; 126 | session.Log("Install directory to validate: " + installDir); 127 | 128 | if (!installDir.EndsWith("\\")) 129 | { 130 | installDir += "\\"; 131 | } 132 | 133 | try 134 | { 135 | if (!Regex.IsMatch(installDir.Substring(0, 3), "\\\\[a-zA-Z0-9]")) 136 | { 137 | throw new ArgumentException("Installer path must be a network locattion (start with \"\\\\\")."); 138 | } 139 | 140 | if (!installDir.EndsWith("\\" + OUTPUT_FOLDER + "\\")) 141 | { 142 | throw new ArgumentException("Telemetry Dashboard but be installed to \"" + OUTPUT_FOLDER + "\" folder on share (installer directory must end with \"\\" + OUTPUT_FOLDER + "\")."); 143 | } 144 | 145 | installDir = installDir.Substring(0, installDir.Length - (OUTPUT_FOLDER.Length + 1)); 146 | 147 | string[] dirs = Directory.GetDirectories(installDir); 148 | for (int i = 0; i < dirs.Length; i++) 149 | { 150 | dirs[i] = dirs[i].Substring(installDir.Length); 151 | } 152 | 153 | if (!(dirs.Contains("Apps") || dirs.Contains("ArchivedLogs") || dirs.Contains("CustomData") || dirs.Contains("StaticContent"))) 154 | { 155 | session.Message(InstallMessage.Warning, new Record() { FormatString = "Installer did not find an 'Apps', 'StaticContent', 'ArchivedLogs' or 'StaticContent' folder. Install will proceed but Telemetry Dashboard may not function if not installed in root Qlik Sense share folder." }); 156 | } 157 | } 158 | catch (ArgumentException e) 159 | { 160 | session.Message(InstallMessage.Error, new Record() { FormatString = "The install directory was not valid:\n" + e.Message }); 161 | return ActionResult.Failure; 162 | } 163 | catch (Exception e) 164 | { 165 | session.Message(InstallMessage.Error, new Record() { FormatString = "The install directory validation failed:\n" + e.Message }); 166 | return ActionResult.Failure; 167 | } 168 | 169 | return ActionResult.Success; 170 | } 171 | 172 | [CustomAction] 173 | public static ActionResult SetOutputDir(Session session) 174 | { 175 | string installDir = session.CustomActionData["InstallDir"]; 176 | string outputDir = Path.Combine(installDir, METADATA_OUTPUT); 177 | 178 | outputDir = outputDir.Replace('\\', '/'); 179 | if (!outputDir.EndsWith("/")) 180 | { 181 | outputDir += '/'; 182 | } 183 | string text = File.ReadAllText(installDir + JS_LIBRARY_FOLDER + "\\config\\config.js"); 184 | text = text.Replace("outputFolderPlaceholder", outputDir); 185 | File.WriteAllText(installDir + JS_LIBRARY_FOLDER + "\\config\\config.js", text); 186 | 187 | return ActionResult.Success; 188 | } 189 | 190 | [CustomAction] 191 | public static ActionResult IsRepositoryRunning(Session session) 192 | { 193 | session.Log("Making a request to 'https://{0}:4242", HOSTNAME.Value); 194 | Tuple response = MakeQrsRequest("/about", HttpMethod.Get); 195 | if (response.Item1 == HttpStatusCode.OK) 196 | { 197 | return ActionResult.Success; 198 | } 199 | else 200 | { 201 | session.Log("IsRepositoryRunning custom action failed."); 202 | session.Log("Response was: {0}", response.Item1.ToString()); 203 | 204 | session.Message(InstallMessage.Error, new Record() { FormatString = "Cannot install the Telemetry Dashboard as the installer could not contact the 'Qlik Repository Service'. Response code was: " + response.Item1.ToString() }); 205 | return ActionResult.Failure; 206 | } 207 | } 208 | 209 | [CustomAction] 210 | public static ActionResult ImportApp(Session session) 211 | { 212 | Tuple apps = MakeQrsRequest("/app/full?filter=name eq 'Telemetry Dashboard'", HttpMethod.Get); 213 | if (apps.Item1 != HttpStatusCode.OK) 214 | { 215 | return ActionResult.Failure; 216 | } 217 | 218 | JArray listOfApps = JArray.Parse(apps.Item2); 219 | 220 | if (listOfApps.Count == 1) 221 | { 222 | string appID = listOfApps[0]["id"].ToString(); 223 | Tuple replaceAppResponse = MakeQrsRequest("/app/upload/replace?targetappid=" + appID, HttpMethod.Post, HTTPContentType.app, Properties.Resources.Telemetry_Dashboard); 224 | if (replaceAppResponse.Item1 == HttpStatusCode.Created) 225 | { 226 | return ActionResult.Success; 227 | } 228 | } 229 | 230 | else 231 | { 232 | if (listOfApps.Count > 1) 233 | { 234 | for (int i = 0; i < listOfApps.Count; i++) 235 | { 236 | listOfApps[i]["name"] = listOfApps[i]["name"] + "-old"; 237 | listOfApps[i]["modifiedDate"] = DateTime.UtcNow.ToString("s") + "Z"; 238 | string appId = listOfApps[i]["id"].ToString(); 239 | Tuple updatedApp = MakeQrsRequest("/app/" + appId, HttpMethod.Put, HTTPContentType.json, Encoding.UTF8.GetBytes(listOfApps[i].ToString())); 240 | if (updatedApp.Item1 != HttpStatusCode.OK) 241 | { 242 | return ActionResult.Failure; 243 | } 244 | } 245 | } 246 | 247 | Tuple uploadAppResponse = MakeQrsRequest("/app/upload?name=Telemetry Dashboard", HttpMethod.Post, HTTPContentType.app, Properties.Resources.Telemetry_Dashboard); 248 | if (uploadAppResponse.Item1 == HttpStatusCode.Created) 249 | { 250 | return ActionResult.Success; 251 | } 252 | } 253 | return ActionResult.Failure; 254 | } 255 | 256 | [CustomAction] 257 | public static ActionResult CreateTasks(Session session) 258 | { 259 | string installDir = session.CustomActionData["InstallDir"]; 260 | if (!installDir.EndsWith("\\")) 261 | { 262 | installDir += "\\"; 263 | } 264 | 265 | string externalTaskID = ""; 266 | // External Task 267 | Tuple hasExternalTask = MakeQrsRequest("/externalprogramtask/count?filter=name eq 'TelemetryDashboard-1-Generate-Metadata'", HttpMethod.Get); 268 | if (hasExternalTask.Item1 != HttpStatusCode.OK) 269 | { 270 | return ActionResult.Failure; 271 | } 272 | if (JObject.Parse(hasExternalTask.Item2)["value"].ToObject() == 0) 273 | { 274 | installDir = installDir.Replace("\\", "\\\\"); 275 | string body = @" 276 | { 277 | 'path': '..\\ServiceDispatcher\\Node\\node.exe', 278 | 'parameters': '""" + Path.Combine(installDir, JS_LIBRARY_FOLDER) + @"\\fetchMetadata.js""', 279 | 'name': 'TelemetryDashboard-1-Generate-Metadata', 280 | 'taskType': 1, 281 | 'enabled': true, 282 | 'taskSessionTimeout': 1440, 283 | 'maxRetries': 0, 284 | 'impactSecurityAccess': false, 285 | 'schemaPath': 'ExternalProgramTask' 286 | }"; 287 | Tuple createExternalTask = MakeQrsRequest("/externalprogramtask", HttpMethod.Post, HTTPContentType.json, Encoding.UTF8.GetBytes(body)); 288 | if (createExternalTask.Item1 != HttpStatusCode.Created) 289 | { 290 | return ActionResult.Failure; 291 | } 292 | else 293 | { 294 | externalTaskID = JObject.Parse(createExternalTask.Item2)["id"].ToString(); 295 | } 296 | } 297 | else 298 | { 299 | Tuple getExternalTaskId = MakeQrsRequest("/externalprogramtask?filter=name eq 'TelemetryDashboard-1-Generate-Metadata'", HttpMethod.Get); 300 | externalTaskID = JArray.Parse(getExternalTaskId.Item2)[0]["id"].ToString(); 301 | 302 | } 303 | 304 | // Reload Task 305 | Tuple reloadTasks = MakeQrsRequest("/reloadtask/full?filter=name eq 'TelemetryDashboard-2-Reload-Dashboard'", HttpMethod.Get); 306 | if (reloadTasks.Item1 != HttpStatusCode.OK) 307 | { 308 | return ActionResult.Failure; 309 | } 310 | 311 | JArray listOfTasks = JArray.Parse(reloadTasks.Item2); 312 | 313 | // Get AppID for Telemetry Dashboard App 314 | Tuple getAppID = MakeQrsRequest("/app?filter=name eq 'Telemetry Dashboard'", HttpMethod.Get); 315 | string appId = JArray.Parse(getAppID.Item2)[0]["id"].ToString(); 316 | 317 | if (listOfTasks.Count == 0) 318 | { 319 | string body = @" 320 | { 321 | 'compositeEvents': [ 322 | { 323 | 'compositeRules': [ 324 | { 325 | 'externalProgramTask': { 326 | 'id': '" + externalTaskID + @"', 327 | 'name': 'TelemetryDashboard-1-Generate-Metadata' 328 | }, 329 | 'ruleState': 1 330 | } 331 | ], 332 | 'enabled': true, 333 | 'eventType': 1, 334 | 'name': 'telemetry-metadata-trigger', 335 | 'privileges': [ 336 | 'read', 337 | 'update', 338 | 'create', 339 | 'delete' 340 | ], 341 | 'timeConstraint': { 342 | 'days': 0, 343 | 'hours': 0, 344 | 'minutes': 360, 345 | 'seconds': 0 346 | } 347 | } 348 | ], 349 | 'schemaEvents': [], 350 | 'task': { 351 | 'app': { 352 | 'id': '" + appId + @"', 353 | 'name': 'Telemetry Dashboard' 354 | }, 355 | 'customProperties': [], 356 | 'enabled': true, 357 | 'isManuallyTriggered': false, 358 | 'maxRetries': 0, 359 | 'name': 'TelemetryDashboard-2-Reload-Dashboard', 360 | 'tags': [], 361 | 'taskSessionTimeout': 1440, 362 | 'taskType': 0 363 | } 364 | }"; 365 | 366 | Tuple importExtensionResponse = MakeQrsRequest("/reloadtask/create", HttpMethod.Post, HTTPContentType.json, Encoding.UTF8.GetBytes(body)); 367 | if (importExtensionResponse.Item1 != HttpStatusCode.Created) 368 | { 369 | return ActionResult.Failure; 370 | } 371 | } 372 | else 373 | { 374 | listOfTasks[0]["app"] = JObject.Parse(@"{ 'id': '" + appId + "'}"); 375 | listOfTasks[0]["modifiedDate"] = DateTime.UtcNow.ToString("s") + "Z"; 376 | string reloadTaskID = listOfTasks[0]["id"].ToString(); 377 | Tuple updatedApp = MakeQrsRequest("/reloadtask/" + reloadTaskID, HttpMethod.Put, HTTPContentType.json, Encoding.UTF8.GetBytes(listOfTasks[0].ToString())); 378 | if (updatedApp.Item1 != HttpStatusCode.OK) 379 | { 380 | return ActionResult.Failure; 381 | } 382 | } 383 | 384 | return ActionResult.Success; 385 | } 386 | 387 | [CustomAction] 388 | public static ActionResult CreateDataConnections(Session session) 389 | { 390 | string installDir = session.CustomActionData["InstallDir"]; 391 | installDir = installDir.Replace("\\", "\\\\"); 392 | 393 | // Add TelemetryMetadata dataconnection 394 | Tuple dataConnections = MakeQrsRequest("/dataconnection?filter=name eq 'TelemetryMetadata'", HttpMethod.Get); 395 | if (dataConnections.Item1 != HttpStatusCode.OK) 396 | { 397 | return ActionResult.Failure; 398 | } 399 | JArray listOfDataconnections = JArray.Parse(dataConnections.Item2); 400 | if (listOfDataconnections.Count == 0) 401 | { 402 | string body = @" 403 | { 404 | 'name': 'TelemetryMetadata', 405 | 'connectionstring': '" + installDir + METADATA_OUTPUT + @"\\', 406 | 'type': 'folder', 407 | 'username': '' 408 | }"; 409 | 410 | 411 | Tuple createdConnection = MakeQrsRequest("/dataconnection", HttpMethod.Post, HTTPContentType.json, Encoding.UTF8.GetBytes(body)); 412 | if (createdConnection.Item1 != HttpStatusCode.Created) 413 | { 414 | return ActionResult.Failure; 415 | } 416 | } 417 | else 418 | { 419 | installDir = installDir.Replace("\\\\", "\\"); 420 | listOfDataconnections[0]["connectionstring"] = installDir + METADATA_OUTPUT + "\\"; 421 | listOfDataconnections[0]["modifiedDate"] = DateTime.UtcNow.ToString("s") + "Z"; 422 | string appId = listOfDataconnections[0]["id"].ToString(); 423 | Tuple updatedConnection = MakeQrsRequest("/dataconnection/" + appId, HttpMethod.Put, HTTPContentType.json, Encoding.UTF8.GetBytes(listOfDataconnections[0].ToString())); 424 | if (updatedConnection.Item1 != HttpStatusCode.OK) 425 | { 426 | return ActionResult.Failure; 427 | } 428 | } 429 | 430 | // Add EngineSettings dataconnection 431 | Tuple engineSettingDataconnection = MakeQrsRequest("/dataconnection?filter=name eq 'EngineSettingsFolder'", HttpMethod.Get); 432 | if (dataConnections.Item1 != HttpStatusCode.OK) 433 | { 434 | return ActionResult.Failure; 435 | } 436 | listOfDataconnections = JArray.Parse(engineSettingDataconnection.Item2); 437 | if (listOfDataconnections.Count == 0) 438 | { 439 | string body = @" 440 | { 441 | 'name': 'EngineSettingsFolder', 442 | 'connectionstring': 'C:\\ProgramData\\Qlik\\Sense\\Engine\\', 443 | 'type': 'folder', 444 | 'username': '' 445 | }"; 446 | 447 | Tuple createdConnection = MakeQrsRequest("/dataconnection", HttpMethod.Post, HTTPContentType.json, Encoding.UTF8.GetBytes(body)); 448 | if (createdConnection.Item1 != HttpStatusCode.Created) 449 | { 450 | return ActionResult.Failure; 451 | } 452 | } 453 | 454 | return ActionResult.Success; 455 | } 456 | 457 | [CustomAction] 458 | public static ActionResult CopyCertificates(Session session) 459 | { 460 | string installDir = session.CustomActionData["InstallDir"]; 461 | File.Copy(@"C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\.Local Certificates\root.pem", Path.Combine(installDir, JS_LIBRARY_FOLDER, "certs\\root.pem"), true); 462 | File.Copy(@"C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\.Local Certificates\client.pem", Path.Combine(installDir, JS_LIBRARY_FOLDER, "certs\\client.pem"), true); 463 | File.Copy(@"C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\.Local Certificates\client_key.pem", Path.Combine(installDir, JS_LIBRARY_FOLDER, "certs\\client_key.pem"), true); 464 | 465 | return ActionResult.Success; 466 | } 467 | 468 | [CustomAction] 469 | public static ActionResult RemoveTasks(Session session) 470 | { 471 | Tuple getReloadTaskId = MakeQrsRequest("/reloadtask?filter=name eq 'TelemetryDashboard-2-Reload-Dashboard'", HttpMethod.Get); 472 | if (getReloadTaskId.Item1 == HttpStatusCode.OK) 473 | { 474 | JArray reloadTasks = JArray.Parse(getReloadTaskId.Item2); 475 | foreach (JToken t in reloadTasks) 476 | { 477 | MakeQrsRequest("/reloadtask/" + t["id"], HttpMethod.Delete); 478 | } 479 | } 480 | 481 | Tuple getExternalTaskId = MakeQrsRequest("/externalprogramtask?filter=name eq 'TelemetryDashboard-1-Generate-Metadata'", HttpMethod.Get); 482 | if (getExternalTaskId.Item1 == HttpStatusCode.OK) 483 | { 484 | JArray externalTasks = JArray.Parse(getExternalTaskId.Item2); 485 | foreach (JToken t in externalTasks) 486 | { 487 | MakeQrsRequest("/externalprogramtask/" + t["id"], HttpMethod.Delete); 488 | } 489 | } 490 | 491 | return ActionResult.Success; 492 | } 493 | 494 | private static X509Certificate2 SetTLSandGetCertificate() 495 | { 496 | ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; 497 | var clientPem = File.ReadAllText(@"C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\.Local Certificates\client.pem"); 498 | var clientKeyPem = File.ReadAllText(@"C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\.Local Certificates\client_key.pem"); 499 | byte[] certBuffer = HelperFunctions.GetBytesFromPEM(clientPem, Helpers.PemStringType.Certificate); 500 | byte[] certKeyBuffer = HelperFunctions.GetBytesFromPEM(clientKeyPem, Helpers.PemStringType.RsaPrivateKey); 501 | 502 | X509Certificate2 cert = new X509Certificate2(certBuffer); 503 | 504 | RSACryptoServiceProvider provider = Crypto.DecodeRsaPrivateKey(certKeyBuffer); 505 | cert.PrivateKey = provider; 506 | return cert; 507 | } 508 | 509 | private static string GetHostnameFromConfig() 510 | { 511 | string hostnameBase64 = File.ReadAllText(@"C:\ProgramData\Qlik\Sense\Host.cfg"); 512 | byte[] data = Convert.FromBase64String(hostnameBase64); 513 | string hostname = Encoding.ASCII.GetString(data); 514 | return hostname; 515 | } 516 | } 517 | } 518 | -------------------------------------------------------------------------------- /installer/CustomActions/CustomActions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x86 7 | 8.0.30703 8 | 2.0 9 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A} 10 | Library 11 | Properties 12 | CustomActions 13 | CustomActions 14 | v4.5.2 15 | 512 16 | 17 | 18 | 19 | 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | true 38 | bin\x64\Debug\ 39 | DEBUG;TRACE 40 | full 41 | x64 42 | prompt 43 | MinimumRecommendedRules.ruleset 44 | 45 | 46 | bin\x64\Release\ 47 | TRACE 48 | true 49 | pdbonly 50 | x64 51 | prompt 52 | MinimumRecommendedRules.ruleset 53 | 54 | 55 | 56 | ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | True 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | True 77 | True 78 | Resources.resx 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | ResXFileCodeGenerator 89 | Resources.Designer.cs 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /installer/CustomActions/Helpers/Crypto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Security.Cryptography; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace CustomActions.Helpers 11 | { 12 | internal class Crypto 13 | { 14 | /// 15 | /// This helper function parses an RSA private key using the ASN.1 format 16 | /// 17 | /// Byte array containing PEM string of private key. 18 | /// An instance of rapresenting the requested private key. 19 | /// Null if method fails on retriving the key. 20 | public static RSACryptoServiceProvider DecodeRsaPrivateKey(byte[] privateKeyBytes) 21 | { 22 | MemoryStream ms = new MemoryStream(privateKeyBytes); 23 | BinaryReader rd = new BinaryReader(ms); 24 | 25 | try 26 | { 27 | byte byteValue; 28 | ushort shortValue; 29 | 30 | shortValue = rd.ReadUInt16(); 31 | 32 | switch (shortValue) 33 | { 34 | case 0x8130: 35 | // If true, data is little endian since the proper logical seq is 0x30 0x81 36 | rd.ReadByte(); //advance 1 byte 37 | break; 38 | case 0x8230: 39 | rd.ReadInt16(); //advance 2 bytes 40 | break; 41 | default: 42 | Debug.Assert(false); // Improper ASN.1 format 43 | return null; 44 | } 45 | 46 | shortValue = rd.ReadUInt16(); 47 | if (shortValue != 0x0102) // (version number) 48 | { 49 | Debug.Assert(false); // Improper ASN.1 format, unexpected version number 50 | return null; 51 | } 52 | 53 | byteValue = rd.ReadByte(); 54 | if (byteValue != 0x00) 55 | { 56 | Debug.Assert(false); // Improper ASN.1 format 57 | return null; 58 | } 59 | 60 | // The data following the version will be the ASN.1 data itself, which in our case 61 | // are a sequence of integers. 62 | 63 | // In order to solve a problem with instancing RSACryptoServiceProvider 64 | // via default constructor on .net 4.0 this is a hack 65 | CspParameters parms = new CspParameters(); 66 | parms.Flags = CspProviderFlags.NoFlags; 67 | parms.KeyContainerName = Guid.NewGuid().ToString().ToUpperInvariant(); 68 | parms.ProviderType = ((Environment.OSVersion.Version.Major > 5) || ((Environment.OSVersion.Version.Major == 5) && (Environment.OSVersion.Version.Minor >= 1))) ? 0x18 : 1; 69 | 70 | RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(parms); 71 | RSAParameters rsAparams = new RSAParameters(); 72 | 73 | rsAparams.Modulus = rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)); 74 | 75 | // Argh, this is a pain. From emperical testing it appears to be that RSAParameters doesn't like byte buffers that 76 | // have their leading zeros removed. The RFC doesn't address this area that I can see, so it's hard to say that this 77 | // is a bug, but it sure would be helpful if it allowed that. So, there's some extra code here that knows what the 78 | // sizes of the various components are supposed to be. Using these sizes we can ensure the buffer sizes are exactly 79 | // what the RSAParameters expect. Thanks, Microsoft. 80 | RSAParameterTraits traits = new RSAParameterTraits(rsAparams.Modulus.Length * 8); 81 | 82 | rsAparams.Modulus = HelperFunctions.AlignBytes(rsAparams.Modulus, traits.size_Mod); 83 | rsAparams.Exponent = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_Exp); 84 | rsAparams.D = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_D); 85 | rsAparams.P = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_P); 86 | rsAparams.Q = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_Q); 87 | rsAparams.DP = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_DP); 88 | rsAparams.DQ = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_DQ); 89 | rsAparams.InverseQ = HelperFunctions.AlignBytes(rd.ReadBytes(HelperFunctions.DecodeIntegerSize(rd)), traits.size_InvQ); 90 | 91 | rsa.ImportParameters(rsAparams); 92 | return rsa; 93 | } 94 | catch (Exception) 95 | { 96 | Debug.Assert(false); 97 | return null; 98 | } 99 | finally 100 | { 101 | rd.Close(); 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /installer/CustomActions/Helpers/Helpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CustomActions.Helpers 8 | { 9 | public enum PemStringType 10 | { 11 | Certificate, 12 | RsaPrivateKey 13 | } 14 | 15 | internal class HelperFunctions 16 | { 17 | /// 18 | /// This helper function parses an integer size from the reader using the ASN.1 format 19 | /// 20 | /// 21 | /// 22 | public static int DecodeIntegerSize(System.IO.BinaryReader rd) 23 | { 24 | byte byteValue; 25 | int count; 26 | 27 | byteValue = rd.ReadByte(); 28 | if (byteValue != 0x02) // indicates an ASN.1 integer value follows 29 | return 0; 30 | 31 | byteValue = rd.ReadByte(); 32 | if (byteValue == 0x81) 33 | { 34 | count = rd.ReadByte(); // data size is the following byte 35 | } 36 | else if (byteValue == 0x82) 37 | { 38 | byte hi = rd.ReadByte(); // data size in next 2 bytes 39 | byte lo = rd.ReadByte(); 40 | count = BitConverter.ToUInt16(new[] { lo, hi }, 0); 41 | } 42 | else 43 | { 44 | count = byteValue; // we already have the data size 45 | } 46 | 47 | //remove high order zeros in data 48 | while (rd.ReadByte() == 0x00) 49 | { 50 | count -= 1; 51 | } 52 | rd.BaseStream.Seek(-1, System.IO.SeekOrigin.Current); 53 | 54 | return count; 55 | } 56 | 57 | /// 58 | /// 59 | /// 60 | /// 61 | /// 62 | /// 63 | public static byte[] GetBytesFromPEM(string pemString, PemStringType type) 64 | { 65 | string header; string footer; 66 | 67 | switch (type) 68 | { 69 | case PemStringType.Certificate: 70 | header = "-----BEGIN CERTIFICATE-----"; 71 | footer = "-----END CERTIFICATE-----"; 72 | break; 73 | case PemStringType.RsaPrivateKey: 74 | header = "-----BEGIN RSA PRIVATE KEY-----"; 75 | footer = "-----END RSA PRIVATE KEY-----"; 76 | break; 77 | default: 78 | return null; 79 | } 80 | 81 | int start = pemString.IndexOf(header) + header.Length; 82 | int end = pemString.IndexOf(footer, start) - start; 83 | return Convert.FromBase64String(pemString.Substring(start, end)); 84 | } 85 | 86 | /// 87 | /// 88 | /// 89 | /// 90 | /// 91 | /// 92 | public static byte[] AlignBytes(byte[] inputBytes, int alignSize) 93 | { 94 | int inputBytesSize = inputBytes.Length; 95 | 96 | if ((alignSize != -1) && (inputBytesSize < alignSize)) 97 | { 98 | byte[] buf = new byte[alignSize]; 99 | for (int i = 0; i < inputBytesSize; ++i) 100 | { 101 | buf[i + (alignSize - inputBytesSize)] = inputBytes[i]; 102 | } 103 | return buf; 104 | } 105 | else 106 | { 107 | return inputBytes; // Already aligned, or doesn't need alignment 108 | } 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /installer/CustomActions/Helpers/RSAParameterTraits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CustomActions.Helpers 8 | { 9 | internal class RSAParameterTraits 10 | { 11 | public RSAParameterTraits(int modulusLengthInBits) 12 | { 13 | // The modulus length is supposed to be one of the common lengths, which is the commonly referred to strength of the key, 14 | // like 1024 bit, 2048 bit, etc. It might be a few bits off though, since if the modulus has leading zeros it could show 15 | // up as 1016 bits or something like that. 16 | int assumedLength = -1; 17 | double logbase = Math.Log(modulusLengthInBits, 2); 18 | if (logbase == (int)logbase) 19 | { 20 | // It's already an even power of 2 21 | assumedLength = modulusLengthInBits; 22 | } 23 | else 24 | { 25 | // It's not an even power of 2, so round it up to the nearest power of 2. 26 | assumedLength = (int)(logbase + 1.0); 27 | assumedLength = (int)(Math.Pow(2, assumedLength)); 28 | System.Diagnostics.Debug.Assert(false); // Can this really happen in the field? I've never seen it, so if it happens 29 | // you should verify that this really does the 'right' thing! 30 | } 31 | 32 | switch (assumedLength) 33 | { 34 | case 1024: 35 | this.size_Mod = 0x80; 36 | this.size_Exp = -1; 37 | this.size_D = 0x80; 38 | this.size_P = 0x40; 39 | this.size_Q = 0x40; 40 | this.size_DP = 0x40; 41 | this.size_DQ = 0x40; 42 | this.size_InvQ = 0x40; 43 | break; 44 | case 2048: 45 | this.size_Mod = 0x100; 46 | this.size_Exp = -1; 47 | this.size_D = 0x100; 48 | this.size_P = 0x80; 49 | this.size_Q = 0x80; 50 | this.size_DP = 0x80; 51 | this.size_DQ = 0x80; 52 | this.size_InvQ = 0x80; 53 | break; 54 | case 4096: 55 | this.size_Mod = 0x200; 56 | this.size_Exp = -1; 57 | this.size_D = 0x200; 58 | this.size_P = 0x100; 59 | this.size_Q = 0x100; 60 | this.size_DP = 0x100; 61 | this.size_DQ = 0x100; 62 | this.size_InvQ = 0x100; 63 | break; 64 | default: 65 | System.Diagnostics.Debug.Assert(false); // Unknown key size? 66 | break; 67 | } 68 | } 69 | 70 | public int size_Mod = -1; 71 | public int size_Exp = -1; 72 | public int size_D = -1; 73 | public int size_P = -1; 74 | public int size_Q = -1; 75 | public int size_DP = -1; 76 | public int size_DQ = -1; 77 | public int size_InvQ = -1; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /installer/CustomActions/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CustomActions")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("CustomActions")] 12 | [assembly: AssemblyCopyright("Copyright © 2018")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("dc4f450c-71f1-4748-88e8-1fada6f38b0a")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /installer/CustomActions/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CustomActions.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomActions.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Byte[]. 65 | /// 66 | internal static byte[] Telemetry_Dashboard { 67 | get { 68 | object obj = ResourceManager.GetObject("Telemetry_Dashboard", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /installer/CustomActions/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\Telemetry Dashboard.qvf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | -------------------------------------------------------------------------------- /installer/CustomActions/Resources/Telemetry Dashboard.qvf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eapowertools-archive/qs-telemetry-dashboard-node/b3d3e19875120c96694d7aae32112d7d0af0c054/installer/CustomActions/Resources/Telemetry Dashboard.qvf -------------------------------------------------------------------------------- /installer/CustomActions/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /installer/License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}} 2 | {\colortbl ;\red0\green0\blue255;} 3 | {\*\generator Riched20 10.0.16299}\viewkind4\uc1 4 | \pard\sa200\sl276\slmult1\qc\b\fs24\lang9 GNU GENERAL PUBLIC LICENSE\par 5 | Version 3, 29 June 2007\par 6 | \fs22\par 7 | Copyright \'a9 2007 Free Software Foundation, Inc. <{{\field{\*\fldinst{HYPERLINK "https://fsf.org/"}}{\fldrslt{https://fsf.org/\ul0\cf0}}}}\f0\fs22 >\par 8 | 9 | \pard\sa200\sl276\slmult1\b0\par 10 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\par 11 | \b Preamble\par 12 | \b0 The GNU General Public License is a free, copyleft license for software and other kinds of works.\par 13 | The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.\par 14 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.\par 15 | To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.\par 16 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par 17 | Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.\par 18 | For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.\par 19 | Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.\par 20 | Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.\par 21 | The precise terms and conditions for copying, distribution and modification follow.\par 22 | \par 23 | \b TERMS AND CONDITIONS\par 24 | \b0\i 0. Definitions.\par 25 | \i0\ldblquote This License\rdblquote refers to version 3 of the GNU General Public License.\par 26 | \ldblquote Copyright\rdblquote also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.\par 27 | \ldblquote The Program\rdblquote refers to any copyrightable work licensed under this License. Each licensee is addressed as \ldblquote you\rdblquote . \ldblquote Licensees\rdblquote and \ldblquote recipients\rdblquote may be individuals or organizations.\par 28 | To \ldblquote modify\rdblquote a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a \ldblquote modified version\rdblquote of the earlier work or a work \ldblquote based on\rdblquote the earlier work.\par 29 | A \ldblquote covered work\rdblquote means either the unmodified Program or a work based on the Program.\par 30 | To \ldblquote propagate\rdblquote a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.\par 31 | To \ldblquote convey\rdblquote a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.\par 32 | An interactive user interface displays \ldblquote Appropriate Legal Notices\rdblquote to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.\par 33 | \par 34 | \i 1. Source Code.\par 35 | \i0 The \ldblquote source code\rdblquote for a work means the preferred form of the work for making modifications to it. \ldblquote Object code\rdblquote means any non-source form of a work.\par 36 | A \ldblquote Standard Interface\rdblquote means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.\par 37 | The \ldblquote System Libraries\rdblquote of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A \ldblquote Major Component\rdblquote , in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.\par 38 | The \ldblquote Corresponding Source\rdblquote for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.\par 39 | The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.\par 40 | The Corresponding Source for a work in source code form is that same work.\par 41 | \par 42 | \i 2. Basic Permissions.\par 43 | \i0 All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.\par 44 | You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.\par 45 | Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.\par 46 | \par 47 | \i 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\par 48 | \i0 No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.\par 49 | When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.\par 50 | \par 51 | \i 4. Conveying Verbatim Copies.\par 52 | \i0 You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.\par 53 | You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.\par 54 | \par 55 | \i 5. Conveying Modified Source Versions.\par 56 | \i0 You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:\par 57 | a) The work must carry prominent notices stating that you modified it, and giving a relevant date.\par 58 | b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to \ldblquote keep intact all notices\rdblquote .\par 59 | c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.\par 60 | d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.\par 61 | A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an \ldblquote aggregate\rdblquote if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.\par 62 | \par 63 | \i 6. Conveying Non-Source Forms.\par 64 | \i0 You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:\par 65 | a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.\par 66 | b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.\par 67 | c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.\par 68 | d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.\par 69 | e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.\par 70 | A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.\par 71 | A \ldblquote User Product\rdblquote is either (1) a \ldblquote consumer product\rdblquote , which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, \ldblquote normally used\rdblquote refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.\par 72 | \ldblquote Installation Information\rdblquote for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.\par 73 | If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).\par 74 | The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.\par 75 | Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.\par 76 | \par 77 | \i 7. Additional Terms.\par 78 | \i0\ldblquote Additional permissions\rdblquote are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.\par 79 | When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.\par 80 | Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:\par 81 | a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or\par 82 | b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or\par 83 | c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or\par 84 | d) Limiting the use for publicity purposes of names of licensors or authors of the material; or\par 85 | e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or\par 86 | f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.\par 87 | All other non-permissive additional terms are considered \ldblquote further restrictions\rdblquote within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.\par 88 | If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.\par 89 | Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.\par 90 | \par 91 | \i 8. Termination.\par 92 | \i0 You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).\par 93 | However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.\par 94 | Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.\par 95 | Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.\par 96 | \par 97 | \i 9. Acceptance Not Required for Having Copies.\par 98 | \i0 You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.\par 99 | \par 100 | \i 10. Automatic Licensing of Downstream Recipients.\par 101 | \i0 Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.\par 102 | An \ldblquote entity transaction\rdblquote is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.\par 103 | You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.\par 104 | \par 105 | \i 11. Patents.\par 106 | \i0 A \ldblquote contributor\rdblquote is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's \ldblquote contributor version\rdblquote .\par 107 | A contributor's \ldblquote essential patent claims\rdblquote are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, \ldblquote control\rdblquote includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.\par 108 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.\par 109 | In the following three paragraphs, a \ldblquote patent license\rdblquote is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To \ldblquote grant\rdblquote such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.\par 110 | If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. \ldblquote Knowingly relying\rdblquote means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.\par 111 | If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.\par 112 | A patent license is \ldblquote discriminatory\rdblquote if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.\par 113 | Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.\par 114 | \par 115 | \i 12. No Surrender of Others' Freedom.\par 116 | \i0 If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.\par 117 | \par 118 | \i 13. Use with the GNU Affero General Public License.\par 119 | \i0 Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.\par 120 | \par 121 | \i 14. Revised Versions of this License.\par 122 | \i0 The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\par 123 | Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License \ldblquote or any later version\rdblquote applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.\par 124 | If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.\par 125 | Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.\par 126 | \par 127 | \i 15. Disclaimer of Warranty.\par 128 | \i0 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \ldblquote AS IS\rdblquote WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par 129 | \par 130 | \i 16. Limitation of Liability.\par 131 | \i0 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par 132 | \par 133 | \i 17. Interpretation of Sections 15 and 16.\par 134 | \i0 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.\par 135 | \par 136 | \b END OF TERMS AND CONDITIONS\b0\par 137 | How to Apply These Terms to Your New Programs\par 138 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\par 139 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the \ldblquote copyright\rdblquote line and a pointer to where the full notice is found.\par 140 | \par 141 | \par 142 | Copyright (C) \par 143 | This program is free software: you can redistribute it and/or modify\par 144 | it under the terms of the GNU General Public License as published by\par 145 | the Free Software Foundation, either version 3 of the License, or\par 146 | (at your option) any later version.\par 147 | This program is distributed in the hope that it will be useful,\par 148 | but WITHOUT ANY WARRANTY; without even the implied warranty of\par 149 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par 150 | GNU General Public License for more details.\par 151 | \par 152 | You should have received a copy of the GNU General Public License\par 153 | along with this program. If not, see <{{\field{\*\fldinst{HYPERLINK "https://www.gnu.org/licenses/"}}{\fldrslt{https://www.gnu.org/licenses/\ul0\cf0}}}}\f0\fs22 >.\par 154 | Also add information on how to contact you by electronic and paper mail.\par 155 | \par 156 | If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:\par 157 | \par 158 | Copyright (C) \par 159 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\par 160 | This is free software, and you are welcome to redistribute it\par 161 | under certain conditions; type `show c' for details.\par 162 | The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an \ldblquote about box\rdblquote .\par 163 | \par 164 | You should also get your employer (if you work as a programmer) or school, if any, to sign a \ldblquote copyright disclaimer\rdblquote for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <{{\field{\*\fldinst{HYPERLINK "https://www.gnu.org/licenses/"}}{\fldrslt{https://www.gnu.org/licenses/\ul0\cf0}}}}\f0\fs22 >.\par 165 | \par 166 | The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <{{\field{\*\fldinst{HYPERLINK "https://www.gnu.org/licenses/why-not-lgpl.html"}}{\fldrslt{https://www.gnu.org/licenses/why-not-lgpl.html\ul0\cf0}}}}\f0\fs22 >.\par 167 | } 168 | -------------------------------------------------------------------------------- /installer/Product.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | NOT REMOVE 41 | 42 | REMOVE="ALL" 43 | NOT Installed 44 | NOT Installed 45 | NOT REMOVE 46 | NOT REMOVE 47 | NOT REMOVE 48 | NOT REMOVE 49 | NOT REMOVE 50 | NOT REMOVE 51 | NOT REMOVE 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /installer/ca.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /installer/dialog.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eapowertools-archive/qs-telemetry-dashboard-node/b3d3e19875120c96694d7aae32112d7d0af0c054/installer/dialog.bmp -------------------------------------------------------------------------------- /installer/installer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26430.16 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "installer", "installer.wixproj", "{602C8A92-6222-4B60-A603-8ECDA8BB587C}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomActions", "CustomActions\CustomActions.csproj", "{DC4F450C-71F1-4748-88E8-1FADA6F38B0A}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|x64 = Debug|x64 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Debug|Any CPU.ActiveCfg = Debug|x86 21 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Debug|x64.ActiveCfg = Debug|x64 22 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Debug|x64.Build.0 = Debug|x64 23 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Debug|x86.ActiveCfg = Debug|x86 24 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Debug|x86.Build.0 = Debug|x86 25 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Release|Any CPU.ActiveCfg = Release|x86 26 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Release|x64.ActiveCfg = Release|x64 27 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Release|x64.Build.0 = Release|x64 28 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Release|x86.ActiveCfg = Release|x86 29 | {602C8A92-6222-4B60-A603-8ECDA8BB587C}.Release|x86.Build.0 = Release|x86 30 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Debug|Any CPU.ActiveCfg = Debug|x86 31 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Debug|x64.ActiveCfg = Debug|x64 32 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Debug|x64.Build.0 = Debug|x64 33 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Debug|x86.ActiveCfg = Debug|x86 34 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Debug|x86.Build.0 = Debug|x86 35 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Release|Any CPU.ActiveCfg = Release|x86 36 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Release|x64.ActiveCfg = Release|x64 37 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Release|x64.Build.0 = Release|x64 38 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Release|x86.ActiveCfg = Release|x86 39 | {DC4F450C-71F1-4748-88E8-1FADA6F38B0A}.Release|x86.Build.0 = Release|x86 40 | EndGlobalSection 41 | GlobalSection(SolutionProperties) = preSolution 42 | HideSolutionNode = FALSE 43 | EndGlobalSection 44 | EndGlobal 45 | -------------------------------------------------------------------------------- /installer/installer.wixproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x64 7 | 3.10 8 | 602c8a92-6222-4b60-a603-8ecda8bb587c 9 | 2.0 10 | TelemetryDashboard 11 | Package 12 | 13 | 14 | 15 | 16 | bin\$(Configuration)\ 17 | obj\$(Configuration)\ 18 | Debug;NodeModulesPath=..\node_modules\;LibPath=..\lib\ 19 | 20 | 21 | bin\$(Configuration)\ 22 | obj\$(Configuration)\ 23 | 24 | 25 | Debug;NodeModulesPath=..\node_modules\;LibPath=..\lib\ 26 | bin\$(Platform)\$(Configuration)\ 27 | obj\$(Platform)\$(Configuration)\ 28 | 29 | 30 | NodeModulesPath=..\node_modules\;LibPath=..\lib\ 31 | bin\$(Platform)\$(Configuration)\ 32 | obj\$(Platform)\$(Configuration)\ 33 | 34 | 35 | 36 | Generated-DirectoryFiles\LibDirectory.wxs 37 | 38 | 39 | Generated-DirectoryFiles\NodeModuleDirectory.wxs 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | $(WixExtDir)\WixUIExtension.dll 55 | WixUIExtension 56 | 57 | 58 | 59 | 60 | CustomActions 61 | {dc4f450c-71f1-4748-88e8-1fada6f38b0a} 62 | True 63 | True 64 | Binaries;Content;Satellites 65 | INSTALLFOLDER 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | "%25WIX%25\bin\heat.exe" dir "$(ProjectDir)\..\node_modules" -dr JSLIBRARYFOLDER -gg -sfrag -template fragment -cg NodeModulesComponentGroup -var var.NodeModulesPath -out NodeModuleDirectory.wxs 87 | "%25WIX%25\bin\heat.exe" dir "$(ProjectDir)\..\lib" -dr JSLIBRARYFOLDER -gg -sfrag -template fragment -cg LibComponentGroup -var var.LibPath -out LibDirectory.wxs 88 | 89 | 97 | -------------------------------------------------------------------------------- /installer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/getApps.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | 3 | var appData = { 4 | writeToFile: function(qrsInteract, filePath) { 5 | return qrsInteract.Get("app") 6 | .then(function(result) { 7 | var dataMatrix = []; 8 | result.body.forEach(function(element) { 9 | var dataRow = []; 10 | dataRow.push(element['id']); 11 | dataRow.push(element['name']); 12 | if (!element['published']) { 13 | dataRow.push(element['published']); 14 | dataRow.push(''); 15 | dataRow.push(''); 16 | dataRow.push(''); 17 | } else { 18 | dataRow.push(element['published']); 19 | dataRow.push(element['publishTime']); 20 | dataRow.push(element['stream']['id']); 21 | dataRow.push(element['stream']['name']); 22 | } 23 | dataMatrix.push(dataRow); 24 | }, this); 25 | writeCSV.writeDataToFile(filePath, dataMatrix); 26 | // select IDs from dataMatrix 27 | return dataMatrix.map(i => i[0]); 28 | }) 29 | .catch(function(error) { 30 | console.log(error); 31 | }); 32 | } 33 | } 34 | 35 | module.exports = appData; -------------------------------------------------------------------------------- /lib/getAppsEngine.js: -------------------------------------------------------------------------------- 1 | const promise = require('bluebird'); 2 | var writeCSV = require('./writeCSV'); 3 | 4 | var appEngineData = { 5 | writeToFile: function(appSession, appId, sessionObjectParams, vizPath) { 6 | return appSession.open().then((global) => { 7 | console.log("creating a session"); 8 | 9 | return global.openDoc(appId, "", "", "", true).then((app) => { 10 | console.log("opening a doc."); 11 | 12 | return app.createSessionObject(sessionObjectParams).then((sheetList) => { 13 | console.log("Created session object."); 14 | return sheetList.getLayout().then((layout) => { 15 | var vizDataMatrix = []; 16 | 17 | return promise.each(layout['qAppObjectList']['qItems'], (sheetObject) => { 18 | if (sheetObject != undefined) { 19 | return promise.each(sheetObject['qData']['cells'], (cellData) => { 20 | if (cellData != undefined) { 21 | vizDataMatrix.push([sheetObject['qInfo']['qId'], cellData['name'], cellData['type']]); 22 | } 23 | return; 24 | }); 25 | } 26 | }).then(function() { 27 | writeCSV.writeDataToFile(vizPath, vizDataMatrix); 28 | }); 29 | }); 30 | }); 31 | }); 32 | }).then(() => { 33 | appSession.close(); 34 | console.log("Closed Session."); 35 | }).catch(function(err) { 36 | appSession.close(); 37 | console.log("Error connecting to app with id '" + appId + "'."); 38 | console.log("Error message: " + err); 39 | throw err; 40 | }); 41 | } 42 | } 43 | 44 | module.exports = appEngineData; -------------------------------------------------------------------------------- /lib/getCustomPropertiesForEntity.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | 3 | var customProperties = { 4 | 5 | writeToFile: function (qrsInteract, entityType, filePath) { 6 | qrsInteract.Get(entityType + "/full") 7 | .then(function (result) { 8 | var dataMatrix = []; 9 | result.body.forEach(function (element) { 10 | var app = element; 11 | app['customProperties'].forEach(function (customProp) { 12 | var dataRow = []; 13 | dataRow.push(app['id']); 14 | dataRow.push(entityType); 15 | dataRow.push(customProp['definition']['id']); 16 | dataRow.push(customProp['value']); 17 | dataMatrix.push(dataRow); 18 | }); 19 | }, this); 20 | writeCSV.writeDataToFile(filePath, dataMatrix); 21 | }) 22 | .catch(function (error) { 23 | console.log(error); 24 | }); 25 | } 26 | } 27 | 28 | module.exports = customProperties; -------------------------------------------------------------------------------- /lib/getCustomPropertyDefinitions.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | 3 | var customPropertyDefs = { 4 | 5 | writeToFile: function (qrsInteract, filePath) { 6 | qrsInteract.Get('custompropertydefinition') 7 | .then(function (result) { 8 | var dataMatrix = []; 9 | result.body.forEach(function (element) { 10 | var dataRow = []; 11 | dataRow.push(element['id']); 12 | dataRow.push(element['name']); 13 | dataRow.push(element['valueType']); 14 | var optionsString = ""; 15 | element.choiceValues.forEach(function (choice) { 16 | optionsString += choice + ";" 17 | }); 18 | dataRow.push(optionsString); 19 | dataMatrix.push(dataRow); 20 | }, this); 21 | writeCSV.writeDataToFile(filePath, dataMatrix); 22 | }) 23 | .catch(function (error) { 24 | console.log(error); 25 | }); 26 | } 27 | } 28 | 29 | module.exports = customPropertyDefs; -------------------------------------------------------------------------------- /lib/getLogLevels.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | 3 | function getLogLevelEnum(service, settingName, value) { 4 | if ((settingName.indexOf("AuditActivity") > -1 || settingName.indexOf("AuditSecurity") > -1) && service != "printing") { 5 | switch (value) { 6 | case 0: 7 | return "Off"; 8 | case 1: 9 | return "Fatal"; 10 | case 2: 11 | return "Error"; 12 | case 3: 13 | return "Warning"; 14 | case 4: 15 | return "Basic"; 16 | case 5: 17 | return "Extended"; 18 | default: 19 | return "AuditActivity-UnsupportedLogLevel"; 20 | } 21 | } else if (settingName.indexOf("License") > -1) { 22 | switch (value) { 23 | case 0: 24 | return "Info"; 25 | case 1: 26 | return "Debug"; 27 | default: 28 | return "License-UnsupportedLogLevel"; 29 | } 30 | } else { 31 | switch (value) { 32 | case 0: 33 | return "Off"; 34 | case 1: 35 | return "Fatal"; 36 | case 2: 37 | return "Error"; 38 | case 3: 39 | return "Warning"; 40 | case 4: 41 | return "Info"; 42 | case 5: 43 | return "Debug"; 44 | default: 45 | return "Service-UnsupportedLogLevel"; 46 | } 47 | } 48 | } 49 | 50 | var logLevelData = { 51 | writeToFile: function (qrsInteract, filePath) { 52 | qrsInteract.Get("engineservice/full") 53 | .then(function (result) { 54 | var dataMatrix = []; 55 | result.body.forEach(function (element) { 56 | for (var setting in element.settings) { 57 | if (setting.indexOf("LogVerbosity") > -1) { 58 | var dataRow = []; 59 | dataRow.push(element.serverNodeConfiguration['name']); 60 | dataRow.push('engine'); 61 | dataRow.push(setting); 62 | dataRow.push(getLogLevelEnum('engine', setting, element.settings[setting])); 63 | dataMatrix.push(dataRow); 64 | } 65 | } 66 | }, this); 67 | writeCSV.writeDataToFile(filePath, dataMatrix); 68 | }) 69 | .catch(function (error) { 70 | console.log(error); 71 | }); 72 | } 73 | } 74 | 75 | module.exports = logLevelData; -------------------------------------------------------------------------------- /lib/getSheets.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | 3 | var pageSize = 200; 4 | 5 | function getPage(instance, totalCount, dataSet, pageSize, startLocation) { 6 | if (startLocation >= totalCount) { 7 | return dataSet; 8 | } else { 9 | var path = "app/object/table?filter=objectType eq 'sheet'&skip=" + startLocation + "&take=" + pageSize; 10 | return instance.Post(path, { 11 | columns: [{ 12 | columnType: "Property", 13 | definition: "app.id", 14 | name: "app.id" 15 | }, 16 | { 17 | columnType: "Property", 18 | definition: "engineObjectId", 19 | name: "engineObjectId" 20 | }, 21 | { 22 | columnType: "Property", 23 | definition: "name", 24 | name: "name" 25 | }, 26 | { 27 | columnType: "Property", 28 | definition: "owner.id", 29 | name: "owner.id" 30 | }, 31 | { 32 | columnType: "Property", 33 | definition: "published", 34 | name: "published" 35 | }, 36 | { 37 | columnType: "Property", 38 | definition: "approved", 39 | name: "approved" 40 | } 41 | ], 42 | entity: "App.Object" 43 | }, 44 | 'json') 45 | .then(function(result) { 46 | result.body.rows.forEach(function(element) { 47 | var dataRow = []; 48 | dataRow.push(element[0]); 49 | dataRow.push(element[1]); 50 | dataRow.push(element[2]); 51 | dataRow.push(element[3]); 52 | dataRow.push(element[4]); 53 | dataRow.push(element[5]); 54 | dataSet.push(dataRow); 55 | }, this); 56 | return getPage(instance, totalCount, dataSet, pageSize, startLocation + pageSize); 57 | }) 58 | .catch(function(error) { 59 | console.log(error); 60 | }); 61 | } 62 | } 63 | 64 | var sheetData = { 65 | 66 | writeToFile: function(qrsInteract, filePath) { 67 | return qrsInteract.Get("/app/object/count?filter=objectType eq 'sheet'") 68 | .then(function(countResult) { 69 | console.log(countResult.body["value"]); 70 | 71 | var dataMatrix = []; 72 | return getPage(qrsInteract, countResult.body["value"], dataMatrix, pageSize, 0).then(function(dataMatrix) { 73 | return writeCSV.writeDataToFile(filePath, dataMatrix); 74 | }).catch(function(error) { 75 | console.log(error); 76 | });; 77 | }); 78 | } 79 | } 80 | 81 | module.exports = sheetData; -------------------------------------------------------------------------------- /lib/getSysInfo.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | const os = require('os'); 3 | 4 | var systemData = { 5 | 6 | writeToFile: function (qrsInteract, filePath) { 7 | var dataMatrix = []; 8 | var dataRow = []; 9 | dataRow.push('localhost'); 10 | dataRow.push('TotalMemory (GB)'); 11 | dataRow.push((os.totalmem() / 1024 / 1024 / 1024)); 12 | dataMatrix.push(dataRow); 13 | writeCSV.writeDataToFile(filePath, dataMatrix); 14 | 15 | qrsInteract.Get("engineservice/full") 16 | .then(function (result) { 17 | dataMatrix = []; 18 | result.body.forEach(function (element) { 19 | var dataRow = []; 20 | dataRow.push(element.serverNodeConfiguration['name']); 21 | dataRow.push('Working Set Size Low (%)'); 22 | dataRow.push(element.settings['workingSetSizeLoPct']); 23 | dataMatrix.push(dataRow); 24 | 25 | dataRow = []; 26 | dataRow.push(element.serverNodeConfiguration['name']); 27 | dataRow.push('Working Set Size High (%)'); 28 | dataRow.push(element.settings['workingSetSizeHiPct']); 29 | dataMatrix.push(dataRow); 30 | 31 | }, this); 32 | writeCSV.writeDataToFile(filePath, dataMatrix); 33 | }) 34 | .catch(function (error) { 35 | console.log(error); 36 | }); 37 | } 38 | } 39 | 40 | module.exports = systemData; -------------------------------------------------------------------------------- /lib/getUsers.js: -------------------------------------------------------------------------------- 1 | var writeCSV = require('./writeCSV'); 2 | 3 | var userData = { 4 | 5 | writeToFile: function(qrsInteract, filePath) { 6 | return qrsInteract.Get("user") 7 | .then(function(result) { 8 | var dataMatrix = []; 9 | result.body.forEach(function(element) { 10 | var dataRow = []; 11 | dataRow.push(element['id']); 12 | dataRow.push(element['userId']); 13 | dataRow.push(element['userDirectory']); 14 | dataMatrix.push(dataRow); 15 | }, this); 16 | writeCSV.writeDataToFile(filePath, dataMatrix); 17 | }) 18 | .catch(function(error) { 19 | console.log(error); 20 | }); 21 | } 22 | } 23 | 24 | module.exports = userData; -------------------------------------------------------------------------------- /lib/stringExtensions.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | if (!String.prototype.startsWith) { 3 | String.prototype.startsWith = function (searchString, position) { 4 | position = position || 0; 5 | return this.substr(position, searchString.length) === searchString; 6 | }; 7 | } 8 | 9 | String.prototype.replaceAll = function (search, replacement) { 10 | var target = this; 11 | return target.replace(new RegExp(search, 'g'), replacement); 12 | }; 13 | }; -------------------------------------------------------------------------------- /lib/writeCSV.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var config = require('../config/config.js'); 3 | 4 | var writeCSV = { 5 | 6 | writeHeadersToFile: function (filename, headers) { 7 | var dataToWrite = ""; 8 | headers.forEach(function (element) { 9 | dataToWrite += element + config.global.delimiter; 10 | }, this); 11 | dataToWrite = dataToWrite.substring(0, dataToWrite.length - 1); 12 | dataToWrite += "\n"; 13 | 14 | fs.writeFileSync(filename, dataToWrite, { 15 | flag: 'w' 16 | }, function (err) { 17 | if (err) { 18 | return console.log(err); 19 | } 20 | }); 21 | console.log(filename + " was saved."); 22 | }, 23 | writeDataToFile: function (filename, data) { 24 | var dataToWrite = ""; 25 | 26 | data.forEach(function (element) { 27 | element.forEach(function (element) { 28 | // remove linebreaks, linefeeds and tabs 29 | var cleanedElement = element; 30 | if (typeof cleanedElement == "string") { 31 | cleanedElement = cleanedElement.replaceAll("\r\n", ""); 32 | cleanedElement = cleanedElement.replaceAll("\n", "\\n"); 33 | cleanedElement = cleanedElement.replaceAll("\t", " "); 34 | } 35 | 36 | dataToWrite += cleanedElement + config.global.delimiter; 37 | }, this); 38 | dataToWrite = dataToWrite.substring(0, dataToWrite.length - 1); 39 | dataToWrite += "\n"; 40 | }, this); 41 | 42 | fs.writeFileSync(filename, dataToWrite, { 43 | flag: 'a' 44 | }, function (err) { 45 | if (err) { 46 | return console.log(err); 47 | } 48 | }); 49 | console.log(filename + " was saved."); 50 | } 51 | } 52 | 53 | module.exports = writeCSV; -------------------------------------------------------------------------------- /lib/writeHeaders.js: -------------------------------------------------------------------------------- 1 | var config = require('../config/config'); 2 | var writeCSV = require('./writeCSV'); 3 | const path = require('path') 4 | 5 | var writeHeaders = { 6 | 7 | writeAllHeaders: function(outputDir) { 8 | var appsFilename = path.join(outputDir, config.filenames.apps_table); 9 | var appsHeaders = ['AppID', 'AppName', 'IsPublished', 'PublishedDate', 'StreamID', 'StreamName']; 10 | writeCSV.writeHeadersToFile(appsFilename, appsHeaders); 11 | 12 | var sheetsFilename = path.join(outputDir, config.filenames.sheets_table); 13 | var sheetsHeaders = ['AppID', 'SheetID', 'SheetName', 'OwnerID', 'Published', 'Approved']; 14 | writeCSV.writeHeadersToFile(sheetsFilename, sheetsHeaders); 15 | 16 | var usersFilename = path.join(outputDir, config.filenames.users_table); 17 | var usersHeaders = ['ID', 'UserId', 'UserDirectory']; 18 | writeCSV.writeHeadersToFile(usersFilename, usersHeaders); 19 | 20 | var visualizationsFilename = path.join(outputDir, config.filenames.visualizations_table); 21 | var visualizationsHeaders = ['SheetID', 'VisualizationID', 'Type']; 22 | writeCSV.writeHeadersToFile(visualizationsFilename, visualizationsHeaders); 23 | 24 | var customPropertyDefinitionsFilename = path.join(outputDir, config.filenames.customPropertyDefinitions_table); 25 | var customPropertyDefinitionsHeaders = ['CustomPropertyDefinitionID', 'Name', 'Type', 'Values']; 26 | writeCSV.writeHeadersToFile(customPropertyDefinitionsFilename, customPropertyDefinitionsHeaders); 27 | 28 | var customPropertyMapFilename = path.join(outputDir, config.filenames.entityCustomPropertyMap_table); 29 | var customPropertyMapHeaders = ['EntityID', 'EntityType', 'CustomPropertyDefinitionID', 'Value']; 30 | writeCSV.writeHeadersToFile(customPropertyMapFilename, customPropertyMapHeaders); 31 | 32 | var outputStatusFilename = path.join(outputDir, config.filenames.outputStatus_table); 33 | var outputStatusHeaders = ['AppID', 'Timestamp', 'Status', 'Message']; 34 | writeCSV.writeHeadersToFile(outputStatusFilename, outputStatusHeaders); 35 | 36 | var logLevelFilename = path.join(outputDir, config.filenames.logLevel_table); 37 | var logLevelHeaders = ['NodeName', 'ServiceName', 'LogType', 'Level']; 38 | writeCSV.writeHeadersToFile(logLevelFilename, logLevelHeaders); 39 | 40 | var systemInfoFilename = path.join(outputDir, config.filenames.systemInfo_table); 41 | var systemInfoHeaders = ['NodeName', 'Key', 'Value']; 42 | writeCSV.writeHeadersToFile(systemInfoFilename, systemInfoHeaders); 43 | } 44 | } 45 | 46 | module.exports = writeHeaders; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "telemetry-dashboard-meta-fetcher", 3 | "version": "3.1.1", 4 | "description": "", 5 | "main": "fetchMetadata.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "bluebird": "^3.5.3", 13 | "enigma.js": "^2.4.0", 14 | "qrs-interact": "^3.0.0", 15 | "ws": "^4.0.0" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/eapowertools/qs-telemetry-dashboard.git" 20 | } 21 | } --------------------------------------------------------------------------------