Skip to content

Commit 962ce6b

Browse files
committed
typescript fixes
1 parent dafa1cd commit 962ce6b

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

dashboard/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# compiled output
22
/dist
3+
dist-pkg
34
/tmp
45
/out-tsc
56

@@ -70,4 +71,4 @@ jspm_packages/
7071

7172
# System Files
7273
.DS_Store
73-
Thumbs.db
74+
Thumbs.db

dashboard/pkg/epinio/components/application/AppConfiguration.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default Vue.extend<Data, EpinioCompRecord, EpinioCompRecord, EpinioCompRe
6363
value: s.metadata.name,
6464
}));
6565
66-
return sortBy(list, 'label');
66+
return sortBy(list, 'label', false);
6767
},
6868
6969
namespacedServices() {
@@ -82,7 +82,7 @@ export default Vue.extend<Data, EpinioCompRecord, EpinioCompRecord, EpinioCompRe
8282
value: s,
8383
}));
8484
85-
return sortBy(list, 'label');
85+
return sortBy(list, 'label', false);
8686
},
8787
8888
noConfigs() {

dashboard/pkg/epinio/components/application/AppInfo.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default Vue.extend<Data, any, any, any>({
121121
122122
computed: {
123123
namespaces() {
124-
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.NAMESPACE), 'name');
124+
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.NAMESPACE), 'name', false);
125125
},
126126
127127
namespaceNames() {

dashboard/pkg/epinio/components/application/AppSource.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export default Vue.extend<Data, any, any, any>({
258258
return res;
259259
}, {} as { [key: string]: any});
260260
261-
generateZip(filesToZip).then((zip) => {
261+
generateZip(filesToZip).then((zip: any) => {
262262
Vue.set(this.archive, 'tarball', zip);
263263
Vue.set(this.archive, 'fileName', folderName || 'folder');
264264
@@ -370,11 +370,11 @@ export default Vue.extend<Data, any, any, any>({
370370
},
371371
372372
namespaces() {
373-
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.NAMESPACE), 'name');
373+
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.NAMESPACE), 'name', false);
374374
},
375375
376376
appCharts() {
377-
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.APP_CHARTS), 'name').map((ap: EpinioApplicationChartResource) => ({
377+
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.APP_CHARTS), 'name', false).map((ap: EpinioApplicationChartResource) => ({
378378
value: ap.meta.name,
379379
label: `${ ap.meta.name } (${ ap.short_description })`
380380
}));

dashboard/pkg/epinio/edit/applications.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default Vue.extend<Data, EpinioCompRecord, EpinioCompRecord, EpinioCompRe
175175
},
176176
177177
updateSource(changes: EpinioAppSource) {
178-
this.source = {};
178+
this.source = {} as EpinioAppSource;
179179
const { appChart, ...cleanChanges } = changes;
180180
181181
this.value.configuration = this.value.configuration || {};

dashboard/pkg/epinio/edit/configurations.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default Vue.extend<Data, EpinioCompRecord, EpinioCompRecord, EpinioCompRe
7070
...mapGetters({ t: 'i18n/t' }),
7171
7272
namespaces() {
73-
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.NAMESPACE), 'name');
73+
return sortBy(this.$store.getters['epinio/all'](EPINIO_TYPES.NAMESPACE), 'name', false);
7474
},
7575
7676
namespaceNames() {

dashboard/pkg/epinio/tsconfig.json

+10-11
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@
1313
"sourceMap": true,
1414
"baseUrl": ".",
1515
"preserveSymlinks": true,
16+
"typeRoots": [
17+
"../../node_modules",
18+
"../../node_modules/@rancher/shell/types"
19+
],
1620
"types": [
1721
"node",
1822
"webpack-env",
1923
"@types/node",
2024
"@types/jest",
25+
"@types/lodash",
2126
"@nuxt/types",
27+
"rancher",
28+
"shell"
2229
],
2330
"lib": [
2431
"esnext",
@@ -31,25 +38,17 @@
3138
"../../node_modules/@rancher/shell/*"
3239
],
3340
"@components/*": [
34-
"../../node_modules/@rancher/components/*"
35-
],
36-
"@pkg/*": [
37-
"./*"
41+
"@rancher/components/*"
3842
]
3943
}
4044
},
4145
"include": [
4246
"**/*.ts",
4347
"**/*.d.ts",
4448
"**/*.tsx",
45-
"**/*.vue",
46-
"@rancher/shell/types/*.d.ts",
47-
"@rancher/shell/core/*.ts",
48-
"@rancher/shell/config/**/*.js",
49-
"**/*.yaml",
50-
"../../vue-shim.d.ts",
49+
"**/*.vue"
5150
],
5251
"exclude": [
5352
"../../node_modules"
5453
]
55-
}
54+
}

0 commit comments

Comments
 (0)