mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-26 05:00:31 -05:00
Compare commits
6 Commits
dependabot
...
v0.16.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1fb098f5b | ||
|
|
9703cc48cb | ||
|
|
31c3e5a4f6 | ||
|
|
bda52eb49d | ||
|
|
8a54b8ec7f | ||
|
|
c34c82c1f9 |
@@ -19,7 +19,7 @@ class FlowValidateCommandTest {
|
|||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
System.setOut(new PrintStream(out));
|
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 embeddedServer = ctx.getBean(EmbeddedServer.class);
|
||||||
embeddedServer.start();
|
embeddedServer.start();
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ class FlowValidateCommandTest {
|
|||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
System.setOut(new PrintStream(out));
|
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 embeddedServer = ctx.getBean(EmbeddedServer.class);
|
||||||
embeddedServer.start();
|
embeddedServer.start();
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import java.util.stream.StreamSupport;
|
|||||||
@Singleton
|
@Singleton
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class FlowService {
|
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
|
@Inject
|
||||||
RunContextFactory runContextFactory;
|
RunContextFactory runContextFactory;
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ public class FlowService {
|
|||||||
ConditionService conditionService;
|
ConditionService conditionService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
FlowRepositoryInterface flowRepository;
|
Optional<FlowRepositoryInterface> flowRepository;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
YamlFlowParser yamlFlowParser;
|
YamlFlowParser yamlFlowParser;
|
||||||
@@ -62,6 +64,11 @@ public class FlowService {
|
|||||||
.tenantId(tenantId)
|
.tenantId(tenantId)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
if (flowRepository.isEmpty()) {
|
||||||
|
throw NO_REPOSITORY_EXCEPTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
FlowRepositoryInterface flowRepository = this.flowRepository.get();
|
||||||
return flowRepository
|
return flowRepository
|
||||||
.findById(withTenant.getTenantId(), withTenant.getNamespace(), withTenant.getId())
|
.findById(withTenant.getTenantId(), withTenant.getNamespace(), withTenant.getId())
|
||||||
.map(previous -> flowRepository.update(withTenant, previous, source, taskDefaultService.injectDefaults(withTenant)))
|
.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) {
|
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) {
|
public Stream<Flow> keepLastVersion(Stream<Flow> stream) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class TaskDefaultService {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named(QueueFactoryInterface.WORKERTASKLOG_NAMED)
|
@Named(QueueFactoryInterface.WORKERTASKLOG_NAMED)
|
||||||
|
@Nullable
|
||||||
protected QueueInterface<LogEntry> logQueue;
|
protected QueueInterface<LogEntry> logQueue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
version=0.16.0
|
version=0.16.1
|
||||||
|
|
||||||
jacksonVersion=2.16.2
|
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
|
lombokVersion=1.18.32
|
||||||
slf4jVersion=2.0.12
|
slf4jVersion=2.0.12
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</th>
|
</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">
|
<el-tooltip placement="top" :persistent="false" transition="" :hide-after="0">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span style="white-space: pre-wrap;">
|
<span style="white-space: pre-wrap;">
|
||||||
@@ -323,6 +323,10 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cursor-pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -102,7 +102,6 @@
|
|||||||
BookMultipleOutline: shallowRef(BookMultipleOutline),
|
BookMultipleOutline: shallowRef(BookMultipleOutline),
|
||||||
Close: shallowRef(Close)
|
Close: shallowRef(Close)
|
||||||
},
|
},
|
||||||
oldDecorations: [],
|
|
||||||
editorDocumentation: undefined,
|
editorDocumentation: undefined,
|
||||||
plugin: undefined,
|
plugin: undefined,
|
||||||
taskType: undefined,
|
taskType: undefined,
|
||||||
@@ -209,6 +208,8 @@
|
|||||||
|
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
|
|
||||||
|
this.decorations = this.editor.createDecorationsCollection();
|
||||||
|
|
||||||
if (!this.original) {
|
if (!this.original) {
|
||||||
this.editor.onDidBlurEditorWidget(() => {
|
this.editor.onDidBlurEditorWidget(() => {
|
||||||
this.$emit("focusout", editor.getValue());
|
this.$emit("focusout", editor.getValue());
|
||||||
@@ -308,27 +309,27 @@
|
|||||||
this.editor.onDidContentSizeChange(_ => {
|
this.editor.onDidContentSizeChange(_ => {
|
||||||
if (this.guidedProperties.monacoRange) {
|
if (this.guidedProperties.monacoRange) {
|
||||||
editor.revealLine(this.guidedProperties.monacoRange.endLineNumber);
|
editor.revealLine(this.guidedProperties.monacoRange.endLineNumber);
|
||||||
let decorations = [
|
const decorationsToAdd = [];
|
||||||
{
|
decorationsToAdd.push({
|
||||||
range: this.guidedProperties.monacoRange,
|
range: this.guidedProperties.monacoRange,
|
||||||
options: {
|
options: {
|
||||||
isWholeLine: true,
|
isWholeLine: true,
|
||||||
inlineClassName: "highlight-text"
|
inlineClassName: "highlight-text"
|
||||||
},
|
},
|
||||||
className: "highlight-text",
|
className: "highlight-text",
|
||||||
}
|
});
|
||||||
];
|
if (this.guidedProperties.monacoDisableRange) {
|
||||||
decorations = this.guidedProperties.monacoDisableRange ? decorations.concat([
|
decorationsToAdd.push({
|
||||||
{
|
|
||||||
range: this.guidedProperties.monacoDisableRange,
|
range: this.guidedProperties.monacoDisableRange,
|
||||||
options: {
|
options: {
|
||||||
isWholeLine: true,
|
isWholeLine: true,
|
||||||
inlineClassName: "disable-text"
|
inlineClassName: "disable-text"
|
||||||
},
|
},
|
||||||
className: "disable-text",
|
className: "disable-text",
|
||||||
},
|
});
|
||||||
]) : decorations;
|
}
|
||||||
this.oldDecorations = this.editor.deltaDecorations(this.oldDecorations, decorations)
|
|
||||||
|
this.decorations.set(decorationsToAdd);
|
||||||
} else {
|
} else {
|
||||||
this.highlightPebble();
|
this.highlightPebble();
|
||||||
}
|
}
|
||||||
@@ -363,14 +364,14 @@
|
|||||||
highlightPebble() {
|
highlightPebble() {
|
||||||
// Highlight code that match pebble content
|
// Highlight code that match pebble content
|
||||||
let model = this.editor.getModel();
|
let model = this.editor.getModel();
|
||||||
let decorations = [];
|
|
||||||
let text = model.getValue();
|
let text = model.getValue();
|
||||||
let regex = new RegExp("\\{\\{(.+?)}}", "g");
|
let regex = new RegExp("\\{\\{(.+?)}}", "g");
|
||||||
let match;
|
let match;
|
||||||
|
const decorationsToAdd = [];
|
||||||
while ((match = regex.exec(text)) !== null) {
|
while ((match = regex.exec(text)) !== null) {
|
||||||
let startPos = model.getPositionAt(match.index);
|
let startPos = model.getPositionAt(match.index);
|
||||||
let endPos = model.getPositionAt(match.index + match[0].length);
|
let endPos = model.getPositionAt(match.index + match[0].length);
|
||||||
decorations.push({
|
decorationsToAdd.push({
|
||||||
range: {
|
range: {
|
||||||
startLineNumber: startPos.lineNumber,
|
startLineNumber: startPos.lineNumber,
|
||||||
startColumn: startPos.column,
|
startColumn: startPos.column,
|
||||||
@@ -382,7 +383,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.oldDecorations = this.editor.deltaDecorations(this.oldDecorations, decorations);
|
this.decorations.set(decorationsToAdd);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
import TimerCogOutline from "vue-material-design-icons/TimerCogOutline.vue";
|
import TimerCogOutline from "vue-material-design-icons/TimerCogOutline.vue";
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
import ChartBoxOutline from "vue-material-design-icons/ChartBoxOutline.vue";
|
import ChartBoxOutline from "vue-material-design-icons/ChartBoxOutline.vue";
|
||||||
|
import Connection from "vue-material-design-icons/Connection.vue";
|
||||||
import {shallowRef} from "vue";
|
import {shallowRef} from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -169,6 +170,15 @@
|
|||||||
class: "menu-icon"
|
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"),
|
title: this.$t("administration"),
|
||||||
routes: this.routeStartWith("admin"),
|
routes: this.routeStartWith("admin"),
|
||||||
|
|||||||
Reference in New Issue
Block a user