Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh Wizard and UI overhaul #17

Merged
merged 78 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
f439e72
improved the empty state of the DataOverview component. initial setup…
Feb 28, 2020
6bb3368
chore(*) improved and added mocks for better testing.
Mar 3, 2020
47d53e4
feat: starting point for card skeleton that will be used for the new …
Mar 3, 2020
c4587fc
feat: CardSkeleton created and placed in the EntityOverview for testi…
Mar 3, 2020
f779693
improved the visibility of the refresh control on the DataOverview co…
Mar 5, 2020
aeb3b33
feat(GlobalOverview) moved components to the Overview component since…
Mar 5, 2020
a1cd2da
more mocks added for Traffic Traces. VueX getters, mutations, and sta…
Mar 9, 2020
f778d52
feat(GlobalOverview) router revisions for the Global Overview breadcr…
Mar 10, 2020
8c2b6fd
feat(Tabs) Tabs component scaffolded out and tested. styles are next …
Mar 10, 2020
30b3b45
feat(Tabs) basic tab styles. tied the KCard component into the tab co…
Mar 10, 2020
d8cc491
tab component style revisions to be more inline with what KHCP and Ma…
Mar 11, 2020
9d3f6f8
functionality written to emit data from the DataOverview table so tha…
Mar 11, 2020
ecfc22c
fixed an issue with the DataOverview component and the function links…
Mar 11, 2020
baab17c
the HealthCheck view now loads in tab data on both initial page load,…
Mar 12, 2020
b80acf6
fixed some loader inconsistencies. fixed an issue with the selected m…
Mar 13, 2020
c0d89cf
created a new component for handling simple labeled lists. improved t…
Mar 13, 2020
a19fc81
style revisions for the global sidebar. extracted some sidebar styles…
Mar 16, 2020
bdc38c7
HealthCheck view improvements. more mocks added for testing. added so…
Mar 17, 2020
a440afb
feat(Tabs) improved the Tabs component greatly. the active tab can no…
Mar 18, 2020
cd50a6c
feat(ProxyTemplates) the Proxy Templates page now uses the new tabbed…
Mar 18, 2020
45de00c
feat(TrafficLog) the Traffic Logs page now uses the new DataOverview …
Mar 18, 2020
1d84707
feat(TrafficPermissions) the Traffic Permissions page now uses the ne…
Mar 18, 2020
38af9f9
feat(TrafficRoutes) the Traffic Routes page now uses the new DataOver…
Mar 18, 2020
16aa20e
feat(TrafficTraces) the Traffic Traces page now uses the new DataOver…
Mar 18, 2020
5b8450b
small fix to the data loading for each view. new FrameSkeleton compon…
Mar 18, 2020
254ff17
feat(DataOverview) finally got a properly working active table row fu…
Mar 19, 2020
e97316c
chore(ProxyTemplates) carried the row selection functionality changes…
Mar 19, 2020
1d85e53
chore(TrafficLogs) carried the row selection functionality changes in…
Mar 19, 2020
6a15f37
chore(TrafficPermissions) carried the row selection functionality cha…
Mar 19, 2020
e991385
chore(TrafficRoutes) carried the row selection functionality changes …
Mar 19, 2020
61ac38e
chore(TrafficTraces) carried the row selection functionality changes …
Mar 19, 2020
70d6085
entire rows are now clickable on DataOverview table.
Mar 24, 2020
2e6a66e
removed unused table click method that i ended up ditching in favor o…
Mar 24, 2020
d558d9b
fixed an issue with Kongponents imports. swapped out the original Tab…
Mar 25, 2020
49b2d40
Wizard framework created. topology selector created and wired up to s…
Mar 26, 2020
a32bba4
fixed a small REST issue but it requires another test. created a Wiza…
Mar 27, 2020
56bcec4
styled the Wizard step links. created the first step content and func…
Mar 30, 2020
cf9aea2
revised the conditional for handling step advancement.
Mar 30, 2020
e37484d
the next control and tab switching all works accordingly now.
Mar 31, 2020
b1718b9
sidebar added, and sidebar content slots for Mesh added.
Mar 31, 2020
ae5260c
moved the Vue router query manipulation method to a mixin. improved t…
Mar 31, 2020
85ab4e5
mesh step content added for logging.
Apr 1, 2020
3648de8
converted form data to be stored in localStorage vs URL queries and V…
Apr 1, 2020
069dd57
steps added for tracing and metrics.
Apr 1, 2020
adc88ea
new component to simplify form block creation. schema started for Mes…
Apr 2, 2020
e4d2827
added a new background and shadow color for Protocol and Service tags…
Apr 2, 2020
6bc3cc4
various changes to the DataOverview and YAML skeletons. made the load…
Apr 6, 2020
ad9282e
all tabbed views cleaned up and modified to accept the new Kongponent…
Apr 6, 2020
89bd1be
updated all tabbed views to account for the new Kongponents Tabs comp…
Apr 6, 2020
c400946
added Fault Injections count to the entity overview component. added …
Apr 6, 2020
b77a597
updated the VueX store to include total Fault Injections count. added…
Apr 6, 2020
4d590ec
renamed all API functions for clarity and consistency. added REST fun…
Apr 6, 2020
7da13d7
moved Fault Injections up in the sidebar menu so that it is properly …
Apr 6, 2020
769f951
improved selected item mechanism in the MeshSelector sidebar componen…
Apr 6, 2020
10305ae
improved functionality in the App component for better bootstrapping …
Apr 6, 2020
7ae69fc
improved the getSome helper so that it accepts either an Object or an…
Apr 6, 2020
8b973b5
added Fault Injection route param to the DataOverview component just …
Apr 6, 2020
3bf57cf
style improvements to the Tabs component. added VueX state handling f…
Apr 8, 2020
73b91ae
wizard Mesh steps now working and outputting YAML that imports succes…
Apr 9, 2020
034d973
fixed the formatting and output for the Logging section where File an…
Apr 9, 2020
84f23cf
entity scanner component skeleton added with basic props and data.
Apr 9, 2020
be677da
cleaned up the Vue config and switched the build path for assets to b…
Apr 9, 2020
39dfc84
fix for the View row buttons on the new table view. it was a hacky ap…
Apr 9, 2020
eb8f8ff
functional scanning component created and working. it requires some s…
Apr 10, 2020
a6601f7
removed detail views that were no longer needed. revised the sidebar …
Apr 10, 2020
fdf261c
updated KTable to the latest version. added the new KTable clickable …
Apr 10, 2020
1d5c387
renamed some of the views for consistency. moved the View button to t…
Apr 10, 2020
b43337c
revised the sidebar menu to match the mockups. created a CodeView com…
Apr 14, 2020
814728f
Mesh wizard functionality adjustments for the final step. new mixin f…
Apr 15, 2020
e262848
revised the tags in the LabelList component to be 2 columns with mini…
Apr 15, 2020
51309e0
made the Mesh creation button on the Meshes component green to stand …
Apr 15, 2020
97768ec
overhauled multiple views to better utilize the new collection API en…
Apr 16, 2020
a017869
Meshes view adjustments to make it accept single mesh filtering. menu…
Apr 16, 2020
8b6ccdf
router and sidebar revisions to make the Meshes page routing work pro…
Apr 16, 2020
a46c08a
column revision for the Mesh wizard shortcut CTA on the Overview page.
Apr 16, 2020
cc6fb05
switched the destination route name for the MeshSelector component so…
Apr 17, 2020
0401b91
added a route guard that prevents the user from going to the root Mes…
Apr 17, 2020
6136439
new logo in place. added back the tags listing in the tabbed view for…
Apr 17, 2020
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: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NODE_ENV=development
VUE_APP_MOCK_API_ENABLED=false
VUE_APP_MOCK_API_ENABLED=true
VUE_APP_KUMA_CONFIG=/dev-api-config.json
17,592 changes: 0 additions & 17,592 deletions package-lock.json

