Changes between Version 8 and Version 9 of PrefsPresets


Ignore:
Timestamp:
May 21, 2018, 12:28:20 PM (7 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PrefsPresets

    v8 v9  
    6565
    6666If a user selects a preset,
    67 we should store the preset name (max, standard, green) in user.global_prefs,
     67we store the preset name (max, standard, green) in user.global_prefs,
    6868rather than the prefs themselves.
    6969Example:
     
    7676</global_preferences>
    7777}}}
    78 The scheduler can send the corresponding prefs in its reply.
    79 This will let us change/extend the meanings of the presets.
     78The scheduler sends the corresponding prefs in its reply.
     79This lets us change/extend the meanings of the standard presets,
     80and lets each project define its own presets if it wants.
    8081
    8182Initial implementation: for simplicity, support only presets.
    8283Enable this by PREFS_PRESETS in project.inc.
    8384
    84 PHP code only needs to know about preset names.
     85Presets will be stored in a file "prefs_presets.xml" in the project directory,
     86with 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}}}
    85103
    86 C++ code
     104Scheduler: when sending global prefs, check if it's a preset and expand accordingly.
     105Also send the preset name in case we want to show it in the Manager.