@rancher/shell 3.0.12-rc.5 → 3.0.12-rc.6
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/apis/intf/resources-api/resource-base.ts +42 -2
- package/apis/intf/resources-api/resource-instance.ts +101 -0
- package/apis/intf/resources-api/resources-api.ts +177 -23
- package/apis/intf/resources.ts +8 -6
- package/apis/resources/__tests__/resources-api-class.test.ts +309 -28
- package/apis/resources/resources-api-class.ts +232 -43
- package/assets/images/providers/traefik.png +0 -0
- package/assets/translations/en-us.yaml +10 -4
- package/chart/__tests__/rancher-monitoring-dashboards-index.test.ts +269 -0
- package/chart/rancher-monitoring-dashboards/index.vue +155 -0
- package/cloud-credential/__tests__/generic.test.ts +132 -0
- package/cloud-credential/generic.vue +33 -3
- package/components/EtcdInfoBanner.vue +2 -12
- package/components/GrafanaDashboard.vue +2 -8
- package/components/Resource/Detail/Masthead/__tests__/index.test.ts +68 -14
- package/components/Resource/Detail/Masthead/index.vue +8 -3
- package/components/form/Security.vue +1 -1
- package/components/formatter/Translate.vue +22 -1
- package/components/nav/Group.vue +5 -10
- package/components/nav/TopLevelMenu.vue +1 -30
- package/components/nav/__tests__/Group.test.ts +61 -0
- package/config/labels-annotations.js +1 -0
- package/config/table-headers.js +5 -2
- package/core/__tests__/plugin-products-apply.test.ts +787 -0
- package/core/__tests__/plugin-products-extend.test.ts +189 -0
- package/core/__tests__/plugin-products-helpers.test.ts +81 -78
- package/core/__tests__/plugin-products-new.test.ts +389 -0
- package/core/__tests__/plugin-products-scenarios.test.ts +980 -0
- package/core/__tests__/plugin-products-side-menu.test.ts +1935 -0
- package/core/plugin-products-base.ts +201 -93
- package/core/plugin-products-extending.ts +1 -1
- package/core/plugin-products-external.ts +380 -0
- package/core/plugin-products-helpers.ts +28 -24
- package/core/plugin-products-internal.ts +207 -0
- package/core/plugin-products-top-level.ts +10 -5
- package/core/plugin-products-type-guards.ts +17 -6
- package/core/plugin-products.ts +5 -7
- package/core/plugin-types.ts +1 -389
- package/core/plugin.ts +10 -11
- package/core/types.ts +6 -202
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +52 -0
- package/detail/pod.vue +1 -1
- package/detail/provisioning.cattle.io.cluster.vue +0 -2
- package/edit/auth/AuthProviderWarningBanners.vue +12 -0
- package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +10 -1
- package/edit/auth/__tests__/azuread.test.ts +1 -0
- package/edit/auth/__tests__/github.test.ts +1 -0
- package/edit/auth/__tests__/oidc.test.ts +1 -0
- package/edit/auth/__tests__/saml.test.ts +1 -0
- package/edit/auth/ldap/__tests__/index.test.ts +1 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/rke2.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -2
- package/list/management.cattle.io.user.vue +24 -5
- package/list/utils/management.cattle.io.cluster.utils.ts +1 -1
- package/machine-config/__tests__/generic.test.ts +163 -0
- package/machine-config/components/EC2Networking.vue +31 -7
- package/machine-config/components/__tests__/EC2Networking.test.ts +38 -15
- package/machine-config/generic.vue +32 -5
- package/mixins/resource-fetch.js +1 -1
- package/models/__tests__/rke-machine.cattle.io.vmwarevspheremachinetemplate.test.ts +22 -0
- package/models/pod.js +12 -10
- package/models/rke-machine.cattle.io.vmwarevspheremachinetemplate.js +9 -0
- package/package.json +1 -1
- package/pages/auth/login.vue +1 -1
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +110 -0
- package/pages/c/_cluster/apps/charts/install.vue +29 -0
- package/pages/c/_cluster/auth/config/index.vue +11 -4
- package/pages/c/_cluster/monitoring/index.vue +6 -1
- package/plugins/dashboard-store/resource-class.js +10 -3
- package/plugins/steve/__tests__/steve-class-resource-api.test.ts +147 -0
- package/plugins/steve/steve-class.js +43 -0
- package/plugins/steve/subscribe.js +11 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +115 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +83 -3
- package/store/__tests__/auth.test.ts +18 -0
- package/store/__tests__/notifications.test.ts +466 -1
- package/store/__tests__/ui-context.test.ts +255 -0
- package/store/auth.js +11 -1
- package/store/features.js +1 -0
- package/store/plugins.js +6 -0
- package/types/rancher/steve.api.ts +2 -2
- package/types/shell/index.d.ts +58 -0
- package/types/store/dashboard-store.types.ts +2 -2
- package/types/store/type-map.ts +262 -1
- package/utils/async.ts +2 -0
- package/utils/grafana.js +2 -17
- package/utils/monitoring.js +38 -1
- package/core/__tests__/plugin-products.test.ts +0 -4694
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { state, getters, mutations, actions } from '../ui-context';
|
|
2
|
+
|
|
3
|
+
describe('ui-context store', () => {
|
|
4
|
+
describe('state', () => {
|
|
5
|
+
it('returns initial state with empty elements and zero idCounter', () => {
|
|
6
|
+
expect(state()).toStrictEqual({ idCounter: 0, elements: {} });
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it('returns a fresh object on each call', () => {
|
|
10
|
+
const s1 = state();
|
|
11
|
+
const s2 = state();
|
|
12
|
+
|
|
13
|
+
expect(s1).not.toBe(s2);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('getters', () => {
|
|
18
|
+
describe('all', () => {
|
|
19
|
+
it('returns empty array when no elements exist', () => {
|
|
20
|
+
expect(getters.all(state())).toStrictEqual([]);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('returns contexts sorted alphabetically by tag', () => {
|
|
24
|
+
const s = state();
|
|
25
|
+
|
|
26
|
+
s.elements = {
|
|
27
|
+
1: { id: 1, context: { tag: 'z-tag', value: 'a' } },
|
|
28
|
+
2: { id: 2, context: { tag: 'a-tag', value: 'b' } },
|
|
29
|
+
3: { id: 3, context: { tag: 'm-tag', value: 'c' } },
|
|
30
|
+
} as any;
|
|
31
|
+
|
|
32
|
+
const result = getters.all(s);
|
|
33
|
+
|
|
34
|
+
expect(result.map((c: any) => c.tag)).toStrictEqual(['a-tag', 'm-tag', 'z-tag']);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('sorts contexts without tag before tagged contexts', () => {
|
|
38
|
+
const s = state();
|
|
39
|
+
|
|
40
|
+
s.elements = {
|
|
41
|
+
1: { id: 1, context: { tag: 'b-tag', value: 'a' } },
|
|
42
|
+
2: { id: 2, context: { value: 'b' } },
|
|
43
|
+
} as any;
|
|
44
|
+
|
|
45
|
+
const result = getters.all(s);
|
|
46
|
+
|
|
47
|
+
expect(result[0]).toStrictEqual({ value: 'b' });
|
|
48
|
+
expect(result[1].tag).toBe('b-tag');
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('returns context objects, not full element wrappers', () => {
|
|
52
|
+
const context = { tag: 'my-tag', value: 'test-val' };
|
|
53
|
+
const s = state();
|
|
54
|
+
|
|
55
|
+
s.elements = { 1: { id: 1, context } } as any;
|
|
56
|
+
|
|
57
|
+
expect(getters.all(s)).toStrictEqual([context]);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
describe('mutations', () => {
|
|
63
|
+
describe('add', () => {
|
|
64
|
+
it('adds element to state', () => {
|
|
65
|
+
const s = state();
|
|
66
|
+
const element = { id: 1, context: { tag: 'test', value: 'val' } };
|
|
67
|
+
|
|
68
|
+
mutations.add(s, element);
|
|
69
|
+
|
|
70
|
+
expect(s.elements[1]).toStrictEqual(element);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('adds multiple elements without overwriting', () => {
|
|
74
|
+
const s = state();
|
|
75
|
+
const e1 = { id: 1, context: { tag: 'a', value: 1 } };
|
|
76
|
+
const e2 = { id: 2, context: { tag: 'b', value: 2 } };
|
|
77
|
+
|
|
78
|
+
mutations.add(s, e1);
|
|
79
|
+
mutations.add(s, e2);
|
|
80
|
+
|
|
81
|
+
expect(Object.keys(s.elements)).toStrictEqual(['1', '2']);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
describe('update', () => {
|
|
86
|
+
it('updates context of existing element', () => {
|
|
87
|
+
const s = state();
|
|
88
|
+
|
|
89
|
+
s.elements[1] = { id: 1, context: { tag: 'test', value: 'original' } };
|
|
90
|
+
mutations.update(s, { id: 1, context: { tag: 'test', value: 'updated' } });
|
|
91
|
+
|
|
92
|
+
expect(s.elements[1].context).toStrictEqual({ tag: 'test', value: 'updated' });
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('does nothing when element id is not found', () => {
|
|
96
|
+
const s = state();
|
|
97
|
+
const element = { id: 1, context: { tag: 'test', value: 'val' } };
|
|
98
|
+
|
|
99
|
+
s.elements[1] = element;
|
|
100
|
+
mutations.update(s, { id: 999, context: { tag: 'other', value: 'new' } });
|
|
101
|
+
|
|
102
|
+
expect(s.elements[1]).toStrictEqual(element);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
describe('remove', () => {
|
|
107
|
+
it('removes element from state by id', () => {
|
|
108
|
+
const s = state();
|
|
109
|
+
const element = { id: 1, context: { tag: 'test', value: 'val' } };
|
|
110
|
+
|
|
111
|
+
s.elements[1] = element;
|
|
112
|
+
mutations.remove(s, element);
|
|
113
|
+
|
|
114
|
+
expect(s.elements[1]).toBeUndefined();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('leaves other elements intact when removing one', () => {
|
|
118
|
+
const s = state();
|
|
119
|
+
const e1 = { id: 1, context: { tag: 'a', value: 1 } };
|
|
120
|
+
const e2 = { id: 2, context: { tag: 'b', value: 2 } };
|
|
121
|
+
|
|
122
|
+
s.elements[1] = e1;
|
|
123
|
+
s.elements[2] = e2;
|
|
124
|
+
mutations.remove(s, e1);
|
|
125
|
+
|
|
126
|
+
expect(s.elements[2]).toStrictEqual(e2);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
describe('actions', () => {
|
|
132
|
+
const makeStore = () => {
|
|
133
|
+
const s = state() as any;
|
|
134
|
+
const commit = jest.fn((mutation: string, payload: any) => {
|
|
135
|
+
(mutations as any)[mutation](s, payload);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
return { s, commit };
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
describe('add', () => {
|
|
142
|
+
it.each([
|
|
143
|
+
{
|
|
144
|
+
desc: 'undefined context',
|
|
145
|
+
ctx: undefined as any,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
desc: 'null context',
|
|
149
|
+
ctx: null as any,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
desc: 'missing tag property',
|
|
153
|
+
ctx: { value: 'something' } as any,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
desc: 'empty string tag',
|
|
157
|
+
ctx: { value: 'something', tag: '' } as any,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
desc: 'missing value property',
|
|
161
|
+
ctx: { tag: 'test' } as any,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
desc: 'explicit undefined value',
|
|
165
|
+
ctx: { tag: 'test', value: undefined } as any,
|
|
166
|
+
},
|
|
167
|
+
])('throws for invalid context: $desc', ({ ctx }) => {
|
|
168
|
+
const { s, commit } = makeStore();
|
|
169
|
+
|
|
170
|
+
expect(() => actions.add({ commit, state: s }, ctx)).toThrow('[ui-context]');
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('commits add and returns generated id for valid context', () => {
|
|
174
|
+
const { s, commit } = makeStore();
|
|
175
|
+
const ctx = { tag: 'my-tag', value: 'my-value' };
|
|
176
|
+
|
|
177
|
+
const id = actions.add({ commit, state: s }, ctx);
|
|
178
|
+
|
|
179
|
+
expect(id).toBe('ctx-0');
|
|
180
|
+
expect(commit).toHaveBeenCalledWith('add', { id: 'ctx-0', context: ctx });
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it('increments idCounter on successive calls', () => {
|
|
184
|
+
const { s, commit } = makeStore();
|
|
185
|
+
const ctx = { tag: 't', value: 'v' };
|
|
186
|
+
|
|
187
|
+
const id1 = actions.add({ commit, state: s }, ctx);
|
|
188
|
+
const id2 = actions.add({ commit, state: s }, ctx);
|
|
189
|
+
|
|
190
|
+
expect(id1).toBe('ctx-0');
|
|
191
|
+
expect(id2).toBe('ctx-1');
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it.each([
|
|
195
|
+
{
|
|
196
|
+
desc: 'null value',
|
|
197
|
+
ctx: { tag: 'test', value: null },
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
desc: 'false value',
|
|
201
|
+
ctx: { tag: 'test', value: false },
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
desc: 'zero value',
|
|
205
|
+
ctx: { tag: 'test', value: 0 },
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
desc: 'empty string value',
|
|
209
|
+
ctx: { tag: 'test', value: '' },
|
|
210
|
+
},
|
|
211
|
+
])('does not throw for valid context with $desc', ({ ctx }) => {
|
|
212
|
+
const { s, commit } = makeStore();
|
|
213
|
+
|
|
214
|
+
expect(() => actions.add({ commit, state: s }, ctx as any)).not.toThrow();
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
describe('update', () => {
|
|
219
|
+
it('throws when element id is not found in state', () => {
|
|
220
|
+
const { s, commit } = makeStore();
|
|
221
|
+
|
|
222
|
+
expect(() => actions.update({ commit, state: s }, { id: 42, context: { tag: 't', value: 'v' } } as any)).toThrow('[ui-context]');
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it('commits update for existing element', () => {
|
|
226
|
+
const { s, commit } = makeStore();
|
|
227
|
+
|
|
228
|
+
s.elements[1] = { id: 1, context: { tag: 'test', value: 'original' } };
|
|
229
|
+
const updated = { id: 1, context: { tag: 'test', value: 'updated' } };
|
|
230
|
+
|
|
231
|
+
actions.update({ commit, state: s }, updated as any);
|
|
232
|
+
|
|
233
|
+
expect(commit).toHaveBeenCalledWith('update', updated);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
describe('remove', () => {
|
|
238
|
+
it('throws when element id is not found in state', () => {
|
|
239
|
+
const { s, commit } = makeStore();
|
|
240
|
+
|
|
241
|
+
expect(() => actions.remove({ commit, state: s }, 999 as any)).toThrow('[ui-context]');
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
it('commits remove with the found element', () => {
|
|
245
|
+
const { s, commit } = makeStore();
|
|
246
|
+
const element = { id: 1, context: { tag: 'test', value: 'val' } };
|
|
247
|
+
|
|
248
|
+
s.elements[1] = element;
|
|
249
|
+
actions.remove({ commit, state: s }, 1 as any);
|
|
250
|
+
|
|
251
|
+
expect(commit).toHaveBeenCalledWith('remove', element);
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
});
|
package/store/auth.js
CHANGED
|
@@ -76,7 +76,7 @@ export const getters = {
|
|
|
76
76
|
|
|
77
77
|
selfUser(state) {
|
|
78
78
|
return state.selfUser;
|
|
79
|
-
}
|
|
79
|
+
},
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
export const mutations = {
|
|
@@ -208,6 +208,16 @@ export const actions = {
|
|
|
208
208
|
return findBy(authConfigs, 'id', id);
|
|
209
209
|
},
|
|
210
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Is the local auth provider enabled?
|
|
213
|
+
*/
|
|
214
|
+
async getLocalProviderEnabled({ dispatch }) {
|
|
215
|
+
// If it exists as an option to log in --> enabled
|
|
216
|
+
const localProvider = await dispatch('getAuthProvider', 'local');
|
|
217
|
+
|
|
218
|
+
return !!localProvider;
|
|
219
|
+
},
|
|
220
|
+
|
|
211
221
|
/**
|
|
212
222
|
* Create the basic json object used for the nonce (this includes the random nonce/state)
|
|
213
223
|
*/
|
package/store/features.js
CHANGED
|
@@ -43,6 +43,7 @@ export const AUTOSCALER = create('cluster-autoscaling', false);
|
|
|
43
43
|
export const CLUSTER_SHELL = create('cluster-shell', true);
|
|
44
44
|
export const NODE_SHELL = create('node-shell', true);
|
|
45
45
|
export const POD_SHELL = create('pod-shell', true);
|
|
46
|
+
export const HIDE_LOCAL_AUTH_PROVIDER = create('hide-local-auth-provider', false);
|
|
46
47
|
|
|
47
48
|
// Not currently used.. no point defining ones we don't use
|
|
48
49
|
// export const EMBEDDED_CLUSTER_API = create('embedded-cluster-api', true);
|
package/store/plugins.js
CHANGED
|
@@ -129,6 +129,12 @@ export const state = function() {
|
|
|
129
129
|
return {};
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
+
export const actions = {
|
|
133
|
+
mapDriver(ctx, { name, to }) {
|
|
134
|
+
mapDriver(name, to);
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
|
|
132
138
|
export const getters = {
|
|
133
139
|
credentialOptions() {
|
|
134
140
|
return (name) => {
|
|
@@ -13,13 +13,13 @@ export const STEVE_RESPONSE_CODE = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Steve API JSON response for GET requests
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type SteveGetResponse<T = Record<string, any>> = T & KubeGetResponse & {
|
|
17
17
|
// Rancher specific properties (there are more)
|
|
18
18
|
id: string,
|
|
19
19
|
|
|
20
20
|
// Bucket for everything else (hopefully to remove once above populated)
|
|
21
21
|
[key: string]: any
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Steve API JSON response for LIST requests
|
package/types/shell/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export const IMPORTED_CLUSTER_VERSION_MANAGEMENT: "rancher.io/imported-cluster-v
|
|
|
28
28
|
export const UI_PROJECT_SECRET: "management.cattle.io/project-scoped-secret";
|
|
29
29
|
export const UI_PROJECT_SECRET_COPY: "management.cattle.io/project-scoped-secret-copy";
|
|
30
30
|
export const SERVICE_LINKS: "ui.rancher/service-links";
|
|
31
|
+
export const NODE_DRIVER_FIELD_HINTS: "io.cattle.nodedriver/ui-field-hints";
|
|
31
32
|
export namespace KUBERNETES {
|
|
32
33
|
let SERVICE_ACCOUNT_UID: string;
|
|
33
34
|
let SERVICE_ACCOUNT_NAME: string;
|
|
@@ -199,6 +200,7 @@ export const IMPORTED_CLUSTER_VERSION_MANAGEMENT: "rancher.io/imported-cluster-v
|
|
|
199
200
|
export const UI_PROJECT_SECRET: "management.cattle.io/project-scoped-secret";
|
|
200
201
|
export const UI_PROJECT_SECRET_COPY: "management.cattle.io/project-scoped-secret-copy";
|
|
201
202
|
export const SERVICE_LINKS: "ui.rancher/service-links";
|
|
203
|
+
export const NODE_DRIVER_FIELD_HINTS: "io.cattle.nodedriver/ui-field-hints";
|
|
202
204
|
export namespace KUBERNETES {
|
|
203
205
|
let SERVICE_ACCOUNT_UID: string;
|
|
204
206
|
let SERVICE_ACCOUNT_NAME: string;
|
|
@@ -2369,6 +2371,7 @@ export namespace FEATURE_DESCRIPTION {
|
|
|
2369
2371
|
export { formatter_65 as formatter };
|
|
2370
2372
|
export namespace formatterOpts_16 {
|
|
2371
2373
|
let prefix: string;
|
|
2374
|
+
let fallbackPath: string;
|
|
2372
2375
|
}
|
|
2373
2376
|
export { formatterOpts_16 as formatterOpts };
|
|
2374
2377
|
}
|
|
@@ -4166,6 +4169,7 @@ export namespace FEATURE_DESCRIPTION {
|
|
|
4166
4169
|
export { formatter_65 as formatter };
|
|
4167
4170
|
export namespace formatterOpts_16 {
|
|
4168
4171
|
let prefix: string;
|
|
4172
|
+
let fallbackPath: string;
|
|
4169
4173
|
}
|
|
4170
4174
|
export { formatterOpts_16 as formatterOpts };
|
|
4171
4175
|
}
|
|
@@ -7870,6 +7874,18 @@ export default class SteveModel extends HybridModel {
|
|
|
7870
7874
|
* @param {*} res
|
|
7871
7875
|
*/
|
|
7872
7876
|
processSaveResponse(res: any, opt?: {}): void;
|
|
7877
|
+
/**
|
|
7878
|
+
* RESOURCES API - ResourceInstance update method to send a PATCH request
|
|
7879
|
+
*/
|
|
7880
|
+
update(data: any): Promise<this>;
|
|
7881
|
+
/**
|
|
7882
|
+
* RESOURCES API - ResourceInstance update method to send a PUT request
|
|
7883
|
+
*/
|
|
7884
|
+
replace(): Promise<this>;
|
|
7885
|
+
/**
|
|
7886
|
+
* RESOURCES API - ResourceInstance delete method to send a DELETE request
|
|
7887
|
+
*/
|
|
7888
|
+
delete(): Promise<void>;
|
|
7873
7889
|
}
|
|
7874
7890
|
import HybridModel from './hybrid-class';
|
|
7875
7891
|
}
|
|
@@ -7899,6 +7915,18 @@ export default class SteveModel extends HybridModel {
|
|
|
7899
7915
|
* @param {*} res
|
|
7900
7916
|
*/
|
|
7901
7917
|
processSaveResponse(res: any, opt?: {}): void;
|
|
7918
|
+
/**
|
|
7919
|
+
* RESOURCES API - ResourceInstance update method to send a PATCH request
|
|
7920
|
+
*/
|
|
7921
|
+
update(data: any): Promise<this>;
|
|
7922
|
+
/**
|
|
7923
|
+
* RESOURCES API - ResourceInstance update method to send a PUT request
|
|
7924
|
+
*/
|
|
7925
|
+
replace(): Promise<this>;
|
|
7926
|
+
/**
|
|
7927
|
+
* RESOURCES API - ResourceInstance delete method to send a DELETE request
|
|
7928
|
+
*/
|
|
7929
|
+
delete(): Promise<void>;
|
|
7902
7930
|
}
|
|
7903
7931
|
import HybridModel from './hybrid-class';
|
|
7904
7932
|
}
|
|
@@ -7928,6 +7956,7 @@ export const AUTOSCALER: any;
|
|
|
7928
7956
|
export const CLUSTER_SHELL: any;
|
|
7929
7957
|
export const NODE_SHELL: any;
|
|
7930
7958
|
export const POD_SHELL: any;
|
|
7959
|
+
export const HIDE_LOCAL_AUTH_PROVIDER: any;
|
|
7931
7960
|
export namespace getters {
|
|
7932
7961
|
function get(state: any, getters: any, rootState: any, rootGetters: any): (name: any) => any;
|
|
7933
7962
|
}
|
|
@@ -7964,6 +7993,7 @@ export const AUTOSCALER: any;
|
|
|
7964
7993
|
export const CLUSTER_SHELL: any;
|
|
7965
7994
|
export const NODE_SHELL: any;
|
|
7966
7995
|
export const POD_SHELL: any;
|
|
7996
|
+
export const HIDE_LOCAL_AUTH_PROVIDER: any;
|
|
7967
7997
|
export namespace getters {
|
|
7968
7998
|
function get(state: any, getters: any, rootState: any, rootGetters: any): (name: any) => any;
|
|
7969
7999
|
}
|
|
@@ -7988,6 +8018,12 @@ export const fullFields: any[];
|
|
|
7988
8018
|
export const prefixFields: any[];
|
|
7989
8019
|
export const suffixFields: any[];
|
|
7990
8020
|
export function state(): {};
|
|
8021
|
+
export namespace actions {
|
|
8022
|
+
function mapDriver(ctx: any, { name, to }: {
|
|
8023
|
+
name: any;
|
|
8024
|
+
to: any;
|
|
8025
|
+
}): void;
|
|
8026
|
+
}
|
|
7991
8027
|
export namespace getters {
|
|
7992
8028
|
function credentialOptions(): (name: any) => any;
|
|
7993
8029
|
function credentialDriverFor(): (name: any) => any;
|
|
@@ -8013,6 +8049,12 @@ export const fullFields: any[];
|
|
|
8013
8049
|
export const prefixFields: any[];
|
|
8014
8050
|
export const suffixFields: any[];
|
|
8015
8051
|
export function state(): {};
|
|
8052
|
+
export namespace actions {
|
|
8053
|
+
function mapDriver(ctx: any, { name, to }: {
|
|
8054
|
+
name: any;
|
|
8055
|
+
to: any;
|
|
8056
|
+
}): void;
|
|
8057
|
+
}
|
|
8016
8058
|
export namespace getters {
|
|
8017
8059
|
function credentialOptions(): (name: any) => any;
|
|
8018
8060
|
function credentialDriverFor(): (name: any) => any;
|
|
@@ -9526,6 +9568,14 @@ export function monitoringStatus(): {
|
|
|
9526
9568
|
};
|
|
9527
9569
|
};
|
|
9528
9570
|
export function haveV2Monitoring(getters: any): boolean;
|
|
9571
|
+
/**
|
|
9572
|
+
* Look up the installed Rancher monitoring app, preferring the new
|
|
9573
|
+
* `rancher-monitoring-dashboards` chart and falling back to the legacy
|
|
9574
|
+
* `rancher-monitoring`. Returns null if the user lacks permission, neither
|
|
9575
|
+
* chart is installed, or any lookup fails.
|
|
9576
|
+
*/
|
|
9577
|
+
export function fetchMonitoringApp(store: any, storeName: any): Promise<any>;
|
|
9578
|
+
export function fetchMonitoringVersion(store: any, storeName: any): Promise<any>;
|
|
9529
9579
|
export function canViewGrafanaLink(store: any): Promise<boolean>;
|
|
9530
9580
|
export function canViewAlertManagerLink(store: any): Promise<boolean>;
|
|
9531
9581
|
export function canViewPrometheusLink(store: any): Promise<boolean>;
|
|
@@ -9541,6 +9591,14 @@ export function monitoringStatus(): {
|
|
|
9541
9591
|
};
|
|
9542
9592
|
};
|
|
9543
9593
|
export function haveV2Monitoring(getters: any): boolean;
|
|
9594
|
+
/**
|
|
9595
|
+
* Look up the installed Rancher monitoring app, preferring the new
|
|
9596
|
+
* `rancher-monitoring-dashboards` chart and falling back to the legacy
|
|
9597
|
+
* `rancher-monitoring`. Returns null if the user lacks permission, neither
|
|
9598
|
+
* chart is installed, or any lookup fails.
|
|
9599
|
+
*/
|
|
9600
|
+
export function fetchMonitoringApp(store: any, storeName: any): Promise<any>;
|
|
9601
|
+
export function fetchMonitoringVersion(store: any, storeName: any): Promise<any>;
|
|
9544
9602
|
export function canViewGrafanaLink(store: any): Promise<boolean>;
|
|
9545
9603
|
export function canViewAlertManagerLink(store: any): Promise<boolean>;
|
|
9546
9604
|
export function canViewPrometheusLink(store: any): Promise<boolean>;
|
|
@@ -180,7 +180,7 @@ export type ActionFindPageTransientResponse<T = any> = {
|
|
|
180
180
|
*
|
|
181
181
|
* If the request was not transient this will just be the array of resources
|
|
182
182
|
*/
|
|
183
|
-
export type ActionFindPageResponse<T = any
|
|
183
|
+
export type ActionFindPageResponse<T = Record<string, any>> = ActionFindPageTransientResponse<T> | T[];
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* Args used for findMatching action
|
|
@@ -221,7 +221,7 @@ export interface ActionFindMatchingArgs extends ActionCoreFindOptions {
|
|
|
221
221
|
* @internal
|
|
222
222
|
* Response to the findMatching action
|
|
223
223
|
*/
|
|
224
|
-
export type ActionFindMatchingResponse<T = any> =
|
|
224
|
+
export type ActionFindMatchingResponse<T = any> = T[]
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
227
|
* @internal
|