This file was deleted.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
"@kongponents/kemptystate": "0.0.1-beta.4",
"@kongponents/kicon": "0.3.0",
"@kongponents/kinput": "^0.2.0-0",
"@kongponents/kinputswitch": "^0.2.2",
"@kongponents/kmodal": "^0.1.4-8",
"@kongponents/kooltip": "0.2.0",
"@kongponents/kpop": "0.2.10",
"@kongponents/krumbs": "0.0.1",
"@kongponents/ktable": "0.1.4-1",
"@kongponents/ktable": "^0.3.1",
"@kongponents/ktabs": "^0.1.2",
"@kongponents/ktoaster": "0.0.1-beta.4",
"@kongponents/ktoggle": "^0.1.1",
"@kongponents/styles": "0.0.4",
"@kongponents/styles": "^0.1.2",
"axios": "^0.19.0",
"axios-mock-adapter": "^1.17.0",
"core-js": "^2.6.5",
Expand Down
67 changes: 48 additions & 19 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
</template>

<script>
import { setItemToStorage } from '@/Cache'
import { mapState, mapGetters } from 'vuex'
import GlobalHeader from '@/components/Global/Header'
import Sidebar from '@/components/Sidebar/Sidebar'
Expand All @@ -56,33 +55,63 @@ export default {
...mapState({
loading: state => state.globalLoading
}),

...mapGetters({
status: 'getStatus'
})
},
watch: {
'$route' (to, from) {
this.bootstrap()
}
},
beforeMount () {
// check the API status before we do anything else
this.$store.dispatch('getStatus')
.then(() => {
// only dispatch these actions if the API is online
if (this.$store.getters.getStatus === 'OK') {
// fetch the mesh list
this.$store.dispatch('fetchMeshList')
this.bootstrap()
},
methods: {
bootstrap () {
// check the API status before we do anything else
this.$store.dispatch('getStatus')
.then(() => {
// only dispatch these actions if the API is online
if (this.$store.getters.getStatus === 'OK') {
// set the current environment
this.$store.dispatch('updateEnvironment', localStorage.getItem('kumaEnv'))

// fetch all dataplanes
this.$store.dispatch('getAllDataplanes')
// fetch the mesh list
this.$store.dispatch('fetchMeshList')

// fetch the version
this.$store.dispatch('getVersion')
// fetch all dataplanes
// this.$store.dispatch('getAllDataplanes')

// fetch the tagline
this.$store.dispatch('getTagline')
// fetch the version
this.$store.dispatch('getVersion')

// set the selected mesh in localStorage
setItemToStorage('selectedMesh', this.$store.getters.getSelectedMesh)
}
})
// fetch the tagline
this.$store.dispatch('getTagline')

// set the selected mesh in localStorage
const mesh = () => {
const lsMesh = localStorage.getItem('selectedMesh')
const routeMesh = this.$route.params.mesh || null

// if the `mesh` param is present, use that
if (routeMesh) {
return routeMesh
}
// or use what's available in localStorage
else if (lsMesh && lsMesh !== 'undefined' && lsMesh.length > 0) {
return lsMesh
}
// otherwise, fall back to the default value from our VueX store
else {
return this.$store.getters.getSelectedMesh
}
}

localStorage.setItem('selectedMesh', mesh())
}
})
}
}
}
</script>
Expand Down
1 change: 1 addition & 0 deletions src/assets/images/kuma-logo-new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/styles/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@
margin: 0 auto 10px auto;
text-align: center;
}

