Skip to content

Commit 9003d32

Browse files
Merge branch 'rancher-sandbox:main' into volumes-page
2 parents d8abf39 + 6a3ce44 commit 9003d32

24 files changed

Lines changed: 534 additions & 563 deletions

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ indent_style = tab
1818

1919
[*.{sh,bash,bats}]
2020
indent_size = 4
21+
simplify = true

bats/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ lint:
1919
find tests -name '*.bash' | xargs shellcheck -s bash -e $(SC_EXCLUDES)
2020
find tests -name '*.bats' | xargs shellcheck -s bash -e $(SC_EXCLUDES)
2121
find scripts -name '*.sh' | xargs shellcheck -s bash -e $(SC_EXCLUDES)
22-
find tests -name '*.bash' | xargs shfmt -s -d
23-
find tests -name '*.bats' | xargs shfmt -s -d
24-
find scripts -name '*.sh' | xargs shfmt -s -d
22+
find tests -name '*.bash' | xargs shfmt --diff
23+
find tests -name '*.bats' | xargs shfmt --diff
24+
find scripts -name '*.sh' | xargs shfmt --diff
2525

2626
DEPS = bin/darwin/jq bin/linux/jq
2727

e2e/backend.e2e.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import semver from 'semver';
99
import { NavPage } from './pages/nav-page';
1010
import { getAlternateSetting, startSlowerDesktop, teardown } from './utils/TestUtils';
1111

