Compare commits

...

6 Commits

Author SHA1 Message Date
YannC
d1fb098f5b chore(version): update to version 'v0.16.1' 2024-04-15 17:04:32 +02:00
YannC
9703cc48cb feat(ui): click anywhere on the row to open logs of a task in Gantt vue 2024-04-15 17:02:18 +02:00
YannC
31c3e5a4f6 feat(ui): set plugins menu back in the UI (#3558) 2024-04-15 17:02:13 +02:00
brian.mulier
bda52eb49d fix(ui): use new Monaco API for decorations to prevent editor from disappearing
closes #3536
2024-04-15 17:02:00 +02:00
brian.mulier
8a54b8ec7f fix(validate): restore ability to run validate command without any configuration 2024-04-15 17:01:34 +02:00
Loïc Mathieu
c34c82c1f9 fix: downgrade Micronaut
Go back to previously working version 4.3.4 as 4.3.7 have a bug when randomly the routeMatch is null on the security filter.
See https://github.com/kestra-io/kestra-ee/issues/1085
2024-04-15 17:01:24 +02:00
7 changed files with 54 additions and 26 deletions

View File

@@ -19,7 +19,7 @@ class FlowValidateCommandTest {
ByteArrayOutputStream out = new ByteArrayOutputStream();
System.setOut(new PrintStream(out));
try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) {
try (ApplicationContext ctx = ApplicationContext.builder().deduceEnvironment(false).start()) {
EmbeddedServer embeddedServer = ctx.getBean(EmbeddedServer.class);
embeddedServer.start();
@@ -39,7 +39,7 @@ class FlowValidateCommandTest {
ByteArrayOutputStream out = new ByteArrayOutputStream();
System.setOut(new PrintStream(out));
try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) {
try (ApplicationContext ctx = ApplicationContext.builder().deduceEnvironment(false).start()) {
EmbeddedServer embeddedServer = ctx.getBean(EmbeddedServer.class);
embeddedServer.start();

View File

@@ -36,6 +36,8 @@ import java.util.stream.StreamSupport;
@Singleton
@Slf4j
public class FlowService {
private final IllegalStateException NO_REPOSITORY_EXCEPTION = new IllegalStateException("No flow repository found. Make sure the `kestra.repository.type` property is set.");
@Inject
RunContextFactory runContextFactory;
@@ -43,7 +45,7 @@ public class FlowService {
ConditionService conditionService;
@Inject
FlowRepositoryInterface flowRepository;
Optional<FlowRepositoryInterface> flowRepository;
@Inject
YamlFlowParser yamlFlowParser;
@@ -62,6 +64,11 @@ public class FlowService {
.tenantId(tenantId)
.build();
if (flowRepository.isEmpty()) {
throw NO_REPOSITORY_EXCEPTION;
}
FlowRepositoryInterface flowRepository = this.flowRepository.get();
return flowRepository
.findById(withTenant.getTenantId(), withTenant.getNamespace(), withTenant.getId())
.map(previous -> flowRepository.update(withTenant, previous, source, taskDefaultService.injectDefaults(withTenant)))
@@ -69,7 +76,11 @@ public class FlowService {
}
public List<FlowWithSource> findByNamespaceWithSource(String tenantId, String namespace) {
return flowRepository.findByNamespaceWithSource(tenantId, namespace);
if (flowRepository.isEmpty()) {
throw NO_REPOSITORY_EXCEPTION;
}
return flowRepository.get().findByNamespaceWithSource(tenantId, namespace);
}
public Stream<Flow> keepLastVersion(Stream<Flow> stream) {

View File

@@ -34,6 +34,7 @@ public class TaskDefaultService {
@Inject
@Named(QueueFactoryInterface.WORKERTASKLOG_NAMED)
@Nullable
protected QueueInterface<LogEntry> logQueue;
/**

View File

@@ -1,7 +1,8 @@
version=0.16.0
version=0.16.1
jacksonVersion=2.16.2
micronautVersion=4.3.7
# Cannot upgrade for now due to https://github.com/kestra-io/kestra-ee/issues/1085
micronautVersion=4.3.4
lombokVersion=1.18.32
slf4jVersion=2.0.12

View File

@@ -25,7 +25,7 @@
</span>
</el-tooltip>
</th>
<td :colspan="dates.length">
<td :colspan="dates.length" @click="onTaskSelect(serie.task)" class="cursor-pointer">
<el-tooltip placement="top" :persistent="false" transition="" :hide-after="0">
<template #content>
<span style="white-space: pre-wrap;">
@@ -323,6 +323,10 @@
}
.cursor-pointer {
cursor: pointer;
}
table {
table-layout: fixed;
width: 100%;

View File

@@ -102,7 +102,6 @@
BookMultipleOutline: shallowRef(BookMultipleOutline),
Close: shallowRef(Close)
},
oldDecorations: [],
editorDocumentation: undefined,
plugin: undefined,
taskType: undefined,
@@ -209,6 +208,8 @@
this.editor = editor;
this.decorations = this.editor.createDecorationsCollection();
if (!this.original) {
this.editor.onDidBlurEditorWidget(() => {
this.$emit("focusout", editor.getValue());
@@ -308,27 +309,27 @@
this.editor.onDidContentSizeChange(_ => {
if (this.guidedProperties.monacoRange) {
editor.revealLine(this.guidedProperties.monacoRange.endLineNumber);
let decorations = [
{
range: this.guidedProperties.monacoRange,
options: {
isWholeLine: true,
inlineClassName: "highlight-text"
},
className: "highlight-text",
}
];
decorations = this.guidedProperties.monacoDisableRange ? decorations.concat([
{
const decorationsToAdd = [];
decorationsToAdd.push({
range: this.guidedProperties.monacoRange,
options: {
isWholeLine: true,
inlineClassName: "highlight-text"
},
className: "highlight-text",
});
if (this.guidedProperties.monacoDisableRange) {
decorationsToAdd.push({
range: this.guidedProperties.monacoDisableRange,
options: {
isWholeLine: true,
inlineClassName: "disable-text"
},
className: "disable-text",
},
]) : decorations;
this.oldDecorations = this.editor.deltaDecorations(this.oldDecorations, decorations)
});
}
this.decorations.set(decorationsToAdd);
} else {
this.highlightPebble();
}
@@ -363,14 +364,14 @@
highlightPebble() {
// Highlight code that match pebble content
let model = this.editor.getModel();
let decorations = [];
let text = model.getValue();
let regex = new RegExp("\\{\\{(.+?)}}", "g");
let match;
const decorationsToAdd = [];
while ((match = regex.exec(text)) !== null) {
let startPos = model.getPositionAt(match.index);
let endPos = model.getPositionAt(match.index + match[0].length);
decorations.push({
decorationsToAdd.push({
range: {
startLineNumber: startPos.lineNumber,
startColumn: startPos.column,
@@ -382,7 +383,7 @@
}
});
}
this.oldDecorations = this.editor.deltaDecorations(this.oldDecorations, decorations);
this.decorations.set(decorationsToAdd);
}
},
};

View File

@@ -45,6 +45,7 @@
import TimerCogOutline from "vue-material-design-icons/TimerCogOutline.vue";
import {mapState} from "vuex";
import ChartBoxOutline from "vue-material-design-icons/ChartBoxOutline.vue";
import Connection from "vue-material-design-icons/Connection.vue";
import {shallowRef} from "vue";
export default {
@@ -169,6 +170,15 @@
class: "menu-icon"
},
},
{
href: {name: "plugins/list"},
routes: this.routeStartWith("plugins"),
title: this.$t("plugins.names"),
icon: {
element: shallowRef(Connection),
class: "menu-icon"
},
},
{
title: this.$t("administration"),
routes: this.routeStartWith("admin"),