mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-10-31 07:55:06 +01:00 
			
		
		
		
	small fixes, set analysisView config defaults
This commit is contained in:
		| @@ -82,27 +82,21 @@ | ||||
|   let colWidth1 = $state(0); | ||||
|   let colWidth2 = $state(0); | ||||
|   let jobFilters = $state([]); | ||||
|   let metricsInHistograms = $state(ccconfig.analysisView_histogramMetrics) | ||||
|   let metricsInScatterplots = $state(ccconfig.analysisView_scatterPlotMetrics) | ||||
|   let metricsInHistograms = $state(ccconfig?.analysisView_histogramMetrics || []) | ||||
|   let metricsInScatterplots = $state(ccconfig?.analysisView_scatterPlotMetrics || []) | ||||
|   let sortSelection = $state( | ||||
|     sortOptions.find( | ||||
|       (option) => | ||||
|         option.key == | ||||
|         ccconfig[`analysisView_selectedTopCategory:${filterPresets.cluster}`], | ||||
|     ) || | ||||
|     sortOptions.find( | ||||
|       (option) => option.key == ccconfig.analysisView_selectedTopCategory, | ||||
|     ) | ||||
|     ) || sortOptions[0] | ||||
|   ); | ||||
|   let groupSelection = $state( | ||||
|       groupOptions.find( | ||||
|         (option) => | ||||
|           option.key == | ||||
|           ccconfig[`analysisView_selectedTopEntity:${filterPresets.cluster}`], | ||||
|       ) || | ||||
|       groupOptions.find( | ||||
|         (option) => option.key == ccconfig.analysisView_selectedTopEntity, | ||||
|       ) | ||||
|       ) || groupOptions[0] | ||||
|   ); | ||||
|  | ||||
|   /* Init Function */ | ||||
|   | ||||
| @@ -136,7 +136,7 @@ | ||||
|       startTimeQuickSelect | ||||
|       bind:this={filterComponent} | ||||
|       {filterPresets} | ||||
|       menuText="Only {type.toLowerCase()}s with jobs that match the filters will show up" | ||||
|       menuText="Only {type.toLowerCase()}s with matching jobs will be displayed." | ||||
|       applyFilters={(detail) => { | ||||
|         jobFilters = detail.filters; | ||||
|       }} | ||||
|   | ||||
| @@ -98,13 +98,6 @@ | ||||
|     return [] | ||||
|   }); | ||||
|  | ||||
|   // $inspect('System', systemMetrics) | ||||
|   // $inspect('List', selectedMetrics) | ||||
|   // $inspect('Overview', selectedMetric) | ||||
|   // console.log('Config', ccconfig) | ||||
|   // console.log('Config List', ccconfig[`nodeOverview_selectedMetrics:${cluster}`], cluster) | ||||
|   // console.log('Config Overview', ccconfig[`nodeOverview_selectedMetric:${cluster}`], cluster) | ||||
|  | ||||
|   /* Effects */ | ||||
|   $effect(() => { | ||||
|     if (displayNodeOverview) { | ||||
|   | ||||
| @@ -294,11 +294,12 @@ | ||||
|         Filters | ||||
|       </DropdownToggle> | ||||
|       <DropdownMenu> | ||||
|         <DropdownItem header>Manage Filters</DropdownItem> | ||||
|         {#if menuText} | ||||
|           <DropdownItem header>Note</DropdownItem> | ||||
|           <DropdownItem disabled>{menuText}</DropdownItem> | ||||
|           <DropdownItem divider /> | ||||
|         {/if} | ||||
|         <DropdownItem header>Manage Filters</DropdownItem> | ||||
|         <DropdownItem onclick={() => (isClusterOpen = true)}> | ||||
|           <Icon name="cpu" /> Cluster/Partition | ||||
|         </DropdownItem> | ||||
| @@ -325,7 +326,7 @@ | ||||
|         </DropdownItem> | ||||
|         {#if startTimeQuickSelect} | ||||
|           <DropdownItem divider /> | ||||
|           <DropdownItem disabled>Start Time Quick Selection</DropdownItem> | ||||
|           <DropdownItem header>Start Time Quick Selection</DropdownItem> | ||||
|           {#each startTimeSelectOptions.filter((stso) => stso.range !== "") as { rangeLabel, range }} | ||||
|             <DropdownItem | ||||
|               onclick={() => { | ||||
|   | ||||
| @@ -170,7 +170,7 @@ | ||||
|  | ||||
| <tr> | ||||
|   <td> | ||||
|     <JobInfo {job} bind:isSelected showSelect/> | ||||
|     <JobInfo {job} bind:isSelected showJobSelect/> | ||||
|   </td> | ||||
|   {#if job.monitoringStatus == 0 || job.monitoringStatus == 2} | ||||
|     <td colspan={metrics.length}> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user