Changes between Version 8 and Version 9 of PrefsPresets
- Timestamp:
- May 21, 2018, 12:28:20 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PrefsPresets
v8 v9 65 65 66 66 If a user selects a preset, 67 we s hould store the preset name (max, standard, green) in user.global_prefs,67 we store the preset name (max, standard, green) in user.global_prefs, 68 68 rather than the prefs themselves. 69 69 Example: … … 76 76 </global_preferences> 77 77 }}} 78 The scheduler can send the corresponding prefs in its reply. 79 This will let us change/extend the meanings of the presets. 78 The scheduler sends the corresponding prefs in its reply. 79 This lets us change/extend the meanings of the standard presets, 80 and lets each project define its own presets if it wants. 80 81 81 82 Initial implementation: for simplicity, support only presets. 82 83 Enable this by PREFS_PRESETS in project.inc. 83 84 84 PHP code only needs to know about preset names. 85 Presets will be stored in a file "prefs_presets.xml" in the project directory, 86 with the structure 87 {{{ 88 <presets> 89 <preset> 90 <name>Green</name> 91 <description>Limit power consumption> 92 <prefs> 93 <![CDATA[ 94 <max_ncpus_pct>25</max_ncpus_pct> 95 <cpu_usage_limit>100</cpu_usage_limit> 96 ... 97 ]]> 98 </prefs> 99 </preset> 100 ... 101 </presets> 102 }}} 85 103 86 C++ code 104 Scheduler: when sending global prefs, check if it's a preset and expand accordingly. 105 Also send the preset name in case we want to show it in the Manager.