mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-25 11:12:12 -05:00
Compare commits
6 Commits
fix/remove
...
v0.16.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1fb098f5b | ||
|
|
9703cc48cb | ||
|
|
31c3e5a4f6 | ||
|
|
bda52eb49d | ||
|
|
8a54b8ec7f | ||
|
|
c34c82c1f9 |
@@ -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();
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -34,6 +34,7 @@ public class TaskDefaultService {
|
||||
|
||||
@Inject
|
||||
@Named(QueueFactoryInterface.WORKERTASKLOG_NAMED)
|
||||
@Nullable
|
||||
protected QueueInterface<LogEntry> logQueue;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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%;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user