Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Release v0.26.0 (#55)
Browse files Browse the repository at this point in the history
* Release v0.26.0
  • Loading branch information
feedmeapples authored Jun 28, 2020
1 parent a95e9f3 commit f99ac86
Show file tree
Hide file tree
Showing 21 changed files with 406 additions and 369 deletions.
6 changes: 3 additions & 3 deletions client/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ export default {
<div class="detail-view workflow-id" v-if="$route.params.workflowId">
<span>{{ $route.params.workflowId }}</span>
</div>
<div class="detail-view task-list" v-if="$route.params.taskList">
<span>{{ $route.params.taskList }}</span>
<div class="detail-view task-queue" v-if="$route.params.taskQueue">
<span>{{ $route.params.taskQueue }}</span>
</div>
</header>
<router-view @onNotification="onNotification"></router-view>
Expand Down Expand Up @@ -233,7 +233,7 @@ header.top-bar
margin-right spacing
div.workflow-id span::before
content 'WORKFLOW ID'
div.task-list span::before
div.task-queue span::before
content 'TASK LIST'
.version {
color: #c6c6c6;
Expand Down
8 changes: 4 additions & 4 deletions client/helpers/get-key-value-pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import moment from 'moment';
import getJsonStringObject from './get-json-string-object';
import { jsonKeys, preKeys } from '~constants';

const getKeyValuePairs = event => {
const getKeyValuePairs = (event) => {
const kvps = [];
const flatten = (prefix, obj, root) => {
Object.entries(obj).forEach(([k, value]) => {
Expand Down Expand Up @@ -57,13 +57,13 @@ const getKeyValuePairs = event => {
},
value,
});
} else if (key === 'taskList.name' || key === 'Tasklist') {
} else if (key === 'taskQueue.name' || key === 'Taskqueue') {
kvps.push({
key,
routeLink: {
name: 'task-list',
name: 'task-queue',
params: {
taskList: value,
taskQueue: value,
},
},
value,
Expand Down
14 changes: 7 additions & 7 deletions client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import History from './routes/workflow/history';
import Query from './routes/workflow/query';
import Root from './routes';
import StackTrace from './routes/workflow/stack-trace';
import TaskList from './routes/namespace/task-list';
import TaskQueue from './routes/namespace/task-queue';
import WorkflowArchival from './routes/namespace/workflow-archival';
import WorkflowArchivalAdvanced from './routes/namespace/workflow-archival/advanced';
import WorkflowArchivalBasic from './routes/namespace/workflow-archival/basic';
Expand Down Expand Up @@ -154,9 +154,9 @@ const routeOpts = {
],
},
{
name: 'task-list',
path: '/namespaces/:namespace/task-lists/:taskList',
component: TaskList,
name: 'task-queue',
path: '/namespaces/:namespace/task-queues/:taskQueue',
component: TaskQueue,
},

// redirects
Expand Down Expand Up @@ -198,7 +198,7 @@ const routeOpts = {
},
],
parseQuery: qs.parse.bind(qs),
stringifyQuery: query => {
stringifyQuery: (query) => {
const q = qs.stringify(query);

return q ? `?${q}` : '';
Expand Down Expand Up @@ -267,11 +267,11 @@ if (typeof mocha === 'undefined') {
});

if (module.hot) {
module.hot.addStatusHandler(status => {
module.hot.addStatusHandler((status) => {
if (status === 'apply') {
document
.querySelectorAll('link[href][rel=stylesheet]')
.forEach(link => {
.forEach((link) => {
const nextStyleHref = link.href.replace(
/(\?\d+)?$/,
`?${Date.now()}`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section :class="{ 'task-list': true, loading }">
<section :class="{ 'task-queue': true, loading }">
<header><h3>Pollers</h3></header>
<table v-if="pollers">
<thead>
Expand Down Expand Up @@ -33,18 +33,18 @@ export default {
},
created() {
this.$http(
`/api/namespaces/${this.$route.params.namespace}/task-lists/${this.$route.params.taskList}/pollers`
`/api/namespaces/${this.$route.params.namespace}/task-queues/${this.$route.params.taskQueue}/pollers`
)
.then(
p => {
this.pollers = Object.keys(p).map(identity => ({
(p) => {
this.pollers = Object.keys(p).map((identity) => ({
identity,
lastAccessTime: moment(p[identity].lastAccessTime),
handlesDecisions: p[identity].taskListTypes.includes('decision'),
handlesActivities: p[identity].taskListTypes.includes('activity'),
handlesDecisions: p[identity].taskQueueTypes.includes('decision'),
handlesActivities: p[identity].taskQueueTypes.includes('activity'),
}));
},
e => {
(e) => {
this.error = (e.json && e.json.message) || e.status || e.message;
}
)
Expand All @@ -59,7 +59,7 @@ export default {
<style lang="stylus">
@require "../../styles/definitions.styl"
section.task-list
section.task-queue
> header
padding inline-spacing-medium
table
Expand Down
42 changes: 21 additions & 21 deletions client/routes/workflow/helpers/summarize-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,44 @@ import workflowLink from './workflow-link';
import { shortName } from '~helpers';

export const summarizeEvents = {
ActivityTaskCancelRequested: d => ({ Id: d.activityId }),
ActivityTaskCompleted: d => ({ result: d.result }),
ActivityTaskFailed: d => ({
ActivityTaskCancelRequested: (d) => ({ Id: d.activityId }),
ActivityTaskCompleted: (d) => ({ result: d.result }),
ActivityTaskFailed: (d) => ({
details: d.details,
reason: d.reason,
}),
ActivityTaskScheduled: d => ({
ActivityTaskScheduled: (d) => ({
'Close Timeout': moment
.duration(d.scheduleToCloseTimeoutSeconds, 'seconds')
.format(),
Id: d.activityId,
input: d.input,
Name: shortName(d.activityType.name),
}),
ActivityTaskStarted: d => ({
ActivityTaskStarted: (d) => ({
attempt: d.attempt,
identity: d.identity,
requestId: d.requestId,
}),
ActivityTaskTimedOut: d => ({ 'Timeout Type': d.timeoutType }),
ChildWorkflowExecutionCompleted: d => ({
ActivityTaskTimedOut: (d) => ({ 'Timeout Type': d.timeoutType }),
ChildWorkflowExecutionCompleted: (d) => ({
result: d.result,
Workflow: workflowLink(d, true),
}),
ChildWorkflowExecutionStarted: d => ({
ChildWorkflowExecutionStarted: (d) => ({
Workflow: workflowLink(d),
}),
DecisionTaskCompleted: d => ({ identity: d.identity }),
DecisionTaskScheduled: d => ({
Tasklist: d.taskList.name,
DecisionTaskCompleted: (d) => ({ identity: d.identity }),
DecisionTaskScheduled: (d) => ({
Taskqueue: d.taskQueue.name,
Timeout: moment.duration(d.startToCloseTimeoutSeconds, 'seconds').format(),
}),
DecisionTaskStarted: d => ({ requestId: d.requestId }),
DecisionTaskTimedOut: d => ({ 'Timeout Type': d.timeoutType }),
ExternalWorkflowExecutionSignaled: d => ({
DecisionTaskStarted: (d) => ({ requestId: d.requestId }),
DecisionTaskTimedOut: (d) => ({ 'Timeout Type': d.timeoutType }),
ExternalWorkflowExecutionSignaled: (d) => ({
Workflow: workflowLink(d),
}),
MarkerRecorded: d => {
MarkerRecorded: (d) => {
const details = d.details || {};

if (d.markerName === 'LocalActivity') {
Expand Down Expand Up @@ -78,23 +78,23 @@ export const summarizeEvents = {

return d;
},
StartChildWorkflowExecutionInitiated: d => ({
StartChildWorkflowExecutionInitiated: (d) => ({
input: d.input,
Tasklist: d.taskList.name,
Taskqueue: d.taskQueue.name,
Workflow: shortName(d.workflowType.name),
}),
SignalExternalWorkflowExecutionInitiated: d => ({
SignalExternalWorkflowExecutionInitiated: (d) => ({
input: d.input,
signal: d.signalName,
Workflow: workflowLink(d),
}),
TimerStarted: d => ({
TimerStarted: (d) => ({
'Fire Timeout': moment
.duration(d.startToFireTimeoutSeconds, 'seconds')
.format(),
'Timer ID': d.timerId,
}),
WorkflowExecutionStarted: d => {
WorkflowExecutionStarted: (d) => {
const summary = {
'Close Timeout': moment
.duration(d.executionStartToCloseTimeoutSeconds, 'seconds')
Expand All @@ -115,7 +115,7 @@ export const summarizeEvents = {

return summary;
},
WorkflowExecutionFailed: d => {
WorkflowExecutionFailed: (d) => {
return { message: d.failure.message };
},
};
16 changes: 8 additions & 8 deletions client/routes/workflow/summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@
</router-link>
</dd>
</div>
<div class="task-list">
<dt>Task List</dt>
<div class="task-queue">
<dt>Task Queue</dt>
<dd>
<router-link
:to="{
name: 'task-list',
name: 'task-queue',
params: {
taskList: workflow.executionConfig.taskList.name,
taskQueue: workflow.executionConfig.taskQueue.name,
},
}"
>
{{ workflow.executionConfig.taskList.name }}
{{ workflow.executionConfig.taskQueue.name }}
</router-link>
</dd>
</div>
Expand Down Expand Up @@ -198,15 +198,15 @@ export default {
reason: this.terminationReason,
})
.then(
r => {
(r) => {
this.$emit('onNotification', {
message: 'Workflow terminated.',
type: NOTIFICATION_TYPE_SUCCESS,
});
// eslint-disable-next-line no-console
console.dir(r);
},
error => {
(error) => {
this.$emit('onNotification', {
message: getErrorMessage(error, TERMINATE_DEFAULT_ERROR_MESSAGE),
type: NOTIFICATION_TYPE_ERROR,
Expand Down Expand Up @@ -246,7 +246,7 @@ section.workflow-summary
margin-bottom 1em
dt
padding 0 4px
.run-id, .task-list, .workflow-id, .workflow-name
.run-id, .task-queue, .workflow-id, .workflow-name
dd
font-weight 300
font-family monospace-font-family
Expand Down
27 changes: 14 additions & 13 deletions client/test/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export default {
open: [
{
execution: {
workflowId: 'github.com/temporalio/temporal-web/email-daily-summaries-2',
workflowId:
'github.com/temporalio/temporal-web/email-daily-summaries-2',
runId: 'ef2c889e-e709-4d50-99ee-3748dfa0a101',
},
type: {
Expand Down Expand Up @@ -66,7 +67,7 @@ export default {
workflowType: {
name: 'email-daily-summaries',
},
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
input: [839134, { env: 'prod' }],
Expand All @@ -79,7 +80,7 @@ export default {
eventType: 'DecisionTaskScheduled',
eventId: 2,
details: {
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
zero: 0,
Expand Down Expand Up @@ -124,7 +125,7 @@ export default {
activityType: {
name: 'send-emails',
},
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
input: [12345, ['bob@example.com', 'jane@somewhere.com']],
Expand Down Expand Up @@ -159,7 +160,7 @@ export default {
timestamp: emailRun1Start.add(11, 'second').toISOString(),
eventType: 'DecisionTaskScheduled',
eventId: 9,
details: { taskList: { name: 'ci-task-queue' } },
details: { taskQueue: { name: 'ci-task-queue' } },
},
{
timestamp: emailRun1Start.add(11, 'second').toISOString(),
Expand Down Expand Up @@ -196,7 +197,7 @@ export default {
{
details: {
executionStartToCloseTimeoutSeconds: 360,
taskList: {
taskQueue: {
name: 'canary-task-queue',
},
taskStartToCloseTimeoutSeconds: 180,
Expand Down Expand Up @@ -249,7 +250,7 @@ export default {
scheduleToCloseTimeoutSeconds: 2,
scheduleToStartTimeoutSeconds: 1,
startToCloseTimeoutSeconds: 1,
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
},
Expand Down Expand Up @@ -279,7 +280,7 @@ export default {
{
details: {
startToCloseTimeoutSeconds: 180,
taskList: {
taskQueue: {
name: 'compute3330-sjc1:43b62b8e-aa2a-4b58-9571-39062a073d24',
},
},
Expand Down Expand Up @@ -324,7 +325,7 @@ export default {
workflowType: {
name: 'email-daily-summaries',
},
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
input: [839134, { env: 'prod' }],
Expand All @@ -337,7 +338,7 @@ export default {
eventType: 'DecisionTaskScheduled',
eventId: 2,
details: {
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
zero: 0,
Expand Down Expand Up @@ -382,7 +383,7 @@ export default {
activityType: {
name: 'search-for-treasure',
},
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
input: { location: 'volcanic island' },
Expand Down Expand Up @@ -427,7 +428,7 @@ export default {
eventId: 10,
details: {
workflowType: { name: 'sail-the-ocean' },
taskList: { name: 'another-queue' },
taskQueue: { name: 'another-queue' },
input: { direction: 'west' },
},
},
Expand All @@ -454,7 +455,7 @@ export default {
activityType: {
name: 'swab-the-deck',
},
taskList: {
taskQueue: {
name: 'ci-task-queue',
},
input: { moveTheGrogToo: true },
Expand Down
Loading

0 comments on commit f99ac86

Please sign in to comment.