/* KCard variants */

@media screen and (min-width: 1024px) {
.k-card--small {
max-width: 65%;
}
}
8 changes: 6 additions & 2 deletions src/assets/styles/inputs.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ select {
font-size: 16px;
color: #1155CB;
line-height: 20px;
padding: 10px 13px;
padding: 10px 16px 10px 13px;

background-color: #fff;
background-image: url("../images/chevron-down.svg?external");
background-position: 90% 50%;
background-position: calc(100% - 13px) 50%;
background-repeat: no-repeat;
}

Expand All @@ -22,3 +22,7 @@ select {
.k-button.primary {

}

.code-sample {
font-family: var(--font-family-mono);
}
14 changes: 14 additions & 0 deletions src/assets/styles/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
--gray-3: rgba(0, 0, 0, 0.45);
--gray-4: #ebebeb;
--gray-5: #f7f9fa;
--gray-6: #fdfdfd;
--gray-7: #f3f5f7;

--blue-1: #2d64b3;
--blue-2: #3d88f2;
--blue-3: rgba(61,136,242,0.07);
--blue-4: #1155CB;
--black-1: rgba(0, 0, 0, 0.75);

--green-1: #1b9844;

/* logo colors */
Expand All @@ -28,12 +32,22 @@
--logo-mint: #00E8C2;
--logo-navy: #172350;
--logo-green: #3db664;
--logo-purple: #290b53;

--brand-color-1: var(--logo-coral);
--brand-color-2: var(--logo-teal);
--brand-color-3: var(--logo-mint);
--brand-color-4: var(--logo-navy);
--brand-color-5: var(--logo-green);
--brand-color-6: var(--logo-purple);

/* Topbar */
--topbar-height: 4rem;

/* Sidebar */
--sidebar-width: 240px;
--sidebar-width-closed: 63px;
--sidebar-bg-color: var(--gray-6);

/* Kongponents color remappings */
--KButtonPrimaryBase: var(--blue-4);
Expand Down
22 changes: 10 additions & 12 deletions src/components/Global/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
<div class="main-header__content flex justify-between items-center -mx-4">
<div class="px-4">
<router-link
:to="{
name: 'mesh-overview',
params: {
mesh: currentMesh
}
}"
:to="{ name: 'global-overview' }"
exact
class="logo"
>
<img
src="@/assets/images/kuma-logo.svg?external"
src="@/assets/images/kuma-logo-new.svg?external"
alt="Kuma Logo"
>
</router-link>
Expand Down Expand Up @@ -75,7 +70,7 @@ export default {
}
</script>

