fix(editor): Insights FE fixes and improvements (#14398)

Co-authored-by: r00gm <raul00gm@gmail.com>
This commit is contained in:
Csaba Tuncsik
2025-04-07 10:55:56 +02:00
committed by GitHub
parent 8f9ea23019
commit e8a7acda6b
17 changed files with 277 additions and 133 deletions

View File

@@ -111,7 +111,9 @@ const mainMenuItems = computed(() => [
customIconSize: 'medium',
position: 'bottom',
route: { to: { name: VIEWS.INSIGHTS } },
available: hasPermission(['rbac'], { rbac: { scope: 'insights:list' } }),
available:
settingsStore.settings.insights.enabled &&
hasPermission(['rbac'], { rbac: { scope: 'insights:list' } }),
},
{
id: 'help',

View File

@@ -380,7 +380,11 @@ const toggleTimeout = () => {
const updateTimeSavedPerExecution = (value: string) => {
const numValue = parseInt(value, 10);
workflowSettings.value.timeSavedPerExecution = isNaN(numValue) ? undefined : numValue;
workflowSettings.value.timeSavedPerExecution = isNaN(numValue)
? undefined
: numValue < 0
? 0
: numValue;
};
onMounted(async () => {
@@ -826,6 +830,7 @@ onMounted(async () => {
:disabled="readOnlyEnv || !workflowPermissions.update"
data-test-id="workflow-settings-time-saved-per-execution"
type="number"
min="0"
@update:model-value="updateTimeSavedPerExecution"
/>
<span>{{ i18n.baseText('workflowSettings.timeSavedPerExecution.hint') }}</span>