mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-10-28 15:15:07 +01:00
Merge branch 'dev' of github.com:ClusterCockpit/cc-backend into dev
This commit is contained in:
@@ -21,3 +21,15 @@ CREATE TABLE "node" (
|
||||
meta_data TEXT, -- JSON
|
||||
UNIQUE (hostname, cluster)
|
||||
);
|
||||
|
||||
-- Add Indices For New Node Table VARCHAR Fields
|
||||
CREATE INDEX IF NOT EXISTS nodes_cluster ON node (cluster);
|
||||
CREATE INDEX IF NOT EXISTS nodes_cluster_subcluster ON node (cluster, subcluster);
|
||||
CREATE INDEX IF NOT EXISTS nodes_state ON node (node_state);
|
||||
CREATE INDEX IF NOT EXISTS nodes_cluster_state ON node (cluster, node_state);
|
||||
CREATE INDEX IF NOT EXISTS nodes_health ON node (health_state);
|
||||
CREATE INDEX IF NOT EXISTS nodes_cluster_health ON node (cluster, health_state);
|
||||
|
||||
-- Add Indices For Increased Amounts of Tags
|
||||
CREATE INDEX IF NOT EXISTS tags_jobid ON jobtag (job_id);
|
||||
CREATE INDEX IF NOT EXISTS tags_tagid ON jobtag (tag_id);
|
||||
@@ -38,7 +38,9 @@
|
||||
import RooflineHeatmap from "./generic/plots/RooflineHeatmap.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { filterPresets } = $props();
|
||||
let {
|
||||
filterPresets
|
||||
} = $props();
|
||||
|
||||
// By default, look at the jobs of the last 6 hours:
|
||||
if (filterPresets?.startTime == null) {
|
||||
@@ -346,8 +348,10 @@
|
||||
{:else if cluster}
|
||||
<PlotSelection
|
||||
availableMetrics={availableMetrics.map((av) => av.name)}
|
||||
bind:metricsInHistograms
|
||||
bind:metricsInScatterplots
|
||||
presetMetricsInHistograms={metricsInHistograms}
|
||||
presetMetricsInScatterplots={metricsInScatterplots}
|
||||
applyHistograms={(metrics) => metricsInHistograms = [...metrics]}
|
||||
applyScatter={(metrics) => metricsInScatterplots = [...metrics]}
|
||||
/>
|
||||
{/if}
|
||||
</Col>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
- `isSupport Bool!`: Is currently logged in user support authority
|
||||
- `isApi Bool!`: Is currently logged in user api authority
|
||||
- `username String!`: Empty string if auth. is disabled, otherwise the username as string
|
||||
- `ncontent String!`: The currently displayed message on the homescreen
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -25,7 +25,13 @@
|
||||
import NavbarTools from "./header/NavbarTools.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { username, authlevel, clusters, subClusters, roles } = $props();
|
||||
let {
|
||||
username,
|
||||
authlevel,
|
||||
clusters,
|
||||
subClusters,
|
||||
roles
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
const jobsTitle = new Map();
|
||||
@@ -123,11 +129,11 @@
|
||||
let isOpen = $state(false);
|
||||
let screenSize = $state(0);
|
||||
|
||||
/* Derived Vars */
|
||||
let showMax = $derived(screenSize >= 1500);
|
||||
let showMid = $derived(screenSize < 1500 && screenSize >= 1300);
|
||||
let showSml = $derived(screenSize < 1300 && screenSize >= 768);
|
||||
let showBrg = $derived(screenSize < 768);
|
||||
/* Derived */
|
||||
const showMax = $derived(screenSize >= 1500);
|
||||
const showMid = $derived(screenSize < 1500 && screenSize >= 1300);
|
||||
const showSml = $derived(screenSize < 1300 && screenSize >= 768);
|
||||
const showBrg = $derived(screenSize < 768);
|
||||
</script>
|
||||
|
||||
<svelte:window bind:innerWidth={screenSize} />
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
|
||||
/* Effects */
|
||||
$effect(() => {
|
||||
document.title = $initq.fetching
|
||||
document.title = $initq?.fetching
|
||||
? "Loading..."
|
||||
: $initq.error
|
||||
: $initq?.error
|
||||
? "Error"
|
||||
: `Job ${$initq.data.job.jobId} - ClusterCockpit`;
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@component Main job list component
|
||||
|
||||
Properties:
|
||||
- `filterPresets Object?`: Optional predefined filter values [Default: {}]
|
||||
- `filterPresets Object`: Optional predefined filter values
|
||||
- `authlevel Number`: The current users authentication level
|
||||
- `roles [Number]`: Enum containing available roles
|
||||
-->
|
||||
@@ -28,7 +28,11 @@
|
||||
import MetricSelection from "./generic/select/MetricSelection.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { filterPresets, authlevel, roles } = $props();
|
||||
let {
|
||||
filterPresets,
|
||||
authlevel,
|
||||
roles
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
const { query: initq } = init();
|
||||
|
||||
@@ -32,18 +32,12 @@
|
||||
import Filters from "./generic/Filters.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { type, filterPresets } = $props();
|
||||
|
||||
// By default, look at the jobs of the last 30 days:
|
||||
if (filterPresets?.startTime == null) {
|
||||
if (filterPresets == null) filterPresets = {};
|
||||
|
||||
filterPresets.startTime = {
|
||||
range: "last30d",
|
||||
text: "Last 30 Days",
|
||||
};
|
||||
}
|
||||
let {
|
||||
type,
|
||||
filterPresets
|
||||
} = $props();
|
||||
|
||||
/* Validate Type */
|
||||
console.assert(
|
||||
type == "USER" || type == "PROJECT",
|
||||
"Invalid list type provided!",
|
||||
@@ -107,7 +101,19 @@
|
||||
}
|
||||
|
||||
/* On Mount */
|
||||
onMount(() => filterComponent.updateFilters());
|
||||
onMount(() => {
|
||||
// By default, look at the jobs of the last 30 days:
|
||||
if (filterPresets?.startTime == null) {
|
||||
if (filterPresets == null) filterPresets = {};
|
||||
|
||||
filterPresets.startTime = {
|
||||
range: "last30d",
|
||||
text: "Last 30 Days",
|
||||
};
|
||||
};
|
||||
// Init Filter
|
||||
filterComponent.updateFilters();
|
||||
});
|
||||
</script>
|
||||
|
||||
<Row cols={{ xs: 1, md: 2}}>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
Properties:
|
||||
- `cluster String`: Currently selected cluster
|
||||
- `hostname String`: Currently selected host (== node)
|
||||
- `from Date?`: Custom Time Range selection 'from' [Default: null]
|
||||
- `to Date?`: Custom Time Range selection 'to' [Default: null]
|
||||
- `presetFrom Date?`: Custom Time Range selection 'from' [Default: null]
|
||||
- `presetTo Date?`: Custom Time Range selection 'to' [Default: null]
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
import HistogramSelection from "./generic/select/HistogramSelection.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { cluster } = $props();
|
||||
let {
|
||||
cluster
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
const { query: initq } = init();
|
||||
@@ -60,9 +62,13 @@
|
||||
/* State Init */
|
||||
let from = $state(new Date(Date.now() - 5 * 60 * 1000));
|
||||
let to = $state(new Date(Date.now()));
|
||||
let isHistogramSelectionOpen = $state(false);
|
||||
let colWidth = $state(0);
|
||||
let plotWidths = $state([]);
|
||||
// Histrogram
|
||||
let isHistogramSelectionOpen = $state(false);
|
||||
let selectedHistograms = $state(cluster
|
||||
? ccconfig[`user_view_histogramMetrics:${cluster}`] || ( ccconfig['user_view_histogramMetrics'] || [] )
|
||||
: ccconfig['user_view_histogramMetrics'] || []);
|
||||
// Bar Gauges
|
||||
let allocatedNodes = $state({});
|
||||
let flopRate = $state({});
|
||||
@@ -71,11 +77,7 @@
|
||||
let memBwRate = $state({});
|
||||
let memBwRateUnitPrefix = $state({});
|
||||
let memBwRateUnitBase = $state({});
|
||||
|
||||
let selectedHistograms = $state(cluster
|
||||
? ccconfig[`user_view_histogramMetrics:${cluster}`] || ( ccconfig['user_view_histogramMetrics'] || [] )
|
||||
: ccconfig['user_view_histogramMetrics'] || []);
|
||||
|
||||
// Pie Charts
|
||||
let topProjectSelection = $state(
|
||||
topOptions.find(
|
||||
(option) =>
|
||||
@@ -86,7 +88,6 @@
|
||||
(option) => option.key == ccconfig.status_view_selectedTopProjectCategory,
|
||||
)
|
||||
);
|
||||
|
||||
let topUserSelection = $state(
|
||||
topOptions.find(
|
||||
(option) =>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
|
||||
Properties:
|
||||
- `displayType String?`: The type of node display ['OVERVIEW' || 'LIST']
|
||||
- `cluster String`: The cluster to show status information for
|
||||
- `from Date?`: Custom Time Range selection 'from' [Default: null]
|
||||
- `to Date?`: Custom Time Range selection 'to' [Default: null]
|
||||
- `cluster String`: The cluster to show status information for [Default: null]
|
||||
- `subCluster String`: The subCluster to show status information for [Default: null]
|
||||
- `presetFrom Date?`: Custom Time Range selection 'from' [Default: null]
|
||||
- `presetTo Date?`: Custom Time Range selection 'to' [Default: null]
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -38,8 +39,8 @@
|
||||
displayType,
|
||||
cluster = null,
|
||||
subCluster = null,
|
||||
fromPreset = null,
|
||||
toPreset = null,
|
||||
presetFrom = null,
|
||||
presetTo = null,
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
@@ -54,9 +55,12 @@
|
||||
const resampleDefault = resampleConfig ? Math.max(...resampleConfig.resolutions) : 0;
|
||||
const nowDate = new Date(Date.now());
|
||||
|
||||
/* Var Init */
|
||||
let timeoutId = null;
|
||||
|
||||
/* State Init */
|
||||
let to = $state(toPreset || new Date(Date.now()));
|
||||
let from = $state(fromPreset || new Date(nowDate.setHours(nowDate.getHours() - 4)));
|
||||
let to = $state(presetTo || new Date(Date.now()));
|
||||
let from = $state(presetFrom || new Date(nowDate.setHours(nowDate.getHours() - 4)));
|
||||
let selectedResolution = $state(resampleConfig ? resampleDefault : 0);
|
||||
let hostnameFilter = $state("");
|
||||
let pendingHostnameFilter = $state("");
|
||||
@@ -89,7 +93,6 @@
|
||||
};
|
||||
|
||||
// Wait after input for some time to prevent too many requests
|
||||
let timeoutId = null;
|
||||
function updateHostnameFilter() {
|
||||
if (timeoutId != null) clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(function () {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Properties:
|
||||
- `username String!`: Users username.
|
||||
- `isAdmin Bool!`: User has Admin Auth.
|
||||
- `tagmap Object!`: Map of accessible, appwide tags. Prefiltered in backend.
|
||||
- `presetTagmap Object!`: Map of accessible, appwide tags. Prefiltered in backend.
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/* State Init */
|
||||
let pendingChange = $state("none");
|
||||
let tagmap = $state(presetTagmap)
|
||||
let tagmap = $state(presetTagmap);
|
||||
|
||||
/* Functions */
|
||||
const removeTagMutation = ({ tagIds }) => {
|
||||
@@ -68,8 +68,8 @@
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
|
||||
@@ -43,7 +43,10 @@
|
||||
import Refresher from "./generic/helper/Refresher.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { user, filterPresets } = $props();
|
||||
let {
|
||||
user,
|
||||
filterPresets
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
const { query: initq } = init();
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
Properties:
|
||||
- `availableMetrics [String]`: Available metrics in selected cluster
|
||||
- `metricsInHistograms [String]`: The currently selected metrics to display as histogram
|
||||
- `metricsInScatterplots [[String, String]]`: The currently selected metrics to display as scatterplot
|
||||
- `presetMetricsInHistograms [String]`: The latest selected metrics to display as histogram
|
||||
- `presetMetricsInScatterplots [[String, String]]`: The latest selected metrics to display as scatterplot
|
||||
- `applyHistograms Func`: The callback function to apply current histogramMetrics selection
|
||||
- `applyScatter Func`: The callback function to apply current scatterMetrics selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -24,8 +26,10 @@
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
availableMetrics,
|
||||
metricsInHistograms = $bindable(),
|
||||
metricsInScatterplots = $bindable(),
|
||||
presetMetricsInHistograms,
|
||||
presetMetricsInScatterplots,
|
||||
applyHistograms,
|
||||
applyScatter
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
@@ -45,6 +49,8 @@
|
||||
/* State Init */
|
||||
let isHistogramConfigOpen = $state(false);
|
||||
let isScatterPlotConfigOpen = $state(false);
|
||||
let metricsInHistograms = $state(presetMetricsInHistograms);
|
||||
let metricsInScatterplots = $state(presetMetricsInScatterplots);
|
||||
let selectedMetric1 = $state(null);
|
||||
let selectedMetric2 = $state(null);
|
||||
|
||||
@@ -84,11 +90,13 @@
|
||||
type="checkbox"
|
||||
bind:group={metricsInHistograms}
|
||||
value={metric}
|
||||
onchange={() =>
|
||||
onchange={() => {
|
||||
updateConfiguration({
|
||||
name: "analysis_view_histogramMetrics",
|
||||
value: metricsInHistograms,
|
||||
})}
|
||||
});
|
||||
applyHistograms(metricsInHistograms);
|
||||
}}
|
||||
/>
|
||||
|
||||
{metric}
|
||||
@@ -126,6 +134,7 @@
|
||||
name: "analysis_view_scatterPlotMetrics",
|
||||
value: metricsInScatterplots,
|
||||
});
|
||||
applyScatter(metricsInScatterplots);
|
||||
}}
|
||||
>
|
||||
<Icon name="x" />
|
||||
@@ -163,6 +172,7 @@
|
||||
name: "analysis_view_scatterPlotMetrics",
|
||||
value: metricsInScatterplots,
|
||||
});
|
||||
applyScatter(metricsInScatterplots);
|
||||
}}
|
||||
>
|
||||
Add Plot
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<!--
|
||||
@component Admin settings wrapper
|
||||
|
||||
Properties:
|
||||
- `ncontent String`: The homepage notice content
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -13,7 +16,9 @@
|
||||
import NoticeEdit from "./admin/NoticeEdit.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { ncontent } = $props();
|
||||
let {
|
||||
ncontent
|
||||
} = $props();
|
||||
|
||||
/* Const Init*/
|
||||
const ccconfig = getContext("cc-config");
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
@component Support settings wrapper
|
||||
Properties: None
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { getContext } from "svelte";
|
||||
import SupportOptions from "./support/SupportOptions.svelte";
|
||||
|
||||
/* Const Init */
|
||||
const ccconfig = getContext("cc-config");
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
Properties:
|
||||
- `roles [String]!`: List of roles used in app as strings
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list after user creation
|
||||
- `reloadUser Func`: The callback function to reload the user list
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -13,7 +11,10 @@
|
||||
import { fade } from "svelte/transition";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { roles, reloadUser } = $props();
|
||||
let {
|
||||
roles,
|
||||
reloadUser
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let message = $state({ msg: "", color: "#d63384" });
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
@component User managed project edit form card
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list after project update
|
||||
Properties:
|
||||
- `reloadUser Func`: The callback function to reload the user list
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -10,7 +10,9 @@
|
||||
import { fade } from "svelte/transition";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { reloadUser } = $props();
|
||||
let {
|
||||
reloadUser
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let message = $state({ msg: "", color: "#d63384" });
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
Properties:
|
||||
- `roles [String]!`: List of roles used in app as strings
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list after role edit
|
||||
- `reloadUser Func`: The callback function to reload the user list
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -13,7 +11,10 @@
|
||||
import { fade } from "svelte/transition";
|
||||
|
||||
/* SVelte 5 Props */
|
||||
let {roles, reloadUser } = $props();
|
||||
let {
|
||||
roles,
|
||||
reloadUser
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let message = $state({ msg: "", color: "#d63384" });
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<!--
|
||||
@component Admin edit notice.txt content card
|
||||
@component Admin edit notice content card
|
||||
|
||||
Properties:
|
||||
- `ncontent String`: The homepage notice content
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -7,7 +10,9 @@
|
||||
import { fade } from "svelte/transition";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { ncontent } = $props();
|
||||
let {
|
||||
ncontent
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let message = $state({ msg: "", color: "#d63384" });
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
@component User management table
|
||||
|
||||
Properties:
|
||||
- `users [Object]?`: List of users
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list
|
||||
- `users [Object]?`: List of users [Bindable, Default: []]
|
||||
- `reloadUser Func`: The callback function to reload the user list
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -19,7 +17,10 @@
|
||||
import ShowUsersRow from "./ShowUsersRow.svelte";
|
||||
|
||||
/*Svelte 5 Props */
|
||||
let { users = $bindable([]), reloadUser } = $props();
|
||||
let {
|
||||
users = $bindable([]),
|
||||
reloadUser
|
||||
} = $props();
|
||||
|
||||
/* Functions */
|
||||
function deleteUser(username) {
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
import { fetchJwt } from "../../generic/utils.js"
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { user } = $props();
|
||||
let {
|
||||
user
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let jwt = $state("");
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<!--
|
||||
@component Support option select card
|
||||
|
||||
Properties:
|
||||
- `config Object`: Config includes latest option states
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -7,7 +10,9 @@
|
||||
import { fade } from "svelte/transition";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { config } = $props();
|
||||
let {
|
||||
config
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let message = $state("");
|
||||
|
||||
@@ -3,11 +3,10 @@
|
||||
|
||||
Properties:
|
||||
- `config Object`: Current cc-config
|
||||
- `message Object`: Message to display on success or error
|
||||
- `displayMessage Bool`: If to display message content
|
||||
|
||||
Events:
|
||||
- `update-config, {selector: String, target: String}`: Trigger upstream update of the config option
|
||||
- `message Object`: Message to display on success or error [Bindable]
|
||||
- `displayMessage Bool`: If to display message content [Bindable]
|
||||
- `cbmode Bool?`: Current colorblindness mode state [Bindable, Default: false]
|
||||
- `updateSetting Func`: The callback function to apply current option selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -324,8 +323,8 @@
|
||||
|
||||
<Row cols={1} class="p-2 g-2">
|
||||
<!-- COLORSCHEME -->
|
||||
<Col
|
||||
><Card>
|
||||
<Col>
|
||||
<Card>
|
||||
<form
|
||||
id="colorscheme-form"
|
||||
method="post"
|
||||
@@ -337,13 +336,13 @@
|
||||
style="margin-bottom: 1em; display: flex; align-items: center;"
|
||||
>
|
||||
<div>Color Scheme for Timeseries Plots {cbmode ? `(Color Blind Friendly Palettes)` : ``}</div>
|
||||
{#if displayMessage && message.target == "cs"}<div
|
||||
style="margin-left: auto; font-size: 0.9em;"
|
||||
>
|
||||
<code style="color: {message.color};" out:fade
|
||||
>Update: {message.msg}</code
|
||||
>
|
||||
</div>{/if}
|
||||
{#if displayMessage && message.target == "cs"}
|
||||
<div style="margin-left: auto; font-size: 0.9em;">
|
||||
<code style="color: {message.color};" out:fade>
|
||||
Update: {message.msg}
|
||||
</code>
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_colorscheme" />
|
||||
<Table hover>
|
||||
@@ -369,8 +368,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{#each rgbrow as rgb}
|
||||
<span class="color-dot" style="background-color: {rgb};"
|
||||
></span>
|
||||
<span class="color-dot" style="background-color: {rgb};"></span>
|
||||
{/each}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -379,8 +377,8 @@
|
||||
</tbody>
|
||||
</Table>
|
||||
</form>
|
||||
</Card></Col
|
||||
>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
|
||||
Properties:
|
||||
- `config Object`: Current cc-config
|
||||
- `message Object`: Message to display on success or error
|
||||
- `displayMessage Bool`: If to display message content
|
||||
|
||||
Events:
|
||||
- `update-config, {selector: String, target: String}`: Trigger upstream update of the config option
|
||||
- `message Object`: Message to display on success or error [Bindable]
|
||||
- `displayMessage Bool`: If to display message content [Bindable]
|
||||
- `updateSetting Func`: The callback function to apply current option selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -31,8 +29,8 @@
|
||||
|
||||
<Row cols={3} class="p-2 g-2">
|
||||
<!-- LINE WIDTH -->
|
||||
<Col
|
||||
><Card class="h-100">
|
||||
<Col>
|
||||
<Card class="h-100">
|
||||
<form
|
||||
id="line-width-form"
|
||||
method="post"
|
||||
@@ -75,12 +73,12 @@
|
||||
</div>
|
||||
<Button color="primary" type="submit">Submit</Button>
|
||||
</form>
|
||||
</Card></Col
|
||||
>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<!-- PLOTS PER ROW -->
|
||||
<Col
|
||||
><Card class="h-100">
|
||||
<Col>
|
||||
<Card class="h-100">
|
||||
<form
|
||||
id="plots-per-row-form"
|
||||
method="post"
|
||||
@@ -96,13 +94,13 @@
|
||||
style="margin-bottom: 1em; display: flex; align-items: center;"
|
||||
>
|
||||
<div>Plots per Row</div>
|
||||
{#if displayMessage && message.target == "ppr"}<div
|
||||
style="margin-left: auto; font-size: 0.9em;"
|
||||
>
|
||||
<code style="color: {message.color};" out:fade
|
||||
>Update: {message.msg}</code
|
||||
>
|
||||
</div>{/if}
|
||||
{#if displayMessage && message.target == "ppr"}
|
||||
<div style="margin-left: auto; font-size: 0.9em;">
|
||||
<code style="color: {message.color};" out:fade>
|
||||
Update: {message.msg}
|
||||
</code>
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_view_plotsPerRow" />
|
||||
<div class="mb-3">
|
||||
@@ -123,12 +121,12 @@
|
||||
</div>
|
||||
<Button color="primary" type="submit">Submit</Button>
|
||||
</form>
|
||||
</Card></Col
|
||||
>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<!-- BACKGROUND -->
|
||||
<Col class="d-flex justify-content-between"
|
||||
><Card class="h-100" style="width: 49%;">
|
||||
<Col class="d-flex justify-content-between">
|
||||
<Card class="h-100" style="width: 49%;">
|
||||
<form
|
||||
id="backgrounds-form"
|
||||
method="post"
|
||||
@@ -144,13 +142,13 @@
|
||||
style="margin-bottom: 1em; display: flex; align-items: center;"
|
||||
>
|
||||
<div>Colored Backgrounds</div>
|
||||
{#if displayMessage && message.target == "bg"}<div
|
||||
style="margin-left: auto; font-size: 0.9em;"
|
||||
>
|
||||
<code style="color: {message.color};" out:fade
|
||||
>Update: {message.msg}</code
|
||||
>
|
||||
</div>{/if}
|
||||
{#if displayMessage && message.target == "bg"}
|
||||
<div style="margin-left: auto; font-size: 0.9em;">
|
||||
<code style="color: {message.color};" out:fade>
|
||||
Update: {message.msg}
|
||||
</code>
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_colorBackground" />
|
||||
<div class="mb-3">
|
||||
@@ -190,13 +188,13 @@
|
||||
style="margin-bottom: 1em; display: flex; align-items: center;"
|
||||
>
|
||||
<div>Color Blind Mode</div>
|
||||
{#if displayMessage && message.target == "cbm"}<div
|
||||
style="margin-left: auto; font-size: 0.9em;"
|
||||
>
|
||||
<code style="color: {message.color};" out:fade
|
||||
>Update: {message.msg}</code
|
||||
>
|
||||
</div>{/if}
|
||||
{#if displayMessage && message.target == "cbm"}
|
||||
<div style="margin-left: auto; font-size: 0.9em;">
|
||||
<code style="color: {message.color};" out:fade>
|
||||
Update: {message.msg}
|
||||
</code>
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_colorblindMode" />
|
||||
<div class="mb-3">
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
|
||||
Properties:
|
||||
- `config Object`: Current cc-config
|
||||
- `message Object`: Message to display on success or error
|
||||
- `displayMessage Bool`: If to display message content
|
||||
- `message Object`: Message to display on success or error [Bindable]
|
||||
- `displayMessage Bool`: If to display message content [Bindable]
|
||||
- `username String!`: Empty string if auth. is disabled, otherwise the username as string
|
||||
- `isApi Bool!`: Is currently logged in user api authority
|
||||
|
||||
Events:
|
||||
- `update-config, {selector: String, target: String}`: Trigger upstream update of the config option
|
||||
- `updateSetting Func`: The callback function to apply current option selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -7,12 +7,13 @@
|
||||
- `disableClusterSelection Bool?`: Is the selection disabled [Default: false]
|
||||
- `startTimeQuickSelect Bool?`: Render startTime quick selections [Default: false]
|
||||
- `matchedJobs Number?`: Number of jobs matching the filter [Default: -2]
|
||||
|
||||
Events:
|
||||
- `update-filters, {filters: [Object]?}`: The detail's 'filters' prop are new filter items to be applied
|
||||
- `showFilter Func`: If the filter component should be rendered in addition to total count info [Default: true]
|
||||
- `applyFilters Func`: The callback function to apply current filter selection
|
||||
|
||||
Functions:
|
||||
- `void updateFilters (additionalFilters: Object?)`: Handles new filters from nested components, triggers upstream update event
|
||||
- `void updateFilters (additionalFilters: Object, force: Bool)`:
|
||||
Handles new filters from nested components, triggers upstream update event.
|
||||
'additionalFilters' usually added to existing selection, but can be forced to overwrite instead.
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -510,8 +511,6 @@
|
||||
setFilter={(filter) => updateFilters(filter)}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
:global(.cc-dropdown-on-hover:hover .dropdown-menu) {
|
||||
display: block;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
@component jobCompare component; compares jobs according to set filters or job selection
|
||||
|
||||
Properties:
|
||||
- `matchedCompareJobs Number?`: Number of matched jobs for selected filters [Default: 0]
|
||||
- `matchedCompareJobs Number?`: Number of matched jobs for selected filters [Bindable, Default: 0]
|
||||
- `metrics [String]?`: The currently selected metrics [Default: User-Configured Selection]
|
||||
- `showFootprint Bool`: If to display the jobFootprint component
|
||||
- `filterBuffer [Object]?`: Latest selected filters to keep for view switch to job list [Default: []]
|
||||
|
||||
Functions:
|
||||
- `queryJobs(filters?: [JobFilter])`: Load jobs data with new filters, starts from page 1
|
||||
@@ -104,6 +104,7 @@
|
||||
|
||||
/* Effect */
|
||||
$effect(() => {
|
||||
// Update bound property
|
||||
matchedCompareJobs = $compareData?.data != null ? $compareData.data.jobsMetricStats.length : -1;
|
||||
});
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
|
||||
Properties:
|
||||
- `sorting Object?`: Currently active sorting [Default: {field: "startTime", type: "col", order: "DESC"}]
|
||||
- `matchedListJobs Number?`: Number of matched jobs for selected filters [Default: 0]
|
||||
- `matchedListJobs Number?`: Number of matched jobs for selected filters [Bindable, Default: 0]
|
||||
- `metrics [String]?`: The currently selected metrics [Default: User-Configured Selection]
|
||||
- `showFootprint Bool`: If to display the jobFootprint component
|
||||
- `showFootprint Bool?`: If to display the jobFootprint component [Default: false]
|
||||
- `selectedJobs [Number]?`: IDs of jobs selected for job comparison [Bindable, Default: []]
|
||||
- `filterBuffer [Object]?`: Latest selected filters to keep for view switch to job compare [Default: []]
|
||||
|
||||
Functions:
|
||||
- `refreshJobs()`: Load jobs data with unchanged parameters and 'network-only' keyword
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<!--
|
||||
@component Organized display of plots as bootstrap (sveltestrap) grid
|
||||
@component Organized display of svelte 5 snippets as bootstrap (sveltestrap) grid
|
||||
|
||||
Properties:
|
||||
- `items [Any]`: Array of information required for gridContent SV5 snippet
|
||||
- `itemsPerRow Number`: Elements to render per row
|
||||
- `items [Any]`: List of plot components to render
|
||||
- `gridContent Func`: Svelte 5 Snippet from Upstream; Defines what and how to render $item data
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
@component Filter sub-component for selecting cluster and subCluster
|
||||
|
||||
Properties:
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `presetCluster String?`: The latest selected cluster [Default: ""]
|
||||
- `presetPartition String?`: The latest selected partition [Default: ""]
|
||||
- `disableClusterSelection Bool?`: Is the selection disabled [Default: false]
|
||||
- `isModified Bool?`: Is this filter component modified [Default: false]
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `cluster String?`: The currently selected cluster [Default: null]
|
||||
- `partition String?`: The currently selected partition (i.e. subCluster) [Default: null]
|
||||
|
||||
Events:
|
||||
- `set-filter, {String?, String?}`: Set 'cluster, subCluster' filter in upstream component
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -33,14 +30,13 @@
|
||||
setFilter
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
const clusters = getContext("clusters");
|
||||
const initialized = getContext("initialized");
|
||||
|
||||
/* State Init */
|
||||
let pendingCluster = $state(presetCluster);
|
||||
let pendingPartition = $state(presetPartition);
|
||||
|
||||
/* Derived Vars */
|
||||
const clusters = $derived(getContext("clusters"));
|
||||
const initialized = $derived(getContext("initialized"));
|
||||
|
||||
</script>
|
||||
|
||||
<Modal {isOpen} toggle={() => (isOpen = !isOpen)}>
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
@component Filter sub-component for selecting job duration
|
||||
|
||||
Properties:
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `lessThan Number?`: Amount of seconds [Default: null]
|
||||
- `moreThan Number?`: Amount of seconds [Default: null]
|
||||
- `from Number?`: Epoch time in seconds [Default: null]
|
||||
- `to Number?`: Epoch time in seconds [Default: null]
|
||||
|
||||
Events:
|
||||
- `set-filter, {Number, Number, Number, Number}`: Set 'lessThan, moreThan, from, to' filter in upstream component
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `presetDuration Object?`: Object containing the latest duration filter parameters
|
||||
- Default: { lessThan: null, moreThan: null, from: null, to: null }
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -26,7 +22,12 @@
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
isOpen = $bindable(false),
|
||||
presetDuration ={lessThan: null, moreThan: null, from: null, to: null},
|
||||
presetDuration = {
|
||||
lessThan: null,
|
||||
moreThan: null,
|
||||
from: null,
|
||||
to: null
|
||||
},
|
||||
setFilter
|
||||
} = $props();
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
@component Filter sub-component for selecting job energies
|
||||
|
||||
Properties:
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `energy Object?`: The currently selected total energy filter [Default: {from:null, to:null}]
|
||||
|
||||
Events:
|
||||
- `set-filter, {Object}`: Set 'energy' filter in upstream component
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, efault: false]
|
||||
- `presetEnergy Object?`: Object containing the latest energy filter parameters
|
||||
- Default: { from: null, to: null }
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -22,13 +21,15 @@
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
isOpen = $bindable(false),
|
||||
presetEnergy= {from: null, to: null},
|
||||
presetEnergy = {
|
||||
from: null,
|
||||
to: null
|
||||
},
|
||||
setFilter,
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let energyState = $state(presetEnergy);
|
||||
|
||||
</script>
|
||||
|
||||
<Modal {isOpen} toggle={() => (isOpen = !isOpen)}>
|
||||
|
||||
@@ -3,15 +3,21 @@
|
||||
|
||||
Properties:
|
||||
- `icon String`: Sveltestrap icon name
|
||||
- `modified Bool?`: Optional if filter is modified [Default: false]
|
||||
- `onclick Fn()`: Opens Modal on click
|
||||
- `children Fn()?`: Internal prop, Svelte 5 version of <slot/>
|
||||
- `modified Bool?`: Optional if filter is modified
|
||||
- `onclick Func`: Opens Modal on click
|
||||
- `children Func`: Internal prop, Svelte 5 version of <slot/>
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Button, Icon } from "@sveltestrap/sveltestrap";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { icon, modified, onclick, children } = $props();
|
||||
let {
|
||||
icon,
|
||||
modified,
|
||||
onclick,
|
||||
children
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<Button class="mr-2 mb-1" outline color={modified ? "warning" : "primary"} {onclick}>
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
@component Filter sub-component for selecting job states
|
||||
|
||||
Properties:
|
||||
- `isModified Bool?`: Is this filter component modified [Default: false]
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `states [String]?`: The currently selected states [Default: [...allJobStates]]
|
||||
|
||||
Events:
|
||||
- `set-filter, {[String]}`: Set 'states' filter in upstream component
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `presetStates [String]?`: The latest selected filter state [Default: [...allJobStates]]
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
|
||||
Exported:
|
||||
- `const allJobStates [String]`: List of all available job states used in cc-backend
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
@component Filter sub-component for selecting job resources
|
||||
|
||||
Properties:
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `activeCluster String?`: The currently selected cluster name [Default: null]
|
||||
- `numNodes Object?`: The currently selected numNodes filter [Default: {from:null, to:null}]
|
||||
- `numHWThreads Object?`: The currently selected numHWThreads filter [Default: {from:null, to:null}]
|
||||
- `numAccelerators Object?`: The currently selected numAccelerators filter [Default: {from:null, to:null}]
|
||||
- `namedNode String?`: The currently selected single named node (= hostname) [Default: null]
|
||||
|
||||
Events:
|
||||
- `set-filter, {Object, Object, Object, String}`: Set 'numNodes, numHWThreads, numAccelerators, namedNode' filter in upstream component
|
||||
- `presetNumNodes Object?`: The currently selected numNodes filter [Default: {from:null, to:null}]
|
||||
- `presetNumHWThreads Object?`: The currently selected numHWThreads filter [Default: {from:null, to:null}]
|
||||
- `presetNumAccelerators Object?`: The currently selected numAccelerators filter [Default: {from:null, to:null}]
|
||||
- `presetNamedNode String?`: The currently selected single named node (= hostname) [Default: null]
|
||||
- `presetNodeMatch String?`: The currently selected single named node (= hostname) [Default: "eq"]
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
@component Filter sub-component for selecting job starttime
|
||||
|
||||
Properties:
|
||||
- `isModified Bool?`: Is this filter component modified [Default: false]
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `from Object?`: The currently selected from startime [Default: null]
|
||||
- `to Object?`: The currently selected to starttime (i.e. subCluster) [Default: null]
|
||||
- `range String?`: The currently selected starttime range as string [Default: ""]
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `presetStartTime Object?`: Object containing the latest duration filter parameters
|
||||
- Default: { from: null, to: null, range: "" }
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
|
||||
Events:
|
||||
- `set-filter, {String?, String?}`: Set 'from, to' filter in upstream component
|
||||
Exported:
|
||||
- `const startTimeSelectOptions [Object]`: List of available fixed startTimes used in cc-backend
|
||||
-->
|
||||
|
||||
<script module>
|
||||
@@ -24,7 +23,6 @@
|
||||
|
||||
<script>
|
||||
/* Note: Ignore VSCode reported 'A component can only have one instance-level <script> element' error */
|
||||
|
||||
import { parse, format, sub } from "date-fns";
|
||||
import {
|
||||
Row,
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
@component Filter sub-component for selecting job statistics
|
||||
|
||||
Properties:
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `stats [Object]?`: The currently selected statistics filter [Default: []]
|
||||
|
||||
Events:
|
||||
- `set-filter, {[Object]}`: Set 'stats' filter in upstream component
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `presetStats [Object]?`: The latest selected statistics filter
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
@component Filter sub-component for selecting tags
|
||||
|
||||
Properties:
|
||||
- `isModified Bool?`: Is this filter component modified [Default: false]
|
||||
- `isOpen Bool?`: Is this filter component opened [Default: false]
|
||||
- `tags [Number]?`: The currently selected tags (as IDs) [Default: []]
|
||||
|
||||
Events:
|
||||
- `set-filter, {[Number]}`: Set 'tag' filter in upstream component
|
||||
- `isOpen Bool?`: Is this filter component opened [Bindable, Default: false]
|
||||
- `presetTags [Number]?`: The currently selected tags (as IDs) [Default: []]
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
Properties:
|
||||
- `cJobs JobLinkResultList`: List of concurrent Jobs
|
||||
- `showLinks Bool?`: Show list as clickable links [Default: false]
|
||||
- `renderCard Bool?`: If to render component as content only or with card wrapping [Default: true]
|
||||
- `renderCard Bool?`: If to render component as content only or with card wrapping [Default: false]
|
||||
- `width String?`: Width of the card [Default: 'auto']
|
||||
- `height String?`: Height of the card [Default: '310px']
|
||||
- `height String?`: Height of the card [Default: '400px']
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
Properties:
|
||||
- `initially Number?`: Initial refresh interval on component mount, in seconds [Default: null]
|
||||
|
||||
Events:
|
||||
- `refresh`: When fired, the upstream component refreshes its contents
|
||||
- `presetClass String?`: Custom class to apply to main <InputGroup>
|
||||
- `onRefresh Func`: The callback function to perform at refresh times
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Button, Icon, Input, InputGroup } from "@sveltestrap/sveltestrap";
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
@component Single tag pill component
|
||||
|
||||
Properties:
|
||||
- id: ID! (if the tag-id is known but not the tag type/name, this can be used)
|
||||
- tag: { id: ID!, type: String, name: String }
|
||||
- clickable: Boolean (default is true)
|
||||
- `id ID!`: (if the tag-id is known but not the tag type/name, this can be used)
|
||||
- `tag Object`: The tag Object
|
||||
- `clickable Bool`: If tag should be click reactive [Default: true]
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -45,6 +45,14 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<a target={clickable ? "_blank" : null} href={clickable ? `/monitoring/jobs/?tag=${id}` : null}>
|
||||
{#if tag}
|
||||
<span style="background-color:{getScopeColor(tag?.scope)};" class="my-1 badge text-dark">{tag.type}: {tag.name}</span>
|
||||
{:else}
|
||||
Loading...
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
<style>
|
||||
a {
|
||||
margin-right: 0.5rem;
|
||||
@@ -53,11 +61,3 @@
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<a target={clickable ? "_blank" : null} href={clickable ? `/monitoring/jobs/?tag=${id}` : null}>
|
||||
{#if tag}
|
||||
<span style="background-color:{getScopeColor(tag?.scope)};" class="my-1 badge text-dark">{tag.type}: {tag.name}</span>
|
||||
{:else}
|
||||
Loading...
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
@component Job Info Subcomponent; allows management of job tags by deletion or new entries
|
||||
|
||||
Properties:
|
||||
- `jobTags [Number]`: The array of currently designated tags [Bindable]
|
||||
- `job Object`: The job object
|
||||
- `jobTags [Number]`: The array of currently designated tags
|
||||
- `username String`: Empty string if auth. is disabled, otherwise the username as string
|
||||
- `authlevel Number`: The current users authentication level
|
||||
- `roles [Number]`: Enum containing available roles
|
||||
- `renderModal Bool?`: If component is rendered as bootstrap modal button [Default: true]
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { getContext } from "svelte";
|
||||
import { gql, getContextClient, mutationStore } from "@urql/svelte";
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
- `presetProject String?`: Currently active project filter [Default: '']
|
||||
- `authlevel Number?`: The current users authentication level [Default: null]
|
||||
- `roles [Number]?`: Enum containing available roles [Default: null]
|
||||
|
||||
Events:
|
||||
- `set-filter, {String?, String?, String?}`: Set 'user, project, jobName' filter in upstream component
|
||||
- `setFilter Func`: The callback function to apply current filter selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
Properties:
|
||||
- `job Object`: The Job Object (GraphQL.Job)
|
||||
- `jobTags [Number]?`: The jobs tags as IDs, default useful for dynamically updating the tags [Default: job.tags]
|
||||
- `showJobSelect Bool?`: Show job selection interface for job comparison [Default: false]
|
||||
- `showTagEdit Bool?`: Show tag editing interface [Default: false]
|
||||
- `username String?`: The current username
|
||||
- `authlevel Number`: The current user authentication level
|
||||
- `roles [String]`: Available roles
|
||||
- `isSelected Bool`: Whether job is selected for comparison [Bindable, Default: false]
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -16,12 +22,12 @@
|
||||
let {
|
||||
job,
|
||||
jobTags = job.tags,
|
||||
showTagedit = false,
|
||||
showJobSelect = false,
|
||||
showTagEdit = false,
|
||||
username = null,
|
||||
authlevel = null,
|
||||
roles = null,
|
||||
isSelected = $bindable(),
|
||||
showSelect = false,
|
||||
isSelected = $bindable(false),
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
@@ -49,7 +55,6 @@
|
||||
}
|
||||
|
||||
function clipJobId(jid) {
|
||||
|
||||
// Navigator clipboard api needs a secure context (https)
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
navigator.clipboard
|
||||
@@ -82,7 +87,7 @@
|
||||
({job.cluster})
|
||||
</span>
|
||||
<span>
|
||||
{#if showSelect}
|
||||
{#if showJobSelect}
|
||||
<Button id={`${job.cluster}-${job.jobId}-select`} outline={!isSelected} color={isSelected? `success`: `secondary`} size="sm" class="mr-2"
|
||||
onclick={() => {
|
||||
isSelected = !isSelected
|
||||
@@ -193,7 +198,7 @@
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
{#if showTagedit}
|
||||
{#if showTagEdit}
|
||||
<hr class="mt-0 mb-2"/>
|
||||
<p class="mb-1">
|
||||
<TagManagement bind:jobTags {job} {username} {authlevel} {roles} renderModal/> :
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
- `metrics [String]`: Currently selected metrics
|
||||
- `plotWidth Number`: Width of the sub-components
|
||||
- `plotHeight Number?`: Height of the sub-components [Default: 275]
|
||||
- `showFootprint Bool`: Display of footprint component for job
|
||||
- `triggerMetricRefresh Bool?`: If changed to true from upstream, will trigger metric query
|
||||
- `showFootprint Bool`: Display of footprint component for job [Default: false]
|
||||
- `previousSelect Bool`: The latest job select state for job comparison [Default: false]
|
||||
- `triggerMetricRefresh Bool?`: If changed to true from upstream, will trigger metric query [Default: false]
|
||||
- `selectJob Func`: The callback function to select a job for comparison
|
||||
- `unselectJob Func`: The callback function to unselect a job from comparison
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -21,15 +24,15 @@
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
triggerMetricRefresh = false,
|
||||
job,
|
||||
metrics,
|
||||
plotWidth,
|
||||
plotHeight = 275,
|
||||
showFootprint,
|
||||
showFootprint = false,
|
||||
previousSelect = false,
|
||||
triggerMetricRefresh = false,
|
||||
selectJob,
|
||||
unselectJob
|
||||
unselectJob,
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
@component Pagination selection component
|
||||
|
||||
Properties:
|
||||
- page: Number (changes from inside)
|
||||
- itemsPerPage: Number (changes from inside)
|
||||
- totalItems: Number (only displayed)
|
||||
|
||||
Events:
|
||||
- "update-paging": { page: Number, itemsPerPage: Number }
|
||||
- Dispatched once immediately and then each time page or itemsPerPage changes
|
||||
- `page Number?`: Current page [Default: 1]
|
||||
- `itemsPerPage Number?`: Current items displayed per page [Default: 10]
|
||||
- `totalItems Number?`: Total count of items [Default: 0]
|
||||
- `itemText String?`: Name of paged items, e.g. "Jobs" [Default: "items"]
|
||||
- `pageSizes [Number!]?`: Options available for page sizes [Default: [10, 25, 50]]
|
||||
- `updatePaging Func`: The callback function to apply current paging selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<!--
|
||||
@component Main plot component, based on uPlot; metricdata values by time
|
||||
@component Job Data Compare Plot Component, based on uPlot; metricData values by jobId/startTime
|
||||
|
||||
Only width/height should change reactively.
|
||||
|
||||
Properties:
|
||||
- `metric String`: The metric name
|
||||
- `metric String?`: The metric name [Default: ""]
|
||||
- `width Number?`: The plot width [Default: 0]
|
||||
- `height Number?`: The plot height [Default: 300]
|
||||
- `data [Array]`: The metric data object
|
||||
- `cluster String`: Cluster name of the parent job / data
|
||||
- `subCluster String`: Name of the subCluster of the parent job
|
||||
- `data [Array]`: The data object [Default: null]
|
||||
- `title String?`: Plot title [Default: ""]
|
||||
- `xlabel String?`: Plot X axis label [Default: ""]
|
||||
- `ylabel String?`: Plot Y axis label [Default: ""]
|
||||
- `yunit String?`: Plot Y axis unit [Default: ""]
|
||||
- `xticks Array`: Array containing jobIDs [Default: []]
|
||||
- `xinfo Array`: Array containing job information [Default: []]
|
||||
- `forResources Bool?`: Render this plot for allocated jobResources [Default: false]
|
||||
- `plot Sync Object!`: uPlot cursor synchronization key
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<!--
|
||||
@component Histogram Plot based on uPlot Bars
|
||||
|
||||
Only width/height should change reactively.
|
||||
|
||||
Properties:
|
||||
- `data [[],[]]`: uPlot data structure array ( [[],[]] == [X, Y] )
|
||||
- `usesBins Bool?`: If X-Axis labels are bins ("XX-YY") [Default: false]
|
||||
- `width Number?`: Plot width (reactively adaptive) [Default: 500]
|
||||
- `height Number?`: Plot height (reactively adaptive) [Default: 300]
|
||||
- `width Number?`: Plot width (reactively adaptive) [Default: null]
|
||||
- `height Number?`: Plot height (reactively adaptive) [Default: 250]
|
||||
- `title String?`: Plot title [Default: ""]
|
||||
- `xlabel String?`: Plot X axis label [Default: ""]
|
||||
- `xunit String?`: Plot X axis unit [Default: ""]
|
||||
- `xtime Bool?`: If X-Axis is based on time information [Default: false]
|
||||
- `ylabel String?`: Plot Y axis label [Default: ""]
|
||||
- `yunit String?`: Plot Y axis unit [Default: ""]
|
||||
-->
|
||||
|
||||
@@ -11,13 +11,16 @@
|
||||
- `series [GraphQL.Series]`: The metric data object
|
||||
- `useStatsSeries Bool?`: If this plot uses the statistics Min/Max/Median representation; automatically set to according bool [Default: false]
|
||||
- `statisticsSeries [GraphQL.StatisticsSeries]?`: Min/Max/Median representation of metric data [Default: null]
|
||||
- `cluster String`: Cluster name of the parent job / data
|
||||
- `cluster String?`: Cluster name of the parent job / data [Default: ""]
|
||||
- `subCluster String`: Name of the subCluster of the parent job
|
||||
- `isShared Bool?`: If this job used shared resources; will adapt threshold indicators accordingly [Default: false]
|
||||
- `forNode Bool?`: If this plot is used for node data display; will render x-axis as negative time with $now as maximum [Default: false]
|
||||
- `numhwthreads Number?`: Number of job HWThreads [Default: 0]
|
||||
- `numaccs Number?`: Number of job Accelerators [Default: 0]
|
||||
- `zoomState Object?`: The last zoom state to preserve on user zoom [Default: null]
|
||||
- `thersholdState Object?`: The last threshold state to preserve on user zoom [Default: null]
|
||||
- `extendedLegendData Object?`: Additional information to be rendered in an extended legend [Default: null]
|
||||
- `onZoom Func`: Callback function to handle zoom-in event
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
@component Pie Plot based on chart.js Pie
|
||||
|
||||
Properties:
|
||||
- `canvasId String?`: Unique ID for correct parallel chart.js rendering [Default: "pie-default"]
|
||||
- `size Number`: X and Y size of the plot, for square shape
|
||||
- `sliceLabel String`: Label used in segment legends
|
||||
- `quantities [Number]`: Data values
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
Properties:
|
||||
- `polarMetrics [Object]?`: Metric names and scaled peak values for rendering polar plot [Default: [] ]
|
||||
- `polarData [GraphQL.JobMetricStatWithName]?`: Metric data [Default: null]
|
||||
- `canvasId String?`: Unique ID for correct parallel chart.js rendering [Default: "polar-default"]
|
||||
- `height Number?`: Plot height [Default: 365]
|
||||
-->
|
||||
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
- `X [Number]`: Data from first selected metric as X-values
|
||||
- `Y [Number]`: Data from second selected metric as Y-values
|
||||
- `S GraphQl.TimeWeights.X?`: Float to scale the data with [Default: null]
|
||||
- `color String`: Color of the drawn scatter circles
|
||||
- `width Number`:
|
||||
- `height Number`:
|
||||
- `xLabel String`:
|
||||
- `yLabel String`:
|
||||
- `color String?`: Color of the drawn scatter circles [Default: '#0066cc']
|
||||
- `width Number?`: Width of the plot [Default: 250]
|
||||
- `height Number?`: Height of the plot [Default: 300]
|
||||
- `xLabel String?`: X-Axis Label [Ðefault: ""]
|
||||
- `yLabel String?`: Y-Axis Label [Default: ""]
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { formatNumber } from '../units.js'
|
||||
@@ -23,8 +24,8 @@
|
||||
color = '#0066cc',
|
||||
width = 250,
|
||||
height = 300,
|
||||
xLabel,
|
||||
yLabel,
|
||||
xLabel = "",
|
||||
yLabel = "",
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
|
||||
@@ -4,17 +4,16 @@ Originally created by Michael Keller (https://github.com/mhkeller/svelte-double-
|
||||
Changes: remove dependency, text inputs, configurable value ranges, on:change event
|
||||
Changes #2: Rewritten for Svelte 5, removed bodyHandler
|
||||
-->
|
||||
|
||||
<!--
|
||||
@component Selector component to display range selections via min and max double-sliders
|
||||
|
||||
Properties:
|
||||
- min: Number
|
||||
- max: Number
|
||||
- sliderHandleFrom: Number (Starting position of slider #1)
|
||||
- sliderHandleTo: Number (Starting position of slider #2)
|
||||
|
||||
Events:
|
||||
- `change`: [Number, Number] (Positions of the two sliders)
|
||||
- `sliderMin Number!`: Minimum possible value for slider
|
||||
- `sliderMax Number!`: Maximum possible value for slider
|
||||
- `fromPreset Number?`: Latest "from" value selection [Default: 1]
|
||||
- `toPreset Number?`: Latest "to" value selection [Default: 100]
|
||||
- `changeRange Func`: The callback function to apply current range selections
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -154,7 +153,6 @@ Changes #2: Rewritten for Svelte 5, removed bodyHandler
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="double-range-container">
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
Properties:
|
||||
- `cluster String`: Currently selected cluster
|
||||
- `selectedHistograms [String]`: The currently selected metrics to display as histogram
|
||||
- ìsOpen Bool`: Is selection opened
|
||||
- `ìsOpen Bool`: Is selection opened [Bindable]
|
||||
- `applyChange Func`: The callback function to apply current selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
@component Metric selector component; allows reorder via drag and drop
|
||||
|
||||
Properties:
|
||||
- `metrics [String]`: (changes from inside, needs to be initialised, list of selected metrics)
|
||||
- `isOpen Bool`: (can change from inside and outside)
|
||||
- `configName String`: The config key for the last saved selection (constant)
|
||||
- `allMetrics [String]?`: List of all available metrics [Default: null]
|
||||
- `isOpen Bool`: Is selection modal opened [Bindable, Default: false]
|
||||
- `showFootprint Bool?`: Upstream state of whether to render footprint card [Bindable, Default: false]
|
||||
- `totalMetrics Number?`: Total available metrics [Bindable, Default: 0]
|
||||
- `presetMetrics [String]`: Latest selection of metrics [Default: []]
|
||||
- `cluster String?`: The currently selected cluster [Default: null]
|
||||
- `showFootprint Bool?`: Upstream state of wether to render footpritn card [Default: false]
|
||||
- `subCluster String?`: The currently selected subCluster [Default: null]
|
||||
- `footprintSelect Bool?`: Render checkbox for footprint display in upstream component [Default: false]
|
||||
- `preInitialized Bool?`: If the parent component has a dedicated call to init() [Default: false]
|
||||
- `configName String`: The config key for the last saved selection (constant)
|
||||
- `applyMetrics Func`: The callback function to apply current selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -64,7 +67,7 @@
|
||||
|
||||
/* Reactive Effects */
|
||||
$effect(() => {
|
||||
totalMetrics = allMetrics.size;
|
||||
totalMetrics = allMetrics?.size || 0;
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
@component Selector for sorting field and direction
|
||||
|
||||
Properties:
|
||||
- sorting: { field: String, order: "DESC" | "ASC" } (changes from inside)
|
||||
- isOpen: Boolean (can change from inside and outside)
|
||||
- `presetSorting Object?`: The latest sort selection state
|
||||
- Default { field: "startTime", type: "col", order: "DESC" }
|
||||
- `isOpen Bool?`: Is modal opened [Bindable, Default: false]
|
||||
- `applySorting Func`: The callback function to apply current selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
@component Selector for specified real time ranges for data cutoff; used in systems and nodes view
|
||||
|
||||
Properties:
|
||||
- `from Date`: The datetime to start data display from
|
||||
- `to Date`: The datetime to end data display at
|
||||
- `presetFrom Date`: The latest "from" JS Date Object
|
||||
- `presetTo Date`: The latest Date "to" JS Date Object
|
||||
- `customEnabled Bool?`: Allow custom time window selection [Default: true]
|
||||
- `options Object? {String:Number}`: The quick time selection options [Default: {..., "Last 24hrs": 24*60*60}]
|
||||
|
||||
Events:
|
||||
- `change, {Date, Date}`: Set 'from, to' values in upstream component
|
||||
- `applyTime Func`: The callback function to apply current selection
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -6,7 +6,7 @@ const headerDomTarget = document.getElementById('svelte-header');
|
||||
if (headerDomTarget != null) {
|
||||
mount(Header, {
|
||||
target: headerDomTarget,
|
||||
props: { // { ...header },
|
||||
props: {
|
||||
username: hUsername,
|
||||
authlevel: hAuthlevel,
|
||||
clusters: hClusters,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Properties:
|
||||
- `job Object`: The GQL job object
|
||||
- `width String?`: Width of the card [Default: 'auto']
|
||||
- `height String?`: Height of the card [Default: '310px']
|
||||
- `height String?`: Height of the card [Default: '400px']
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -17,7 +17,6 @@
|
||||
import JobFootprintBars from "./jobsummary/JobFootprintBars.svelte";
|
||||
import JobFootprintPolar from "./jobsummary/JobFootprintPolar.svelte";
|
||||
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
job,
|
||||
@@ -25,6 +24,7 @@
|
||||
height = "400px",
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
const showFootprintTab = !!getContext("cc-config")[`job_view_showFootprint`];
|
||||
</script>
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
- `metricName String`: The metrics name
|
||||
- `metricUnit Object`: The metrics GQL unit object
|
||||
- `nativeScope String`: The metrics native scope
|
||||
- `scopes [String]`: The scopes returned for this metric
|
||||
- `rawData [Object]`: Metric data for all scopes returned for this metric
|
||||
- `presetScopes [String]`: The preset scopes returned for this metric
|
||||
- `isShared Bool?`: If this job used shared resources; will adapt threshold indicators accordingly in downstream plots [Default: false]
|
||||
-->
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
import { findJobFootprintThresholds } from "../../generic/utils.js";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let {job} = $props();
|
||||
let {
|
||||
job
|
||||
} = $props();
|
||||
|
||||
/* Derived */
|
||||
// Prepare Job Footprint Data Based On Values Saved In Database
|
||||
@@ -167,8 +169,7 @@
|
||||
<Tooltip
|
||||
target={`footprint-${job.jobId}-${index}`}
|
||||
placement="right"
|
||||
>{fpd.message}</Tooltip
|
||||
>
|
||||
>{fpd.message}</Tooltip>
|
||||
</div>
|
||||
<Row cols={12} class={(jobFootprintData.length == (index + 1)) ? 'mb-0' : 'mb-2'}>
|
||||
{#if fpd.dir}
|
||||
@@ -205,8 +206,7 @@
|
||||
<Tooltip
|
||||
target={`footprint-${job.jobId}-${index}`}
|
||||
placement="right"
|
||||
>{fpd.message}</Tooltip
|
||||
>
|
||||
>{fpd.message}</Tooltip>
|
||||
{/if}
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
import Polar from "../../generic/plots/Polar.svelte";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let { job } = $props();
|
||||
let {
|
||||
job
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
// Metric Names Configured To Be Footprints For (sub)Cluster
|
||||
|
||||
@@ -123,7 +123,6 @@
|
||||
return s.dir != "up" ? s1[stat] - s2[stat] : s2[stat] - s1[stat];
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<Table class="mb-0">
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
|
||||
Properties:
|
||||
- `cluster String`: The nodes' cluster
|
||||
- `subCluster String`: The nodes' subCluster
|
||||
- `subCluster String`: The nodes' subCluster [Default: ""]
|
||||
- `ccconfig Object?`: The ClusterCockpit Config Context [Default: null]
|
||||
- `selectedMetrics [String]`: The array of selected metrics
|
||||
- `systemUnits Object`: The object of metric units
|
||||
- `selectedMetrics [String]`: The array of selected metrics [Default []]
|
||||
- `selectedResolution Number?`: The selected data resolution [Default: 0]
|
||||
- `hostnameFilter String?`: The active hostnamefilter [Default: ""]
|
||||
- `presetSystemUnits Object`: The object of metric units [Default: null]
|
||||
- `from Date?`: The selected "from" date [Default: null]
|
||||
- `to Date?`: The selected "to" date [Default: null]
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
- `ccconfig Object?`: The ClusterCockpit Config Context [Default: null]
|
||||
- `cluster String`: The cluster to show status information for
|
||||
- `selectedMetric String?`: The selectedMetric input [Default: ""]
|
||||
- `hostnameFilter String?`: The active hostnamefilter [Default: ""]
|
||||
- `from Date?`: The selected "from" date [Default: null]
|
||||
- `to Date?`: The selected "to" date [Default: null]
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
Properties:
|
||||
- `cluster String`: The nodes' cluster
|
||||
- `subCluster String`: The nodes' subCluster
|
||||
- `cluster String`: The nodes' hostname
|
||||
- `hostname String`: The nodes' hostname
|
||||
- `dataHealth [Bool]`: Array of Booleans depicting state of returned data per metric
|
||||
- `nodeJobsData [Object]`: Data returned by GQL for jobs runninig on this node [Default: null]
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user