mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-26 14:00:23 -05:00
Compare commits
10 Commits
dependabot
...
v0.18.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ee9b9f069 | ||
|
|
d57d9dd3e8 | ||
|
|
ae15cef7b7 | ||
|
|
0e46055884 | ||
|
|
f91b070dca | ||
|
|
d964d49861 | ||
|
|
dd45545202 | ||
|
|
8d2589485f | ||
|
|
78069b45f8 | ||
|
|
7a13ed79d8 |
14
.github/dependabot.yml
vendored
14
.github/dependabot.yml
vendored
@@ -22,12 +22,20 @@ updates:
|
|||||||
- "dependency-upgrade"
|
- "dependency-upgrade"
|
||||||
open-pull-requests-limit: 50
|
open-pull-requests-limit: 50
|
||||||
|
|
||||||
# Maintain dependencies for Npm modules
|
# Maintain dependencies for NPM modules
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/ui"
|
directory: "/ui"
|
||||||
schedule:
|
schedule:
|
||||||
# Check for updates to Npm modules every week
|
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
day: "sunday"
|
||||||
|
time: "09:00"
|
||||||
|
open-pull-requests-limit: 50
|
||||||
labels:
|
labels:
|
||||||
- "dependency-upgrade"
|
- "dependency-upgrade"
|
||||||
open-pull-requests-limit: 50
|
ignore:
|
||||||
|
# Ignore updates of version 1.x, as we're using beta of 2.x
|
||||||
|
- dependency-name: "vue-virtual-scroller"
|
||||||
|
versions: ["1.x"]
|
||||||
|
# Ignore major versions greater than 8, as it's still known to be flaky
|
||||||
|
- dependency-name: "eslint"
|
||||||
|
versions: [">8"]
|
||||||
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@@ -117,10 +117,12 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
if: ${{ github.event.inputs.skip-test == 'false' || github.event.inputs.skip-test == '' }}
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# Docker Build
|
# Docker Build
|
||||||
- name: Build & Export Docker Image
|
- name: Build & Export Docker Image
|
||||||
|
if: ${{ github.event.inputs.skip-test == 'false' || github.event.inputs.skip-test == '' }}
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@@ -275,7 +277,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
name: Github Release
|
name: Github Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ check, check-e2e ]
|
needs: build-artifacts
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
# Download Exec
|
# Download Exec
|
||||||
@@ -367,7 +369,7 @@ jobs:
|
|||||||
maven:
|
maven:
|
||||||
name: Publish to Maven
|
name: Publish to Maven
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [check, check-e2e]
|
needs: [check]
|
||||||
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/v')
|
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -61,14 +61,13 @@ public class LogEntry implements DeletedInterface, TenantInterface {
|
|||||||
@Builder.Default
|
@Builder.Default
|
||||||
boolean deleted = false;
|
boolean deleted = false;
|
||||||
|
|
||||||
public static List<String> findLevelsByMin(Level minLevel) {
|
public static List<Level> findLevelsByMin(Level minLevel) {
|
||||||
if (minLevel == null) {
|
if (minLevel == null) {
|
||||||
return Arrays.stream(Level.values()).map(Enum::name).toList();
|
return Arrays.asList(Level.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
return Arrays.stream(Level.values())
|
return Arrays.stream(Level.values())
|
||||||
.filter(level -> level.toInt() >= minLevel.toInt())
|
.filter(level -> level.toInt() >= minLevel.toInt())
|
||||||
.map(Enum::name)
|
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,18 +144,16 @@ public class DefaultRunContext extends RunContext {
|
|||||||
@Override
|
@Override
|
||||||
public DefaultRunContext clone() {
|
public DefaultRunContext clone() {
|
||||||
DefaultRunContext runContext = new DefaultRunContext();
|
DefaultRunContext runContext = new DefaultRunContext();
|
||||||
runContext.variableRenderer = this.variableRenderer;
|
|
||||||
runContext.applicationContext = this.applicationContext;
|
|
||||||
runContext.storageInterface = this.storageInterface;
|
|
||||||
runContext.storage = this.storage;
|
|
||||||
runContext.variables = new HashMap<>(this.variables);
|
runContext.variables = new HashMap<>(this.variables);
|
||||||
runContext.metrics = new ArrayList<>();
|
|
||||||
runContext.meterRegistry = this.meterRegistry;
|
|
||||||
runContext.workingDir = this.workingDir;
|
runContext.workingDir = this.workingDir;
|
||||||
runContext.logger = this.logger;
|
runContext.logger = this.logger;
|
||||||
|
runContext.metrics = new ArrayList<>();
|
||||||
|
runContext.storage = this.storage;
|
||||||
runContext.pluginConfiguration = this.pluginConfiguration;
|
runContext.pluginConfiguration = this.pluginConfiguration;
|
||||||
runContext.version = version;
|
if (this.isInitialized.get()) {
|
||||||
runContext.isInitialized.set(this.isInitialized.get());
|
//Inject all services
|
||||||
|
runContext.init(applicationContext);
|
||||||
|
}
|
||||||
return runContext;
|
return runContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class Extension extends AbstractExtension {
|
|||||||
return operators;
|
return operators;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Filter> getFilters() {
|
public Map<String, Filter> getFilters() {
|
||||||
Map<String, Filter> filters = new HashMap<>();
|
Map<String, Filter> filters = new HashMap<>();
|
||||||
@@ -104,6 +105,7 @@ public class Extension extends AbstractExtension {
|
|||||||
return tests;
|
return tests;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Function> getFunctions() {
|
public Map<String, Function> getFunctions() {
|
||||||
Map<String, Function> functions = new HashMap<>();
|
Map<String, Function> functions = new HashMap<>();
|
||||||
|
|||||||
@@ -10,11 +10,8 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class JsonFilter extends ToJsonFilter {
|
public class JsonFilter extends ToJsonFilter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object apply(Object input, Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) throws PebbleException {
|
public Object apply(Object input, Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) throws PebbleException {
|
||||||
log.warn("The 'json' filter is deprecated, please use 'toJson' instead");
|
|
||||||
|
|
||||||
return super.apply(input, args, self, context, lineNumber);
|
return super.apply(input, args, self, context, lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,8 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class JsonFunction extends FromJsonFunction {
|
public class JsonFunction extends FromJsonFunction {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) {
|
public Object execute(Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) {
|
||||||
log.warn("The 'json' function is deprecated, please use 'fromJson' instead");
|
|
||||||
|
|
||||||
return super.execute(args, self, context, lineNumber);
|
return super.execute(args, self, context, lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ public abstract class AbstractLogRepositoryTest {
|
|||||||
|
|
||||||
logRepository.save(log1);
|
logRepository.save(log1);
|
||||||
|
|
||||||
logRepository.deleteByQuery(null, "io.kestra.unittest", "flowId", null, null, ZonedDateTime.now().plusMinutes(1));
|
logRepository.deleteByQuery(null, "io.kestra.unittest", "flowId", List.of(Level.TRACE, Level.DEBUG, Level.INFO), null, ZonedDateTime.now().plusMinutes(1));
|
||||||
|
|
||||||
find = logRepository.findByExecutionId(null, log1.getExecutionId(), null, Pageable.from(1, 50));
|
find = logRepository.findByExecutionId(null, log1.getExecutionId(), null, Pageable.from(1, 50));
|
||||||
assertThat(find.size(), is(0));
|
assertThat(find.size(), is(0));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version=0.18.0-SNAPSHOT
|
version=0.18.1
|
||||||
|
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.jooq.impl.DSL;
|
|||||||
import org.slf4j.event.Level;
|
import org.slf4j.event.Level;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@@ -27,10 +28,9 @@ public class PostgresLogRepository extends AbstractJdbcLogRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Condition minLevel(Level minLevel) {
|
protected Condition levelsCondition(List<Level> levels) {
|
||||||
return DSL.condition("level in (" +
|
return DSL.condition("level in (" +
|
||||||
LogEntry
|
levels
|
||||||
.findLevelsByMin(minLevel)
|
|
||||||
.stream()
|
.stream()
|
||||||
.map(s -> "'" + s + "'::log_level")
|
.map(s -> "'" + s + "'::log_level")
|
||||||
.collect(Collectors.joining(", ")) +
|
.collect(Collectors.joining(", ")) +
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ public abstract class AbstractJdbcLogRepository extends AbstractJdbcRepository i
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (logLevels != null) {
|
if (logLevels != null) {
|
||||||
delete = delete.and(field("level").in(logLevels));
|
delete = delete.and(levelsCondition(logLevels));
|
||||||
}
|
}
|
||||||
|
|
||||||
return delete.execute();
|
return delete.execute();
|
||||||
@@ -493,7 +493,11 @@ public abstract class AbstractJdbcLogRepository extends AbstractJdbcRepository i
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Condition minLevel(Level minLevel) {
|
private Condition minLevel(Level minLevel) {
|
||||||
return field("level").in(LogEntry.findLevelsByMin(minLevel));
|
return levelsCondition(LogEntry.findLevelsByMin(minLevel));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Condition levelsCondition(List<Level> levels) {
|
||||||
|
return field("level").in(levels.stream().map(level -> level.name()).toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,2 @@
|
|||||||
public/vscode/
|
|
||||||
public/vscode-web/
|
|
||||||
|
|
||||||
node/
|
node/
|
||||||
node_modules/
|
node_modules/
|
||||||
2274
ui/package-lock.json
generated
2274
ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "kestra",
|
"name": "kestra",
|
||||||
"version": "0.1.0",
|
"version": "0.18.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "npm@9.8.1",
|
"type": "module",
|
||||||
|
"packageManager": "npm@9.9.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "vite build --emptyOutDir",
|
"build": "vite build --emptyOutDir",
|
||||||
@@ -12,17 +13,17 @@
|
|||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix"
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kestra-io/ui-libs": "^0.0.53",
|
"@kestra-io/ui-libs": "^0.0.57",
|
||||||
"@vue-flow/background": "^1.3.0",
|
"@vue-flow/background": "^1.3.0",
|
||||||
"@vue-flow/controls": "^1.1.2",
|
"@vue-flow/controls": "^1.1.2",
|
||||||
"@vue-flow/core": "^1.39.1",
|
"@vue-flow/core": "^1.39.3",
|
||||||
"ansi-to-html": "^0.7.2",
|
"ansi-to-html": "^0.7.2",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.3",
|
||||||
"bootstrap": "^5.3.3",
|
"bootstrap": "^5.3.3",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"chart.js": "^4.4.3",
|
"chart.js": "^4.4.3",
|
||||||
"chartjs-chart-treemap": "^2.3.1",
|
"chartjs-chart-treemap": "^2.3.1",
|
||||||
"core-js": "^3.37.1",
|
"core-js": "^3.38.0",
|
||||||
"cronstrue": "^2.50.0",
|
"cronstrue": "^2.50.0",
|
||||||
"dagre": "^0.8.5",
|
"dagre": "^0.8.5",
|
||||||
"element-plus": "^2.7.8",
|
"element-plus": "^2.7.8",
|
||||||
@@ -39,20 +40,18 @@
|
|||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"moment-range": "4.0.2",
|
"moment-range": "4.0.2",
|
||||||
"moment-timezone": "^0.5.45",
|
"moment-timezone": "^0.5.45",
|
||||||
"node-modules-polyfill": "^0.1.4",
|
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pdfjs-dist": "^4.5.136",
|
"pdfjs-dist": "^4.5.136",
|
||||||
"posthog-js": "^1.150.1",
|
"posthog-js": "^1.154.5",
|
||||||
"throttle-debounce": "^5.0.2",
|
"throttle-debounce": "^5.0.2",
|
||||||
"vite-plugin-eslint": "^1.8.1",
|
"vue": "^3.4.36",
|
||||||
"vue": "^3.4.34",
|
|
||||||
"vue-axios": "3.5.2",
|
"vue-axios": "3.5.2",
|
||||||
"vue-chartjs": "^5.3.1",
|
"vue-chartjs": "^5.3.1",
|
||||||
"vue-gtag": "^2.0.1",
|
"vue-gtag": "^2.0.1",
|
||||||
"vue-i18n": "^9.13.1",
|
"vue-i18n": "^9.13.1",
|
||||||
"vue-material-design-icons": "^5.3.0",
|
"vue-material-design-icons": "^5.3.0",
|
||||||
"vue-router": "^4.4.0",
|
"vue-router": "^4.4.3",
|
||||||
"vue-sidebar-menu": "^5.4.0",
|
"vue-sidebar-menu": "^5.4.1",
|
||||||
"vue-virtual-scroller": "^2.0.0-beta.8",
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
||||||
"vue3-popper": "^1.5.0",
|
"vue3-popper": "^1.5.0",
|
||||||
"vue3-runtime-template": "^1.0.2",
|
"vue3-runtime-template": "^1.0.2",
|
||||||
@@ -62,10 +61,11 @@
|
|||||||
"yaml": "^2.5.0"
|
"yaml": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||||
"@rushstack/eslint-patch": "^1.10.4",
|
"@rushstack/eslint-patch": "^1.10.4",
|
||||||
"@shikijs/markdown-it": "^1.6.3",
|
"@shikijs/markdown-it": "^1.12.1",
|
||||||
"@typescript-eslint/parser": "^7.17.0",
|
"@typescript-eslint/parser": "^8.0.1",
|
||||||
"@vitejs/plugin-vue": "^5.1.1",
|
"@vitejs/plugin-vue": "^5.1.2",
|
||||||
"@vue/eslint-config-prettier": "^9.0.0",
|
"@vue/eslint-config-prettier": "^9.0.0",
|
||||||
"@vue/test-utils": "^2.4.6",
|
"@vue/test-utils": "^2.4.6",
|
||||||
"decompress": "^4.2.1",
|
"decompress": "^4.2.1",
|
||||||
@@ -77,13 +77,14 @@
|
|||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"rollup-plugin-copy": "^3.5.0",
|
"rollup-plugin-copy": "^3.5.0",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
"sass": "^1.77.4",
|
"sass": "^1.77.8",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
"vite": "^5.3.5",
|
"vite": "^5.3.5",
|
||||||
"vitest": "^2.0.4"
|
"vite-plugin-eslint": "^1.8.1",
|
||||||
|
"vitest": "^2.0.5"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-linux-x64-gnu": "^4.19.0"
|
"@rollup/rollup-linux-x64-gnu": "^4.20.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"bootstrap": {
|
"bootstrap": {
|
||||||
|
|||||||
30
ui/plugins/commit.ts
Normal file
30
ui/plugins/commit.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import type {Plugin} from "vite";
|
||||||
|
import {execSync} from "child_process";
|
||||||
|
|
||||||
|
const getInfo = (formats: string[]): string[] => formats.map(format => execSync(`git log -1 --format=${format}`).toString().trim());
|
||||||
|
|
||||||
|
const comment = (message: string, author: string, date: string): string => `
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Last Commit:
|
||||||
|
|
||||||
|
${message}
|
||||||
|
----------
|
||||||
|
Author: ${author}
|
||||||
|
Date: ${date}
|
||||||
|
|
||||||
|
-->`;
|
||||||
|
|
||||||
|
export const commit = (): Plugin => {
|
||||||
|
const [message, author, date] = getInfo(["%s", "%an", "%cd"]);
|
||||||
|
|
||||||
|
return {
|
||||||
|
name: "commit",
|
||||||
|
transformIndexHtml: {
|
||||||
|
order: "pre",
|
||||||
|
handler(html: string): string {
|
||||||
|
return comment(message, author, date) + html;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import type {Plugin} from "vite";
|
|
||||||
import {execSync} from "child_process";
|
|
||||||
|
|
||||||
const comment = (hash: string, date: string): string => {
|
|
||||||
return `
|
|
||||||
<!--
|
|
||||||
|
|
||||||
Last Commit:
|
|
||||||
|
|
||||||
URL: https://github.com/kestra-io/kestra/commit/${hash}
|
|
||||||
Date: ${date}
|
|
||||||
|
|
||||||
-->`;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const details = (): Plugin => {
|
|
||||||
const hash: string = execSync("git rev-parse --short HEAD").toString().trim();
|
|
||||||
const date: string = execSync("git log -1 --format=%cd").toString().trim();
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: "details",
|
|
||||||
transformIndexHtml: {
|
|
||||||
order: "pre",
|
|
||||||
handler(html: string): string {
|
|
||||||
return comment(hash, date) + html;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -124,6 +124,7 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState("api", ["version"]),
|
...mapState("api", ["version"]),
|
||||||
|
...mapState("core", ["tutorialFlows"]),
|
||||||
...mapGetters("core", ["guidedProperties"]),
|
...mapGetters("core", ["guidedProperties"]),
|
||||||
...mapGetters("auth", ["user"]),
|
...mapGetters("auth", ["user"]),
|
||||||
displayNavBar() {
|
displayNavBar() {
|
||||||
@@ -131,7 +132,7 @@
|
|||||||
},
|
},
|
||||||
tourEnabled(){
|
tourEnabled(){
|
||||||
// Temporary solution to not showing the tour menu item for EE
|
// Temporary solution to not showing the tour menu item for EE
|
||||||
return !Object.keys(this.user).length
|
return this.tutorialFlows?.length && !Object.keys(this.user).length
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-button v-if="!isLogsListing && logs !== undefined && logs.length > 0" @click="deleteLogs()" class="mb-3 delete-logs-btn">
|
<el-button v-if="shouldDisplayDeleteButton && logs !== undefined && logs.length > 0" @click="deleteLogs()" class="mb-3 delete-logs-btn">
|
||||||
<TrashCan class="me-2" />
|
<TrashCan class="me-2" />
|
||||||
<span>{{ $t("delete logs") }}</span>
|
<span>{{ $t("delete logs") }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -153,8 +153,8 @@
|
|||||||
isFlowEdit() {
|
isFlowEdit() {
|
||||||
return this.$route.name === "flows/update"
|
return this.$route.name === "flows/update"
|
||||||
},
|
},
|
||||||
isLogsListing() {
|
shouldDisplayDeleteButton() {
|
||||||
return this.$route.name === "logs/list"
|
return this.$route.name === "flows/update"
|
||||||
},
|
},
|
||||||
isNamespaceEdit() {
|
isNamespaceEdit() {
|
||||||
return this.$route.name === "namespaces/update"
|
return this.$route.name === "namespaces/update"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<div
|
<div
|
||||||
v-if="currentStep(tour).title"
|
v-if="currentStep(tour).title"
|
||||||
class="title"
|
class="title"
|
||||||
:class="{dark: currentStep(tour).keepDark}"
|
:class="{dark: currentStep(tour).keepDark, empty: !flows.length}"
|
||||||
>
|
>
|
||||||
<div v-if="currentStep(tour).icon">
|
<div v-if="currentStep(tour).icon">
|
||||||
<img
|
<img
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
:class="{jump: currentStep(tour).jump}"
|
:class="{jump: currentStep(tour).jump}"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<span v-html="currentStep(tour).title" />
|
<span v-html="tour.currentStep === 1 && !flows.length ? t('onboarding.no_flows') : currentStep(tour).title" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
@@ -99,6 +99,7 @@
|
|||||||
![0, 1].includes(tour.currentStep) ||
|
![0, 1].includes(tour.currentStep) ||
|
||||||
!tour.isLast
|
!tour.isLast
|
||||||
"
|
"
|
||||||
|
:disabled="tour.currentStep === 1 && !flows.length"
|
||||||
@click="
|
@click="
|
||||||
tour.isLast
|
tour.isLast
|
||||||
? finishTour(tour.currentStep)
|
? finishTour(tour.currentStep)
|
||||||
@@ -147,7 +148,6 @@
|
|||||||
|
|
||||||
import Finish from "./components/buttons/Finish.vue";
|
import Finish from "./components/buttons/Finish.vue";
|
||||||
|
|
||||||
import {apiUrl} from "override/utils/route";
|
|
||||||
import {pageFromRoute} from "../../utils/eventsRouter";
|
import {pageFromRoute} from "../../utils/eventsRouter";
|
||||||
|
|
||||||
import TaskIcon from "@kestra-io/ui-libs/src/components/misc/TaskIcon.vue";
|
import TaskIcon from "@kestra-io/ui-libs/src/components/misc/TaskIcon.vue";
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const activeFlow = ref(0);
|
const activeFlow = ref(0);
|
||||||
const flows = ref([]);
|
const flows = computed(() => store.state.core.tutorialFlows);
|
||||||
|
|
||||||
const allTasks = (tasks) => {
|
const allTasks = (tasks) => {
|
||||||
const uniqueTypes = new Set();
|
const uniqueTypes = new Set();
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
name: "flows/update",
|
name: "flows/update",
|
||||||
params: {
|
params: {
|
||||||
namespace: "tutorial",
|
namespace: "tutorial",
|
||||||
id: flows.value[activeFlow.value].id,
|
id: flows.value[activeFlow.value]?.id,
|
||||||
tab: "editor",
|
tab: "editor",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
store.commit("editor/updateOnboarding"),
|
store.commit("editor/updateOnboarding"),
|
||||||
store.commit("core/setGuidedProperties", {
|
store.commit("core/setGuidedProperties", {
|
||||||
tourStarted: true,
|
tourStarted: true,
|
||||||
template: flows.value[activeFlow.value].id,
|
template: flows.value[activeFlow.value]?.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
wait(1);
|
wait(1);
|
||||||
@@ -422,11 +422,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const HTTP = getCurrentInstance()?.appContext.config.globalProperties.$http;
|
store.dispatch("core/readTutorialFlows");
|
||||||
|
|
||||||
HTTP.get(`${apiUrl(this)}/flows/tutorial`).then(
|
|
||||||
(response) => (flows.value = response.data),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -530,6 +526,11 @@ $flow-image-size-container: 36px;
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: $color;
|
color: $color;
|
||||||
|
|
||||||
|
&.empty {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
& div {
|
& div {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import {apiUrl} from "override/utils/route";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
state: {
|
state: {
|
||||||
@@ -10,7 +12,8 @@ export default {
|
|||||||
template: undefined,
|
template: undefined,
|
||||||
},
|
},
|
||||||
monacoYamlConfigured: false,
|
monacoYamlConfigured: false,
|
||||||
autocompletionSource: undefined
|
autocompletionSource: undefined,
|
||||||
|
tutorialFlows: []
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
showMessage({commit}, message) {
|
showMessage({commit}, message) {
|
||||||
@@ -21,7 +24,10 @@ export default {
|
|||||||
},
|
},
|
||||||
isUnsaved({commit}, unsavedChange) {
|
isUnsaved({commit}, unsavedChange) {
|
||||||
commit("setUnsavedChange", unsavedChange)
|
commit("setUnsavedChange", unsavedChange)
|
||||||
}
|
},
|
||||||
|
readTutorialFlows({commit}) {
|
||||||
|
return this.$http.get(`${apiUrl(this)}/flows/tutorial`).then((response) => commit("setTutorialFlows", response.data))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setMessage(state, message) {
|
setMessage(state, message) {
|
||||||
@@ -41,7 +47,10 @@ export default {
|
|||||||
},
|
},
|
||||||
setAutocompletionSource(state, autocompletionSource) {
|
setAutocompletionSource(state, autocompletionSource) {
|
||||||
state.autocompletionSource = autocompletionSource
|
state.autocompletionSource = autocompletionSource
|
||||||
}
|
},
|
||||||
|
setTutorialFlows(state, flows) {
|
||||||
|
state.tutorialFlows = flows
|
||||||
|
},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
unsavedChange(state) {
|
unsavedChange(state) {
|
||||||
|
|||||||
@@ -790,6 +790,7 @@
|
|||||||
"previous": "Previous",
|
"previous": "Previous",
|
||||||
"finish": "Finish",
|
"finish": "Finish",
|
||||||
"skip": "Skip Tutorial",
|
"skip": "Skip Tutorial",
|
||||||
|
"no_flows": "No flows available under tutorial namespace.",
|
||||||
"steps": {
|
"steps": {
|
||||||
"0": {
|
"0": {
|
||||||
"title": "Welcome to Kestra!",
|
"title": "Welcome to Kestra!",
|
||||||
|
|||||||
@@ -767,6 +767,7 @@
|
|||||||
"previous": "Précédent",
|
"previous": "Précédent",
|
||||||
"finish": "Finir",
|
"finish": "Finir",
|
||||||
"skip": "Passer le tutoriel",
|
"skip": "Passer le tutoriel",
|
||||||
|
"no_flows": "Aucun flux disponible dans l'espace de noms du tutoriel.",
|
||||||
"steps": {
|
"steps": {
|
||||||
"0": {
|
"0": {
|
||||||
"title": "Bienvenue chez Kestra!",
|
"title": "Bienvenue chez Kestra!",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export function chartClick(moment, router, route, event) {
|
|||||||
const query = {};
|
const query = {};
|
||||||
|
|
||||||
if (event.date) {
|
if (event.date) {
|
||||||
const formattedDate = moment(event.date, "DD/MM/YYYY");
|
const formattedDate = moment(event.date, moment.localeData().longDateFormat("L"));
|
||||||
query.startDate = formattedDate.toISOString(true);
|
query.startDate = formattedDate.toISOString(true);
|
||||||
query.endDate = formattedDate.add(1, "d").toISOString(true);
|
query.endDate = formattedDate.add(1, "d").toISOString(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {createRouter, createWebHistory} from "vue-router";
|
|||||||
import VueGtag from "vue-gtag";
|
import VueGtag from "vue-gtag";
|
||||||
import {createI18n} from "vue-i18n";
|
import {createI18n} from "vue-i18n";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import "moment/locale/fr"
|
import "moment/dist/locale/fr"
|
||||||
import {extendMoment} from "moment-range";
|
import {extendMoment} from "moment-range";
|
||||||
import VueSidebarMenu from "vue-sidebar-menu";
|
import VueSidebarMenu from "vue-sidebar-menu";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -3,49 +3,43 @@ import mark from "markdown-it-mark";
|
|||||||
import meta from "markdown-it-meta";
|
import meta from "markdown-it-meta";
|
||||||
import anchor from "markdown-it-anchor";
|
import anchor from "markdown-it-anchor";
|
||||||
import container from "markdown-it-container";
|
import container from "markdown-it-container";
|
||||||
import {fromHighlighter} from "@shikijs/markdown-it/core"
|
import {fromHighlighter} from "@shikijs/markdown-it/core";
|
||||||
import {getHighlighterCore} from "shiki/core"
|
import {createHighlighterCore} from "shiki/core";
|
||||||
import githubDark from "shiki/themes/github-dark.mjs";
|
import githubDark from "shiki/themes/github-dark.mjs";
|
||||||
import githubLight from "shiki/themes/github-light.mjs";
|
import githubLight from "shiki/themes/github-light.mjs";
|
||||||
import {linkTag} from "./markdown_plugins/link";
|
import {linkTag} from "./markdown_plugins/link";
|
||||||
|
|
||||||
|
let highlighter = null;
|
||||||
|
|
||||||
|
async function getHighlighter() {
|
||||||
|
if (!highlighter) {
|
||||||
|
highlighter = createHighlighterCore({
|
||||||
|
langs: [import("shiki/langs/yaml.mjs"), import("shiki/langs/python.mjs"), import("shiki/langs/javascript.mjs")],
|
||||||
|
themes: [githubDark, githubLight],
|
||||||
|
loadWasm: import("shiki/wasm"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return highlighter;
|
||||||
|
}
|
||||||
|
|
||||||
export default class Markdown {
|
export default class Markdown {
|
||||||
static async render(markdown, options) {
|
static async render(markdown, options) {
|
||||||
|
const highlighter = await getHighlighter();
|
||||||
|
|
||||||
githubDark["colors"]["editor.background"] = "var(--bs-gray-500)";
|
githubDark["colors"]["editor.background"] = "var(--bs-gray-500)";
|
||||||
githubLight["colors"]["editor.background"] = "var(--bs-white)";
|
githubLight["colors"]["editor.background"] = "var(--bs-white)";
|
||||||
|
|
||||||
const highlighter = await getHighlighterCore({
|
options = options || {};
|
||||||
themes: [
|
|
||||||
githubDark,
|
|
||||||
githubLight
|
|
||||||
],
|
|
||||||
langs: [
|
|
||||||
import("shiki/langs/yaml.mjs"),
|
|
||||||
import("shiki/langs/python.mjs"),
|
|
||||||
import("shiki/langs/javascript.mjs")
|
|
||||||
],
|
|
||||||
loadWasm: import("shiki/wasm")
|
|
||||||
})
|
|
||||||
|
|
||||||
options = options || {}
|
|
||||||
|
|
||||||
const darkTheme = document.getElementsByTagName("html")[0].className.indexOf("dark") >= 0;
|
const darkTheme = document.getElementsByTagName("html")[0].className.indexOf("dark") >= 0;
|
||||||
|
|
||||||
// noinspection JSPotentiallyInvalidConstructorUsage
|
let md = new markdownIt()
|
||||||
let md = new markdownIt() // jshint ignore:line
|
|
||||||
.use(mark)
|
.use(mark)
|
||||||
.use(meta)
|
.use(meta)
|
||||||
.use(anchor, {
|
.use(anchor, {permalink: options.permalink ? anchor.permalink.ariaHidden({placement: "before"}) : undefined})
|
||||||
permalink: options.permalink ? anchor.permalink.ariaHidden({
|
|
||||||
placement: "before"
|
|
||||||
}) : undefined
|
|
||||||
})
|
|
||||||
// if more alert types are used inside the task documentation, they need to be configured here also
|
|
||||||
.use(container, "warning")
|
.use(container, "warning")
|
||||||
.use(container, "info")
|
.use(container, "info")
|
||||||
.use(fromHighlighter(highlighter, {
|
.use(fromHighlighter(highlighter, {theme: darkTheme ? "github-dark" : "github-light"}))
|
||||||
theme: darkTheme ? "github-dark" : "github-light",
|
|
||||||
}))
|
|
||||||
.use(linkTag);
|
.use(linkTag);
|
||||||
|
|
||||||
md.set({
|
md.set({
|
||||||
@@ -56,12 +50,10 @@ export default class Markdown {
|
|||||||
typographer: true,
|
typographer: true,
|
||||||
langPrefix: "language-",
|
langPrefix: "language-",
|
||||||
quotes: "“”‘’",
|
quotes: "“”‘’",
|
||||||
})
|
});
|
||||||
|
|
||||||
md.renderer.rules.table_open = () => "<table class=\"table\">\n"
|
md.renderer.rules.table_open = () => "<table class=\"table\">\n";
|
||||||
|
|
||||||
return md.render(
|
return md.render(markdown);
|
||||||
markdown
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ import {defineConfig} from "vite";
|
|||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
import {visualizer} from "rollup-plugin-visualizer";
|
import {visualizer} from "rollup-plugin-visualizer";
|
||||||
import eslintPlugin from "vite-plugin-eslint";
|
import eslintPlugin from "vite-plugin-eslint";
|
||||||
|
import * as sass from "sass"
|
||||||
|
|
||||||
import {filename} from "./plugins/filename"
|
import {filename} from "./plugins/filename"
|
||||||
import {details} from "./plugins/details"
|
import {commit} from "./plugins/commit"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: "",
|
base: "",
|
||||||
@@ -22,16 +23,18 @@ export default defineConfig({
|
|||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
visualizer(),
|
visualizer(),
|
||||||
eslintPlugin({
|
eslintPlugin({failOnWarning: true, failOnError: true}),
|
||||||
failOnWarning: true,
|
|
||||||
failOnError: true
|
|
||||||
}),
|
|
||||||
filename(),
|
filename(),
|
||||||
details()
|
commit()
|
||||||
],
|
],
|
||||||
assetsInclude: ["**/*.md"],
|
assetsInclude: ["**/*.md"],
|
||||||
css: {
|
css: {
|
||||||
devSourcemap: true
|
devSourcemap: true,
|
||||||
|
preprocessorOptions: {
|
||||||
|
scss: {
|
||||||
|
logger: sass.Logger.silent
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: [
|
include: [
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class LogController {
|
|||||||
@Parameter(description = "The min log level filter") @Nullable @QueryValue Level minLevel
|
@Parameter(description = "The min log level filter") @Nullable @QueryValue Level minLevel
|
||||||
) {
|
) {
|
||||||
AtomicReference<Runnable> cancel = new AtomicReference<>();
|
AtomicReference<Runnable> cancel = new AtomicReference<>();
|
||||||
List<String> levels = LogEntry.findLevelsByMin(minLevel);
|
List<String> levels = LogEntry.findLevelsByMin(minLevel).stream().map(level -> level.name()).toList();
|
||||||
|
|
||||||
return Flux
|
return Flux
|
||||||
.<Event<LogEntry>>create(emitter -> {
|
.<Event<LogEntry>>create(emitter -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user