Skip to content

Commit

Permalink
[KYUUBI #5620] [UI] Remove dummy information card from Overview page
Browse files Browse the repository at this point in the history
### _Why are the changes needed?_

<img width="1345" alt="image" src="https://github.com/apache/kyuubi/assets/26535726/3c566b65-0403-493c-9e83-dd4d14587557">

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

<img width="1350" alt="image" src="https://github.com/apache/kyuubi/assets/26535726/dba98f70-1a07-4458-99ad-e5037d9bac46">

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

No

Closes #5620 from pan3793/ui-overview.

Closes #5620

50cface [Cheng Pan] fix
44815e2 [Cheng Pan] [UI] Remove dummy information card from Overview page

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit b17c882)
Signed-off-by: Cheng Pan <chengpan@apache.org>
  • Loading branch information
pan3793 committed Nov 3, 2023
1 parent 6298657 commit 4119007
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 32 deletions.
16 changes: 16 additions & 0 deletions kyuubi-server/web-ui/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

VITE_APP_VERSION=$npm_package_version
8 changes: 2 additions & 6 deletions kyuubi-server/web-ui/src/layout/components/aside/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<header>
<img v-if="!isCollapse" src="@/assets/kyuubi-logo.svg" />
<img v-else class="collapsed-logo" src="@/assets/kyuubi.png" />
<pre v-if="!isCollapse">{{ title }}</pre>
<pre v-if="!isCollapse">{{ version }}</pre>
</header>
<c-menu :is-collapse="isCollapse" :active-path="activePath" :menus="menus" />
</template>
Expand All @@ -38,11 +38,7 @@
const { isCollapse } = storeToRefs(store)
const router = useRoute()
const activePath = ref(router.path)
/* eslint-disable */
// define __APP_VERSION__ in vite.config.ts
// @ts-ignore
const title = `${__APP_VERSION__}`
/* eslint-enable */
const version = import.meta.env.VITE_APP_VERSION
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,5 @@ test('mount component', () => {
}
})
expect(wrapper.text())
/* eslint-disable */
// define __APP_VERSION__ in vitest.config.ts
// @ts-ignore
.toContain(`${__APP_VERSION__}`)
/* eslint-enable */
.toContain(import.meta.env.VITE_APP_VERSION)
})
17 changes: 2 additions & 15 deletions kyuubi-server/web-ui/src/views/overview/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<main>
<el-row :gutter="12">
<el-col v-for="(card, index) in cards" :key="index" :md="8">
<c-card :title="card.title" :value="card.value" />
<c-card />
</el-col>
</el-row>
</main>
Expand All @@ -30,20 +30,7 @@
import { reactive } from 'vue'
import cCard from '@/components/card/index.vue'
const cards = reactive([
{
title: 'Opened Session',
value: 1
},
{
title: 'ExecPool Size',
value: 2
},
{
title: 'ExecPool ActiveCount',
value: 3
}
])
const cards = reactive([])
</script>

<style scoped></style>
3 changes: 0 additions & 3 deletions kyuubi-server/web-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export default defineConfig(({ mode }) => {
changeOrigin: true
}
}
},
define: {
__APP_VERSION__: JSON.stringify(require('./package.json').version)
}
}
})
3 changes: 0 additions & 3 deletions kyuubi-server/web-ui/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ export default defineConfig({
test: {
globals: true,
environment: 'jsdom'
},
define: {
__APP_VERSION__: JSON.stringify(require('./package.json').version)
}
})

0 comments on commit 4119007

Please sign in to comment.