Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ gemspec

# Load Gemfile with dependencies from manageiq
eval_gemfile(File.expand_path("spec/manageiq/Gemfile", __dir__))


25 changes: 15 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ end
# Only load the jasmine tasks if we are within this repo, otherwise, the bundle
# won't contain the jasmine gem (i.e., from manageiq)
if ENV["BUNDLE_GEMFILE"].nil? || ENV["BUNDLE_GEMFILE"] == File.expand_path("../Gemfile", __FILE__)
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'

# running jasmine outside ci ignores the `random: false` in `jasmine.yml` - needs a message
task :jasmine_url do
puts
puts "Please open http://localhost:#{Jasmine.config.port(:server)}/?random=false"
puts
end
begin
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'

Rake::Task['jasmine'].prerequisites.unshift 'jasmine_url'
task :jasmine_url do
puts
puts "Please open http://localhost:#{Jasmine.config.port(:server)}/?random=false"
puts
end

Rake::Task['jasmine'].prerequisites.unshift 'jasmine_url'
rescue LoadError
# Jasmine not installed, skip JS test tasks
end
end


namespace :spec do
desc "Run all routing specs"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:routes => 'app:test:initialize') do |t|
spec_dir = File.expand_path("spec", __dir__)
EvmTestHelper.init_rspec_task(t, ['--require', File.join(spec_dir, 'spec_helper')])
Expand Down
14 changes: 14 additions & 0 deletions app/javascript/components/workflows/Test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';


const Test=()=>{
console.log("Testapp");

return(
<div>
"Hello Test Appl"
</div>
);
}

export default Test;
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright 2017-2023 Elyra Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-console: ["error", { allow: ["log", "info", "warn", "error", "time", "timeEnd"] }] */

import React from "react";

import AllTypesCanvas from "../test_resources/diagrams/allTypesCanvas.json";
import ModelerPalette from "../test_resources/palettes/leftPaletteMenu.json";
// Note use "@elyra/canvas" instead of "common-canvas" here, if you are importing from the NPM module.
import { CommonCanvas, CanvasController } from "@elyra/canvas"; // eslint-disable-line import/no-unresolved
// This library is only needed if you want to use hot loading during development.

class App extends React.Component {
constructor(props) {
super(props);

this.canvasController = new CanvasController();
this.canvasController.setPipelineFlow(AllTypesCanvas);
this.canvasController.setPipelineFlowPalette(ModelerPalette);
}

render() {
return (
<div id="harness-app-container">

<CommonCanvas
canvasController={this.canvasController}
/>

</div>
);
}
}

