mirror of https://github.com/rancher/dashboard.git
Minor updates
This commit is contained in:
parent
56bcea43ab
commit
35b9993f5a
|
|
@ -0,0 +1,5 @@
|
|||
# Built-in icon images that can be used for Dynamic Content
|
||||
|
||||
These are referenced in the dynamic content package with the '~' prefix.
|
||||
|
||||
Light theme mode images are in this folder. The version of the image for dark theme mode should be in the `dark` sub-folder.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="180" height="165" viewBox="0, 0, 180, 165">
|
||||
<g id="Layer_1">
|
||||
<g>
|
||||
<path d="M148.462,130.726 L134.906,130.726 C133.862,130.726 133.01,129.877 133.01,128.831 L133.01,121.982 L146.093,121.982 C147.217,121.982 148.13,121.071 148.13,119.946 C148.13,118.821 147.217,117.91 146.093,117.91 L133.01,117.91 L133.01,111.171 C133.01,110.125 133.862,109.273 134.906,109.273 L148.462,109.273 C149.642,109.273 150.6,108.318 150.6,107.138 C150.6,105.958 149.642,105 148.462,105 L134.906,105 C131.507,105 128.738,107.768 128.738,111.171 L128.738,128.831 C128.738,132.232 131.507,135 134.906,135 L148.462,135 C149.642,135 150.6,134.044 150.6,132.864 C150.6,131.683 149.642,130.726 148.462,130.726 M108.601,117.965 C105.736,117.451 103.743,116.842 102.627,116.133 C101.511,115.424 100.952,114.466 100.952,113.259 C100.952,111.963 101.525,110.899 102.672,110.069 C103.819,109.24 105.432,108.825 107.516,108.825 C109.627,108.825 111.317,109.231 112.585,110.047 C113.266,110.485 113.888,111.069 114.448,111.797 C115.274,112.868 116.832,113.009 117.837,112.105 C118.783,111.251 118.866,109.786 118.014,108.837 C116.987,107.688 115.817,106.778 114.507,106.109 C112.561,105.114 110.215,104.616 107.471,104.616 C105.116,104.616 103.057,105.024 101.294,105.838 C99.529,106.651 98.176,107.754 97.243,109.141 C96.306,110.528 95.839,112.068 95.839,113.757 C95.839,115.357 96.207,116.715 96.949,117.83 C97.686,118.947 98.872,119.882 100.501,120.636 C102.129,121.391 104.316,122.024 107.063,122.537 C109.809,123.05 111.731,123.638 112.832,124.301 C113.934,124.966 114.485,125.84 114.485,126.925 C114.485,128.284 113.874,129.333 112.65,130.071 C111.431,130.811 109.748,131.18 107.606,131.18 C105.343,131.18 103.45,130.758 101.926,129.913 C101.056,129.43 100.277,128.79 99.586,127.993 C98.718,126.985 97.162,126.962 96.222,127.902 L96.213,127.911 C95.353,128.77 95.287,130.162 96.099,131.066 C98.681,133.949 102.533,135.388 107.65,135.388 C110.004,135.388 112.078,135.034 113.874,134.325 C115.669,133.617 117.063,132.599 118.059,131.271 C119.056,129.943 119.553,128.404 119.553,126.654 C119.553,125.025 119.191,123.661 118.467,122.559 C117.742,121.459 116.59,120.538 115.005,119.799 C113.422,119.059 111.286,118.449 108.601,117.965 M41.771,117.975 C38.905,117.459 36.913,116.852 35.796,116.143 C34.68,115.432 34.122,114.475 34.122,113.267 C34.122,111.971 34.696,110.907 35.842,110.077 C36.989,109.249 38.602,108.833 40.685,108.833 C42.795,108.833 44.485,109.24 45.753,110.055 C46.436,110.493 47.057,111.077 47.617,111.807 C48.442,112.877 50.001,113.017 51.007,112.114 C51.953,111.258 52.035,109.795 51.183,108.845 C50.156,107.697 48.985,106.788 47.676,106.117 C45.73,105.122 43.383,104.625 40.639,104.625 C38.285,104.625 36.227,105.032 34.462,105.846 C32.697,106.661 31.346,107.763 30.411,109.149 C29.476,110.538 29.009,112.076 29.009,113.766 C29.009,115.365 29.377,116.724 30.117,117.838 C30.856,118.956 32.041,119.891 33.67,120.645 C35.299,121.399 37.486,122.032 40.231,122.546 C42.977,123.059 44.9,123.647 46.002,124.311 C47.102,124.973 47.654,125.849 47.654,126.934 C47.654,128.292 47.042,129.341 45.821,130.08 C44.599,130.82 42.917,131.189 40.776,131.189 C38.512,131.189 36.619,130.767 35.096,129.921 C34.225,129.438 33.446,128.798 32.757,128.001 C31.889,126.994 30.33,126.97 29.39,127.911 L29.382,127.92 C28.522,128.778 28.457,130.171 29.267,131.075 C31.85,133.957 35.701,135.397 40.82,135.397 C43.173,135.397 45.247,135.042 47.042,134.333 C48.838,133.625 50.232,132.606 51.228,131.279 C52.225,129.953 52.722,128.412 52.722,126.662 C52.722,125.034 52.36,123.669 51.635,122.568 C50.911,121.467 49.759,120.547 48.173,119.808 C46.59,119.067 44.456,118.457 41.771,117.975 M86.342,107.06 L86.342,123.487 C86.342,127.409 85.302,130.373 83.221,132.38 C81.138,134.386 78.107,135.388 74.125,135.388 C70.142,135.388 67.109,134.386 65.028,132.38 C62.947,130.373 61.906,127.409 61.906,123.487 L61.906,107.06 C61.906,105.71 63,104.616 64.349,104.616 C65.697,104.616 66.794,105.71 66.794,107.06 L66.794,122.899 C66.794,125.735 67.389,127.824 68.581,129.166 C69.773,130.508 71.619,131.18 74.125,131.18 C76.629,131.18 78.476,130.508 79.668,129.166 C80.86,127.824 81.455,125.735 81.455,122.899 L81.455,107.06 C81.455,105.71 82.55,104.616 83.9,104.616 C85.248,104.616 86.342,105.71 86.342,107.06" fill="#0C322C"/>
|
||||
<path d="M144.609,50.569 C143.952,51.005 143.071,51.006 142.414,50.569 C141.335,49.853 141.232,48.358 142.102,47.49 C142.874,46.69 144.148,46.69 144.921,47.489 C145.789,48.357 145.684,49.853 144.609,50.569 M147.749,46.208 C149.001,51.537 144.212,56.329 138.883,55.077 C136.171,54.44 134.015,52.287 133.381,49.574 C132.13,44.248 136.917,39.46 142.245,40.709 C144.956,41.342 147.11,43.495 147.749,46.208 M111.867,74.867 C112.479,75.743 112.983,76.588 113.269,77.433 C113.469,78.035 113.725,78.826 114.319,79.144 C114.353,79.162 114.381,79.177 114.416,79.188 C115.503,79.584 118.3,79.517 118.3,79.517 L123.442,79.517 C123.881,79.524 127.743,79.513 127.647,79.08 C127.184,77.014 124.792,76.646 122.976,75.565 C121.297,74.565 119.71,73.432 118.986,71.483 C118.612,70.477 118.834,68.156 119.482,67.31 C119.955,66.7 120.647,66.294 121.398,66.13 C122.225,65.953 123.085,66.106 123.916,66.19 C124.937,66.294 125.948,66.479 126.965,66.606 C128.934,66.862 130.918,66.965 132.901,66.911 C136.175,66.82 139.456,66.298 142.559,65.241 C144.724,64.513 146.858,63.53 148.7,62.163 C150.794,60.606 150.246,60.753 148.123,60.97 C145.581,61.231 143.015,61.267 140.467,61.117 C138.088,60.979 135.743,60.699 133.59,59.593 C131.894,58.719 130.439,57.843 129.098,56.488 C128.897,56.284 128.771,55.686 129.139,55.305 C129.495,54.934 130.252,55.15 130.485,55.346 C132.829,57.306 136.322,58.918 139.942,59.094 C141.897,59.191 143.803,59.229 145.761,59.141 C146.738,59.097 148.218,59.104 149.196,59.094 C149.704,59.088 151.085,59.233 151.343,58.697 C151.42,58.54 151.414,58.359 151.408,58.184 C151.12,50.355 150.541,41.521 142.347,37.778 C136.233,34.982 127.066,30.651 123.195,28.854 C122.295,28.429 121.245,29.103 121.245,30.102 C121.245,32.718 121.38,36.476 121.38,39.896 C119.526,38.006 116.402,36.815 114.021,35.722 C111.319,34.481 108.526,33.432 105.689,32.547 C99.969,30.776 94.053,29.686 88.103,29.093 C81.357,28.421 74.495,28.743 67.846,30.115 C56.904,32.385 46.148,37.649 37.982,45.344 C32.969,50.068 29.036,56.78 28.769,63.594 C28.39,73.237 31.091,78.417 36.058,83.754 C43.977,92.26 61.02,93.45 67.922,83.364 C71.025,78.822 71.702,72.663 69.447,67.646 C67.195,62.629 62.014,59.003 56.52,58.819 C52.256,58.679 47.715,60.846 46.082,64.788 C44.835,67.797 45.545,71.516 47.814,73.854 C48.698,74.767 49.895,75.511 51.205,75.219 C51.974,75.049 52.619,74.469 52.736,73.687 C52.908,72.533 51.897,71.785 51.277,70.899 C50.156,69.3 50.383,66.902 51.787,65.543 C52.971,64.396 54.725,64.057 56.374,64.06 C57.908,64.063 59.478,64.339 60.803,65.113 C62.664,66.207 63.902,68.212 64.327,70.333 C65.606,76.666 60.458,81.812 53.476,82.217 C49.905,82.429 46.269,81.489 43.481,79.245 C36.421,73.566 34.691,61.957 42.763,55.759 C50.422,49.877 60.094,51.393 65.793,54.45 C70.358,56.895 73.759,60.897 76.336,65.321 C77.628,67.545 78.73,69.869 79.753,72.232 C80.737,74.502 81.655,76.79 83.624,78.454 C84.928,79.557 86.535,79.517 88.243,79.517 L97.989,79.517 C99.311,79.517 98.991,78.635 98.417,78.05 C97.125,76.73 95.269,76.431 93.549,75.958 C89.623,74.878 90.023,69.679 91.109,69.679 C94.622,69.679 94.733,69.783 97.809,69.742 C102.251,69.682 103.592,69.424 107.063,70.709 C108.921,71.396 110.705,73.211 111.867,74.867" fill="#30BA78"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.6 KiB |
|
|
@ -1,8 +1,11 @@
|
|||
<script>
|
||||
import { NotificationLevel } from '@shell/types/notifications';
|
||||
import DynamicContentIcon from './DynamicContentIcon'
|
||||
|
||||
export default {
|
||||
name: 'HomePageDynamicContent',
|
||||
name: 'DynamicContentBanner',
|
||||
|
||||
components: { DynamicContentIcon },
|
||||
|
||||
props: {
|
||||
location: {
|
||||
|
|
@ -49,6 +52,12 @@ export default {
|
|||
v-if="dynamicContent"
|
||||
class="home-page-dynamic-content"
|
||||
>
|
||||
<template v-if="dynamicContent.data">
|
||||
<DynamicContentIcon
|
||||
v-if="dynamicContent.data.icon"
|
||||
:class="{'mr-10': dynamicContent.data.icon }"
|
||||
/>
|
||||
</template>
|
||||
<div class="dc-content">
|
||||
<div class="dc-title">
|
||||
{{ dynamicContent.title }}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'DynamicContentIcon',
|
||||
|
||||
props: {
|
||||
location: {
|
||||
type: String,
|
||||
default: 'banner'
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
src() {
|
||||
return require('~shell/assets/images/content/suse.svg');
|
||||
},
|
||||
|
||||
// Return the un-read hidden notifications for display on the home page
|
||||
dynamicContent() {
|
||||
let hiddenNotifications = this.$store.getters['notifications/all'].filter((n) => n.level === NotificationLevel.Hidden && !n.read);
|
||||
|
||||
hiddenNotifications = hiddenNotifications.filter((n) => n.data?.location === this.location);
|
||||
|
||||
return hiddenNotifications.length > 0 ? hiddenNotifications[0] : undefined;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<img
|
||||
:src="src"
|
||||
class="dc-icon"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dc-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -7,7 +7,7 @@ import PaginatedResourceTable from '@shell/components/PaginatedResourceTable.vue
|
|||
import { BadgeState } from '@components/BadgeState';
|
||||
import CommunityLinks from '@shell/components/CommunityLinks.vue';
|
||||
import SingleClusterInfo from '@shell/components/SingleClusterInfo.vue';
|
||||
import HomePageDynamicContent from '@shell/components/HomePageDynamicContent.vue';
|
||||
import DynamicContentBanner from '@shell/components/DynamicContent/DynamicContentBanner.vue';
|
||||
import { mapGetters, mapState } from 'vuex';
|
||||
import { MANAGEMENT, CAPI, COUNT } from '@shell/config/types';
|
||||
import { NAME as MANAGER } from '@shell/config/product/manager';
|
||||
|
|
@ -48,7 +48,7 @@ export default defineComponent({
|
|||
SingleClusterInfo,
|
||||
TabTitle,
|
||||
ResourceTable,
|
||||
HomePageDynamicContent,
|
||||
DynamicContentBanner,
|
||||
},
|
||||
|
||||
mixins: [PageHeaderActions, Preset],
|
||||
|
|
@ -612,7 +612,7 @@ export default defineComponent({
|
|||
pref-key="welcomeBanner"
|
||||
data-testid="home-banner-graphic"
|
||||
/>
|
||||
<HomePageDynamicContent location="banner" />
|
||||
<DynamicContentBanner location="banner" />
|
||||
<IndentedPanel class="mt-20 mb-20">
|
||||
<div class="row home-panels">
|
||||
<div class="col main-panel">
|
||||
|
|
|
|||
Loading…
Reference in New Issue