-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
K8s machineimage version warning (#511)
* Implemented select hint colorizer component * Show hint in case kubernetes patch updates are enabled and selected kubernetes version is not latest patch * removed vm.nexttick workarounds where possible * use colorizer component to colorize machineimage hint Show hint in case user does not select latest machine image and has automatic operating system updates enabled * Filter invalid kubernetes / machine image versions * renamed variable * changes as discussed added tests * Fixed: Addon dialog not resetted properly Fixed: Vendor icon error in console for unknown infrastructure providers * Cleaned unit tests * cleaned store tests * Update frontend/src/components/NewShoot/NewShootDetails.vue Co-Authored-By: Peter Sutter <peter.sutter@sap.com> * changes as discussed * test getters directly * improved tests * use startsWith Co-authored-by: Peter Sutter <peter.sutter@sap.com>
- Loading branch information
1 parent
73fdcc9
commit 65a161b
Showing
16 changed files
with
637 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!-- | ||
Copyright (c) 2019 by SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file | ||
Licensed 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. | ||
--> | ||
|
||
<template> | ||
<div> | ||
<slot></slot> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'select-hint-colorizer', | ||
props: { | ||
hintColor: { | ||
type: String | ||
} | ||
}, | ||
watch: { | ||
hintColor (hintColor) { | ||
this.applyHintColor(hintColor) | ||
} | ||
}, | ||
methods: { | ||
applyHintColor (hintColor) { | ||
if (!this.$el) { | ||
return | ||
} | ||
const elementClasses = this.$el.classList | ||
elementClasses.forEach((className) => { | ||
if (className.startsWith('hintColor-')) { | ||
elementClasses.remove(className) | ||
} | ||
}) | ||
if (hintColor !== 'default') { | ||
elementClasses.add(`hintColor-${hintColor}`) | ||
} | ||
} | ||
}, | ||
mounted () { | ||
this.applyHintColor(this.hintColor) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="styl" scoped> | ||
@import '~vuetify/src/stylus/settings/_colors.styl'; | ||
.hintColor-orange { | ||
>>>.v-messages__wrapper { | ||
.v-messages__message { | ||
color: $orange.darken-2 !important; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.