@rancher/shell 0.3.16 → 0.3.18
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/assets/images/wechat-qr-code.jpg +0 -0
- package/assets/translations/en-us.yaml +75 -16
- package/assets/translations/zh-hans.yaml +151 -15
- package/chart/__tests__/S3.test.ts +50 -0
- package/chart/rancher-backup/S3.vue +21 -0
- package/chart/rancher-backup/index.vue +4 -0
- package/components/AsyncButton.vue +1 -1
- package/components/CommunityLinks.vue +1 -0
- package/components/FileDiff.vue +92 -85
- package/components/Inactivity.vue +10 -0
- package/components/LazyImage.vue +2 -2
- package/components/PromptRestore.vue +7 -5
- package/components/ResourceDetail/Masthead.vue +1 -1
- package/components/ResourceDetail/index.vue +8 -14
- package/components/ResourceList/index.vue +1 -1
- package/components/ResourceTable.vue +50 -2
- package/components/YamlEditor.vue +1 -0
- package/components/__tests__/PromptRestore.test.ts +72 -0
- package/components/auth/AzureWarning.vue +1 -1
- package/components/auth/RoleDetailEdit.vue +1 -0
- package/components/fleet/FleetResources.vue +3 -64
- package/components/form/FileImageSelector.vue +9 -0
- package/components/form/FileSelector.vue +2 -1
- package/components/form/MatchExpressions.vue +1 -3
- package/components/form/NameNsDescription.vue +28 -12
- package/components/form/NodeAffinity.vue +2 -2
- package/components/form/PodAffinity.vue +2 -2
- package/components/form/ResourceTabs/index.vue +8 -2
- package/components/form/Select.vue +16 -0
- package/components/form/__tests__/FileImageSelector.test.ts +42 -0
- package/components/form/__tests__/FileSelector.test.ts +76 -0
- package/components/form/__tests__/NodeAffinity.test.ts +38 -0
- package/components/form/__tests__/PodAffinity.test.ts +46 -0
- package/components/formatter/ClusterLink.vue +8 -4
- package/components/formatter/ClusterProvider.vue +3 -1
- package/components/formatter/ImageName.vue +23 -0
- package/components/formatter/PodImages.vue +7 -1
- package/components/formatter/__tests__/ClusterLink.test.ts +101 -0
- package/components/formatter/__tests__/ClusterProvider.test.ts +24 -0
- package/components/nav/Header.vue +2 -2
- package/components/nav/WindowManager/ContainerShell.vue +60 -36
- package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +561 -0
- package/config/__test__/home-links.test.ts +62 -0
- package/config/home-links.js +15 -3
- package/config/labels-annotations.js +7 -2
- package/config/persistentVolume.ts +108 -0
- package/config/product/manager.js +5 -1
- package/config/router.js +0 -4
- package/config/settings.ts +4 -0
- package/config/table-headers.js +6 -5
- package/config/types.js +2 -0
- package/config/uiplugins.js +50 -5
- package/core/plugin-helpers.js +39 -15
- package/core/plugin.ts +9 -0
- package/core/plugins.js +1 -1
- package/core/types-provisioning.ts +253 -0
- package/core/types.ts +21 -3
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +50 -1
- package/detail/fleet.cattle.io.gitrepo.vue +10 -2
- package/detail/node.vue +6 -6
- package/detail/pod.vue +38 -9
- package/detail/provisioning.cattle.io.cluster.vue +46 -7
- package/detail/workload/index.vue +49 -18
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +62 -0
- package/edit/__tests__/ui.cattle.io.navlink.test.ts +110 -0
- package/edit/auth/github.vue +1 -0
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +130 -0
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +79 -0
- package/edit/fleet.cattle.io.clustergroup.vue +14 -3
- package/edit/fleet.cattle.io.gitrepo.vue +18 -1
- package/edit/namespace.vue +9 -1
- package/edit/networking.k8s.io.ingress/RulePath.vue +0 -2
- package/edit/persistentvolume/__tests__/persistentvolume.test.ts +82 -0
- package/edit/persistentvolume/index.vue +2 -1
- package/edit/persistentvolume/plugins/csi.vue +3 -1
- package/edit/persistentvolume/plugins/longhorn.vue +12 -12
- package/edit/provisioning.cattle.io.cluster/AgentConfiguration.vue +1 -30
- package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +15 -11
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +79 -1
- package/edit/provisioning.cattle.io.cluster/index.vue +53 -1
- package/edit/provisioning.cattle.io.cluster/rke2.vue +335 -151
- package/edit/storage.k8s.io.storageclass/index.vue +1 -2
- package/edit/ui.cattle.io.navlink.vue +213 -186
- package/initialize/App.js +3 -13
- package/initialize/layouts.ts +26 -0
- package/layouts/default.vue +1 -1
- package/list/group.principal.vue +1 -1
- package/list/provisioning.cattle.io.cluster.vue +8 -1
- package/middleware/authenticated.js +101 -5
- package/mixins/brand.js +39 -3
- package/mixins/child-hook.js +2 -2
- package/mixins/create-edit-view/impl.js +4 -4
- package/models/chart.js +1 -1
- package/models/fleet.cattle.io.cluster.js +33 -4
- package/models/fleet.cattle.io.gitrepo.js +113 -38
- package/models/management.cattle.io.kontainerdriver.js +14 -0
- package/models/persistentvolume.js +2 -111
- package/models/pod.js +30 -0
- package/models/provisioning.cattle.io.cluster.js +9 -1
- package/models/rke.cattle.io.etcdsnapshot.js +10 -7
- package/package.json +2 -2
- package/pages/about.vue +8 -2
- package/pages/auth/login.vue +1 -1
- package/pages/auth/logout.vue +11 -3
- package/pages/c/_cluster/apps/charts/index.vue +5 -2
- package/pages/c/_cluster/apps/charts/install.vue +5 -0
- package/pages/c/_cluster/auth/group.principal/assign-edit.vue +1 -1
- package/pages/c/_cluster/auth/roles/index.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +2 -11
- package/pages/c/_cluster/manager/cloudCredential/_id.vue +0 -1
- package/pages/c/_cluster/manager/cloudCredential/create.vue +0 -1
- package/pages/c/_cluster/settings/brand.vue +11 -8
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +177 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +19 -3
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +90 -21
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +107 -37
- package/pages/c/_cluster/uiplugins/index.vue +160 -44
- package/pages/docs/_doc.vue +9 -3
- package/pages/home.vue +6 -6
- package/pages/support/index.vue +10 -4
- package/pkg/auto-import.js +1 -1
- package/plugins/clean-tooltip-directive.js +1 -1
- package/plugins/dashboard-store/__tests__/actions.spec.ts +165 -0
- package/plugins/dashboard-store/__tests__/getters.spec.ts +100 -0
- package/plugins/dashboard-store/__tests__/{mutations.spec.js → mutations.spec.ts} +2 -2
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +39 -2
- package/plugins/plugin.js +9 -1
- package/plugins/steve/__tests__/getters.spec.ts +93 -0
- package/plugins/steve/getters.js +21 -1
- package/plugins/steve/subscribe.js +1 -3
- package/rancher-components/BadgeState/BadgeState.vue +5 -1
- package/rancher-components/Banner/Banner.test.ts +51 -1
- package/rancher-components/Banner/Banner.vue +134 -53
- package/rancher-components/Card/Card.test.ts +37 -0
- package/rancher-components/Card/Card.vue +24 -7
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +20 -29
- package/rancher-components/Form/Checkbox/Checkbox.vue +45 -20
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +2 -8
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +22 -10
- package/rancher-components/Form/Radio/RadioButton.test.ts +31 -0
- package/rancher-components/Form/Radio/RadioButton.vue +30 -13
- package/rancher-components/Form/Radio/RadioGroup.vue +26 -7
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -6
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +25 -38
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +23 -11
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +19 -5
- package/rancher-components/StringList/StringList.test.ts +453 -49
- package/rancher-components/StringList/StringList.vue +44 -26
- package/scripts/extension/publish +2 -2
- package/scripts/typegen.sh +11 -2
- package/server/server-middleware.js +4 -12
- package/store/index.js +14 -3
- package/store/prefs.js +0 -3
- package/store/store-types.js +2 -0
- package/store/type-map.js +17 -29
- package/types/api.d.ts +1 -0
- package/types/fleet.d.ts +1 -0
- package/types/shell/index.d.ts +931 -85
- package/types/userPreferences.d.ts +1 -1
- package/utils/__mocks__/socket.js +21 -0
- package/utils/grafana.js +23 -11
- package/utils/kube.js +9 -0
- package/utils/object.js +27 -0
- package/utils/selector.js +2 -1
- package/utils/settings.ts +2 -2
- package/utils/validators/formRules/index.ts +3 -3
- package/vue.config.js +3 -2
- package/components/.DS_Store +0 -0
- package/components/__tests__/.DS_Store +0 -0
- package/creators/pkg/package-lock.json +0 -37
- package/pages/safeMode.vue +0 -17
- package/plugins/steve/urloptions.js +0 -47
- package/yarn-error.log +0 -196
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const addEventListener = jest.fn();
|
|
2
|
+
export const connect = jest.fn();
|
|
3
|
+
export const disconnect = jest.fn();
|
|
4
|
+
export const send = jest.fn();
|
|
5
|
+
|
|
6
|
+
export const EVENT_CONNECTED = 'connected';
|
|
7
|
+
export const EVENT_CONNECTING = 'connecting';
|
|
8
|
+
export const EVENT_DISCONNECTED = 'disconnected';
|
|
9
|
+
export const EVENT_MESSAGE = 'message';
|
|
10
|
+
export const EVENT_CONNECT_ERROR = 'connect_error';
|
|
11
|
+
|
|
12
|
+
const mock = jest.fn().mockImplementation(() => {
|
|
13
|
+
return {
|
|
14
|
+
addEventListener,
|
|
15
|
+
connect,
|
|
16
|
+
disconnect,
|
|
17
|
+
send
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export default mock;
|
package/utils/grafana.js
CHANGED
|
@@ -32,14 +32,19 @@ export function computeDashboardUrl(monitoringVersion, embedUrl, clusterId, para
|
|
|
32
32
|
return newUrl;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export async function dashboardExists(monitoringVersion, store, clusterId, embedUrl, storeName = 'cluster') {
|
|
35
|
+
export async function dashboardExists(monitoringVersion, store, clusterId, embedUrl, storeName = 'cluster', projectId = null) {
|
|
36
36
|
if ( !haveV2Monitoring(store.getters) ) {
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const url = parseUrl(embedUrl);
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
let prefix = `${ getClusterPrefix(monitoringVersion, clusterId) }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/`;
|
|
42
|
+
let delimiter = 'http:rancher-monitoring-grafana:80/proxy/';
|
|
43
|
+
|
|
44
|
+
if (projectId) {
|
|
45
|
+
prefix = `${ getClusterPrefix(monitoringVersion, clusterId) }/api/v1/namespaces/cattle-project-${ projectId }-monitoring/services/http:cattle-project-${ projectId }-monitoring-grafana:80/proxy/`;
|
|
46
|
+
delimiter = `http:cattle-project-${ projectId }-monitoring-grafana:80/proxy/`;
|
|
47
|
+
}
|
|
43
48
|
const path = url.path.split(delimiter)[1];
|
|
44
49
|
const uid = path.split('/')[1];
|
|
45
50
|
const newUrl = `${ prefix }api/dashboards/uid/${ uid }`;
|
|
@@ -53,18 +58,25 @@ export async function dashboardExists(monitoringVersion, store, clusterId, embed
|
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
export async function allDashboardsExist(store, clusterId, embeddedUrls, storeName = 'cluster') {
|
|
61
|
+
export async function allDashboardsExist(store, clusterId, embeddedUrls, storeName = 'cluster', projectId = null) {
|
|
57
62
|
let res;
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
let monitoringVersion = '';
|
|
65
|
+
|
|
66
|
+
if (!projectId) {
|
|
67
|
+
try {
|
|
68
|
+
res = await store.dispatch(`${ storeName }/find`, {
|
|
69
|
+
type: CATALOG.APP,
|
|
70
|
+
id: 'cattle-monitoring-system/rancher-monitoring'
|
|
71
|
+
});
|
|
72
|
+
} catch (err) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
64
75
|
|
|
65
|
-
|
|
76
|
+
monitoringVersion = res?.currentVersion;
|
|
77
|
+
}
|
|
66
78
|
|
|
67
|
-
const existPromises = embeddedUrls.map((url) => dashboardExists(monitoringVersion, store, clusterId, url, storeName));
|
|
79
|
+
const existPromises = embeddedUrls.map((url) => dashboardExists(monitoringVersion, store, clusterId, url, storeName, projectId));
|
|
68
80
|
|
|
69
81
|
return (await Promise.all(existPromises)).every((exists) => exists);
|
|
70
82
|
}
|
package/utils/kube.js
ADDED
package/utils/object.js
CHANGED
|
@@ -218,6 +218,33 @@ export function diff(from, to) {
|
|
|
218
218
|
return out;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Super simple lodash isEqual equivalent.
|
|
223
|
+
*
|
|
224
|
+
* Only checks root properties for strict equality
|
|
225
|
+
*/
|
|
226
|
+
function isEqualBasic(from, to) {
|
|
227
|
+
const fromKeys = Object.keys(from || {});
|
|
228
|
+
const toKeys = Object.keys(to || {});
|
|
229
|
+
|
|
230
|
+
if (fromKeys.length !== toKeys.length) {
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
for (let i = 0; i < fromKeys.length; i++) {
|
|
235
|
+
const fromValue = from[fromKeys[i]];
|
|
236
|
+
const toValue = to[fromKeys[i]];
|
|
237
|
+
|
|
238
|
+
if (fromValue !== toValue) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { isEqualBasic as isEqual };
|
|
247
|
+
|
|
221
248
|
export function changeset(from, to, parentPath = []) {
|
|
222
249
|
let out = {};
|
|
223
250
|
|
package/utils/selector.js
CHANGED
|
@@ -198,7 +198,8 @@ export function matches(obj, selector, labelKey = 'metadata.labels') {
|
|
|
198
198
|
}
|
|
199
199
|
break;
|
|
200
200
|
case 'In':
|
|
201
|
-
|
|
201
|
+
// we need to cater empty strings because when creating a label with value = null it's translated into a empty string value ''
|
|
202
|
+
if ( !rule.values.length || !rule.values.includes(value) ) {
|
|
202
203
|
return false;
|
|
203
204
|
}
|
|
204
205
|
break;
|
package/utils/settings.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MANAGEMENT } from '@shell/config/types';
|
|
2
2
|
import { Store } from 'vuex';
|
|
3
3
|
import { DEFAULT_PERF_SETTING, SETTING } from '@shell/config/settings';
|
|
4
|
-
import { GC_PREFERENCES } from 'utils/gc/gc-types';
|
|
4
|
+
import { GC_PREFERENCES } from '@shell/utils/gc/gc-types';
|
|
5
5
|
|
|
6
6
|
export const fetchOrCreateSetting = async(store: Store<any>, id: string, val: string, save = true): Promise<any> => {
|
|
7
7
|
let setting;
|
|
@@ -56,7 +56,7 @@ export const getPerformanceSetting = (rootGetters: Record<string, (arg0: string,
|
|
|
56
56
|
manualRefresh: {};
|
|
57
57
|
disableWebsocketNotification: boolean;
|
|
58
58
|
garbageCollection: GC_PREFERENCES;
|
|
59
|
-
forceNsFilterV2:
|
|
59
|
+
forceNsFilterV2: any;
|
|
60
60
|
advancedWorker: {};
|
|
61
61
|
} => {
|
|
62
62
|
const perfSettingResource = rootGetters['management/byId'](MANAGEMENT.SETTING, SETTING.UI_PERFORMANCE);
|
|
@@ -7,7 +7,7 @@ import cronstrue from 'cronstrue';
|
|
|
7
7
|
import { Translation } from '@shell/types/t';
|
|
8
8
|
|
|
9
9
|
// import uniq from 'lodash/uniq';
|
|
10
|
-
export type Validator = (val: any, arg?: any) =>
|
|
10
|
+
export type Validator<T = undefined | string> = (val: any, arg?: any) => T;
|
|
11
11
|
|
|
12
12
|
export type ValidatorFactory = (arg1: any, arg2?: any) => Validator
|
|
13
13
|
|
|
@@ -53,7 +53,7 @@ export interface ValidationOptions {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// "t" is the function name we use for getting a translated string
|
|
56
|
-
export default function(t: Translation, { key = 'Value' }: ValidationOptions):
|
|
56
|
+
export default function(t: Translation, { key = 'Value' }: ValidationOptions): { [key:string]: Validator<any> | ValidatorFactory } {
|
|
57
57
|
// utility validators these validators only get used by other validators
|
|
58
58
|
const startDot: ValidatorFactory = (label: string): Validator => (val: string) => val?.slice(0, 1) === '.' ? t(`validation.dns.${ label }.startDot`, { key }) : undefined;
|
|
59
59
|
|
|
@@ -257,7 +257,7 @@ export default function(t: Translation, { key = 'Value' }: ValidationOptions): u
|
|
|
257
257
|
|
|
258
258
|
const clusterName: ValidatorFactory = (isRke2: boolean): Validator => (val: string | undefined) => isRke2 && (val || '')?.match(/^(c-.{5}|local)$/i) ? t('validation.cluster.name') : undefined;
|
|
259
259
|
|
|
260
|
-
const servicePort = (val: ServicePort) => {
|
|
260
|
+
const servicePort: Validator<string | Port | undefined> = (val: ServicePort) => {
|
|
261
261
|
const {
|
|
262
262
|
name,
|
|
263
263
|
idx
|
package/vue.config.js
CHANGED
|
@@ -4,6 +4,7 @@ const serveStatic = require('serve-static');
|
|
|
4
4
|
const webpack = require('webpack');
|
|
5
5
|
const { generateDynamicTypeImport } = require('./pkg/auto-import');
|
|
6
6
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
7
|
+
const serverMiddlewares = require('./server/server-middleware.js');
|
|
7
8
|
|
|
8
9
|
// Suppress info level logging messages from http-proxy-middleware
|
|
9
10
|
// This hides all of the "[HPM Proxy created] ..." messages
|
|
@@ -218,8 +219,6 @@ module.exports = function(dir, _appConfig) {
|
|
|
218
219
|
serverMiddleware.push({ path: `/pkg/`, handler: serveStatic(`${ dir }/dist-pkg/`) });
|
|
219
220
|
// Endpoint to download and unpack a tgz from the local verdaccio rgistry (dev)
|
|
220
221
|
serverMiddleware.push(path.resolve(dir, SHELL, 'server', 'verdaccio-middleware'));
|
|
221
|
-
// Add the standard dashboard server middleware after the middleware added to serve up UI packages
|
|
222
|
-
serverMiddleware.push(path.resolve(dir, SHELL, 'server', 'server-middleware'));
|
|
223
222
|
|
|
224
223
|
// ===============================================================================================
|
|
225
224
|
// Dashboard nuxt configuration
|
|
@@ -319,6 +318,8 @@ module.exports = function(dir, _appConfig) {
|
|
|
319
318
|
process.exit(1);
|
|
320
319
|
});
|
|
321
320
|
|
|
321
|
+
app.use(serverMiddlewares);
|
|
322
|
+
|
|
322
323
|
Object.keys(proxy).forEach((p) => {
|
|
323
324
|
const px = createProxyMiddleware({
|
|
324
325
|
...proxy[p],
|
package/components/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rancher/create-pkg",
|
|
3
|
-
"version": "0.1.37",
|
|
4
|
-
"lockfileVersion": 1,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"fs-extra": {
|
|
8
|
-
"version": "10.1.0",
|
|
9
|
-
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
10
|
-
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
|
11
|
-
"requires": {
|
|
12
|
-
"graceful-fs": "^4.2.0",
|
|
13
|
-
"jsonfile": "^6.0.1",
|
|
14
|
-
"universalify": "^2.0.0"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"graceful-fs": {
|
|
18
|
-
"version": "4.2.10",
|
|
19
|
-
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
|
|
20
|
-
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
|
|
21
|
-
},
|
|
22
|
-
"jsonfile": {
|
|
23
|
-
"version": "6.1.0",
|
|
24
|
-
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
25
|
-
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
26
|
-
"requires": {
|
|
27
|
-
"graceful-fs": "^4.1.6",
|
|
28
|
-
"universalify": "^2.0.0"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"universalify": {
|
|
32
|
-
"version": "2.0.0",
|
|
33
|
-
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
|
34
|
-
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
package/pages/safeMode.vue
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
middleware({ redirect, store } ) {
|
|
4
|
-
const dashboardHome = { name: 'home' };
|
|
5
|
-
const t = store.getters['i18n/t'];
|
|
6
|
-
|
|
7
|
-
setTimeout(() => {
|
|
8
|
-
store.dispatch('growl/success', {
|
|
9
|
-
title: t('plugins.safeMode.title'),
|
|
10
|
-
message: t('plugins.safeMode.message')
|
|
11
|
-
}, { root: true });
|
|
12
|
-
}, 1000);
|
|
13
|
-
|
|
14
|
-
return redirect(dashboardHome);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { isArray } from '@shell/utils/array';
|
|
2
|
-
|
|
3
|
-
export default function urlOptions(url, opt) {
|
|
4
|
-
opt = opt || {};
|
|
5
|
-
|
|
6
|
-
// Filter
|
|
7
|
-
if ( opt.filter ) {
|
|
8
|
-
const keys = Object.keys(opt.filter);
|
|
9
|
-
|
|
10
|
-
keys.forEach((key) => {
|
|
11
|
-
let vals = opt.filter[key];
|
|
12
|
-
|
|
13
|
-
if ( !isArray(vals) ) {
|
|
14
|
-
vals = [vals];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
vals.forEach((val) => {
|
|
18
|
-
url += `${ (url.includes('?') ? '&' : '?') + encodeURIComponent(key) }=${ encodeURIComponent(val) }`;
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
// End: Filter
|
|
23
|
-
|
|
24
|
-
// Limit
|
|
25
|
-
const limit = opt.limit;
|
|
26
|
-
|
|
27
|
-
if ( limit ) {
|
|
28
|
-
url += `${ url.includes('?') ? '&' : '?' }limit=${ limit }`;
|
|
29
|
-
}
|
|
30
|
-
// End: Limit
|
|
31
|
-
|
|
32
|
-
// Sort
|
|
33
|
-
const sortBy = opt.sortBy;
|
|
34
|
-
|
|
35
|
-
if ( sortBy ) {
|
|
36
|
-
url += `${ url.includes('?') ? '&' : '?' }sort=${ encodeURIComponent(sortBy) }`;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const orderBy = opt.sortOrder;
|
|
40
|
-
|
|
41
|
-
if ( orderBy ) {
|
|
42
|
-
url += `${ url.includes('?') ? '&' : '?' }order=${ encodeURIComponent(orderBy) }`;
|
|
43
|
-
}
|
|
44
|
-
// End: Sort
|
|
45
|
-
|
|
46
|
-
return url;
|
|
47
|
-
}
|
package/yarn-error.log
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
Arguments:
|
|
2
|
-
/Users/aalves/.nvm/versions/node/v16.16.0/bin/node /Users/aalves/.nvm/versions/node/v16.16.0/bin/yarn publish . --new-version 0.3.3 --no-git-tag-version --access public
|
|
3
|
-
|
|
4
|
-
PATH:
|
|
5
|
-
/Users/aalves/.nvm/versions/node/v16.16.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
|
6
|
-
|
|
7
|
-
Yarn version:
|
|
8
|
-
1.22.19
|
|
9
|
-
|
|
10
|
-
Node version:
|
|
11
|
-
16.16.0
|
|
12
|
-
|
|
13
|
-
Platform:
|
|
14
|
-
darwin arm64
|
|
15
|
-
|
|
16
|
-
Trace:
|
|
17
|
-
Error: https://registry.yarnpkg.com/-/user/org.couchdb.user:aalves08: failed to authenticate: Could not authenticate aalves08: bad password
|
|
18
|
-
at Request.params.callback [as _callback] (/Users/aalves/.nvm/versions/node/v16.16.0/lib/node_modules/yarn/lib/cli.js:66145:18)
|
|
19
|
-
at Request.self.callback (/Users/aalves/.nvm/versions/node/v16.16.0/lib/node_modules/yarn/lib/cli.js:140890:22)
|
|
20
|
-
at Request.emit (node:events:527:28)
|
|
21
|
-
at Request.<anonymous> (/Users/aalves/.nvm/versions/node/v16.16.0/lib/node_modules/yarn/lib/cli.js:141862:10)
|
|
22
|
-
at Request.emit (node:events:527:28)
|
|
23
|
-
at IncomingMessage.<anonymous> (/Users/aalves/.nvm/versions/node/v16.16.0/lib/node_modules/yarn/lib/cli.js:141784:12)
|
|
24
|
-
at Object.onceWrapper (node:events:641:28)
|
|
25
|
-
at IncomingMessage.emit (node:events:539:35)
|
|
26
|
-
at endReadableNT (node:internal/streams/readable:1345:12)
|
|
27
|
-
at processTicksAndRejections (node:internal/process/task_queues:83:21)
|
|
28
|
-
|
|
29
|
-
npm manifest:
|
|
30
|
-
{
|
|
31
|
-
"name": "@rancher/shell",
|
|
32
|
-
"version": "0.3.3",
|
|
33
|
-
"description": "Rancher Dashboard Shell",
|
|
34
|
-
"repository": "https://github.com/rancherlabs/dashboard",
|
|
35
|
-
"license": "Apache-2.0",
|
|
36
|
-
"author": "SUSE",
|
|
37
|
-
"private": false,
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=12"
|
|
40
|
-
},
|
|
41
|
-
"files": [
|
|
42
|
-
"**/*"
|
|
43
|
-
],
|
|
44
|
-
"scripts": {
|
|
45
|
-
"clean": "./scripts/clean",
|
|
46
|
-
"lint": "./node_modules/.bin/eslint --max-warnings 0 --ext .ts,.js,.vue .",
|
|
47
|
-
"test": "./node_modules/.bin/nyc ava --serial --verbose",
|
|
48
|
-
"nuxt": "./node_modules/.bin/nuxt",
|
|
49
|
-
"dev": "./node_modules/.bin/nuxt dev",
|
|
50
|
-
"mem-dev": "node --max-old-space-size=8192 ./node_modules/.bin/nuxt dev",
|
|
51
|
-
"docker-dev": "docker run --rm --name dashboard-dev -p 8005:8005 -e API=$API -v $(pwd):/src -v dashboard_node:/src/node_modules rancher/dashboard:dev",
|
|
52
|
-
"build": "./node_modules/.bin/nuxt build --devtools",
|
|
53
|
-
"analyze": "./node_modules/.bin/nuxt build --analyze",
|
|
54
|
-
"start": "./node_modules/.bin/nuxt start",
|
|
55
|
-
"generate": "./node_modules/.bin/nuxt generate",
|
|
56
|
-
"dev-debug": "node --inspect ./node_modules/.bin/nuxt",
|
|
57
|
-
"cy:run": "cypress run",
|
|
58
|
-
"cy:open": "cypress open",
|
|
59
|
-
"e2e:pre": "NODE_ENV=dev yarn build",
|
|
60
|
-
"e2e:run": "NODE_ENV=dev START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https://localhost:8005/ cy:run",
|
|
61
|
-
"e2e:dev": "start-server-and-test dev https://localhost:8005 cy:open"
|
|
62
|
-
},
|
|
63
|
-
"dependencies": {
|
|
64
|
-
"@aws-sdk/client-ec2": "3.1.0",
|
|
65
|
-
"@aws-sdk/client-eks": "3.1.0",
|
|
66
|
-
"@aws-sdk/client-kms": "3.8.1",
|
|
67
|
-
"@babel/plugin-proposal-optional-chaining": "7.14.5",
|
|
68
|
-
"@babel/plugin-proposal-private-property-in-object": "7.14.5",
|
|
69
|
-
"@babel/preset-typescript": "7.16.7",
|
|
70
|
-
"@innologica/vue-dropdown-menu": "0.1.3",
|
|
71
|
-
"@novnc/novnc": "1.2.0",
|
|
72
|
-
"@nuxt/types": "2.14.6",
|
|
73
|
-
"@nuxt/typescript-build": "2.1.0",
|
|
74
|
-
"@nuxtjs/axios": "5.12.0",
|
|
75
|
-
"@nuxtjs/eslint-config-typescript": "6.0.1",
|
|
76
|
-
"@nuxtjs/eslint-module": "1.2.0",
|
|
77
|
-
"@nuxtjs/proxy": "1.3.3",
|
|
78
|
-
"@nuxtjs/style-resources": "1.2.1",
|
|
79
|
-
"@nuxtjs/webpack-profile": "0.1.0",
|
|
80
|
-
"@popperjs/core": "2.4.4",
|
|
81
|
-
"@types/node": "16.4.3",
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
83
|
-
"@typescript-eslint/parser": "4.33.0",
|
|
84
|
-
"@vue/cli-plugin-babel": "4.5.15",
|
|
85
|
-
"@vue/cli-plugin-typescript": "4.5.15",
|
|
86
|
-
"@vue/cli-service": "4.5.15",
|
|
87
|
-
"@vue/test-utils": "1.2.1",
|
|
88
|
-
"@vue/vue2-jest": "27.0.0",
|
|
89
|
-
"add": "2.0.6",
|
|
90
|
-
"ansi_up": "5.0.0",
|
|
91
|
-
"babel-eslint": "10.1.0",
|
|
92
|
-
"babel-plugin-module-resolver": "4.0.0",
|
|
93
|
-
"babel-preset-vue": "2.0.2",
|
|
94
|
-
"browser-env": "3.3.0",
|
|
95
|
-
"cookie": "0.5.0",
|
|
96
|
-
"cookie-universal-nuxt": "2.1.4",
|
|
97
|
-
"core-js": "3.21.1",
|
|
98
|
-
"cron-validator": "1.2.0",
|
|
99
|
-
"cronstrue": "1.95.0",
|
|
100
|
-
"cross-env": "6.0.3",
|
|
101
|
-
"css-loader": "4.3.0",
|
|
102
|
-
"csv-loader": "3.0.3",
|
|
103
|
-
"cypress": "10.3.1",
|
|
104
|
-
"d3": "7.3.0",
|
|
105
|
-
"d3-selection": "1.4.1",
|
|
106
|
-
"dagre-d3": "0.6.4",
|
|
107
|
-
"dayjs": "1.8.29",
|
|
108
|
-
"diff2html": "2.11.2",
|
|
109
|
-
"dompurify": "2.0.12",
|
|
110
|
-
"eslint": "7.32.0",
|
|
111
|
-
"eslint-config-standard": "16.0.3",
|
|
112
|
-
"eslint-import-resolver-node": "0.3.4",
|
|
113
|
-
"eslint-module-utils": "2.6.1",
|
|
114
|
-
"eslint-plugin-cypress": "2.12.1",
|
|
115
|
-
"eslint-plugin-import": "2.23.4",
|
|
116
|
-
"eslint-plugin-jest": "24.4.0",
|
|
117
|
-
"eslint-plugin-n": "15.2.0",
|
|
118
|
-
"eslint-plugin-vue": "7.14.0",
|
|
119
|
-
"event-target-shim": "5.0.1",
|
|
120
|
-
"express": "4.17.1",
|
|
121
|
-
"file-saver": "2.0.2",
|
|
122
|
-
"frontmatter-markdown-loader": "3.7.0",
|
|
123
|
-
"identicon.js": "2.3.3",
|
|
124
|
-
"intl-messageformat": "7.8.4",
|
|
125
|
-
"is-url": "1.2.4",
|
|
126
|
-
"jest": "27.5.1",
|
|
127
|
-
"jest-serializer-vue": "2.0.2",
|
|
128
|
-
"jexl": "2.2.2",
|
|
129
|
-
"jquery": "3.5.1",
|
|
130
|
-
"js-cookie": "2.2.1",
|
|
131
|
-
"js-yaml": "4.1.0",
|
|
132
|
-
"js-yaml-loader": "1.2.2",
|
|
133
|
-
"jsdiff": "1.1.1",
|
|
134
|
-
"jsdom-global": "3.0.2",
|
|
135
|
-
"jsonpath-plus": "6.0.1",
|
|
136
|
-
"jsrsasign": "10.2.0",
|
|
137
|
-
"jszip": "3.7.0",
|
|
138
|
-
"lodash": "4.17.21",
|
|
139
|
-
"marked": "4.0.17",
|
|
140
|
-
"nodemon": "2.0.4",
|
|
141
|
-
"nuxt": "2.15.8",
|
|
142
|
-
"nyc": "15.1.0",
|
|
143
|
-
"papaparse": "5.3.0",
|
|
144
|
-
"portal-vue": "2.1.7",
|
|
145
|
-
"rancher-icons": "rancher/icons#v2.0.13",
|
|
146
|
-
"require-extension-hooks": "0.3.3",
|
|
147
|
-
"require-extension-hooks-babel": "1.0.0",
|
|
148
|
-
"require-extension-hooks-vue": "3.0.0",
|
|
149
|
-
"sass": "1.51.0",
|
|
150
|
-
"sass-loader": "10.2.1",
|
|
151
|
-
"serve-static": "1.14.1",
|
|
152
|
-
"set-cookie-parser": "2.4.6",
|
|
153
|
-
"shell-quote": "1.7.3",
|
|
154
|
-
"sinon": "8.1.1",
|
|
155
|
-
"start-server-and-test": "1.13.1",
|
|
156
|
-
"style-loader": "1.2.1",
|
|
157
|
-
"ts-node": "8.10.2",
|
|
158
|
-
"typescript": "4.1.6",
|
|
159
|
-
"url-parse": "1.5.10",
|
|
160
|
-
"v-tooltip": "2.0.3",
|
|
161
|
-
"vue": "2.6.14",
|
|
162
|
-
"vue-clipboard2": "0.3.1",
|
|
163
|
-
"vue-codemirror": "4.0.6",
|
|
164
|
-
"vue-js-modal": "1.3.35",
|
|
165
|
-
"vue-resize": "0.4.5",
|
|
166
|
-
"vue-select": "3.18.3",
|
|
167
|
-
"vue-server-renderer": "2.6.14",
|
|
168
|
-
"vue-shortkey": "3.1.7",
|
|
169
|
-
"vue-template-compiler": "2.6.14",
|
|
170
|
-
"vue-virtual-scroll-list": "^2.3.4",
|
|
171
|
-
"vue2-transitions": "0.3.0",
|
|
172
|
-
"vuedraggable": "2.24.3",
|
|
173
|
-
"vuex": "3.6.2",
|
|
174
|
-
"webpack-bundle-analyzer": "4.5.0",
|
|
175
|
-
"webpack-virtual-modules": "0.4.3",
|
|
176
|
-
"xterm": "5.0.0",
|
|
177
|
-
"xterm-addon-fit": "0.6.0",
|
|
178
|
-
"xterm-addon-search": "0.10.0",
|
|
179
|
-
"xterm-addon-web-links": "0.7.0",
|
|
180
|
-
"xterm-addon-webgl": "0.13.0",
|
|
181
|
-
"worker-loader": "3.0.8",
|
|
182
|
-
"yarn": "1.22.18"
|
|
183
|
-
},
|
|
184
|
-
"nyc": {
|
|
185
|
-
"extension": [
|
|
186
|
-
".js",
|
|
187
|
-
".vue"
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
yarn manifest:
|
|
193
|
-
No manifest
|
|
194
|
-
|
|
195
|
-
Lockfile:
|
|
196
|
-
No lockfile
|