export default App;
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"Comment": "An example of the Amazon States Language with all states.",
"StartAt": "FirstState",
"States": {
"FirstState": {
"Type": "Task",
"Resource": "docker://docker.io/agrare/hello-world:latest",
"Credentials": {
"mysecret": "dont tell anyone"
},
"Retry": [
{
"ErrorEquals": [
"States.Timeout"
],
"IntervalSeconds": 3,
"MaxAttempts": 2,
"BackoffRate": 1.5
}
],
"Catch": [
{
"ErrorEquals": [
"States.ALL"
],
"Next": "FailState"
}
],
"Next": "ChoiceState"
},
"ChoiceState": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.foo",
"NumericEquals": 1,
"Next": "FirstMatchState"
},
{
"Variable": "$.foo",
"NumericEquals": 2,
"Next": "SecondMatchState"
},
{
"Variable": "$.foo",
"NumericEquals": 3,
"Next": "SuccessState"
},
{
"Variable": "$.foo",
"StringEquals": "b",
"Next": "ChoiceState"
}
],
"Default": "FailState"
},
"FirstMatchState": {
"Type": "Task",
"Resource": "docker://docker.io/agrare/hello-world:latest",
"Next": "PassState"
},
"SecondMatchState": {
"Type": "Task",
"Resource": "docker://docker.io/agrare/hello-world:latest",
"Next": "WaitState"
},
"WaitState": {
"Type": "Wait",
"Seconds": 1,
"Next": "PassState"
},
"PassState": {
"Type": "Pass",
"Next": "MapState",
"Result": {
"foo": "bar",
"colors": [
"red",
"green",
"blue",
"yellow",
"white"
]
}
},
"FailState": {
"Type": "Fail",
"Error": "FailStateError",
"Cause": "No Matches!"
},
"MapState": {
"Type": "Map",
"ItemsPath": "$.colors",
"MaxConcurrency": 2,
"ItemProcessor": {
"ProcessorConfig": {
"Mode": "INLINE"
},
"StartAt": "Generate UUID",
"States": {
"Generate UUID": {
"Type": "Pass",
"Next": "PassState",
"Parameters": {
"uuid.$": "States.UUID()"
}
},
"PassState": {
"Type": "Pass",
"End": true
}
}
},
"Next": "ParallelState"
},
"ParallelState": {
"Type": "Parallel",
"Next": "SuccessState",
"Branches": [
{
"StartAt": "Add",
"States": {
"Add": {
"Type": "Task",
"Resource": "docker://docker.io/agrare/sleep:latest",
"End": true
}
}
},
{
"StartAt": "Subtract",
"States": {
"Subtract": {
"Type": "Task",
"Resource": "docker://docker.io/agrare/sleep:latest",
"End": true
}
}
}
]
},
"SuccessState": {
"Type": "Succeed"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Comment": "A simple minimal example of the States language",
"StartAt": "Hello World",
"States": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"States": {
"VMware Template ": {
"Type": "Task",
"Resource": "docker://docker.io/manageiq/workflows-examples-provision-vm-service-list-templates:latest",
"Credentials": {
"api_user.$": "$.api_user",
"api_password.$": "$.api_password",
"api_token.$": "$.api_token",
"api_bearer_token.$": "$.api_bearer_token"
},
"Parameters": {
"API_URL.$": "$$.Execution._manageiq_api_url",
"VERIFY_SSL.$": "$.dialog.dialog_verify_ssl",
"PROVIDER_ID.$": "$.dialog.dialog_provider"
},
"Next": "Choice"
},
"Choice": {
"Type": "Choice",
"Choices": [
{
"Next": "Wait (2)"
}
],
"Default": "providers"
},
"Wait (2)": {
"Type": "Wait",
"Seconds": 5,
"Next": "Pass"
},
"Pass": {
"Type": "Pass",
"Next": "Wait (1)"
},
"Wait (1)": {
"Type": "Wait",
"Seconds": 5,
"Next": "Send Email "
},
"Send Email ": {
"Type": "Task",
"Resource": "manageiq://email",
"Parameters": {
"To": "[email protected]",
"Subject": "Your provisioning has completed",
"Body": "Your provisioning request has completed"
},
"Next": "Success"
},
"Success": {
"Type": "Succeed",
"Comment": "tttt"
},
"Wait": {
"Type": "Wait",
"Seconds": 11,
"Next": "Wait (3)"
},
"Wait (3)": {
"Type": "Wait",
"Seconds": 5,
"Next": "ECS RunTask"
},
"ECS RunTask": {
"Type": "Task",
"Resource": "arn:aws:states:::ecs:runTask",
"Parameters": {
"LaunchType": "FARGATE",
"Cluster": "arn:aws:ecs:REGION:ACCOUNT_ID:cluster/MyECSCluster",
"TaskDefinition": "arn:aws:ecs:REGION:ACCOUNT_ID:task-definition/MyTaskDefinition:1"
},
"Next": "Wait (4)"
},
"Wait (4)": {
"Type": "Wait",
"Seconds": 5,
"End": true
},
"providers": {
"Type": "Task",
"Resource": "docker://docker.io/manageiq/workflows-examples-provision-vm-service-list-providers:latest",
"Credentials": {
"api_user.$": "$.api_user",
"api_password.$": "$.api_password",
"api_token.$": "$.api_token",
"api_bearer_token.$": "$.api_bearer_token"
},
"Parameters": {
"API_URL.$": "$$.Execution._manageiq_api_url",
"VERIFY_SSL.$": "$.dialog.dialog_verify_ssl",
"PROVIDER_TYPE": "ManageIQ::Providers::Vmware::InfraManager"
},
"Next": "VMware Template2"
},
"VMware Template2": {
"Type": "Task",
"Resource": "docker://docker.io/manageiq/workflows-examples-provision-vm-service-list-templates:latest",
"Credentials": {
"api_user.$": "$.api_user",
"api_password.$": "$.api_password",
"api_token.$": "$.api_token",
"api_bearer_token.$": "$.api_bearer_token"
},
"Parameters": {
"API_URL.$": "$$.Execution._manageiq_api_url",
"VERIFY_SSL.$": "$.dialog.dialog_verify_ssl",
"PROVIDER_ID.$": "$.dialog.dialog_provider"
},
"Next": "Fail"
},
"Fail": {
"Type": "Fail",
"End": true,
"Error": "test error",
"Cause": "caused by stattes",
"Comment": "comment"
}
},
"Comment": "A simple minimal example of the States language",
"StartAt": "VMware Template "
}
Loading
Loading