Skip to content

Commit bfccddd

Browse files
authored
Feature/workflows refactoring (#112)
* refactoring workflow list screen * fixing spinner * removing settings cog and workflows from breadcrumb * eslint and small refactor for criteria * fixing tests * 3.14.0-beta.0
1 parent 23bddd4 commit bfccddd

File tree

12 files changed

+195
-115
lines changed

12 files changed

+195
-115
lines changed

client/App.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,6 @@ export default {
9393
>
9494
{{ $route.params.domain }}
9595
</a>
96-
<a
97-
class="config"
98-
:class="{
99-
'router-link-active':
100-
$route.path === `/domains/${$route.params.domain}/config`,
101-
}"
102-
:href="`/domains/${$route.params.domain}/config`"
103-
></a>
104-
</div>
105-
<div v-if="$route.name === 'workflow-list'">
106-
Workflows
10796
</div>
10897
<div class="detail-view workflow-id" v-if="$route.params.workflowId">
10998
<span>{{ $route.params.workflowId }}</span>
@@ -238,7 +227,7 @@ area-loader, section.loading
238227
height size
239228
border-radius size
240229
left "calc(50% - %s)" % (size/2)
241-
top "calc(25% - %s)" % (size/2)
230+
top 300px;
242231
border 3px solid uber-blue
243232
border-bottom-color transparent
244233
animation spin 800ms linear infinite

client/components/date-range-picker/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ sidebarWidth = sidebarColumnShortcutsWidth + sidebarColumnCustomRangeWidth;
282282
cursor: pointer;
283283
height: auto;
284284
margin: 0;
285-
padding: 8px 30px 8px 10px;
285+
padding: 9px 30px 9px 10px;
286286
width: 325px;
287287
}
288288

client/main.js

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ import copyButton from './components/copy.vue';
1313
import snapscroll from './directives/snapscroll';
1414

1515
import App from './App.vue';
16-
import Root from './routes/index.vue';
17-
import Help from './routes/help/index.vue';
16+
import Domain from './routes/domain/index.vue';
1817
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';
18+
import DomainSettings from './routes/domain/domain-settings.vue';
19+
import Help from './routes/help/index.vue';
2320
import History from './routes/workflow/history.vue';
24-
import StackTrace from './routes/workflow/stack-trace.vue';
2521
import Query from './routes/workflow/query.vue';
22+
import Root from './routes/index.vue';
23+
import StackTrace from './routes/workflow/stack-trace.vue';
2624
import TaskList from './routes/domain/task-list.vue';
25+
import WorkflowList from './routes/domain/workflow-list.vue';
26+
import WorkflowSummary from './routes/workflow/summary.vue';
27+
import WorkflowTabs from './routes/workflow/index.vue';
28+
2729
import { http, injectMomentDurationFormat, jsonTryParse } from '~helpers';
2830

2931
const routeOpts = {
@@ -51,22 +53,28 @@ const routeOpts = {
5153
],
5254
},
5355
{
54-
name: 'domains-redirect',
55-
path: '/domain/*',
56-
redirect: '/domains/*',
57-
},
58-
{
59-
name: 'workflow-list',
60-
path: '/domains/:domain/workflows',
61-
component: WorkflowList,
62-
},
63-
{
64-
name: 'domain-config',
65-
path: '/domains/:domain/config',
66-
component: DomainConfig,
56+
name: 'domain',
57+
path: '/domains/:domain',
58+
component: Domain,
6759
props: ({ params }) => ({
6860
domain: params.domain,
6961
}),
62+
children: [
63+
{
64+
name: 'workflow-list',
65+
path: '/domains/:domain/workflows',
66+
components: {
67+
'workflow-list': WorkflowList,
68+
},
69+
},
70+
{
71+
name: 'domain-settings',
72+
path: '/domains/:domain/settings',
73+
components: {
74+
'domain-settings': DomainSettings,
75+
},
76+
},
77+
],
7078
},
7179
{
7280
name: 'workflow',
@@ -129,6 +137,19 @@ const routeOpts = {
129137
path: '/domains/:domain/task-lists/:taskList',
130138
component: TaskList,
131139
},
140+
141+
// redirects
142+
143+
{
144+
name: 'domains-redirect',
145+
path: '/domain/*',
146+
redirect: '/domains/*',
147+
},
148+
{
149+
name: 'domain-config-redirect',
150+
path: '/domains/:domain/config',
151+
redirect: '/domains/:domain/settings',
152+
},
132153
{
133154
path: '/domains/:domain/history',
134155
redirect: ({ params, query }) => {

client/routes/domain/domain-config.vue renamed to client/routes/domain/domain-settings.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<section :class="{ 'domain-config domain-description': true, loading }">
2+
<section class="domain-settings domain-description" :class="{ loading }">
33
<header>
44
<h3>{{ domain }}</h3>
55
</header>
@@ -52,7 +52,7 @@ export default {
5252
<style lang="stylus">
5353
@require "../../styles/definitions.styl"
5454
55-
section.domain-config
55+
section.domain-settings
5656
.foobar
5757
display none
5858
</style>

client/routes/domain/index.vue

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<template>
2+
<section>
3+
<navigation-bar>
4+
<navigation-link
5+
icon="icon_search"
6+
label="Workflows"
7+
:to="{ name: 'workflow-list' }"
8+
/>
9+
<navigation-link
10+
label="Settings"
11+
icon="icon_settings"
12+
:to="{ name: 'domain-settings' }"
13+
/>
14+
</navigation-bar>
15+
<router-view name="workflow-list" :domain="domain" />
16+
<router-view name="domain-settings" :domain="domain" />
17+
</section>
18+
</template>
19+
20+
<script>
21+
import { NavigationBar, NavigationLink } from '~components';
22+
23+
export default {
24+
props: ['domain'],
25+
components: {
26+
'navigation-bar': NavigationBar,
27+
'navigation-link': NavigationLink,
28+
},
29+
};
30+
</script>
31+
32+
<style lang="stylus"></style>

0 commit comments

Comments
 (0)