Skip to content

Instantly share code, notes, and snippets.

View michaelkro's full-sized avatar

Michael Ro michaelkro

View GitHub Profile
@michaelkro
michaelkro / machine.js
Last active May 1, 2020 23:49
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
{
"auth": {
"enabled": true,
"timeout": 60
},
"autoUpdate": {
"enabled": false,
"url": "https://s3-us-west-2.amazonaws.com/vneck-windows-releases"
},
"adminAPI": {
<View>
{loading ? (
<LoadingView />
) : (
completed && <ResultsView />
inProgress && <QuestionView />
)}
</View>
# Before Refresh
#<TransformationMappingItem:0x00007fb8f5a4caf8
id: 13,
source_id: 1,
source_type: "Storage",
destination_id: 13,
destination_type: "Storage",
transformation_mapping_id: 2,
options: {},
irb(main):005:0> pp Lan.all
Lan Load (0.5ms) SELECT "lans".* FROM "lans"
Lan Inst Including Associations (0.4ms - 26rows)
[#<Lan:0x00007fb00b2465e0
id: 1,
switch_id: 1,
name: "VM Network",
tag: "0",
created_on: Tue, 22 Jan 2019 09:33:15 UTC +00:00,
updated_on: Tue, 22 Jan 2019 09:33:15 UTC +00:00,
irb(main):003:0> pp Lan.all
Lan Load (0.5ms) SELECT "lans".* FROM "lans"
Lan Inst Including Associations (0.4ms - 16rows)
[#<Lan:0x00007fb01b2e4410
id: 1,
switch_id: 1,
name: "VM Network",
tag: "0",
created_on: Tue, 22 Jan 2019 09:33:15 UTC +00:00,
updated_on: Tue, 22 Jan 2019 09:33:15 UTC +00:00,
{
current_state: '/State3',
current_description: '<PRE_MIGRATION_PLAYBOOK_DESCRIPTION>',
percent: null,
states: {
'/State1': {
status: 'finished',
weight: 1,
description: 'Assess Migration',
message: 'State1 is finished.',
{
"name": "Plan Name",
"prov_type": "generic_transformation_plan",
"config_info": {
"transformation_mapping_id": "4",
"pre_service_id": "1",
"post_service_id": "2",
"tasks": [
{ "vm_id": 1, "pre_service": true, "post_service": false },
{ "vm_id": 2, "pre_service": true, "post_service": true }
{
"name": "Mapping Name",
"state": "draft",
"transformation_mapping_items": [
{ "source": "/api/clusters/3", "destination": "/api/clusters/1" },
{ "source": "/api/data_stores/10", "destination": "/api/data_stores/1" },
{ "source": "/api/lans/29", "destination": "/api/lans/19" },
{ "source": "/api/lans/42", "destination": "/api/lans/19" }
]
}
{
"name": "service_templates",
"count": 18,
"subcount": 1,
"subquery_count": 1,
"pages": 1,
"resources": [
{
"href": "http://localhost:3000/api/service_templates/44",
"name": "Pending Plan Test",