12-
import { Settings, ContainerEngine, VMType } from '@pkg/config/settings';
12+
import { Settings, ContainerEngine, VMType, MountType } from '@pkg/config/settings';
1313
import fetch from '@pkg/utils/fetch';
1414
import paths from '@pkg/utils/paths';
1515
import { RecursivePartial, RecursiveKeys } from '@pkg/utils/typeUtils';
@@ -21,7 +21,13 @@ test.describe.serial('KubernetesBackend', () => {
2121
let page: Page;
2222

2323
test.beforeAll(async({ colorScheme }, testInfo) => {
24-
[electronApp, page] = await startSlowerDesktop(testInfo);
24+
[electronApp, page] = await startSlowerDesktop(testInfo, {
25+
virtualMachine: {
26+
mount: {
27+
type: MountType.REVERSE_SSHFS,
28+
}
29+
}
30+
});
2531
});
2632

2733
test.afterAll(({ colorScheme }, testInfo) => teardown(electronApp, testInfo));

e2e/preferences.e2e.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ test.describe.serial('Main App Test', () => {
131131
}
132132
}
133133

134-
await expect(virtualMachine.reverseSshFs).toBeChecked();
134+
if (os.platform() === 'darwin' && parseInt(os.release()) >= 23) {
135+
await expect(virtualMachine.virtiofs).toBeChecked();
136+
} else {
137+
await expect(virtualMachine.reverseSshFs).toBeChecked();
138+
}
135139

136140
await virtualMachine.ninep.click();
137141
await expect(virtualMachine.cacheMode).toBeVisible();

package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"semver": "7.7.2",
8282
"tar-stream": "3.1.7",
8383
"vue": "2.7.16",
84-
"vue-class-component": "7.2.6",
8584
"vue-client-only": "2.1.0",
8685
"vue-meta": "2.4.0",
8786
"vue-no-ssr": "1.1.1",
@@ -98,7 +97,7 @@
9897
"yaml": "2.8.0"
9998
},
10099
"devDependencies": {
101-
"@babel/eslint-parser": "7.27.5",
100+
"@babel/eslint-parser": "7.28.0",
102101
"@babel/plugin-proposal-class-properties": "7.18.6",
103102
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
104103
"@babel/plugin-proposal-optional-chaining": "7.21.0",
@@ -113,25 +112,25 @@
113112
"@types/dompurify": "3.2.0",
114113
"@types/ejs": "3.1.5",
115114
"@types/jest": "29.5.14",
116-
"@types/lodash": "4.17.19",
115+
"@types/lodash": "4.17.20",
117116
"@types/mustache": "4.2.6",
118117
"@types/node": "22.15.33",
119118
"@types/node-fetch": "2.6.9",
120-
"@types/node-forge": "1.3.11",
119+
"@types/node-forge": "1.3.12",
121120
"@types/plist": "3.0.5",
122121
"@types/ps-tree": "1.1.6",
123122
"@types/semver": "7.7.0",
124123
"@types/tar-stream": "3.1.4",
125124
"@types/which": "3.0.4",
126-
"@typescript-eslint/eslint-plugin": "8.35.0",
125+
"@typescript-eslint/eslint-plugin": "8.35.1",
127126
"@typescript-eslint/parser": "8.35.1",
128127
"@vue/cli-plugin-babel": "5.0.8",
129128
"@vue/cli-plugin-router": "5.0.8",
130129
"@vue/cli-plugin-unit-jest": "5.0.8",
131130
"@vue/cli-plugin-vuex": "5.0.8",
132131
"@vue/cli-service": "5.0.8",
133132
"@vue/eslint-config-standard-with-typescript": "9.2.0",
134-
"@vue/eslint-config-typescript": "14.5.1",
133+
"@vue/eslint-config-typescript": "14.6.0",
135134
"@vue/test-utils": "1.3.6",
136135
"@vue/vue2-jest": "29.2.6",
137136
"babel-core": "7.0.0-bridge.0",
@@ -141,19 +140,19 @@
141140
"cross-env": "7.0.3",
142141
"css-loader": "7.1.2",
143142
"ejs": "3.1.10",
144-
"electron": "37.1.0",
143+
"electron": "37.2.0",
145144
"electron-builder": "26.0.12",
146-
"eslint": "9.30.0",
145+
"eslint": "9.30.1",
147146
"eslint-import-resolver-typescript": "4.4.4",
148147
"eslint-plugin-node": "11.1.0",
149148
"eslint-plugin-promise": "7.2.1",
150149
"eslint-plugin-unicorn": "59.0.1",
151-
"eslint-plugin-vue": "10.2.0",
150+
"eslint-plugin-vue": "10.3.0",
152151
"extract-zip": "2.0.1",
153152
"glob": "^11.0.3",
154-
"globals": "16.2.0",
153+
"globals": "16.3.0",
155154
"jest": "29.7.0",
156-
"jest-environment-jsdom": "30.0.2",
155+
"jest-environment-jsdom": "30.0.4",
157156
"js-yaml-loader": "1.2.2",
158157
"mustache": "4.2.0",
159158
"nan": "2.22.2",
@@ -172,7 +171,7 @@
172171
"tsconfig-paths": "4.2.0",
173172
"tsx": "4.20.3",
174173
"typescript": "5.8.3",
175-
"vue-eslint-parser": "10.1.4",
174+
"vue-eslint-parser": "10.2.0",
176175
"vue-template-compiler": "2.7.16",
177176
"webpack": "5.99.9"
178177
},

pkg/rancher-desktop/assets/dependencies.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ alpineLimaISO:
77
WSLDistro: "0.84"
88
kuberlr: 0.6.0
99
helm: 3.18.3
10-
dockerCLI: 28.3.0
10+
dockerCLI: 28.3.1
1111
dockerBuildx: 0.25.0
1212
dockerCompose: 2.38.1
1313
golangci-lint: 2.2.1
14-
trivy: 0.63.0
14+
trivy: 0.64.1
1515
steve: 0.1.0-beta9
1616
rancherDashboard: 2.11.1.rd1
1717
dockerProvidedCredentialHelpers: 0.9.3
18-
ECRCredentialHelper: 0.10.0
18+
ECRCredentialHelper: 0.10.1
1919
mobyOpenAPISpec: "1.51"
2020
wix: v3.14.1
2121
hostSwitch: 1.2.7
2222
moproxy: 0.5.1
2323
spinShim: 0.19.0
2424
spinOperator: 0.5.0
25-
certManager: 1.18.1
25+
certManager: 1.18.2
2626
spinCLI: 3.3.1
2727
spinKubePlugin: 0.4.0
2828
check-spelling: 0.0.25

pkg/rancher-desktop/assets/extension-data.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Data generated by running `yarn generate:extension-data`. DO NOT EDIT.
22
- slug: rancher/application-collection-extension
3-
version: 0.4.0
3+
version: 0.4.1
44
containerd_compatible: true
55
labels:
66
com.docker.desktop.extension.api.version: 0.3.4
@@ -10,7 +10,7 @@
1010
application","url":"https://apps.rancher.io"}, {"title":"Documentation","url":"https://docs.apps.rancher.io"}, {"title":"Support","url":"https://github.com/rancherlabs/application-collection-extension/discussions"} ]'
1111
com.docker.extension.categories: kubernetes,utility-tools
1212
com.docker.extension.changelog: See full <a
13-
href="https://github.com/rancherlabs/application-collection-extension/releases/tag/0.4.0">change
13+
href="https://github.com/rancherlabs/application-collection-extension/releases/tag/0.4.1">change
1414
log</a>.
1515
com.docker.extension.detailed-description: " Build and run cloud-native
1616
applications with SUSE's trusted, curated, and continuously updated
@@ -67,14 +67,14 @@
6767
org.opencontainers.image.authors: ""
6868
org.opencontainers.image.base.digest: sha256:a05744ce2c3f4696496bed0ea75f9e909b09a727f3d3407cd155bc24e1d01689
6969
org.opencontainers.image.base.name: registry.suse.com/bci/bci-micro:15.6.45.1
70-
org.opencontainers.image.created: 2025-06-23T16:38:28.062487883Z
70+
org.opencontainers.image.created: 2025-06-30T13:41:21.366137620Z
7171
org.opencontainers.image.description: Integrate the Application Collection into your development lifecycle
72-
org.opencontainers.image.ref.name: 22.16.0-10.60
72+
org.opencontainers.image.ref.name: 22.17.0-10.62
7373
org.opencontainers.image.source: ""
7474
org.opencontainers.image.title: SUSE Application Collection
7575
org.opencontainers.image.url: https://apps.rancher.io/applications/nodejs
7676
org.opencontainers.image.vendor: SUSE LLC
77-
org.opencontainers.image.version: 22.16.0
77+
org.opencontainers.image.version: 22.17.0
7878
org.opensuse.reference: registry.suse.com/bci/bci-micro:15.6.45.1
7979
title: SUSE Application Collection
8080
logo: https://raw.githubusercontent.com/rancherlabs/application-collection-extension/refs/heads/main/assets/rancher-logo-cow-blue.svg

pkg/rancher-desktop/components/BackendProgress.vue

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class="details"
1212
:title="progressDetails"
1313
>{{ progressDetails }}</label>
14-
<Progress
14+
<CustomProgress
1515
class="progress-bar"
1616
:indeterminate="progressIndeterminate"
1717
:value="progress.current"
@@ -26,75 +26,41 @@
2626

2727
<script lang="ts">
2828
import Vue from 'vue';
29-
import Component from 'vue-class-component';
3029
31-
import Progress from '@pkg/components/Progress.vue';
30+
import CustomProgress from '@pkg/components/Progress.vue';
3231
import { ipcRenderer } from '@pkg/utils/ipcRenderer';
3332
34-
@Component({ components: { Progress } })
35-
class BackendProgress extends Vue {
36-
/** Current Kubernetes backend action progress. */
37-
progress: {
38-
/** The current progress, from 0 to max. */
39-
readonly current: number;
40-
/** Maximum possible progress; if less than zero, the progress is indeterminate. */
41-
readonly max: number;
42-
/** Description of current action. */
43-
readonly description?: string;
44-
/** Time since the description became valid. */
45-
readonly transitionTime?: Date;
46-
} = { current: 1, max: 1 };
47-
48-
progressInterval: ReturnType<typeof setInterval> | undefined;
49-
50-
get progressDetails(): string {
51-
return this.progress.description || '';
52-
}
53-
54-
progressDuration = '';
55-
56-
get progressIndeterminate(): boolean {
57-
return this.progress.max <= 0;
58-
}
59-
60-
get progressBusy(): boolean {
61-
return this.progressIndeterminate || this.progress.current < this.progress.max;
62-
}
63-
64-
/** Return a string describing the elapsed time or progress. */
65-
describeElapsed(since: number): string {
66-
if (this.progress.max > 0) {
67-
// If we have numbers, give a description about that.
68-
const units = ['', 'K', 'M', 'G', 'T'];
69-
let remaining = this.progress.max - this.progress.current;
70-
71-
while (remaining > 512 && units.length > 0) {
72-
remaining /= 1024;
73-
units.shift();
74-
}
75-
if (remaining > 0) {
76-
remaining = Math.round(remaining);
77-
} else {
78-
remaining = Math.round(remaining * 10) / 10;
79-
}
80-
81-
return `${ remaining }${ units[0] } left`;
82-
}
83-
if (!since) {
84-
return '';
85-
}
86-
let remaining = Math.floor((Date.now() - since) / 1000);
87-
const parts: [number, string][] = [];
88-
89-
parts.unshift([remaining % 60, 's']);
90-
remaining = Math.floor(remaining / 60);
91-
parts.unshift([remaining % 60, 'm']);
92-
remaining = Math.floor(remaining / 60);
93-
parts.unshift([remaining % 24, 'h']);
94-
parts.unshift([Math.floor(remaining / 24), 'd']);
95-
96-
return parts.filter(([n, s]) => n > 0).map(([n, s]) => `${ n }${ s }`).join('');
97-
}
33+
export default Vue.extend({
34+
components: { CustomProgress },
35+
data() {
36+
return {
37+
/** Current Kubernetes backend action progress. */
38+
progress: { current: 1, max: 1 } as {
39+
/** The current progress, from 0 to max. */
40+
readonly current: number;
41+
/** Maximum possible progress; if less than zero, the progress is indeterminate. */
42+
readonly max: number;
43+
/** Description of current action. */
44+
readonly description?: string;
45+
/** Time since the description became valid. */
46+
readonly transitionTime?: Date;
47+
},
48+
progressInterval: undefined as ReturnType<typeof setInterval> | undefined,
49+
progressDuration: '',
50+
};
51+
},
52+
53+
computed: {
54+
progressDetails(): string {
55+
return this.progress.description || '';
56+
},
57+
progressIndeterminate(): boolean {
58+
return this.progress.max <= 0;
59+
},
60+
progressBusy(): boolean {
61+
return this.progressIndeterminate || this.progress.current < this.progress.max;
62+
},
63+
},
9864
9965
mounted() {
10066
ipcRenderer.on('k8s-progress', (event, progress) => {
@@ -117,9 +83,45 @@ class BackendProgress extends Vue {
11783
ipcRenderer.invoke('k8s-progress').then((progress) => {
11884
this.progress = progress;
11985
});
120-
}
121-
}
122-
export default BackendProgress;
86+
},
87+
88+
methods: {
89+
/** Return a string describing the elapsed time or progress. */
90+
describeElapsed(since: number): string {
91+
if (this.progress.max > 0) {
92+
// If we have numbers, give a description about that.
93+
const units = ['', 'K', 'M', 'G', 'T'];
94+
const scales = [2**0, 2**10, 2**20, 2**30, 2**40];
95+
const remaining = this.progress.max - this.progress.current;
96+
97+
const unitIndex = scales.findLastIndex((scale) => remaining * 2 >= scale);
98+
const fraction = remaining / scales[unitIndex];
99+
// If the fraction is 0.5...0.9999 display it as single significant figure.
100+
const display = fraction > 1 ? Math.round(fraction) : Math.round(fraction * 10) / 10;
101+
return `${ display }${ units[unitIndex] } left`;
102+
}
103+
if (!since) {
104+
return '';
105+
}
106+
// We have a starting time; describe how much time has elapsed since.
107+
// Start from the smallest unit, and modify `remaining` to be the next
108+
// unit up at every iteration.
109+
let remaining = Math.floor((Date.now() - since) / 1000); // Elapsed time, in seconds.
110+
const scales: [number, string][] = [[60, 's'], [60, 'm'], [24, 'h'], [Number.POSITIVE_INFINITY, 'd']];
111+
let label = '';
112+
113+
for (const [scale, unit] of scales) {
114+
if (remaining % scale > 0) {
115+
// Add the part, but only if it's non-zero.
116+
label = `${ remaining % scale }${ unit }${ label }`;
117+
}
118+
remaining = Math.floor(remaining / scale);
119+
}
120+
121+
return label;
122+
},
123+
},
124+
});
123125
</script>
124126

125127
<style lang="scss" scoped>

pkg/rancher-desktop/components/Nav.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ ul {
205205
gap: 0.25rem;
206206
color: var(--body-text);
207207
text-decoration: none;
208-
line-height: 24px;
209-
padding: 7.5px 10px;
210-
letter-spacing: 1.4px;
208+
font-size: 1.125rem;
209+
line-height: 1.75rem;
210+
padding: 0.5rem 0.75rem;
211211
outline: none;
212212
}
213213

pkg/rancher-desktop/components/NavItem.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export default Vue.extend({ props: { id: { type: String, default: '' } } });
2727
.nav-item {
2828
color: var(--body-text);
2929
text-decoration: none;
30-
line-height: 24px;
31-
padding: 7.5px 10px;
32-
letter-spacing: 1.4px;
30+
font-size: 1.125rem;
31+
line-height: 1.75rem;
32+
padding: 0.5rem 0.75rem;
3333
display: flex;
3434
gap: 0.5rem;
3535
align-items: center;

0 commit comments

Comments
 (0)