<style lang="scss">
<style lang="scss" scoped>
.main-header {
position: fixed;
z-index: 9999;
Expand All @@ -94,12 +89,15 @@ export default {
.main-header--simple {
border-bottom: 0;
background: none;
}

.logo {
.logo {

img {
// transform: translateY(68px);
}
img {
display: block;
width: 100%;
height: auto;
max-height: 46px;
}
}
</style>
15 changes: 8 additions & 7 deletions src/components/Pagination.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template>
<div class="pagination">
<KButton
ref="paginatePrev"
:disabled="!hasPrevious"
appearance="primary"
data-testid="previous"
@click="$emit('previous')"
>
&lsaquo; Previous
</KButton>

<KButton
ref="paginateNext"
:disabled="!hasNext"
appearance="primary"
data-testid="next"
@click="$emit('next')"
>
Next &rsaquo;
Expand All @@ -38,16 +38,17 @@ export default {

<style lang="scss" scoped>
.pagination {
display: flex;
margin-top: 16px;
justify-content: space-between;
// display: flex;
// justify-content: space-between;
padding: var(--spacing-sm);
text-align: right;

button {
font-size: 14px;
padding: 4px 8px;

&:nth-child(2) {
margin-left: auto;
&:not(:first-of-type) {
margin-left: var(--spacing-sm);
}

&:after {
Expand Down
12 changes: 6 additions & 6 deletions src/components/Sidebar/KNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ export default {
}
</script>

<style lang='scss' scoped>
<style lang="scss" scoped>
nav {
position: fixed;
display: flex;
flex-direction: column;
width: 240px;
width: var(--sidebar-width);
height: auto;
min-height: 100%;
border-right: 1px solid #e6e7e8;
background: #fff;
background: var(--sidebar-bg-color);
z-index: 1000;

&.closed {
width: 63px;
width: var(--sidebar-width-closed);
}
}
</style>

<style lang="scss">
nav#the-sidebar + .main-content {
margin-left: 240px;
margin-left: var(--sidebar-width);
}

nav#the-sidebar.closed + .main-content {
margin-left: 63px;
margin-left: var(--sidebar-width-closed);
}
</style>
33 changes: 18 additions & 15 deletions src/components/Sidebar/MenuList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
:class="{'menu-title' : item.title, 'hasBadge': item.badge}"
>
<router-link
v-if="item.link"
v-if="item.link && item.pathFlip"
:to="{
path: item.root ? preparePath(item.link) : preparePath(item.link) + '/' + meshPath
}"
>
{{ item.name }}
</router-link>
<router-link
v-else-if="item.link && !item.pathFlip"
:to="{
path: item.root ? preparePath(item.link) : '/' + meshPath + preparePath(item.link)
}"
>
{{ item.name }}
<!-- <span
v-if="item.badge"
class="badge"
>{{ item.badge }}</span> -->
<!-- <span
v-if="item.badgeSecondary"
class="badge secondary"
>{{ item.badgeSecondary }}</span> -->
</router-link>
<span v-else-if="!item.hidden">{{ item.name }}</span>
</li>
Expand Down Expand Up @@ -48,9 +48,12 @@ export default {
...mapState(['selectedMesh'])
},
watch: {
'$route' (to, from) {
// set the menu links accordingly
this.setMeshPath()
$route: {
deep: true,
handler () {
// set the menu links accordingly
this.setMeshPath()
}
}
},
beforeMount () {
Expand All @@ -72,10 +75,10 @@ export default {
} else if (meshFromLocalStorage && meshFromLocalStorage.length > 0) {
// otherwise fall back to what's present in localStorage
this.meshPath = meshFromLocalStorage
} else {
// otherwise fallback to what's in the store (it has a default value)
this.meshPath = this.$store.getters.getSelectedMesh
}

// otherwise fallback to what's in the store (it has a default value)
this.meshPath = this.$store.getters.getSelectedMesh
}
}
}
Expand Down
Loading