mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix linter complaints
Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>
This commit is contained in:
parent
7178d0534a
commit
84d4535f54
@ -27,7 +27,7 @@ export class KubeconfigManager {
|
|||||||
protected createTemporaryKubeconfig(): string {
|
protected createTemporaryKubeconfig(): string {
|
||||||
ensureDir(this.configDir)
|
ensureDir(this.configDir)
|
||||||
const path = `${this.configDir}/${randomFileName("kubeconfig")}`
|
const path = `${this.configDir}/${randomFileName("kubeconfig")}`
|
||||||
let kc = {
|
const kc = {
|
||||||
clusters: [
|
clusters: [
|
||||||
{
|
{
|
||||||
name: this.cluster.contextName,
|
name: this.cluster.contextName,
|
||||||
|
|||||||
@ -11,11 +11,11 @@ export function migration(store: any) {
|
|||||||
|
|
||||||
const kubeConfigBase = path.join(app.getPath("userData"), "kubeconfigs")
|
const kubeConfigBase = path.join(app.getPath("userData"), "kubeconfigs")
|
||||||
ensureDirSync(kubeConfigBase)
|
ensureDirSync(kubeConfigBase)
|
||||||
let storedClusters = store.get("clusters") as any[]
|
const storedClusters = store.get("clusters") as any[]
|
||||||
if (!storedClusters) return
|
if (!storedClusters) return
|
||||||
|
|
||||||
console.log("num clusters to migrate: ", storedClusters.length)
|
console.log("num clusters to migrate: ", storedClusters.length)
|
||||||
for (let cluster of storedClusters ) {
|
for (const cluster of storedClusters ) {
|
||||||
// TODO Should probably guard this, not to make the whole migration fail if one cluster fails!?
|
// TODO Should probably guard this, not to make the whole migration fail if one cluster fails!?
|
||||||
// take the embedded kubeconfig and dump it into a file
|
// take the embedded kubeconfig and dump it into a file
|
||||||
const kubeConfigFile = clusterStore.writeEmbeddedKubeConfig(cluster.id, cluster.kubeConfig)
|
const kubeConfigFile = clusterStore.writeEmbeddedKubeConfig(cluster.id, cluster.kubeConfig)
|
||||||
|
|||||||
@ -16,8 +16,11 @@
|
|||||||
placeholder="Choose a file or drop it here..."
|
placeholder="Choose a file or drop it here..."
|
||||||
drop-placeholder="Drop file here..."
|
drop-placeholder="Drop file here..."
|
||||||
@input="reloadKubeContexts()"
|
@input="reloadKubeContexts()"
|
||||||
></b-form-file>
|
/>
|
||||||
<div class="mt-3">Selected file: {{ file ? file.name : '' }}</div>
|
|
||||||
|
<div class="mt-3">
|
||||||
|
Selected file: {{ file ? file.name : '' }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<b-form-select
|
<b-form-select
|
||||||
id="kubecontext-select"
|
id="kubecontext-select"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user