Skip to content

Commit 1e96cd3

Browse files
authored
Feature/refactor folder structure (#106)
* restructuring and removing unused code * adding tab navigation component to help with reusability * adding icons * refactor to use component * adding alias for components * added more alias. trying to get mocha tests working again. * eslint * fixing help styling * added video embed * hiding faq section. * 3.12.0-beta.0 * adding slot to help to enable extention * 3.12.0-beta.1 * moving slot * 3.12.0-beta.2 * adding more slots for extra customization * 3.12.0-beta.3 * moving getting started slot. Making slack option able to be hidden * 3.12.0-beta.4 * adding option to hide stack overflow link * 3.12.0-beta.5 * adding cadence-web link * 3.12.0-beta.6 * removing hidden image for links on help screen * 3.12.0-beta.7 * making headers linkable which will navigate to that place in the page when copied. * 3.12.0-beta.8 * allow hiding docs link * 3.12.0-beta.9 * renaming intro to domain-search test. adding new tests for help page * fixing intgration tests * adding CLI section. placeholder content for now. * fixing link and adding tests for CLI * adding common cli commands * 3.12.0-beta.10 * adding see more cli commands link * 3.12.0-beta.11 * rename execution to workflow. making component folder for workflow. made domain folder and moved relevant screens. * making workflows url to be workflow to make it easier to recognize url and its structure. follows closer to REST syntax * updating API to follow REST syntax for workflows to use workflow * renaming queries to query to match REST syntax. * reformatting css * renaming event-details to event-detail * rename workflow to workflows. rename domain to domains.
1 parent bed7dff commit 1e96cd3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+277
-488
lines changed

client/App.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,30 +78,31 @@ export default {
7878
:type="notification.type"
7979
/>
8080
<header class="top-bar">
81-
<a href="/" class="logo">
81+
<a href="/domains" class="logo">
8282
<div v-html="logo"></div>
8383
<span class="version">{{ version }}</span>
8484
</a>
8585
<div class="domain" v-if="$route.params.domain">
8686
<a
87-
:href="`/domain/${$route.params.domain}/workflows`"
87+
class="workflows"
8888
:class="{
8989
'router-link-active':
90-
$route.path === `/domain/${$route.params.domain}/workflows`,
91-
workflows: true,
90+
$route.path === `/domains/${$route.params.domain}/workflows`,
9291
}"
93-
>{{ $route.params.domain }}</a
92+
:href="`/domains/${$route.params.domain}/workflows`"
9493
>
94+
{{ $route.params.domain }}
95+
</a>
9596
<a
96-
:href="`/domain/${$route.params.domain}/config`"
97+
class="config"
9798
:class="{
9899
'router-link-active':
99-
$route.path === `/domain/${$route.params.domain}/config`,
100-
config: true,
100+
$route.path === `/domains/${$route.params.domain}/config`,
101101
}"
102+
:href="`/domains/${$route.params.domain}/config`"
102103
></a>
103104
</div>
104-
<div class="list-workflows" v-if="$route.name === 'workflows'">
105+
<div v-if="$route.name === 'workflow-list'">
105106
Workflows
106107
</div>
107108
<div class="detail-view workflow-id" v-if="$route.params.workflowId">

