@rancher/shell 0.3.5 → 0.3.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/assets/images/providers/outscale.svg +19 -0
- package/assets/styles/base/_basic.scss +18 -0
- package/assets/styles/base/_mixins.scss +0 -11
- package/assets/styles/base/_variables.scss +2 -4
- package/assets/styles/global/_button.scss +12 -2
- package/assets/translations/en-us.yaml +22 -1
- package/assets/translations/zh-hans.yaml +30 -10
- package/chart/gatekeeper.vue +3 -2
- package/chart/istio.vue +29 -3
- package/components/BrandImage.vue +1 -4
- package/components/Carousel.vue +85 -37
- package/components/EtcdInfoBanner.vue +7 -3
- package/components/ExplorerMembers.vue +100 -5
- package/components/ExplorerProjectsNamespaces.vue +32 -2
- package/components/GrafanaDashboard.vue +9 -2
- package/components/SortableTable/index.vue +23 -11
- package/components/SortableTable/selection.js +58 -50
- package/components/Wizard.vue +4 -2
- package/components/auth/RoleDetailEdit.vue +2 -2
- package/components/form/HookOption.vue +14 -10
- package/components/form/Labels.vue +32 -27
- package/components/form/MatchExpressions.vue +2 -2
- package/components/form/Members/ClusterPermissionsEditor.vue +32 -7
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +46 -21
- package/components/form/Tolerations.vue +4 -1
- package/components/form/ValueFromResource.vue +14 -9
- package/components/form/WorkloadPorts.vue +2 -2
- package/components/form/__tests__/NameNsDescription.ts +27 -0
- package/components/formatter/WorkloadHealthScale.vue +8 -2
- package/components/nav/NamespaceFilter.vue +8 -0
- package/{nuxt/components → components/nuxt}/nuxt.js +1 -1
- package/{nuxt → config}/middleware.js +8 -8
- package/config/product/explorer.js +24 -3
- package/config/query-params.js +1 -0
- package/config/router.js +1 -1
- package/{nuxt → config}/store.js +82 -79
- package/config/table-headers.js +46 -12
- package/config/types.js +7 -0
- package/core/plugin.ts +4 -2
- package/core/types.ts +258 -1
- package/creators/app/files/tsconfig.json +0 -1
- package/creators/app/files/vue.config.js +0 -1
- package/creators/pkg/files/.github/workflows/build-extension.yml +3 -4
- package/creators/pkg/files/tsconfig.json +0 -1
- package/creators/pkg/pkg.package.json +3 -3
- package/detail/constraints.gatekeeper.sh.constraint.vue +14 -7
- package/detail/fleet.cattle.io.clustergroup.vue +7 -1
- package/edit/fleet.cattle.io.gitrepo.vue +16 -1
- package/edit/logging.banzaicloud.io.output/index.vue +18 -5
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +1 -0
- package/edit/namespace.vue +12 -8
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +11 -4
- package/edit/provisioning.cattle.io.cluster/import.vue +23 -25
- package/edit/provisioning.cattle.io.cluster/rke2.vue +96 -18
- package/edit/workload/mixins/workload.js +6 -7
- package/edit/workload/storage/Mount.vue +3 -3
- package/initialize/App.js +206 -0
- package/{nuxt → initialize}/client.js +406 -360
- package/{nuxt → initialize}/index.js +21 -22
- package/layouts/standalone.vue +13 -0
- package/list/catalog.cattle.io.clusterrepo.vue +1 -0
- package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +48 -0
- package/list/workload.vue +6 -4
- package/mixins/chart.js +29 -1
- package/mixins/fetch.client.js +95 -0
- package/{nuxt/mixins → mixins}/fetch.server.js +30 -26
- package/mixins/labeled-form-element.ts +2 -2
- package/models/constraints.gatekeeper.sh.constraint.js +37 -0
- package/models/pod.js +4 -0
- package/models/rbac.authorization.k8s.io.clusterrolebinding.js +16 -0
- package/models/rbac.authorization.k8s.io.rolebinding.js +16 -0
- package/package.json +9 -13
- package/pages/c/_cluster/apps/charts/install.vue +61 -39
- package/pages/diagnostic.vue +32 -25
- package/pages/rio/mesh.vue +1 -2
- package/pkg/tsconfig.json +0 -1
- package/plugins/clean-html-directive.js +3 -0
- package/plugins/dashboard-store/index.js +1 -1
- package/plugins/plugin.js +0 -14
- package/plugins/portal-vue.js +4 -0
- package/rancher-components/components/Banner/Banner.test.ts +3 -5
- package/rancher-components/components/Banner/Banner.vue +1 -0
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +31 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +14 -3
- package/scripts/extension/publish +42 -23
- package/scripts/serve-pkgs +6 -2
- package/store/type-map.js +1 -1
- package/tsconfig.json +0 -1
- package/types/rancher/index.d.ts +2 -0
- package/types/shell/index.d.ts +353 -284
- package/utils/__tests__/grafana.test.ts +44 -0
- package/utils/axios.js +190 -0
- package/{nuxt → utils}/cookie-universal-nuxt.js +7 -6
- package/utils/dom.js +15 -0
- package/utils/grafana.js +35 -16
- package/{nuxt/utils.js → utils/nuxt.js} +265 -236
- package/utils/router.scrollBehavior.js +1 -1
- package/vue.config.js +30 -19
- package/nuxt/App.js +0 -210
- package/nuxt/axios.js +0 -186
- package/nuxt/empty.js +0 -1
- package/nuxt/jsonp.js +0 -82
- package/nuxt/loading.html +0 -39
- package/nuxt/mixins/fetch.client.js +0 -90
- package/nuxt/portal-vue.js +0 -4
- package/nuxt/server.js +0 -312
- package/nuxt/views/app.template.html +0 -9
- package/nuxt/views/error.html +0 -23
- package/plugins/dashboard-store/extensions.js +0 -22
- /package/{nuxt/components → components/nuxt}/nuxt-build-indicator.vue +0 -0
- /package/{nuxt/components → components/nuxt}/nuxt-child.js +0 -0
- /package/{nuxt/components → components/nuxt}/nuxt-error.vue +0 -0
- /package/{nuxt/components → components/nuxt}/nuxt-link.client.js +0 -0
- /package/{nuxt/components → components/nuxt}/nuxt-link.server.js +0 -0
- /package/{nuxt/components → components/nuxt}/nuxt-loading.vue +0 -0
|
@@ -1191,16 +1191,29 @@ export default {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
|
-
/* Chart custom UI components have the ability to edit CRD chart values
|
|
1195
|
-
|
|
1194
|
+
/* Chart custom UI components have the ability to edit CRD chart values eg gatekeeper-crd has values.enableRuntimeDefaultSeccompProfile
|
|
1195
|
+
like the main chart, only CRD values that differ from defaults should be sent on install/upgrade
|
|
1196
|
+
CRDs should be installed with the same global values as the main chart
|
|
1196
1197
|
*/
|
|
1197
1198
|
for (const versionInfo of this.autoInstallInfo) {
|
|
1199
|
+
// allValues are the values potentially changed in the installation ui: any previously customized values + defaults
|
|
1200
|
+
// values are default values from the chart
|
|
1201
|
+
const { allValues, values: crdValues } = versionInfo;
|
|
1202
|
+
|
|
1203
|
+
// only save crd values that differ from the defaults defined in chart values.yaml
|
|
1204
|
+
const customizedCrdValues = diff(crdValues, allValues);
|
|
1205
|
+
|
|
1206
|
+
// CRD globals should be overwritten by main chart globals
|
|
1207
|
+
// we want to avoid including globals present on crd values and not main chart values
|
|
1208
|
+
// that covers the scenario where a global value was customized on a previous install (and so is present in crd global vals) and the user has reverted it to default on this update (no longer present in main chart global vals)
|
|
1209
|
+
const crdValuesToInstall = { ...customizedCrdValues, global: values.global };
|
|
1210
|
+
|
|
1198
1211
|
out.charts.unshift({
|
|
1199
1212
|
chartName: versionInfo.chart.name,
|
|
1200
1213
|
version: versionInfo.chart.version,
|
|
1201
1214
|
releaseName: versionInfo.chart.annotations[CATALOG_ANNOTATIONS.RELEASE_NAME] || chart.name,
|
|
1202
1215
|
projectId: this.project,
|
|
1203
|
-
values:
|
|
1216
|
+
values: crdValuesToInstall
|
|
1204
1217
|
});
|
|
1205
1218
|
}
|
|
1206
1219
|
/*
|
|
@@ -1487,42 +1500,44 @@ export default {
|
|
|
1487
1500
|
</div>
|
|
1488
1501
|
</template>
|
|
1489
1502
|
<template #helmValues>
|
|
1490
|
-
<
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
{{ step2Description }}
|
|
1496
|
-
</Banner>
|
|
1497
|
-
<div class="step__values__controls">
|
|
1498
|
-
<ButtonGroup
|
|
1499
|
-
v-model="preFormYamlOption"
|
|
1500
|
-
:options="formYamlOptions"
|
|
1501
|
-
inactive-class="bg-disabled btn-sm"
|
|
1502
|
-
active-class="bg-primary btn-sm"
|
|
1503
|
-
:disabled="preFormYamlOption != formYamlOption"
|
|
1504
|
-
/>
|
|
1505
|
-
<div class="step__values__controls--spacer">
|
|
1506
|
-
|
|
1507
|
-
</div>
|
|
1508
|
-
<ButtonGroup
|
|
1509
|
-
v-if="showDiff"
|
|
1510
|
-
v-model="diffMode"
|
|
1511
|
-
:options="yamlDiffModeOptions"
|
|
1512
|
-
inactive-class="bg-disabled btn-sm"
|
|
1513
|
-
active-class="bg-primary btn-sm"
|
|
1514
|
-
/>
|
|
1515
|
-
<div
|
|
1516
|
-
v-if="hasReadme && !showingReadmeWindow"
|
|
1517
|
-
class="btn-group"
|
|
1503
|
+
<div class="sticky-header">
|
|
1504
|
+
<Banner
|
|
1505
|
+
v-if="step2Description"
|
|
1506
|
+
color="info"
|
|
1507
|
+
class="description"
|
|
1518
1508
|
>
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1509
|
+
{{ step2Description }}
|
|
1510
|
+
</Banner>
|
|
1511
|
+
<div class="step__values__controls">
|
|
1512
|
+
<ButtonGroup
|
|
1513
|
+
v-model="preFormYamlOption"
|
|
1514
|
+
:options="formYamlOptions"
|
|
1515
|
+
inactive-class="bg-disabled btn-sm"
|
|
1516
|
+
active-class="bg-primary btn-sm"
|
|
1517
|
+
:disabled="preFormYamlOption != formYamlOption"
|
|
1518
|
+
/>
|
|
1519
|
+
<div class="step__values__controls--spacer">
|
|
1520
|
+
|
|
1521
|
+
</div>
|
|
1522
|
+
<ButtonGroup
|
|
1523
|
+
v-if="showDiff"
|
|
1524
|
+
v-model="diffMode"
|
|
1525
|
+
:options="yamlDiffModeOptions"
|
|
1526
|
+
inactive-class="bg-disabled btn-sm"
|
|
1527
|
+
active-class="bg-primary btn-sm"
|
|
1528
|
+
/>
|
|
1529
|
+
<div
|
|
1530
|
+
v-if="hasReadme && !showingReadmeWindow"
|
|
1531
|
+
class="btn-group"
|
|
1523
1532
|
>
|
|
1524
|
-
|
|
1525
|
-
|
|
1533
|
+
<button
|
|
1534
|
+
type="button"
|
|
1535
|
+
class="btn bg-primary btn-sm"
|
|
1536
|
+
@click="showSlideIn = !showSlideIn"
|
|
1537
|
+
>
|
|
1538
|
+
{{ t('catalog.install.steps.helmValues.chartInfo.button') }}
|
|
1539
|
+
</button>
|
|
1540
|
+
</div>
|
|
1526
1541
|
</div>
|
|
1527
1542
|
</div>
|
|
1528
1543
|
<div class="scroll__container">
|
|
@@ -1945,8 +1960,6 @@ export default {
|
|
|
1945
1960
|
.scroll {
|
|
1946
1961
|
&__container {
|
|
1947
1962
|
$yaml-height: 200px;
|
|
1948
|
-
display: flex;
|
|
1949
|
-
flex: 1;
|
|
1950
1963
|
min-height: $yaml-height;
|
|
1951
1964
|
height: 0;
|
|
1952
1965
|
}
|
|
@@ -2045,4 +2058,13 @@ export default {
|
|
|
2045
2058
|
margin-top: 5px;
|
|
2046
2059
|
}
|
|
2047
2060
|
|
|
2061
|
+
.sticky-header {
|
|
2062
|
+
position: sticky;
|
|
2063
|
+
top: 0;
|
|
2064
|
+
z-index: 10;
|
|
2065
|
+
display: flex;
|
|
2066
|
+
flex-direction: column;
|
|
2067
|
+
background: var(--primary-text);
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2048
2070
|
</style>
|
package/pages/diagnostic.vue
CHANGED
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
const clusterForCounts = filterHiddenLocalCluster(filterOnlyKubernetesClusters(readyClusters), this.$store);
|
|
19
19
|
const finalCounts = [];
|
|
20
20
|
const promises = [];
|
|
21
|
-
|
|
21
|
+
const topFifteenForResponseTime = [];
|
|
22
22
|
|
|
23
23
|
clusterForCounts.forEach((cluster, i) => {
|
|
24
24
|
// Necessary to retrieve the proper display name of the cluster
|
|
@@ -42,6 +42,7 @@ export default {
|
|
|
42
42
|
|
|
43
43
|
if (counts) {
|
|
44
44
|
const sanitizedCount = [];
|
|
45
|
+
let finalCount = [];
|
|
45
46
|
|
|
46
47
|
Object.keys(counts).forEach((key) => {
|
|
47
48
|
sanitizedCount[key] = counts[key].summary?.count;
|
|
@@ -53,20 +54,22 @@ export default {
|
|
|
53
54
|
|
|
54
55
|
const sortedCount = sortBy(sanitizedCount, 'count:desc');
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
finalCount = finalCount.concat(sortedCount);
|
|
58
|
+
finalCount = sortBy(finalCount, 'count:desc');
|
|
59
|
+
finalCount = finalCount.splice(0, 15);
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
finalCount.forEach((item, i) => {
|
|
62
|
+
finalCount[i].id = finalCounts[index].id;
|
|
63
|
+
finalCount[i].capiId = finalCounts[index].capiId;
|
|
63
64
|
});
|
|
64
65
|
|
|
66
|
+
topFifteenForResponseTime.push(finalCount);
|
|
67
|
+
|
|
65
68
|
finalCounts[index].counts = sortedCount;
|
|
66
69
|
}
|
|
67
70
|
});
|
|
68
71
|
|
|
69
|
-
this.
|
|
72
|
+
this.topFifteenForResponseTime = topFifteenForResponseTime;
|
|
70
73
|
this.finalCounts = finalCounts;
|
|
71
74
|
},
|
|
72
75
|
|
|
@@ -122,12 +125,12 @@ export default {
|
|
|
122
125
|
|
|
123
126
|
return {
|
|
124
127
|
systemInformation,
|
|
125
|
-
|
|
126
|
-
responseTimes:
|
|
127
|
-
finalCounts:
|
|
128
|
-
includeResponseTimes:
|
|
129
|
-
storeMapping:
|
|
130
|
-
latestLogs:
|
|
128
|
+
topFifteenForResponseTime: null,
|
|
129
|
+
responseTimes: null,
|
|
130
|
+
finalCounts: null,
|
|
131
|
+
includeResponseTimes: true,
|
|
132
|
+
storeMapping: this.$store?._modules?.root?.state,
|
|
133
|
+
latestLogs: console.logs // eslint-disable-line no-console
|
|
131
134
|
};
|
|
132
135
|
},
|
|
133
136
|
|
|
@@ -205,17 +208,21 @@ export default {
|
|
|
205
208
|
},
|
|
206
209
|
|
|
207
210
|
async gatherResponseTimes(btnCb) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
const promises = this.topFifteenForResponseTime.flatMap((cluster) => {
|
|
212
|
+
return cluster.map((item) => {
|
|
213
|
+
const t = Date.now();
|
|
214
|
+
|
|
215
|
+
return this.$store.dispatch('management/request', { url: `/k8s/clusters/${ item.capiId }/v1/${ item.resource }` })
|
|
216
|
+
.then(() => ({
|
|
217
|
+
outcome: 'success', item, durationMs: Date.now() - t
|
|
218
|
+
}))
|
|
219
|
+
.catch(() => ({
|
|
220
|
+
outcome: 'error', item, durationMs: Date.now() - t
|
|
221
|
+
}));
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
return await Promise.all(promises).then((responseTimes) => {
|
|
219
226
|
this.responseTimes = responseTimes;
|
|
220
227
|
this.setResourceResponseTiming(responseTimes);
|
|
221
228
|
btnCb(true);
|
package/pages/rio/mesh.vue
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import $ from 'jquery';
|
|
3
2
|
import { escapeHtml } from '@shell/utils/string';
|
|
4
3
|
|
|
5
4
|
const RADIUS = 5;
|
|
@@ -399,7 +398,7 @@ export default {
|
|
|
399
398
|
},
|
|
400
399
|
|
|
401
400
|
clicked(event) {
|
|
402
|
-
const path =
|
|
401
|
+
const path = event.target.closest('.edgePath');
|
|
403
402
|
|
|
404
403
|
console.log(path); // eslint-disable-line no-console
|
|
405
404
|
}
|
package/pkg/tsconfig.json
CHANGED
package/plugins/plugin.js
CHANGED
|
@@ -2,23 +2,9 @@
|
|
|
2
2
|
import { allHashSettled } from '@shell/utils/promise';
|
|
3
3
|
import { shouldNotLoadPlugin, UI_PLUGIN_BASE_URL } from '@shell/config/uiplugins';
|
|
4
4
|
|
|
5
|
-
const META_NAME_PREFIX = 'app-autoload-';
|
|
6
|
-
|
|
7
5
|
export default async function(context) {
|
|
8
|
-
// UI Plugins declared in the HTML head
|
|
9
|
-
const meta = context.app?.head?.meta || [];
|
|
10
6
|
const hash = {};
|
|
11
7
|
|
|
12
|
-
meta.forEach((m) => {
|
|
13
|
-
const metaName = m.name || '';
|
|
14
|
-
|
|
15
|
-
if (metaName.indexOf(META_NAME_PREFIX) === 0) {
|
|
16
|
-
const name = metaName.substr(META_NAME_PREFIX.length);
|
|
17
|
-
|
|
18
|
-
hash[name] = context.$plugin.loadAsync(name, m.content);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
8
|
// Provide a mechanism to load the UI without the plugins loaded - in case there is a problem
|
|
23
9
|
let loadPlugins = true;
|
|
24
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils';
|
|
2
2
|
import { Banner } from './index';
|
|
3
|
-
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive'
|
|
3
|
+
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
|
4
4
|
|
|
5
5
|
describe('component: Banner', () => {
|
|
6
6
|
it('should display text based on label', () => {
|
|
@@ -8,10 +8,8 @@ describe('component: Banner', () => {
|
|
|
8
8
|
const wrapper = mount(
|
|
9
9
|
Banner,
|
|
10
10
|
{
|
|
11
|
-
directives: {
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
propsData: { label }
|
|
11
|
+
directives: { cleanHtmlDirective },
|
|
12
|
+
propsData: { label }
|
|
15
13
|
});
|
|
16
14
|
|
|
17
15
|
const element = wrapper.find('span').element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { RadioButton } from './index';
|
|
3
|
+
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
|
4
|
+
|
|
5
|
+
describe('RadioButton.vue', () => {
|
|
6
|
+
it('renders label slot contents', () => {
|
|
7
|
+
const wrapper = shallowMount(RadioButton, { slots: { label: 'Test Label' } });
|
|
8
|
+
|
|
9
|
+
expect(wrapper.find('.radio-label').text()).toBe('Test Label');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('renders label prop contents', () => {
|
|
13
|
+
const wrapper = shallowMount(
|
|
14
|
+
RadioButton,
|
|
15
|
+
{
|
|
16
|
+
directives: { cleanHtmlDirective },
|
|
17
|
+
propsData: { label: 'Test Label' }
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
expect(wrapper.find('.radio-label').text()).toBe('Test Label');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('renders slot contents when both slot and label prop are provided', () => {
|
|
24
|
+
const wrapper = shallowMount(RadioButton, {
|
|
25
|
+
slots: { label: 'Test Label - Slot' },
|
|
26
|
+
propsData: { label: 'Test Label - Props' },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
expect(wrapper.find('.radio-label').text()).toBe('Test Label - Slot');
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -96,6 +96,10 @@ export default Vue.extend({
|
|
|
96
96
|
hasDescriptionSlot(): boolean {
|
|
97
97
|
return !!this.$slots.description;
|
|
98
98
|
},
|
|
99
|
+
|
|
100
|
+
hasLabelSlot(): boolean {
|
|
101
|
+
return !!this.$slots.label || !!this.$scopedSlots.label;
|
|
102
|
+
}
|
|
99
103
|
},
|
|
100
104
|
|
|
101
105
|
watch: {
|
|
@@ -149,12 +153,19 @@ export default Vue.extend({
|
|
|
149
153
|
/>
|
|
150
154
|
<div class="labeling">
|
|
151
155
|
<label
|
|
152
|
-
v-if="label"
|
|
153
156
|
:class="[ muteLabel ? 'text-muted' : '', 'radio-label', 'm-0']"
|
|
154
157
|
:for="name"
|
|
155
|
-
v-clean-html="label"
|
|
156
158
|
>
|
|
157
|
-
<slot
|
|
159
|
+
<slot
|
|
160
|
+
v-if="hasLabelSlot"
|
|
161
|
+
name="label"
|
|
162
|
+
>
|
|
163
|
+
<!-- slot content -->
|
|
164
|
+
</slot>
|
|
165
|
+
<span
|
|
166
|
+
v-else-if="label"
|
|
167
|
+
v-clean-html="label"
|
|
168
|
+
/>
|
|
158
169
|
</label>
|
|
159
170
|
<div
|
|
160
171
|
v-if="descriptionKey || description"
|
|
@@ -81,6 +81,12 @@ echo -e "${CYAN}${BOLD}Publishing UI Plugins${RESET}"
|
|
|
81
81
|
pushd ${BASE_DIR} > /dev/null
|
|
82
82
|
|
|
83
83
|
if [ "${GITHUB_BUILD}" == "true" ]; then
|
|
84
|
+
# Determine if gh-pages build is possible
|
|
85
|
+
if [[ "${GITHUB_BRANCH}" == "gh-pages" ]] && ! git show-ref -q --heads gh-pages; then
|
|
86
|
+
echo -e "${YELLOW}'gh-pages' branch not found, this branch must exist before running this script${RESET}"
|
|
87
|
+
exit 1
|
|
88
|
+
fi
|
|
89
|
+
|
|
84
90
|
echo -e "${CYAN}GitHub Repository: ${GITHUB_SOURCE}${RESET}"
|
|
85
91
|
echo -e "${CYAN}GitHub Branch : ${GITHUB_BRANCH}${RESET}"
|
|
86
92
|
else
|
|
@@ -188,27 +194,22 @@ for d in pkg/*/ ; do
|
|
|
188
194
|
echo -e "${CYAN}Building plugin from source code${RESET}"
|
|
189
195
|
FORCE_COLOR=1 yarn build-pkg $pkg | cat
|
|
190
196
|
|
|
191
|
-
|
|
192
|
-
# Build the docker image
|
|
193
|
-
${SCRIPT_DIR}/bundle ${pkg} ${PKG_VERSION} ${REGISTRY} ${REGISTRY_ORG} ${IMAGE_PREFIX} ${PUSH}
|
|
194
|
-
else
|
|
195
|
-
echo -e "${CYAN}Adding plugin code ...${RESET}"
|
|
197
|
+
echo -e "${CYAN}Adding plugin code ...${RESET}"
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
EXT_FOLDER=${BASE_DIR}/extensions/${pkg}/${PKG_VERSION}
|
|
200
|
+
PKG_DIST="${BASE_DIR}/dist-pkg/${PKG_NAME}"
|
|
199
201
|
|
|
200
|
-
|
|
202
|
+
rm -rf ${EXT_FOLDER}
|
|
201
203
|
|
|
202
|
-
|
|
204
|
+
mkdir -p ${EXT_FOLDER}/plugin
|
|
203
205
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
# Copy the code into the folder
|
|
207
|
+
cp -R ${PKG_DIST}/* ${EXT_FOLDER}/plugin
|
|
206
208
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
fi
|
|
209
|
+
pushd ${BASE_DIR}/extensions/${pkg}/${PKG_VERSION} > /dev/null
|
|
210
|
+
rm -f plugin/report.html
|
|
211
|
+
find plugin -type f | sort > files.txt
|
|
212
|
+
popd > /dev/null
|
|
212
213
|
|
|
213
214
|
rm -rf ${TMP}/container
|
|
214
215
|
|
|
@@ -248,7 +249,7 @@ for d in pkg/*/ ; do
|
|
|
248
249
|
rm *.yaml
|
|
249
250
|
mv temp.cr cr.yaml
|
|
250
251
|
ENDPOINT=https://raw.githubusercontent.com/${GITHUB_SOURCE}/${GITHUB_BRANCH}/extensions/${pkg}/${PKG_VERSION}
|
|
251
|
-
sed -i.bak -e 's@endpoint: .*@endpoint: '"${ENDPOINT}"'@g' cr.yaml
|
|
252
|
+
sed -i.bak -e 's@endpoint: .*@endpoint: '"${ENDPOINT}"'@g' cr.yaml
|
|
252
253
|
rm *.bak
|
|
253
254
|
popd > /dev/null
|
|
254
255
|
fi
|
|
@@ -266,6 +267,15 @@ for d in pkg/*/ ; do
|
|
|
266
267
|
|
|
267
268
|
if [ -f "${HELM_INDEX}" ]; then
|
|
268
269
|
UPDATE="--merge ${HELM_INDEX}"
|
|
270
|
+
elif [ "${GITHUB_BUILD}" == "true" ] && [[ -n ${GITHUB_SOURCE} ]]; then
|
|
271
|
+
GITHUB_SOURCE=$(echo -e "${GITHUB_SOURCE}" | sed 's/https:\/\///g')
|
|
272
|
+
|
|
273
|
+
# Check if git branch contains index.yaml
|
|
274
|
+
wget -P ${BASE_DIR} https://raw.githubusercontent.com/${GITHUB_SOURCE}/${GITHUB_BRANCH}/index.yaml
|
|
275
|
+
|
|
276
|
+
if [ -f "${HELM_INDEX}" ]; then
|
|
277
|
+
UPDATE="--merge ${HELM_INDEX}"
|
|
278
|
+
fi
|
|
269
279
|
fi
|
|
270
280
|
|
|
271
281
|
# Base URL referencing assets directly from GitHub
|
|
@@ -292,6 +302,21 @@ for d in pkg/*/ ; do
|
|
|
292
302
|
fi
|
|
293
303
|
done
|
|
294
304
|
|
|
305
|
+
if [ "${GITHUB_BUILD}" == "false" ]; then
|
|
306
|
+
BASE=$(basename ${BASE_DIR})
|
|
307
|
+
EXT_VERSION=$(jq -r .version ${BASE_DIR}/package.json)
|
|
308
|
+
|
|
309
|
+
if [ -z ${EXT_VERSION} ]; then
|
|
310
|
+
EXT_VERSION="0.0.0"
|
|
311
|
+
fi
|
|
312
|
+
|
|
313
|
+
echo -e "${CYAN}Base extension: ${BASE}${RESET}"
|
|
314
|
+
echo -e "${CYAN}Extension version: ${EXT_VERSION}${RESET}"
|
|
315
|
+
|
|
316
|
+
# Build the docker image
|
|
317
|
+
${SCRIPT_DIR}/bundle ${BASE} ${EXT_VERSION} ${REGISTRY} ${REGISTRY_ORG} ${IMAGE_PREFIX} ${PUSH}
|
|
318
|
+
fi
|
|
319
|
+
|
|
295
320
|
if [ "${GITHUB_BUILD}" == "true" ]; then
|
|
296
321
|
cp index.yaml tmp
|
|
297
322
|
fi
|
|
@@ -306,9 +331,3 @@ rm -rf ${CHART_TMP}
|
|
|
306
331
|
if [ "${GITHUB_BUILD}" == "false" ]; then
|
|
307
332
|
rm -rf ${TMP}
|
|
308
333
|
fi
|
|
309
|
-
|
|
310
|
-
# If the user asked to create a commit, commit the changes
|
|
311
|
-
# if [ "${COMMIT}" == "true" ]; then
|
|
312
|
-
# echo -e "${CYAN}${BOLD}Creating git commit${RESET}"
|
|
313
|
-
# git add --all
|
|
314
|
-
# fi
|
package/scripts/serve-pkgs
CHANGED
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
const path = require('path');
|
|
5
|
-
|
|
6
|
-
console.log(__dirname);
|
|
5
|
+
const { exit } = require('process');
|
|
7
6
|
|
|
8
7
|
const dir = path.resolve('.');
|
|
9
8
|
const pkgs = path.join(dir, 'dist-pkg');
|
|
10
9
|
let port = 4500;
|
|
11
10
|
|
|
11
|
+
if (!fs.existsSync(pkgs)) {
|
|
12
|
+
console.log(`\n\x1B[31m%s\x1B[0m\n`, `Error: The 'dist-pkg directory doesn't exist. You likely need to run the 'yarn build-pkg <pkg name>' command first.`);
|
|
13
|
+
exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
const express = require('express');
|
|
13
17
|
const serveStatic = require('serve-static');
|
|
14
18
|
|
package/store/type-map.js
CHANGED
|
@@ -1163,7 +1163,7 @@ export const getters = {
|
|
|
1163
1163
|
return (rawType, subType) => {
|
|
1164
1164
|
const key = getters.componentFor(rawType, subType);
|
|
1165
1165
|
|
|
1166
|
-
return hasCustom(state, rootState, '
|
|
1166
|
+
return hasCustom(state, rootState, 'cloud-credential', key, key => resolveCloudCredentialComponent(key));
|
|
1167
1167
|
};
|
|
1168
1168
|
},
|
|
1169
1169
|
|
package/tsconfig.json
CHANGED