mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-25 11:12:12 -05:00
Compare commits
8 Commits
fix/remove
...
feat/agent
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce3837b995 | ||
|
|
d48f3b9bd9 | ||
|
|
291fba3281 | ||
|
|
db3b3236ac | ||
|
|
5a8a631b47 | ||
|
|
2da191896f | ||
|
|
111026369b | ||
|
|
e3a0e59e9c |
170
build.gradle
170
build.gradle
@@ -171,13 +171,22 @@ allprojects {
|
||||
subprojects {subProj ->
|
||||
|
||||
if (subProj.name != 'platform' && subProj.name != 'jmh-benchmarks') {
|
||||
|
||||
apply plugin: "com.adarshr.test-logger"
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
java {
|
||||
sourceCompatibility = targetJavaVersion
|
||||
targetCompatibility = targetJavaVersion
|
||||
}
|
||||
|
||||
configurations {
|
||||
agent {
|
||||
canBeResolved = true
|
||||
canBeConsumed = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Platform
|
||||
testAnnotationProcessor enforcedPlatform(project(":platform"))
|
||||
@@ -204,9 +213,16 @@ subprojects {subProj ->
|
||||
|
||||
//assertj
|
||||
testImplementation 'org.assertj:assertj-core'
|
||||
|
||||
agent "org.aspectj:aspectjweaver:1.9.25.1"
|
||||
|
||||
testImplementation platform("io.qameta.allure:allure-bom")
|
||||
testImplementation "io.qameta.allure:allure-junit5"
|
||||
}
|
||||
|
||||
def commonTestConfig = { Test t ->
|
||||
t.ignoreFailures = true
|
||||
|
||||
// set Xmx for test workers
|
||||
t.maxHeapSize = '4g'
|
||||
|
||||
@@ -232,6 +248,52 @@ subprojects {subProj ->
|
||||
// }
|
||||
}
|
||||
|
||||
tasks.register('integrationTest', Test) { Test t ->
|
||||
description = 'Runs integration tests'
|
||||
group = 'verification'
|
||||
|
||||
useJUnitPlatform {
|
||||
includeTags 'integration'
|
||||
}
|
||||
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
|
||||
reports {
|
||||
junitXml.required = true
|
||||
junitXml.outputPerTestCase = true
|
||||
junitXml.mergeReruns = true
|
||||
junitXml.includeSystemErrLog = true
|
||||
junitXml.outputLocation = layout.buildDirectory.dir("test-results/test")
|
||||
}
|
||||
|
||||
// Integration tests typically not parallel (but you can enable)
|
||||
maxParallelForks = 1
|
||||
commonTestConfig(t)
|
||||
}
|
||||
|
||||
tasks.register('unitTest', Test) { Test t ->
|
||||
description = 'Runs unit tests'
|
||||
group = 'verification'
|
||||
|
||||
useJUnitPlatform {
|
||||
excludeTags 'flaky', 'integration'
|
||||
}
|
||||
|
||||
testClassesDirs = sourceSets.test.output.classesDirs
|
||||
classpath = sourceSets.test.runtimeClasspath
|
||||
|
||||
reports {
|
||||
junitXml.required = true
|
||||
junitXml.outputPerTestCase = true
|
||||
junitXml.mergeReruns = true
|
||||
junitXml.includeSystemErrLog = true
|
||||
junitXml.outputLocation = layout.buildDirectory.dir("test-results/test")
|
||||
}
|
||||
|
||||
commonTestConfig(t)
|
||||
}
|
||||
|
||||
tasks.register('flakyTest', Test) { Test t ->
|
||||
group = 'verification'
|
||||
description = 'Runs tests tagged @Flaky but does not fail the build.'
|
||||
@@ -239,7 +301,6 @@ subprojects {subProj ->
|
||||
useJUnitPlatform {
|
||||
includeTags 'flaky'
|
||||
}
|
||||
ignoreFailures = true
|
||||
|
||||
reports {
|
||||
junitXml.required = true
|
||||
@@ -249,10 +310,13 @@ subprojects {subProj ->
|
||||
junitXml.outputLocation = layout.buildDirectory.dir("test-results/flakyTest")
|
||||
}
|
||||
commonTestConfig(t)
|
||||
|
||||
}
|
||||
|
||||
test {
|
||||
// test task (default)
|
||||
tasks.named('test', Test) { Test t ->
|
||||
group = 'verification'
|
||||
description = 'Runs all non-flaky tests.'
|
||||
|
||||
useJUnitPlatform {
|
||||
excludeTags 'flaky'
|
||||
}
|
||||
@@ -263,10 +327,12 @@ subprojects {subProj ->
|
||||
junitXml.includeSystemErrLog = true
|
||||
junitXml.outputLocation = layout.buildDirectory.dir("test-results/test")
|
||||
}
|
||||
commonTestConfig(it)
|
||||
commonTestConfig(t)
|
||||
jvmArgs = ["-javaagent:${configurations.agent.singleFile}"]
|
||||
}
|
||||
|
||||
|
||||
finalizedBy(tasks.named('flakyTest'))
|
||||
tasks.named('check') {
|
||||
dependsOn(tasks.named('test'))// default behaviour
|
||||
}
|
||||
|
||||
testlogger {
|
||||
@@ -282,83 +348,25 @@ subprojects {subProj ->
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************\
|
||||
* End-to-End Tests
|
||||
**********************************************************************************************************************/
|
||||
def e2eTestsCheck = tasks.register('e2eTestsCheck') {
|
||||
group = 'verification'
|
||||
description = "Runs the 'check' task for all e2e-tests modules"
|
||||
doFirst {
|
||||
project.ext.set("e2e-tests", true)
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
// Add e2e-tests modules check tasks to e2eTestsCheck
|
||||
if (project.name.startsWith("e2e-tests")) {
|
||||
test {
|
||||
onlyIf {
|
||||
project.hasProperty("e2e-tests")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
// Add e2e-tests modules check tasks to e2eTestsCheck
|
||||
if (project.name.startsWith("e2e-tests")) {
|
||||
e2eTestsCheck.configure {
|
||||
finalizedBy(check)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************\
|
||||
* Allure Reports
|
||||
**********************************************************************************************************************/
|
||||
subprojects {
|
||||
if (it.name != 'platform' && it.name != 'jmh-benchmarks') {
|
||||
dependencies {
|
||||
testImplementation platform("io.qameta.allure:allure-bom")
|
||||
testImplementation "io.qameta.allure:allure-junit5"
|
||||
}
|
||||
|
||||
configurations {
|
||||
agent {
|
||||
canBeResolved = true
|
||||
canBeConsumed = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
agent "org.aspectj:aspectjweaver:1.9.25.1"
|
||||
}
|
||||
|
||||
test {
|
||||
jvmArgs = ["-javaagent:${configurations.agent.singleFile}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************\
|
||||
* Jacoco
|
||||
**********************************************************************************************************************/
|
||||
subprojects {
|
||||
if (it.name != 'platform' && it.name != 'jmh-benchmarks') {
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
test {
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
dependsOn test
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('check') {
|
||||
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
tasks.register('unitTest') {
|
||||
// No jacocoTestReport here, because it depends by default on :test,
|
||||
// and that would make :test being run twice in our CI.
|
||||
// In practice the report will be generated later in the CI by :check.
|
||||
}
|
||||
|
||||
tasks.register('integrationTest') {
|
||||
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
tasks.register('flakyTest') {
|
||||
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
tasks.named('testCodeCoverageReport') {
|
||||
|
||||
@@ -151,6 +151,12 @@ public record QueryFilter(
|
||||
return List.of(Op.EQUALS, Op.NOT_EQUALS, Op.CONTAINS, Op.STARTS_WITH, Op.ENDS_WITH, Op.IN, Op.NOT_IN);
|
||||
}
|
||||
},
|
||||
TRIGGER_STATE("triggerState"){
|
||||
@Override
|
||||
public List<Op> supportedOp() {
|
||||
return List.of(Op.EQUALS, Op.NOT_EQUALS);
|
||||
}
|
||||
},
|
||||
EXECUTION_ID("executionId") {
|
||||
@Override
|
||||
public List<Op> supportedOp() {
|
||||
@@ -271,7 +277,7 @@ public record QueryFilter(
|
||||
@Override
|
||||
public List<Field> supportedField() {
|
||||
return List.of(Field.QUERY, Field.SCOPE, Field.NAMESPACE, Field.WORKER_ID, Field.FLOW_ID,
|
||||
Field.START_DATE, Field.END_DATE, Field.TRIGGER_ID
|
||||
Field.START_DATE, Field.END_DATE, Field.TRIGGER_ID, Field.TRIGGER_STATE
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package io.kestra.core.plugins.notifications;
|
||||
|
||||
import io.kestra.core.models.property.Property;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ExecutionInterface {
|
||||
@Schema(
|
||||
title = "The execution id to use",
|
||||
description = "Default is the current execution, " +
|
||||
"change it to {{ trigger.executionId }} if you use this task with a Flow trigger to use the original execution."
|
||||
)
|
||||
Property<String> getExecutionId();
|
||||
|
||||
@Schema(
|
||||
title = "Custom fields to be added on notification"
|
||||
)
|
||||
Property<Map<String, Object>> getCustomFields();
|
||||
|
||||
@Schema(
|
||||
title = "Custom message to be added on notification"
|
||||
)
|
||||
Property<String> getCustomMessage();
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package io.kestra.core.plugins.notifications;
|
||||
|
||||
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
|
||||
import io.kestra.core.models.executions.Execution;
|
||||
import io.kestra.core.models.executions.TaskRun;
|
||||
import io.kestra.core.models.flows.State;
|
||||
import io.kestra.core.models.property.Property;
|
||||
import io.kestra.core.models.tasks.retrys.Exponential;
|
||||
import io.kestra.core.repositories.ExecutionRepositoryInterface;
|
||||
import io.kestra.core.runners.DefaultRunContext;
|
||||
import io.kestra.core.runners.RunContext;
|
||||
import io.kestra.core.serializers.JacksonMapper;
|
||||
import io.kestra.core.utils.ListUtils;
|
||||
import io.kestra.core.utils.RetryUtils;
|
||||
import io.kestra.core.utils.UriProvider;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
|
||||
public final class ExecutionService {
|
||||
private ExecutionService() {}
|
||||
|
||||
public static Execution findExecution(RunContext runContext, Property<String> executionId) throws IllegalVariableEvaluationException, NoSuchElementException {
|
||||
ExecutionRepositoryInterface executionRepository = ((DefaultRunContext) runContext).getApplicationContext().getBean(ExecutionRepositoryInterface.class);
|
||||
|
||||
RetryUtils.Instance<Execution, NoSuchElementException> retryInstance = RetryUtils
|
||||
.of(Exponential.builder()
|
||||
.delayFactor(2.0)
|
||||
.interval(Duration.ofSeconds(1))
|
||||
.maxInterval(Duration.ofSeconds(15))
|
||||
.maxAttempts(-1)
|
||||
.maxDuration(Duration.ofMinutes(10))
|
||||
.build(),
|
||||
runContext.logger()
|
||||
);
|
||||
|
||||
var executionRendererId = runContext.render(executionId).as(String.class).orElse(null);
|
||||
var flowTriggerExecutionState = getOptionalFlowTriggerExecutionState(runContext);
|
||||
|
||||
var flowVars = (Map<String, String>) runContext.getVariables().get("flow");
|
||||
var isCurrentExecution = isCurrentExecution(runContext, executionRendererId);
|
||||
if (isCurrentExecution) {
|
||||
runContext.logger().info("Loading execution data for the current execution.");
|
||||
}
|
||||
|
||||
return retryInstance.run(
|
||||
NoSuchElementException.class,
|
||||
() -> executionRepository.findById(flowVars.get("tenantId"), executionRendererId)
|
||||
.filter(foundExecution -> isExecutionInTheWantedState(foundExecution, isCurrentExecution, flowTriggerExecutionState))
|
||||
.orElseThrow(() -> new NoSuchElementException("Unable to find execution '" + executionRendererId + "'"))
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ExecutionRepository can be out of sync in ElasticSearch stack, with this filter we try to mitigate that
|
||||
*
|
||||
* @param execution the Execution we fetched from ExecutionRepository
|
||||
* @param isCurrentExecution true if this *Execution Task is configured to send a notification for the current Execution
|
||||
* @param flowTriggerExecutionState the Execution State that triggered the Flow trigger, if any
|
||||
* @return true if we think we fetched the right Execution data for our usecase
|
||||
*/
|
||||
public static boolean isExecutionInTheWantedState(Execution execution, boolean isCurrentExecution, Optional<String> flowTriggerExecutionState) {
|
||||
if (isCurrentExecution) {
|
||||
// we don't wait for current execution to be terminated as it could not be possible as long as this task is running
|
||||
return true;
|
||||
}
|
||||
|
||||
if (flowTriggerExecutionState.isPresent()) {
|
||||
// we were triggered by a Flow trigger that can be, for example: PAUSED
|
||||
if (flowTriggerExecutionState.get().equals(State.Type.RUNNING.toString())) {
|
||||
// RUNNING special case: we take the first state we got
|
||||
return true;
|
||||
} else {
|
||||
// to handle the case where the ExecutionRepository is out of sync in ElasticSearch stack,
|
||||
// we try to match an Execution with the same state
|
||||
return execution.getState().getCurrent().name().equals(flowTriggerExecutionState.get());
|
||||
}
|
||||
} else {
|
||||
return execution.getState().getCurrent().isTerminated();
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, Object> executionMap(RunContext runContext, ExecutionInterface executionInterface) throws IllegalVariableEvaluationException {
|
||||
Execution execution = findExecution(runContext, executionInterface.getExecutionId());
|
||||
UriProvider uriProvider = ((DefaultRunContext) runContext).getApplicationContext().getBean(UriProvider.class);
|
||||
|
||||
Map<String, Object> templateRenderMap = new HashMap<>();
|
||||
templateRenderMap.put("duration", execution.getState().humanDuration());
|
||||
templateRenderMap.put("startDate", execution.getState().getStartDate());
|
||||
templateRenderMap.put("link", uriProvider.executionUrl(execution));
|
||||
templateRenderMap.put("execution", JacksonMapper.toMap(execution));
|
||||
|
||||
runContext.render(executionInterface.getCustomMessage())
|
||||
.as(String.class)
|
||||
.ifPresent(s -> templateRenderMap.put("customMessage", s));
|
||||
|
||||
final Map<String, Object> renderedCustomFields = runContext.render(executionInterface.getCustomFields()).asMap(String.class, Object.class);
|
||||
if (!renderedCustomFields.isEmpty()) {
|
||||
templateRenderMap.put("customFields", renderedCustomFields);
|
||||
}
|
||||
|
||||
var isCurrentExecution = isCurrentExecution(runContext, execution.getId());
|
||||
|
||||
List<TaskRun> taskRuns;
|
||||
|
||||
if (isCurrentExecution) {
|
||||
taskRuns = execution.getTaskRunList();
|
||||
} else {
|
||||
taskRuns = execution.getTaskRunList().stream()
|
||||
.filter(t -> (execution.hasFailed() ? State.Type.FAILED : State.Type.SUCCESS).equals(t.getState().getCurrent()))
|
||||
.toList();
|
||||
}
|
||||
|
||||
if (!ListUtils.isEmpty(taskRuns)) {
|
||||
TaskRun lastTaskRun = taskRuns.getLast();
|
||||
templateRenderMap.put("firstFailed", State.Type.FAILED.equals(lastTaskRun.getState().getCurrent()) ? lastTaskRun : false);
|
||||
templateRenderMap.put("lastTask", lastTaskRun);
|
||||
}
|
||||
|
||||
return templateRenderMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* if there is a state, we assume this is a Flow trigger with type: {@link io.kestra.plugin.core.trigger.Flow.Output}
|
||||
*
|
||||
* @return the state of the execution that triggered the Flow trigger, or empty if another usecase/trigger
|
||||
*/
|
||||
private static Optional<String> getOptionalFlowTriggerExecutionState(RunContext runContext) {
|
||||
var triggerVar = Optional.ofNullable(
|
||||
runContext.getVariables().get("trigger")
|
||||
);
|
||||
return triggerVar.map(trigger -> ((Map<String, String>) trigger).get("state"));
|
||||
}
|
||||
|
||||
private static boolean isCurrentExecution(RunContext runContext, String executionId) {
|
||||
var executionVars = (Map<String, String>) runContext.getVariables().get("execution");
|
||||
return executionId.equals(executionVars.get("id"));
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import io.kestra.core.models.dashboards.charts.DataChart;
|
||||
import io.kestra.core.plugins.DefaultPluginRegistry;
|
||||
import io.kestra.core.plugins.PluginRegistry;
|
||||
import io.kestra.core.serializers.JacksonMapper;
|
||||
import io.micronaut.context.exceptions.NoSuchBeanException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -72,7 +73,7 @@ public final class PluginDeserializer<T extends Plugin> extends JsonDeserializer
|
||||
// By default, if no plugin-registry is configured retrieve
|
||||
// the one configured from the static Kestra's context.
|
||||
pluginRegistry = KestraContext.getContext().getPluginRegistry();
|
||||
} catch (IllegalStateException ignore) {
|
||||
} catch (IllegalStateException | NoSuchBeanException ignore) {
|
||||
// This error can only happen if the KestraContext is not initialized (i.e. in unit tests).
|
||||
log.error("No plugin registry was initialized. Use default implementation.");
|
||||
pluginRegistry = DefaultPluginRegistry.getOrCreate();
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE triggers
|
||||
ADD COLUMN "disabled" BOOL
|
||||
GENERATED ALWAYS AS (JQ_BOOLEAN("value", '.disabled')) NOT NULL;
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE triggers
|
||||
ADD COLUMN `disabled` BOOL
|
||||
GENERATED ALWAYS AS (value ->> '$.disabled' = 'true') STORED NOT NULL
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE triggers
|
||||
ADD COLUMN "disabled" BOOL
|
||||
GENERATED ALWAYS AS (CAST(value ->> 'disabled' AS BOOL)) STORED NOT NULL;
|
||||
|
||||
@@ -324,6 +324,10 @@ public abstract class AbstractJdbcRepository {
|
||||
}
|
||||
}
|
||||
|
||||
if(field == QueryFilter.Field.TRIGGER_STATE){
|
||||
return applyTriggerStateCondition(value, operation);
|
||||
}
|
||||
|
||||
// Convert the field name to lowercase and quote it
|
||||
Name columnName = getColumnName(field);
|
||||
|
||||
@@ -341,7 +345,7 @@ public abstract class AbstractJdbcRepository {
|
||||
case CONTAINS -> DSL.field(columnName).like("%" + value + "%");
|
||||
case REGEX -> DSL.field(columnName).likeRegex((String) value);
|
||||
case PREFIX -> DSL.field(columnName).like(value + "%")
|
||||
.or(DSL.field(columnName).eq(value));
|
||||
.or(DSL.field(columnName).eq(value));
|
||||
default -> throw new InvalidQueryFiltersException("Unsupported operation: " + operation);
|
||||
};
|
||||
}
|
||||
@@ -469,6 +473,23 @@ public abstract class AbstractJdbcRepository {
|
||||
};
|
||||
}
|
||||
|
||||
private Condition applyTriggerStateCondition(Object value, QueryFilter.Op operation) {
|
||||
String triggerState = value.toString();
|
||||
Boolean isDisabled = switch (triggerState) {
|
||||
case "disabled" -> true;
|
||||
case "enabled" -> false;
|
||||
default -> null;
|
||||
};
|
||||
if (isDisabled == null) {
|
||||
return DSL.noCondition();
|
||||
}
|
||||
return switch (operation) {
|
||||
case EQUALS -> field("disabled").eq(isDisabled);
|
||||
case NOT_EQUALS -> field("disabled").ne(isDisabled);
|
||||
default -> throw new InvalidQueryFiltersException("Unsupported operation for Trigger State: " + operation);
|
||||
};
|
||||
}
|
||||
|
||||
protected Field<Date> formatDateField(String dateField, DateUtils.GroupType groupType) {
|
||||
throw new UnsupportedOperationException("formatDateField() not implemented");
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@ import io.micronaut.context.annotation.Factory;
|
||||
import io.micronaut.context.annotation.Requires;
|
||||
import io.micronaut.test.annotation.TransactionMode;
|
||||
import io.micronaut.test.condition.TestActiveCondition;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Tag("integration")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE, ElementType.TYPE})
|
||||
@ExtendWith(KestraTestExtension.class)
|
||||
|
||||
@@ -103,6 +103,10 @@ export function useValues(label: string | undefined, t?: ReturnType<typeof useI1
|
||||
STATUSES: buildFromArray(["PENDING", "ACCEPTED", "EXPIRED"]),
|
||||
AGGREGATIONS: buildFromArray(["SUM", "AVG", "MIN", "MAX"]),
|
||||
RELATIVE_DATE,
|
||||
TRIGGER_STATES:[
|
||||
{label: t("filter.triggerState.enabled"), value: "enabled"},
|
||||
{label: t("filter.triggerState.disabled"), value: "disabled"}
|
||||
]
|
||||
};
|
||||
|
||||
return {VALUES, getRelativeDateLabel};
|
||||
|
||||
@@ -41,9 +41,9 @@ export const useTriggerFilter = (): ComputedRef<FilterConfiguration> => {
|
||||
return [...current, `${(previousCombination ? previousCombination + "." : "")}${part}`];
|
||||
}, []);
|
||||
}))].map(namespace => ({
|
||||
label: namespace,
|
||||
value: namespace
|
||||
}));
|
||||
label: namespace,
|
||||
value: namespace
|
||||
}));
|
||||
}
|
||||
return [];
|
||||
},
|
||||
@@ -116,8 +116,22 @@ export const useTriggerFilter = (): ComputedRef<FilterConfiguration> => {
|
||||
],
|
||||
valueType: "text",
|
||||
searchable: true,
|
||||
},
|
||||
{
|
||||
key: "triggerState",
|
||||
label: t("filter.triggerState.label"),
|
||||
description: t("filter.triggerState.description"),
|
||||
comparators: [
|
||||
Comparators.EQUALS,
|
||||
Comparators.NOT_EQUALS
|
||||
],
|
||||
valueType: "select",
|
||||
valueProvider: async () => {
|
||||
const {VALUES} = useValues("triggers");
|
||||
return VALUES.TRIGGER_STATES;
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
id="side-menu"
|
||||
:menu
|
||||
@update:collapsed="onToggleCollapse"
|
||||
width="268px"
|
||||
width="280px"
|
||||
:collapsed="collapsed"
|
||||
linkComponentName="LeftMenuLink"
|
||||
hideToggle
|
||||
|
||||
@@ -1,45 +1,70 @@
|
||||
import {computed} from "vue";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
|
||||
import {useRoute, useRouter, type RouteRecordNameGeneric} from "vue-router";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
import {useMiscStore} from "override/stores/misc";
|
||||
|
||||
import {getDashboard} from "../../components/dashboard/composables/useDashboards";
|
||||
|
||||
// Main icons
|
||||
import ChartLineVariant from "vue-material-design-icons/ChartLineVariant.vue";
|
||||
import FileTreeOutline from "vue-material-design-icons/FileTreeOutline.vue";
|
||||
import LayersTripleOutline from "vue-material-design-icons/LayersTripleOutline.vue";
|
||||
import ContentCopy from "vue-material-design-icons/ContentCopy.vue";
|
||||
import TimelineClockOutline from "vue-material-design-icons/TimelineClockOutline.vue";
|
||||
import TimelineTextOutline from "vue-material-design-icons/TimelineTextOutline.vue";
|
||||
import BallotOutline from "vue-material-design-icons/BallotOutline.vue";
|
||||
import ShieldAccountVariantOutline from "vue-material-design-icons/ShieldAccountVariantOutline.vue";
|
||||
import ViewDashboardVariantOutline from "vue-material-design-icons/ViewDashboardVariantOutline.vue";
|
||||
import Connection from "vue-material-design-icons/Connection.vue";
|
||||
import DotsSquare from "vue-material-design-icons/DotsSquare.vue";
|
||||
import FormatListGroupPlus from "vue-material-design-icons/FormatListGroupPlus.vue";
|
||||
import DatabaseOutline from "vue-material-design-icons/DatabaseOutline.vue";
|
||||
import ShieldKeyOutline from "vue-material-design-icons/ShieldKeyOutline.vue";
|
||||
import PlayOutline from "vue-material-design-icons/PlayOutline.vue";
|
||||
import FileDocumentOutline from "vue-material-design-icons/FileDocumentOutline.vue";
|
||||
import FlaskOutline from "vue-material-design-icons/FlaskOutline.vue";
|
||||
// import PackageVariantClosed from "vue-material-design-icons/PackageVariantClosed.vue";
|
||||
import FolderOpenOutline from "vue-material-design-icons/FolderOpenOutline.vue";
|
||||
import PuzzleOutline from "vue-material-design-icons/PuzzleOutline.vue";
|
||||
import ShapePlusOutline from "vue-material-design-icons/ShapePlusOutline.vue";
|
||||
import OfficeBuildingOutline from "vue-material-design-icons/OfficeBuildingOutline.vue";
|
||||
import ServerNetworkOutline from "vue-material-design-icons/ServerNetworkOutline.vue";
|
||||
|
||||
// Blueprints icons
|
||||
import Wrench from "vue-material-design-icons/Wrench.vue";
|
||||
|
||||
// Tenant Administration icons
|
||||
import Monitor from "vue-material-design-icons/Monitor.vue";
|
||||
import DatabaseOutline from "vue-material-design-icons/DatabaseOutline.vue";
|
||||
import LockOutline from "vue-material-design-icons/LockOutline.vue";
|
||||
import LightningBolt from "vue-material-design-icons/LightningBolt.vue";
|
||||
import Battery40 from "vue-material-design-icons/Battery40.vue";
|
||||
import ShieldAccount from "vue-material-design-icons/ShieldAccount.vue";
|
||||
|
||||
export type MenuItem = {
|
||||
title: string;
|
||||
routes?: RouteRecordNameGeneric[];
|
||||
href?: {
|
||||
path?: string,
|
||||
name: string,
|
||||
params?: Record<string, any>,
|
||||
query?: Record<string, any>
|
||||
},
|
||||
child?: MenuItem[],
|
||||
disabled?: boolean,
|
||||
name: string;
|
||||
params?: Record<string, any>;
|
||||
query?: Record<string, any>;
|
||||
};
|
||||
icon?: {
|
||||
element?: any;
|
||||
class?: any;
|
||||
};
|
||||
child?: MenuItem[];
|
||||
attributes?: {
|
||||
locked?: boolean;
|
||||
};
|
||||
hidden?: boolean;
|
||||
};
|
||||
|
||||
export function useLeftMenu() {
|
||||
const {t} = useI18n({useScope: "global"});
|
||||
const $route = useRoute();
|
||||
const $router = useRouter();
|
||||
const miscStore = useMiscStore();
|
||||
|
||||
const {t} = useI18n({useScope: "global"});
|
||||
|
||||
const configs = useMiscStore().configs;
|
||||
|
||||
/**
|
||||
* Returns all route names that start with the given route
|
||||
* @param route
|
||||
* @returns
|
||||
* Returns the names of all registered routes whose name starts with the given prefix.
|
||||
*
|
||||
* @param route - The route name prefix to match against.
|
||||
* @returns An array of route names starting with the provided prefix.
|
||||
*/
|
||||
function routeStartWith(route: string) {
|
||||
return $router
|
||||
@@ -50,140 +75,145 @@ export function useLeftMenu() {
|
||||
.map((r) => r.name);
|
||||
}
|
||||
|
||||
const flatMenuItems = (items: MenuItem[]): MenuItem[] => {
|
||||
return items.flatMap(item => item.child ? [item, ...flatMenuItems(item.child)] : [item])
|
||||
}
|
||||
|
||||
const menu = computed(() => {
|
||||
const generatedMenu = [
|
||||
const menu = computed<MenuItem[]>(() => {
|
||||
return [
|
||||
{
|
||||
title: t("dashboards.labels.plural"),
|
||||
href: {
|
||||
name: "home",
|
||||
params: {dashboard: getDashboard($route, "id")},
|
||||
params: {
|
||||
dashboard: getDashboard($route, "id"),
|
||||
},
|
||||
},
|
||||
title: t("dashboards.labels.plural"),
|
||||
icon: {
|
||||
element: ViewDashboardVariantOutline,
|
||||
class: "menu-icon",
|
||||
element: ChartLineVariant,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "flows/list"},
|
||||
routes: routeStartWith("flows"),
|
||||
title: t("flows"),
|
||||
routes: routeStartWith("flows"),
|
||||
href: {
|
||||
name: "flows/list",
|
||||
},
|
||||
icon: {
|
||||
element: FileTreeOutline,
|
||||
class: "menu-icon",
|
||||
},
|
||||
exact: false,
|
||||
},
|
||||
{
|
||||
href: {name: "apps/list"},
|
||||
routes: routeStartWith("apps"),
|
||||
title: t("apps"),
|
||||
routes: routeStartWith("apps"),
|
||||
href: {
|
||||
name: "apps/list",
|
||||
},
|
||||
icon: {
|
||||
element: FormatListGroupPlus,
|
||||
class: "menu-icon",
|
||||
element: LayersTripleOutline,
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "templates/list"},
|
||||
routes: routeStartWith("templates"),
|
||||
title: t("templates"),
|
||||
icon: {
|
||||
element: ContentCopy,
|
||||
class: "menu-icon",
|
||||
},
|
||||
hidden: !miscStore.configs?.isTemplateEnabled,
|
||||
},
|
||||
{
|
||||
href: {name: "executions/list"},
|
||||
routes: routeStartWith("executions"),
|
||||
title: t("executions"),
|
||||
routes: routeStartWith("executions"),
|
||||
href: {
|
||||
name: "executions/list",
|
||||
},
|
||||
icon: {
|
||||
element: TimelineClockOutline,
|
||||
class: "menu-icon",
|
||||
element: PlayOutline,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "logs/list"},
|
||||
routes: routeStartWith("logs"),
|
||||
title: t("logs"),
|
||||
routes: routeStartWith("logs"),
|
||||
href: {
|
||||
name: "logs/list",
|
||||
},
|
||||
icon: {
|
||||
element: TimelineTextOutline,
|
||||
class: "menu-icon",
|
||||
element: FileDocumentOutline,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "tests/list"},
|
||||
routes: routeStartWith("tests"),
|
||||
title: t("demos.tests.label"),
|
||||
routes: routeStartWith("tests"),
|
||||
href: {
|
||||
name: "tests/list",
|
||||
},
|
||||
icon: {
|
||||
element: FlaskOutline,
|
||||
class: "menu-icon"
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
// TODO: To add Assets entry here in future release
|
||||
// Uncomment PackageVariantClosed on line 25 and use as the icon
|
||||
{
|
||||
href: {name: "namespaces/list"},
|
||||
routes: routeStartWith("namespaces"),
|
||||
title: t("namespaces"),
|
||||
routes: routeStartWith("namespaces"),
|
||||
href: {
|
||||
name: "namespaces/list",
|
||||
},
|
||||
icon: {
|
||||
element: DotsSquare,
|
||||
class: "menu-icon",
|
||||
element: FolderOpenOutline,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "kv/list"},
|
||||
routes: routeStartWith("kv"),
|
||||
title: t("kv.name"),
|
||||
title: t("templates"),
|
||||
routes: routeStartWith("templates"),
|
||||
href: {
|
||||
name: "templates/list",
|
||||
},
|
||||
icon: {
|
||||
element: DatabaseOutline,
|
||||
class: "menu-icon",
|
||||
element: ContentCopy,
|
||||
},
|
||||
hidden: !configs?.isTemplateEnabled,
|
||||
},
|
||||
{
|
||||
title: t("plugins.names"),
|
||||
routes: routeStartWith("plugins"),
|
||||
href: {
|
||||
name: "plugins/list",
|
||||
},
|
||||
icon: {
|
||||
element: PuzzleOutline,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "secrets/list"},
|
||||
routes: routeStartWith("secrets"),
|
||||
title: t("secret.names"),
|
||||
icon: {
|
||||
element: ShieldKeyOutline,
|
||||
class: "menu-icon",
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
routes: routeStartWith("blueprints"),
|
||||
title: t("blueprints.title"),
|
||||
routes: routeStartWith("blueprints"),
|
||||
icon: {
|
||||
element: BallotOutline,
|
||||
class: "menu-icon",
|
||||
element: ShapePlusOutline,
|
||||
},
|
||||
child: [
|
||||
{
|
||||
title: t("blueprints.custom"),
|
||||
routes: routeStartWith("blueprints/flow"),
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
routes: routeStartWith("blueprints/flow/custom"),
|
||||
href: {
|
||||
name: "blueprints",
|
||||
params: {kind: "flow", tab: "custom"},
|
||||
params: {
|
||||
kind: "flow",
|
||||
tab: "custom",
|
||||
},
|
||||
},
|
||||
icon: {
|
||||
element: Wrench,
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("blueprints.flows"),
|
||||
routes: routeStartWith("blueprints/flow"),
|
||||
routes: routeStartWith("blueprints/flow/community"),
|
||||
href: {
|
||||
name: "blueprints",
|
||||
params: {kind: "flow", tab: "community"},
|
||||
params: {
|
||||
kind: "flow",
|
||||
tab: "community",
|
||||
},
|
||||
},
|
||||
icon: {
|
||||
element: FileTreeOutline,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -191,91 +221,144 @@ export function useLeftMenu() {
|
||||
routes: routeStartWith("blueprints/dashboard"),
|
||||
href: {
|
||||
name: "blueprints",
|
||||
params: {kind: "dashboard", tab: "community"},
|
||||
params: {
|
||||
kind: "dashboard",
|
||||
tab: "community",
|
||||
},
|
||||
},
|
||||
icon: {
|
||||
element: ChartLineVariant,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
href: {name: "plugins/list"},
|
||||
routes: routeStartWith("plugins"),
|
||||
title: t("plugins.names"),
|
||||
title: t("tenant_administration"),
|
||||
routes: [
|
||||
"admin/stats",
|
||||
"kv",
|
||||
"secrets",
|
||||
"admin/triggers",
|
||||
"admin/auditlogs",
|
||||
"admin/iam",
|
||||
"admin/concurrency-limits",
|
||||
]
|
||||
.map(routeStartWith)
|
||||
.find((routes) => routes.length > 0),
|
||||
icon: {
|
||||
element: Connection,
|
||||
class: "menu-icon",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("administration"),
|
||||
routes: routeStartWith("admin"),
|
||||
icon: {
|
||||
element: ShieldAccountVariantOutline,
|
||||
class: "menu-icon",
|
||||
element: OfficeBuildingOutline,
|
||||
},
|
||||
child: [
|
||||
{
|
||||
href: {name: "admin/iam"},
|
||||
routes: routeStartWith("admin/iam"),
|
||||
title: t("iam"),
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "admin/auditlogs/list"},
|
||||
routes: routeStartWith("admin/auditlogs"),
|
||||
title: t("auditlogs"),
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "admin/triggers"},
|
||||
routes: routeStartWith("admin/triggers"),
|
||||
title: t("triggers"),
|
||||
},
|
||||
{
|
||||
href: {name: "admin/instance"},
|
||||
routes: routeStartWith("admin/instance"),
|
||||
title: t("instance"),
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "admin/tenants/list"},
|
||||
routes: routeStartWith("admin/tenants"),
|
||||
title: t("tenant.names"),
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
href: {name: "admin/concurrency-limits"},
|
||||
routes: routeStartWith("admin/concurrency-limits"),
|
||||
title: t("concurrency limits"),
|
||||
hidden: !miscStore.configs?.isConcurrencyViewEnabled,
|
||||
},
|
||||
{
|
||||
href: {name: "admin/stats"},
|
||||
routes: routeStartWith("admin/stats"),
|
||||
title: t("system overview"),
|
||||
routes: routeStartWith("admin/stats"),
|
||||
href: {
|
||||
name: "admin/stats",
|
||||
},
|
||||
icon: {
|
||||
element: Monitor,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("kv.name"),
|
||||
routes: routeStartWith("kv"),
|
||||
href: {
|
||||
name: "kv/list",
|
||||
},
|
||||
icon: {
|
||||
element: DatabaseOutline,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("secret.names"),
|
||||
routes: routeStartWith("secrets"),
|
||||
href: {
|
||||
name: "secrets/list",
|
||||
},
|
||||
icon: {
|
||||
element: LockOutline,
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("triggers"),
|
||||
routes: routeStartWith("admin/triggers"),
|
||||
href: {
|
||||
name: "admin/triggers",
|
||||
},
|
||||
icon: {
|
||||
element: LightningBolt,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("auditlogs"),
|
||||
routes: routeStartWith("admin/auditlogs"),
|
||||
href: {
|
||||
name: "admin/auditlogs/list",
|
||||
},
|
||||
icon: {
|
||||
element: FileDocumentOutline,
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: t("concurrency limits"),
|
||||
routes: routeStartWith("admin/concurrency-limits"),
|
||||
href: {
|
||||
name: "admin/concurrency-limits",
|
||||
},
|
||||
icon: {
|
||||
element: Battery40,
|
||||
},
|
||||
hidden: !configs?.isConcurrencyViewEnabled,
|
||||
},
|
||||
{
|
||||
title: t("iam"),
|
||||
routes: routeStartWith("admin/iam"),
|
||||
href: {
|
||||
name: "admin/iam",
|
||||
},
|
||||
icon: {
|
||||
element: ShieldAccount,
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("instance_administration"),
|
||||
routes: routeStartWith("admin/instance"),
|
||||
href: {
|
||||
name: "admin/instance",
|
||||
},
|
||||
icon: {
|
||||
element: ServerNetworkOutline,
|
||||
},
|
||||
attributes: {
|
||||
locked: true,
|
||||
},
|
||||
},
|
||||
].map((item: MenuItem) => {
|
||||
if (item.icon?.element) {
|
||||
item.icon.class = "menu-icon"; // Add default class to all menu icons
|
||||
}
|
||||
];
|
||||
|
||||
flatMenuItems(generatedMenu).forEach(menuItem => {
|
||||
if (menuItem.href !== undefined && menuItem.href?.name === $route.name) {
|
||||
menuItem.href.query = {...$route.query, ...menuItem.href?.query};
|
||||
if (item.href && item.href?.name === $route.name) {
|
||||
item.href.query = {
|
||||
...$route.query,
|
||||
...item.href?.query,
|
||||
};
|
||||
}
|
||||
|
||||
return item;
|
||||
});
|
||||
|
||||
return generatedMenu;
|
||||
});
|
||||
|
||||
return {
|
||||
routeStartWith,
|
||||
menu
|
||||
};
|
||||
return {menu};
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ export default [
|
||||
|
||||
//Admin
|
||||
{name: "admin/triggers", path: "/:tenant?/admin/triggers", component: () => import("../components/admin/Triggers.vue")},
|
||||
{name: "admin/stats", path: "/:tenant?/admin/stats", component: () => import("override/components/admin/stats/Stats.vue")},
|
||||
{name: "admin/stats", path: "/:tenant?/admin/stats/:type?", component: () => import("override/components/admin/stats/Stats.vue")},
|
||||
{name: "admin/concurrency-limits", path: "/:tenant?/admin/concurrency-limits", component: () => import("../components/admin/ConcurrencyLimits.vue")},
|
||||
|
||||
//Setup
|
||||
|
||||
@@ -1,208 +1,233 @@
|
||||
@import "@kestra-io/ui-libs/src/scss/variables.scss";
|
||||
|
||||
#app {
|
||||
.vsm--item {
|
||||
padding: 0 30px;
|
||||
transition: padding 0.2s ease;
|
||||
}
|
||||
|
||||
#app {
|
||||
.vsm--icon {
|
||||
transition: left 0.2s ease;
|
||||
font-size: 1.5em;
|
||||
background-color: transparent !important;
|
||||
padding-bottom: 15px;
|
||||
width: 30px !important;
|
||||
z-index: 20; // in collapsed menu, keep the icon above the opening menu
|
||||
.vsm--icon {
|
||||
width: 20px;
|
||||
margin-right: calc($spacer / 2);
|
||||
transition: left 0.2s ease;
|
||||
background-color: transparent !important;
|
||||
padding-bottom: 15px;
|
||||
|
||||
svg {
|
||||
position: relative;
|
||||
margin-top: 13px;
|
||||
svg {
|
||||
height: 20px !important;
|
||||
width: 20px !important;
|
||||
position: relative;
|
||||
margin-top: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--title {
|
||||
font-size: $font-size-sm;
|
||||
|
||||
&>span {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--child {
|
||||
.vsm--item {
|
||||
padding: 0;
|
||||
|
||||
.vsm--title {
|
||||
font-size: $font-size-xs;
|
||||
}
|
||||
}
|
||||
|
||||
// Make Plugins icon appear as outline
|
||||
.vsm--link[href*="plugins"] .vsm--icon svg {
|
||||
fill: none !important;
|
||||
stroke: currentColor !important;
|
||||
stroke-width: 1.5 !important;
|
||||
.vsm--icon {
|
||||
width: 1rem;
|
||||
|
||||
svg {
|
||||
height: 1rem !important;
|
||||
width: 1rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--link {
|
||||
height: 30px;
|
||||
padding: 0.25rem 0.5rem;
|
||||
margin-bottom: 0.3rem;
|
||||
border-radius: .25rem;
|
||||
transition: padding 0.2s ease;
|
||||
color: var(--ks-content-primary);
|
||||
box-shadow: none;
|
||||
|
||||
&_active,
|
||||
body &_active:hover {
|
||||
background-color: var(--ks-button-background-primary) !important;
|
||||
color: var(--ks-button-content-primary);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.vsm--item {
|
||||
padding: 0 30px;
|
||||
transition: padding 0.2s ease;
|
||||
&.vsm--link_open,
|
||||
&.vsm--link_open:hover {
|
||||
background-color: var(--ks-background-left-menu);
|
||||
color: var(--ks-content-primary);
|
||||
}
|
||||
|
||||
.vsm--child {
|
||||
.vsm--item {
|
||||
padding: 0;
|
||||
.vsm--title {
|
||||
padding-left: 10px;
|
||||
&_disabled {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
body &_hover {
|
||||
background-color: var(--ks-button-background-secondary-hover);
|
||||
}
|
||||
|
||||
.el-tooltip__trigger {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&>span {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--link_open {
|
||||
position: relative !important;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.vsm_collapsed .vsm--link_open {
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.vsm--child .vsm--link {
|
||||
padding: 0 0.2rem;
|
||||
position: relative !important;
|
||||
margin-left: 1.8rem;
|
||||
|
||||
&.vsm--link_level-3 {
|
||||
margin-left: 3.6rem;
|
||||
|
||||
& span {
|
||||
margin-left: calc($spacer / 4);
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--icon {
|
||||
margin-left: calc($spacer / 2);
|
||||
color: var(--ks-content-secondary);
|
||||
}
|
||||
|
||||
&.vsm--link_active .vsm--icon {
|
||||
color: var(--ks-button-content-primary);
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -.8rem;
|
||||
height: 150%;
|
||||
border: 2px solid var(--ks-border-primary);
|
||||
border-top: 0;
|
||||
border-right: 0;
|
||||
z-index: 2;
|
||||
// mask the right half of the object and the top border
|
||||
clip-path: polygon(50% 8px, 50% 100%, 0 100%, 0 8px);
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--title span:first-child {
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.vsm--link_open.vsm--link_active {
|
||||
|
||||
.vsm--title,
|
||||
.vsm--icon {
|
||||
color: var(--ks-button-content-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--arrow_default {
|
||||
width: 8px;
|
||||
|
||||
&:before {
|
||||
border-left-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
a.vsm--link_active[href="#"] {
|
||||
cursor: initial !important;
|
||||
}
|
||||
|
||||
.vsm--dropdown {
|
||||
background-color: var(--ks-background-left-menu);
|
||||
border-radius: 4px;
|
||||
margin-bottom: .5rem;
|
||||
|
||||
.vsm--title {
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--scroll-thumb {
|
||||
background: var(--ks-border-primary) !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.vsm--mobile-bg {
|
||||
border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
|
||||
}
|
||||
|
||||
.vsm_collapsed {
|
||||
.logo {
|
||||
>* {
|
||||
left: 10px;
|
||||
|
||||
span.img {
|
||||
background-size: 207px 55px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--link {
|
||||
padding: 0.3rem 0.5rem;
|
||||
margin-bottom: 0.3rem;
|
||||
border-radius: .25rem;
|
||||
transition: padding 0.2s ease;
|
||||
color: var(--ks-content-primary);
|
||||
box-shadow: none;
|
||||
padding-left: 13px;
|
||||
|
||||
&_active, body &_active:hover {
|
||||
background-color: var(--ks-button-background-primary) !important;
|
||||
color: var(--ks-button-content-primary);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
&.vsm--link_open, &.vsm--link_open:hover {
|
||||
background-color: var(--ks-background-left-menu);
|
||||
color: var(--ks-content-primary);
|
||||
}
|
||||
|
||||
&_disabled {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover, body &_hover {
|
||||
background-color: var(--ks-button-background-secondary-hover);
|
||||
}
|
||||
|
||||
.el-tooltip__trigger {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
& > span{
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--link_open{
|
||||
position: relative !important;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.vsm_collapsed .vsm--link_open{
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.vsm--child .vsm--link{
|
||||
padding: 0 0.2rem;
|
||||
position: relative!important;
|
||||
font-size: 14px;
|
||||
margin-left: 1.8rem;
|
||||
.vsm--icon {
|
||||
margin-right:4px;
|
||||
color: var(--ks-content-secondary);
|
||||
}
|
||||
&.vsm--link_active .vsm--icon{
|
||||
&.vsm--link_hover {
|
||||
background-color: var(--ks-button-background-primary);
|
||||
color: var(--ks-button-content-primary);
|
||||
}
|
||||
&:before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -.8rem;
|
||||
top: -2.5rem;
|
||||
border-radius: 8px;
|
||||
width: 1.6rem;
|
||||
height: 170%;
|
||||
border: 2px solid var(--ks-border-primary);
|
||||
border-top:0;
|
||||
border-right:0;
|
||||
z-index: 2;
|
||||
// mask the right half of the object and the top border
|
||||
clip-path: polygon(50% 8px, 50% 100%, 0 100%, 0 8px);
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--title span:first-child{
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.vsm--link_open.vsm--link_active {
|
||||
.vsm--title, .vsm--icon {
|
||||
color: var(--ks-button-content-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--arrow_default{
|
||||
width: 8px;
|
||||
&:before{
|
||||
border-left-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
a.vsm--link_active[href="#"] {
|
||||
cursor: initial !important;
|
||||
}
|
||||
|
||||
.vsm--dropdown {
|
||||
background-color: var(--ks-background-left-menu);
|
||||
border-radius: 4px;
|
||||
margin-bottom: .5rem;
|
||||
|
||||
.vsm--title {
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--scroll-thumb {
|
||||
background: var(--ks-border-primary) !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.vsm--mobile-bg {
|
||||
border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
|
||||
}
|
||||
|
||||
.vsm_collapsed {
|
||||
.logo {
|
||||
> * {
|
||||
left: 10px;
|
||||
|
||||
span.img {
|
||||
background-size: 207px 55px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--link {
|
||||
padding-left: 13px;
|
||||
&.vsm--link_hover {
|
||||
background-color: var(--ks-button-background-primary);
|
||||
color: var(--ks-button-content-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.vsm--item {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tooltip__trigger .lock-icon.material-design-icon > .material-design-icon__svg {
|
||||
bottom: 0 !important;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.vsm--item {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 10px;
|
||||
height: 1.25rem;
|
||||
z-index: 5;
|
||||
background: linear-gradient(to top, var(--ks-background-left-menu), transparent);
|
||||
opacity: 0.18;
|
||||
}
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-button {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tooltip__trigger .lock-icon.material-design-icon>.material-design-icon__svg {
|
||||
bottom: 0 !important;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.vsm--item {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 10px;
|
||||
height: 1.25rem;
|
||||
z-index: 5;
|
||||
background: linear-gradient(to top, var(--ks-background-left-menu), transparent);
|
||||
opacity: 0.18;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "oder benutzerdefinierte Dauer eingeben:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "Instanz",
|
||||
"instance_administration": "Instanzverwaltung",
|
||||
"invalid bulk delete": "Ausführungen konnten nicht gelöscht werden",
|
||||
"invalid bulk force run": "Konnte Ausführungen nicht erzwingen",
|
||||
"invalid bulk kill": "Ausführungen konnten nicht beendet werden",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Mandanten"
|
||||
},
|
||||
"tenantId": "Mandanten-ID",
|
||||
"tenant_administration": "Mandantenverwaltung",
|
||||
"test-badge-text": "Test",
|
||||
"test-badge-tooltip": "Diese Ausführung wurde durch einen Test erstellt",
|
||||
"theme": "Modus",
|
||||
|
||||
@@ -391,6 +391,8 @@
|
||||
"conditions": "Conditions",
|
||||
"triggerId": "Trigger ID",
|
||||
"tenantId": "Tenant ID",
|
||||
"tenant_administration": "Tenant Administration",
|
||||
"instance_administration": "Instance Administration",
|
||||
"codeDisabled": "Disabled in Flow",
|
||||
"paused": "Paused",
|
||||
"Fold auto": "Editor: automatic fold of multi-lines",
|
||||
@@ -1727,6 +1729,12 @@
|
||||
"label": "Trigger Execution ID",
|
||||
"description": "Filter by trigger execution ID"
|
||||
},
|
||||
"triggerState":{
|
||||
"label": " Trigger State",
|
||||
"description": "Filter by trigger state",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled"
|
||||
},
|
||||
"scope_flow": {
|
||||
"label": "Scope",
|
||||
"description": "Filter by flow scope"
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "o ingrese duración personalizada:",
|
||||
"inputs": "Entradas",
|
||||
"instance": "Instancia",
|
||||
"instance_administration": "Administración de Instancia",
|
||||
"invalid bulk delete": "No se pudieron eliminar las ejecuciones",
|
||||
"invalid bulk force run": "No se pudo forzar la ejecución de ejecuciones",
|
||||
"invalid bulk kill": "No se pudieron matar las ejecuciones",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Arrendatarios"
|
||||
},
|
||||
"tenantId": "ID de Mandante",
|
||||
"tenant_administration": "Administración de Mandantes",
|
||||
"test-badge-text": "Prueba",
|
||||
"test-badge-tooltip": "Esta ejecución fue creada por una prueba",
|
||||
"theme": "Tema",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "ou saisir une durée personnalisée :",
|
||||
"inputs": "Entrées",
|
||||
"instance": "Instance",
|
||||
"instance_administration": "Administration de l'Instance",
|
||||
"invalid bulk delete": "Impossible de supprimer les exécutions",
|
||||
"invalid bulk force run": "Impossible de forcer l'exécution des exécutions",
|
||||
"invalid bulk kill": "Impossible d'arrêter les exécutions",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Mandants"
|
||||
},
|
||||
"tenantId": "ID du mandant",
|
||||
"tenant_administration": "Administration des Mandants",
|
||||
"test-badge-text": "Test",
|
||||
"test-badge-tooltip": "Cette exécution a été créée par un Test",
|
||||
"theme": "Thème",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "या कस्टम अवधि दर्ज करें:",
|
||||
"inputs": "इनपुट्स",
|
||||
"instance": "इंस्टेंस",
|
||||
"instance_administration": "इंस्टेंस प्रशासन",
|
||||
"invalid bulk delete": "निष्पादन हटाने में असमर्थ",
|
||||
"invalid bulk force run": "निष्पादन को जबरन चलाने में असमर्थ",
|
||||
"invalid bulk kill": "निष्पादन kill करने में असमर्थ",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "मंडल"
|
||||
},
|
||||
"tenantId": "टेनेंट ID",
|
||||
"tenant_administration": "किरायेदार प्रशासन",
|
||||
"test-badge-text": "परीक्षण",
|
||||
"test-badge-tooltip": "यह execution एक Test द्वारा बनाया गया था",
|
||||
"theme": "थीम",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "oppure inserisci durata personalizzata:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "Istanza",
|
||||
"instance_administration": "Amministrazione dell'istanza",
|
||||
"invalid bulk delete": "Impossibile eliminare le esecuzioni",
|
||||
"invalid bulk force run": "Impossibile forzare l'esecuzione delle esecuzioni",
|
||||
"invalid bulk kill": "Impossibile kill le esecuzioni",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Mandanti"
|
||||
},
|
||||
"tenantId": "ID del Mandante",
|
||||
"tenant_administration": "Amministrazione del Mandante",
|
||||
"test-badge-text": "Test",
|
||||
"test-badge-tooltip": "Questa esecuzione è stata creata da un Test",
|
||||
"theme": "Tema",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "またはカスタム期間を入力してください:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "インスタンス",
|
||||
"instance_administration": "インスタンス管理",
|
||||
"invalid bulk delete": "実行を削除できませんでした",
|
||||
"invalid bulk force run": "実行を強制的に開始できませんでした",
|
||||
"invalid bulk kill": "実行をkillできませんでした",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "テナント"
|
||||
},
|
||||
"tenantId": "テナントID",
|
||||
"tenant_administration": "テナント管理",
|
||||
"test-badge-text": "テスト",
|
||||
"test-badge-tooltip": "この実行はテストによって作成されました",
|
||||
"theme": "テーマ",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "또는 사용자 지정 기간 입력:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "인스턴스",
|
||||
"instance_administration": "인스턴스 관리",
|
||||
"invalid bulk delete": "실행을 삭제할 수 없습니다",
|
||||
"invalid bulk force run": "실행을 강제로 실행할 수 없습니다.",
|
||||
"invalid bulk kill": "실행을 강제 종료할 수 없습니다",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "테넌트"
|
||||
},
|
||||
"tenantId": "테넌트 ID",
|
||||
"tenant_administration": "테넌트 관리",
|
||||
"test-badge-text": "테스트",
|
||||
"test-badge-tooltip": "이 실행은 테스트에 의해 생성되었습니다.",
|
||||
"theme": "테마",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "lub wprowadź niestandardowy czas trwania:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "Instancja",
|
||||
"instance_administration": "Administracja Instancji",
|
||||
"invalid bulk delete": "Nie można usunąć wykonań",
|
||||
"invalid bulk force run": "Nie można wymusić uruchomienia wykonania",
|
||||
"invalid bulk kill": "Nie można zabić wykonań",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Najemcy"
|
||||
},
|
||||
"tenantId": "Identyfikator Mandanta",
|
||||
"tenant_administration": "Administracja Mandanta",
|
||||
"test-badge-text": "Test",
|
||||
"test-badge-tooltip": "To wykonanie zostało utworzone przez Test.",
|
||||
"theme": "Motyw",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "ou insira uma duração personalizada:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "Instância",
|
||||
"instance_administration": "Administração da Instância",
|
||||
"invalid bulk delete": "Não foi possível deletar execuções",
|
||||
"invalid bulk force run": "Não foi possível forçar a execução das execuções",
|
||||
"invalid bulk kill": "Não foi possível matar execuções",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Mandantes"
|
||||
},
|
||||
"tenantId": "ID do Mandante",
|
||||
"tenant_administration": "Administração do Mandante",
|
||||
"test-badge-text": "Teste",
|
||||
"test-badge-tooltip": "Esta execução foi criada por um Teste",
|
||||
"theme": "Tema",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "ou insira uma duração personalizada:",
|
||||
"inputs": "Inputs",
|
||||
"instance": "Instância",
|
||||
"instance_administration": "Administração da Instância",
|
||||
"invalid bulk delete": "Não foi possível excluir execuções",
|
||||
"invalid bulk force run": "Não foi possível forçar a execução das execuções",
|
||||
"invalid bulk kill": "Não foi possível matar execuções",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Clientes"
|
||||
},
|
||||
"tenantId": "ID do Cliente",
|
||||
"tenant_administration": "Administração de Tenant",
|
||||
"test-badge-text": "Teste",
|
||||
"test-badge-tooltip": "Esta execução foi criada por um Teste",
|
||||
"theme": "Tema",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "или введите пользовательскую продолжительность:",
|
||||
"inputs": "Входные данные",
|
||||
"instance": "Экземпляр",
|
||||
"instance_administration": "Администрирование экземпляра",
|
||||
"invalid bulk delete": "Не удалось удалить выполнения",
|
||||
"invalid bulk force run": "Не удалось принудительно запустить executions",
|
||||
"invalid bulk kill": "Не удалось убить выполнения",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "Арендаторы"
|
||||
},
|
||||
"tenantId": "ID арендатора",
|
||||
"tenant_administration": "Администрирование Манданта",
|
||||
"test-badge-text": "Тест",
|
||||
"test-badge-tooltip": "Это выполнение было создано тестом",
|
||||
"theme": "Тема",
|
||||
|
||||
@@ -1005,6 +1005,7 @@
|
||||
"input_custom_duration": "或输入自定义持续时间:",
|
||||
"inputs": "输入",
|
||||
"instance": "实例",
|
||||
"instance_administration": "实例管理",
|
||||
"invalid bulk delete": "无法删除执行",
|
||||
"invalid bulk force run": "无法强制运行执行",
|
||||
"invalid bulk kill": "无法终止执行",
|
||||
@@ -1737,6 +1738,7 @@
|
||||
"names": "租户"
|
||||
},
|
||||
"tenantId": "租户 ID",
|
||||
"tenant_administration": "租户管理",
|
||||
"test-badge-text": "测试",
|
||||
"test-badge-tooltip": "此执行由测试创建",
|
||||
"theme": "主题",
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ConcurrencyLimitController {
|
||||
|
||||
@ExecuteOn(TaskExecutors.IO)
|
||||
@Get(uri = "/search")
|
||||
@Operation(tags = {"Flows", "Executions"}, summary = "Search for flow concurrency limits")
|
||||
@Operation(tags = {"Flows"}, summary = "Search for flow concurrency limits")
|
||||
public PagedResults<ConcurrencyLimit> searchConcurrencyLimits() {
|
||||
var results = concurrencyLimitService.find(tenantService.resolveTenant());
|
||||
return PagedResults.of(new ArrayListTotal<>(results, results.size()));
|
||||
@@ -33,7 +33,7 @@ public class ConcurrencyLimitController {
|
||||
|
||||
@ExecuteOn(TaskExecutors.IO)
|
||||
@Put("/{namespace}/{flowId}")
|
||||
@Operation(tags = {"Flows", "Executions"}, summary = "Update a flow concurrency limit")
|
||||
@Operation(tags = {"Flows"}, summary = "Update a flow concurrency limit")
|
||||
public HttpResponse<ConcurrencyLimit> updateConcurrencyLimit(@Body ConcurrencyLimit concurrencyLimit) {
|
||||
var existing = concurrencyLimitService.findById(concurrencyLimit.getTenantId(), concurrencyLimit.getNamespace(), concurrencyLimit.getFlowId());
|
||||
if (existing.isEmpty()) {
|
||||
|
||||
@@ -9,12 +9,4 @@ public class WorkerSecurityService {
|
||||
public State.Type callInSecurityContext(AbstractWorkerCallable callable) {
|
||||
return callable.call();
|
||||
}
|
||||
|
||||
public boolean isInSecurityContext() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public AbstractWorkerCallable getCallable() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user