client/components/domain-navigation.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default {
9999
changeDomain() {
100100
if (this.validation === 'valid') {
101101
this.$router.push({
102-
path: `/domain/${this.d}/workflows`,
102+
path: `/domains/${this.d}/workflows`,
103103
query: omit(
104104
this.$router.currentRoute.query,
105105
'workflowId',
@@ -112,7 +112,7 @@ export default {
112112
}
113113
},
114114
domainLink(d) {
115-
return `/domain/${d}/workflows?${stringify(
115+
return `/domains/${d}/workflows?${stringify(
116116
this.$router.currentRoute.query
117117
)}`;
118118
},
@@ -127,7 +127,7 @@ export default {
127127
return Promise.resolve(this.domainDescCache[d]);
128128
}
129129
130-
return this.$http(`/api/domain/${d}`).then(r => {
130+
return this.$http(`/api/domains/${d}`).then(r => {
131131
this.domainDescCache[d] = mapDomainDescription(r);
132132
133133
return this.domainDescCache[d];

client/helpers/get-key-value-pairs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const getKeyValuePairs = event => {
2424
kvps.push({
2525
key,
2626
routeLink: {
27-
name: 'execution/summary',
27+
name: 'workflow/summary',
2828
params: {
2929
runId: value,
3030
},
@@ -35,7 +35,7 @@ const getKeyValuePairs = event => {
3535
kvps.push({
3636
key,
3737
routeLink: {
38-
name: 'execution/summary',
38+
name: 'workflow/summary',
3939
params: {
4040
domain: root.parentWorkflowDomain,
4141
runId: value,
@@ -48,7 +48,7 @@ const getKeyValuePairs = event => {
4848
kvps.push({
4949
key,
5050
routeLink: {
51-
name: 'execution/summary',
51+
name: 'workflow/summary',
5252
params: {
5353
domain: root.domain,
5454
runId: value,

client/main.js

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,30 @@ import snapscroll from './directives/snapscroll';
1515
import App from './App.vue';
1616
import Root from './routes/index.vue';
1717
import Help from './routes/help.vue';
18-
import DomainSearch from './routes/domain-search.vue';
19-
import Workflows from './routes/Workflows.vue';
20-
import DomainConfig from './routes/domain-config.vue';
21-
import ExecutionTabs from './routes/execution/index.vue';
22-
import ExecutionSummary from './routes/execution/summary.vue';
23-
import History from './routes/execution/history.vue';
24-
import StackTrace from './routes/execution/stack-trace.vue';
25-
import Queries from './routes/execution/queries.vue';
26-
import TaskList from './routes/task-list.vue';
18+
import DomainList from './routes/domain-list.vue';
19+
import WorkflowList from './routes/domain/workflow-list.vue';
20+
import DomainConfig from './routes/domain/domain-config.vue';
21+
import WorkflowTabs from './routes/workflow/index.vue';
22+
import WorkflowSummary from './routes/workflow/summary.vue';
23+
import History from './routes/workflow/history.vue';
24+
import StackTrace from './routes/workflow/stack-trace.vue';
25+
import Query from './routes/workflow/query.vue';
26+
import TaskList from './routes/domain/task-list.vue';
2727
import { http, injectMomentDurationFormat, jsonTryParse } from '~helpers';
2828

2929
const routeOpts = {
3030
mode: 'history',
3131
routes: [
3232
{
3333
path: '/',
34+
redirect: '/domains',
3435
component: Root,
3536
children: [
3637
{
37-
name: 'domain-search',
38-
path: '/',
38+
name: 'domain-list',
39+
path: '/domains',
3940
components: {
40-
'domain-search': DomainSearch
41+
'domain-list': DomainList
4142
},
4243
},
4344
{
@@ -50,33 +51,38 @@ const routeOpts = {
5051
],
5152
},
5253
{
53-
name: 'workflows',
54-
path: '/domain/:domain/workflows',
55-
component: Workflows,
54+
name: 'domains-redirect',
55+
path: '/domain/*',
56+
redirect: '/domains/*'
57+
},
58+
{
59+
name: 'workflow-list',
60+
path: '/domains/:domain/workflows',
61+
component: WorkflowList,
5662
},
5763
{
5864
name: 'domain-config',
59-
path: '/domain/:domain/config',
65+
path: '/domains/:domain/config',
6066
component: DomainConfig,
6167
props: ({ params }) => ({
6268
domain: params.domain,
6369
}),
6470
},
6571
{
66-
name: 'execution',
67-
path: '/domain/:domain/workflows/:workflowId/:runId',
68-
component: ExecutionTabs,
72+
name: 'workflow',
73+
path: '/domains/:domain/workflows/:workflowId/:runId',
74+
component: WorkflowTabs,
6975
props: ({ params }) => ({
7076
domain: params.domain,
7177
runId: params.runId,
7278
workflowId: params.workflowId,
7379
}),
7480
children: [
7581
{
76-
name: 'execution/summary',
77-
path: '/domain/:domain/workflows/:workflowId/:runId/summary',
82+
name: 'workflow/summary',
83+
path: '/domains/:domain/workflows/:workflowId/:runId/summary',
7884
components: {
79-
summary: ExecutionSummary,
85+
summary: WorkflowSummary,
8086
},
8187
props: {
8288
summary: ({ params }) => ({
@@ -86,8 +92,8 @@ const routeOpts = {
8692
},
8793
},
8894
{
89-
name: 'execution/history',
90-
path: '/domain/:domain/workflows/:workflowId/:runId/history',
95+
name: 'workflow/history',
96+
path: '/domains/:domain/workflows/:workflowId/:runId/history',
9197
components: {
9298
history: History,
9399
},
@@ -103,32 +109,32 @@ const routeOpts = {
103109
},
104110
},
105111
{
106-
name: 'execution/stack-trace',
107-
path: '/domain/:domain/workflows/:workflowId/:runId/stack-trace',
112+
name: 'workflow/stack-trace',
113+
path: '/domains/:domain/workflows/:workflowId/:runId/stack-trace',
108114
components: {
109115
stacktrace: StackTrace,
110116
},
111117
},
112118
{
113-
name: 'execution/queries',
114-
path: '/domain/:domain/workflows/:workflowId/:runId/queries',
119+
name: 'workflow/query',
120+
path: '/domains/:domain/workflows/:workflowId/:runId/query',
115121
components: {
116-
queries: Queries,
122+
query: Query,
117123
},
118124
},
119125
],
120126
},
121127
{
122128
name: 'task-list',
123-
path: '/domain/:domain/task-lists/:taskList',
129+
path: '/domains/:domain/task-lists/:taskList',
124130
component: TaskList,
125131
},
126132
{
127-
path: '/domain/:domain/history',
133+
path: '/domains/:domain/history',
128134
redirect: ({ params, query }) => {
129135
if (!query.runId || !query.workflowId) {
130136
return {
131-
name: 'workflows',
137+
name: 'workflow-list',
132138
params,
133139
};
134140
}
@@ -142,7 +148,7 @@ const routeOpts = {
142148
};
143149

144150
return {
145-
name: 'execution/history',
151+
name: 'workflow/history',
146152
params: newParams,
147153
query: queryWhitelist,
148154
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default {
2929
'detail-list': DetailList,
3030
},
3131
created() {
32-
this.$http(`/api/domain/${this.domain}`)
32+
this.$http(`/api/domains/${this.domain}`)
3333
.then(
3434
r => {
3535
const domainConfig = mapDomainDescription(r);
@@ -50,7 +50,7 @@ export default {
5050
</script>
5151

5252
<style lang="stylus">
53-
@require "../styles/definitions.styl"
53+
@require "../../styles/definitions.styl"
5454
5555
section.domain-config
5656
.foobar
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
},
3434
created() {
3535
this.$http(
36-
`/api/domain/${this.$route.params.domain}/task-lists/${this.$route.params.taskList}/pollers`
36+
`/api/domains/${this.$route.params.domain}/task-lists/${this.$route.params.taskList}/pollers`
3737
)
3838
.then(
3939
p => {
@@ -57,7 +57,7 @@ export default {
5757
</script>
5858

5959
<style lang="stylus">
60-
@require "../styles/definitions.styl"
60+
@require "../../styles/definitions.styl"
6161
6262
section.task-list
6363
> header
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<section :class="{ workflows: true, loading }">
2+
<section class="workflow-list" :class="{ loading }">
33
<header class="filters">
44
<template v-if="filterMode === 'advanced'">
55
<div class="field query-string">
@@ -86,7 +86,7 @@
8686
<td>
8787
<router-link
8888
:to="{
89-
name: 'execution/summary',
89+
name: 'workflow/summary',
9090
params: { runId: wf.runId, workflowId: wf.workflowId },
9191
}"
9292
>{{ wf.runId }}</router-link
@@ -133,7 +133,7 @@ export default pagedGrid({
133133
};
134134
},
135135
created() {
136-
this.$http(`/api/domain/${this.$route.params.domain}`).then(r => {
136+
this.$http(`/api/domains/${this.$route.params.domain}`).then(r => {
137137
this.maxRetentionDays =
138138
Number(r.configuration.workflowExecutionRetentionPeriodInDays) || 30;
139139
@@ -231,12 +231,12 @@ export default pagedGrid({
231231
q.nextPageToken = this.nextPageToken;
232232
233233
if (q.queryString) {
234-
this.fetch(`/api/domain/${domain}/workflows/list`, q);
234+
this.fetch(`/api/domains/${domain}/workflows/list`, q);
235235
236236
return;
237237
}
238238
239-
this.fetch(`/api/domain/${domain}/workflows/${state}`, q);
239+
this.fetch(`/api/domains/${domain}/workflows/${state}`, q);
240240
},
241241
minStartDate() {
242242
const {
@@ -420,9 +420,9 @@ export default pagedGrid({
420420
</script>
421421

422422
<style lang="stylus">
423-
@require "../styles/definitions.styl"
423+
@require "../../styles/definitions.styl"
424424
425-
section.workflows
425+
section.workflow-list
426426
.filters
427427
flex-wrap wrap
428428
> .field

0 commit comments

Comments
 (0)