@appscode/design-system 1.0.43-alpha.79 → 1.0.43-alpha.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appscode/design-system",
|
|
3
|
-
"version": "1.0.43-alpha.
|
|
3
|
+
"version": "1.0.43-alpha.82",
|
|
4
4
|
"description": "A design system for Appscode websites and dashboards made using Bulma",
|
|
5
5
|
"main": "main.scss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@appscode/design-system-images": "0.0.13"
|
|
11
|
-
"bulma-checkradio": "^1.1.1",
|
|
12
|
-
"bulma-switch": "^2.0.0",
|
|
13
|
-
"bulma-tooltip": "^3.0.2",
|
|
14
|
-
"v-calendar": "^1.0.6",
|
|
15
|
-
"vue-multiselect": "^2.1.6"
|
|
10
|
+
"@appscode/design-system-images": "0.0.13"
|
|
16
11
|
},
|
|
17
12
|
"repository": {
|
|
18
13
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
placeholder="Selected Cluster"
|
|
14
14
|
label="name"
|
|
15
15
|
track-by="name"
|
|
16
|
-
:options="
|
|
16
|
+
:options="clusterOptions"
|
|
17
17
|
:allow-empty="false"
|
|
18
18
|
deselectLabel=""
|
|
19
19
|
selectLabel=""
|
|
@@ -58,10 +58,6 @@ export default {
|
|
|
58
58
|
type: Boolean,
|
|
59
59
|
default: false,
|
|
60
60
|
},
|
|
61
|
-
username: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: "",
|
|
64
|
-
},
|
|
65
61
|
clusterOptions: {
|
|
66
62
|
type: Array,
|
|
67
63
|
default: [],
|
|
@@ -79,23 +75,11 @@ export default {
|
|
|
79
75
|
data() {
|
|
80
76
|
return {
|
|
81
77
|
selectedCluster: null,
|
|
82
|
-
selectedClusterName:
|
|
83
|
-
options: [],
|
|
78
|
+
selectedClusterName: "",
|
|
84
79
|
};
|
|
85
80
|
},
|
|
86
81
|
|
|
87
82
|
methods: {
|
|
88
|
-
async checkStatus(clusterName) {
|
|
89
|
-
try {
|
|
90
|
-
await this.$axios.get(
|
|
91
|
-
`/clusters/${this.username}/${clusterName}/status`
|
|
92
|
-
);
|
|
93
|
-
return true;
|
|
94
|
-
} catch (err) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
|
|
99
83
|
getProviderIcon(provider) {
|
|
100
84
|
return `https://cdn.appscode.com/images/cloud-provider-icons/${provider}.png`;
|
|
101
85
|
},
|
|
@@ -115,22 +99,23 @@ export default {
|
|
|
115
99
|
},
|
|
116
100
|
},
|
|
117
101
|
selectedClusterName(n) {
|
|
102
|
+
if (n !== this.selectedCluster.name) {
|
|
103
|
+
this.clusterOptions.forEach((item) => {
|
|
104
|
+
if (this.selectedClusterName === item.name) {
|
|
105
|
+
this.selectedCluster = item;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
118
109
|
this.$emit("input", n);
|
|
119
110
|
},
|
|
120
111
|
clusterOptions: {
|
|
121
112
|
deep: true,
|
|
122
113
|
immediate: true,
|
|
123
114
|
async handler(list) {
|
|
124
|
-
this.options = [];
|
|
125
|
-
|
|
126
115
|
if (list) {
|
|
127
116
|
list.forEach(async (item) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.options.push(item);
|
|
131
|
-
if(item.name === this.selectedClusterName) {
|
|
132
|
-
this.selectedCluster = item;
|
|
133
|
-
}
|
|
117
|
+
if(item.name === this.selectedClusterName) {
|
|
118
|
+
this.selectedCluster = item;
|
|
134
119
|
}
|
|
135
120
|
});
|
|
136
121
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="is-cluster-logo"
|
|
2
|
+
<div v-if="sidebarCollapsed" class="is-cluster-logo">
|
|
3
3
|
<img
|
|
4
4
|
width="40"
|
|
5
5
|
:src="getProviderIcon(selectedCluster && selectedCluster.provider)"
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
placeholder="Selected Cluster"
|
|
14
14
|
label="name"
|
|
15
15
|
track-by="name"
|
|
16
|
-
:options="
|
|
16
|
+
:options="clusterOptions"
|
|
17
17
|
:allow-empty="false"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
deselect-label=""
|
|
19
|
+
select-label=""
|
|
20
|
+
selected-label=""
|
|
21
21
|
>
|
|
22
|
-
<template
|
|
22
|
+
<template #singleLabel="props">
|
|
23
23
|
<div class="is-flex is-align-items-center">
|
|
24
24
|
<img
|
|
25
25
|
:src="getProviderIcon(props.option.provider)"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
>
|
|
31
31
|
</div>
|
|
32
32
|
</template>
|
|
33
|
-
<template
|
|
33
|
+
<template #option="props">
|
|
34
34
|
<div class="is-flex is-align-items-center">
|
|
35
35
|
<img
|
|
36
36
|
class="mr-15"
|
|
@@ -48,95 +48,86 @@
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script>
|
|
51
|
-
import { defineComponent, defineAsyncComponent } from
|
|
52
|
-
export default defineComponent({
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
import { defineComponent, defineAsyncComponent } from 'vue'
|
|
52
|
+
export default defineComponent({
|
|
53
|
+
components: {
|
|
54
|
+
Multiselect: defineAsyncComponent(() =>
|
|
55
|
+
import('vue-multiselect').then((module) => module.default)
|
|
56
|
+
),
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
props: {
|
|
59
|
+
sidebarCollapsed: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
mouseHover: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
clusterOptions: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => [],
|
|
70
|
+
},
|
|
71
|
+
modelValue: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: '',
|
|
74
|
+
},
|
|
69
75
|
},
|
|
70
|
-
value: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "",
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
components: {
|
|
77
|
-
Multiselect: () => import("vue-multiselect"),
|
|
78
|
-
},
|
|
79
76
|
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
selectedCluster: null,
|
|
83
|
-
selectedClusterName: null,
|
|
84
|
-
options: [],
|
|
85
|
-
};
|
|
86
|
-
},
|
|
77
|
+
emits: ['update:modelValue'],
|
|
87
78
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`/clusters/${this.username}/${clusterName}/status`
|
|
93
|
-
);
|
|
94
|
-
return true;
|
|
95
|
-
} catch (err) {
|
|
96
|
-
return false;
|
|
79
|
+
data() {
|
|
80
|
+
return {
|
|
81
|
+
selectedCluster: null,
|
|
82
|
+
selectedClusterName: null,
|
|
97
83
|
}
|
|
98
84
|
},
|
|
99
85
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
86
|
+
watch: {
|
|
87
|
+
modelValue: {
|
|
88
|
+
immediate: true,
|
|
89
|
+
handler(n) {
|
|
90
|
+
this.selectedClusterName = n
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
selectedCluster: {
|
|
94
|
+
deep: true,
|
|
95
|
+
handler(n) {
|
|
96
|
+
if (this.selectedClusterName !== n.name) {
|
|
97
|
+
this.selectedClusterName = n.name
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
selectedClusterName(n) {
|
|
102
|
+
if (n !== this.selectedCluster.name) {
|
|
103
|
+
this.clusterOptions.forEach((item) => {
|
|
104
|
+
if (this.selectedClusterName === item.name) {
|
|
105
|
+
this.selectedCluster = item
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
}
|
|
104
109
|
|
|
105
|
-
|
|
106
|
-
value: {
|
|
107
|
-
immediate: true,
|
|
108
|
-
handler(n) {
|
|
109
|
-
this.selectedClusterName = n;
|
|
110
|
+
this.$emit('update:modelValue', n)
|
|
110
111
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
clusterOptions: {
|
|
113
|
+
deep: true,
|
|
114
|
+
immediate: true,
|
|
115
|
+
async handler(list) {
|
|
116
|
+
if (list) {
|
|
117
|
+
list.forEach((item) => {
|
|
118
|
+
if (this.selectedClusterName === item.name) {
|
|
119
|
+
this.selectedCluster = item
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
},
|
|
116
124
|
},
|
|
117
125
|
},
|
|
118
|
-
selectedClusterName(n) {
|
|
119
|
-
this.$emit("input", n);
|
|
120
|
-
},
|
|
121
|
-
clusterOptions: {
|
|
122
|
-
deep: true,
|
|
123
|
-
immediate: true,
|
|
124
|
-
async handler(list) {
|
|
125
|
-
this.options = [];
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (resp) {
|
|
131
|
-
this.options.push(item);
|
|
132
|
-
if(item.name === this.selectedClusterName) {
|
|
133
|
-
this.selectedCluster = item;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
127
|
+
methods: {
|
|
128
|
+
getProviderIcon(provider) {
|
|
129
|
+
return `https://cdn.appscode.com/images/cloud-provider-icons/${provider}.png`
|
|
138
130
|
},
|
|
139
131
|
},
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
</script>
|
|
132
|
+
})
|
|
133
|
+
</script>
|