@rancher/shell 0.3.14 → 0.3.15
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/nutanix.svg +1 -0
- package/assets/translations/en-us.yaml +83 -2
- package/chart/gatekeeper.vue +2 -2
- package/chart/monitoring/alerting/index.vue +3 -3
- package/chart/monitoring/index.vue +2 -2
- package/chart/monitoring/prometheus/index.vue +1 -1
- package/chart/rancher-backup/index.vue +2 -2
- package/cloud-credential/harvester.vue +2 -2
- package/components/AssignTo.vue +1 -1
- package/components/AwsComplianceBanner.vue +1 -1
- package/components/BackLink.vue +7 -0
- package/components/BrandImage.vue +3 -3
- package/components/ClusterProviderIcon.vue +1 -1
- package/components/CommunityLinks.vue +2 -2
- package/components/ConsumptionGauge.vue +17 -2
- package/components/CruResource.vue +2 -1
- package/components/DashboardMetrics.vue +8 -0
- package/components/DetailTop.vue +1 -1
- package/components/ExplorerMembers.vue +8 -8
- package/components/ExplorerProjectsNamespaces.vue +9 -9
- package/components/FixedBanner.vue +1 -1
- package/components/GlobalRoleBindings.vue +11 -11
- package/components/GrafanaDashboard.vue +7 -1
- package/components/GrowlManager.vue +1 -1
- package/components/HarvesterServiceAddOnConfig.vue +4 -3
- package/components/IconOrSvg.vue +10 -3
- package/components/LandingPagePreference.vue +2 -2
- package/components/MoveModal.vue +1 -1
- package/components/PodSecurityAdmission.vue +3 -3
- package/components/ProgressBarMulti.vue +2 -2
- package/components/PromptRemove.vue +52 -28
- package/components/PromptRestore.vue +3 -3
- package/components/Questions/index.vue +5 -5
- package/components/RelatedWorkloadsTable.vue +1 -1
- package/components/ResourceList/Masthead.vue +1 -1
- package/components/ResourceTable.vue +3 -3
- package/components/ResourceYaml.vue +1 -1
- package/components/RoleBindings.vue +2 -2
- package/components/SingleClusterInfo.vue +1 -1
- package/components/SortableTable/actions.js +3 -3
- package/components/SortableTable/advanced-filtering.js +7 -7
- package/components/SortableTable/filtering.js +1 -1
- package/components/SortableTable/index.vue +9 -9
- package/components/SortableTable/selection.js +5 -5
- package/components/SortableTable/sorting.js +5 -5
- package/components/Tabbed/index.vue +7 -7
- package/components/TableSparkLine.vue +1 -1
- package/components/Wizard.vue +11 -23
- package/components/__tests__/Collapse.spec.ts +1 -1
- package/components/__tests__/CruResource.test.ts +74 -0
- package/components/__tests__/SimpleBox.spec.ts +1 -1
- package/components/auth/RoleDetailEdit.vue +7 -3
- package/components/auth/SelectPrincipal.vue +3 -3
- package/components/fleet/FleetResources.vue +1 -1
- package/components/fleet/FleetStatus.vue +4 -4
- package/components/fleet/FleetSummary.vue +1 -1
- package/components/fleet/ForceDirectedTreeChart/chartIcons.js +1 -1
- package/components/fleet/ForceDirectedTreeChart/index.vue +1 -1
- package/components/form/ArrayList.vue +11 -3
- package/components/form/ArrayListSelect.vue +2 -2
- package/components/form/FileSelector.vue +6 -0
- package/components/form/GitPicker.vue +528 -0
- package/components/form/KeyValue.vue +82 -41
- package/components/form/LabeledSelect.vue +2 -2
- package/components/form/MatchExpressions.vue +2 -2
- package/components/form/Members/ClusterMembershipEditor.vue +1 -2
- package/components/form/Members/ClusterPermissionsEditor.vue +6 -5
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -2
- package/components/form/NameNsDescription.vue +13 -6
- package/components/form/Networking.vue +2 -2
- package/components/form/NodeScheduling.vue +1 -1
- package/components/form/PodAffinity.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +4 -4
- package/components/form/ResourceQuota/Namespace.vue +2 -2
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -2
- package/components/form/ResourceQuota/Project.vue +1 -1
- package/components/form/ResourceQuota/shared.js +2 -2
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/ResourceTabs/index.vue +1 -1
- package/components/form/RuleSelector.vue +1 -1
- package/components/form/SecretSelector.vue +4 -4
- package/components/form/Select.vue +2 -2
- package/components/form/SelectOrCreateAuthSecret.vue +3 -3
- package/components/form/ServiceNameSelect.vue +1 -1
- package/components/form/ServicePorts.vue +1 -1
- package/components/form/ShellInput.vue +1 -1
- package/components/form/SimpleSecretSelector.vue +4 -4
- package/components/form/Taints.vue +1 -1
- package/components/form/ValueFromResource.vue +3 -3
- package/components/form/WorkloadPorts.vue +8 -7
- package/components/form/__tests__/Error.test.ts +1 -1
- package/components/form/__tests__/KeyValue.test.ts +21 -0
- package/components/formatter/ClusterLink.vue +1 -1
- package/components/formatter/ClusterProvider.vue +13 -2
- package/components/formatter/Endpoints.vue +1 -1
- package/components/formatter/FleetSummaryGraph.vue +2 -2
- package/components/formatter/IngressTarget.vue +2 -2
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/PrincipalGroupBindings.vue +1 -1
- package/components/formatter/ReceiverIcons.vue +3 -3
- package/components/formatter/ServiceType.vue +1 -1
- package/components/formatter/WorkloadDetailEndpoints.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/formatter/__tests__/LiveDate.test.ts +1 -1
- package/components/graph/Bar.vue +1 -1
- package/components/graph/LinePlot.vue +3 -3
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +5 -5
- package/components/nav/NamespaceFilter.vue +14 -14
- package/components/nav/TopLevelMenu.vue +76 -11
- package/components/nav/WindowManager/ContainerLogs.vue +2 -2
- package/components/nav/WindowManager/ContainerShell.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +1 -1
- package/config/home-links.js +4 -4
- package/config/labels-annotations.js +8 -9
- package/config/pod-security-admission.ts +1 -1
- package/config/product/auth.js +4 -4
- package/config/product/explorer.js +14 -0
- package/config/router.js +5 -0
- package/config/store.js +2 -0
- package/config/table-headers.js +13 -13
- package/config/uiplugins.js +8 -1
- package/core/plugin-routes.ts +3 -2
- package/core/plugin.ts +3 -3
- package/core/plugins.js +7 -7
- package/creators/pkg/files/index.ts +1 -1
- package/detail/cis.cattle.io.clusterscan.vue +3 -3
- package/detail/fleet.cattle.io.bundle.vue +1 -1
- package/detail/helm.cattle.io.projecthelmchart.vue +16 -29
- package/detail/management.cattle.io.user.vue +12 -12
- package/detail/namespace.vue +4 -4
- package/detail/networking.k8s.io.ingress.vue +3 -3
- package/detail/node.vue +2 -2
- package/detail/provisioning.cattle.io.cluster.vue +9 -10
- package/detail/service.vue +1 -1
- package/detail/workload/index.vue +3 -3
- package/dialog/AddProjectMemberDialog.vue +2 -2
- package/dialog/DrainNode.vue +1 -1
- package/dialog/GenericPrompt.vue +9 -5
- package/dialog/RotateEncryptionKeyDialog.vue +2 -2
- package/dialog/ScaleMachineDownDialog.vue +2 -2
- package/edit/auth/azuread.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +5 -5
- package/edit/cis.cattle.io.clusterscan.vue +5 -5
- package/edit/cloudcredential.vue +4 -4
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +1 -1
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +4 -4
- package/edit/fleet.cattle.io.gitrepo.vue +6 -6
- package/edit/helm.cattle.io.projecthelmchart.vue +3 -3
- package/edit/logging-flow/index.vue +4 -4
- package/edit/logging.banzaicloud.io.output/index.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +1 -1
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -1
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +1 -1
- package/edit/management.cattle.io.project.vue +3 -3
- package/edit/management.cattle.io.projectroletemplatebinding.vue +2 -2
- package/edit/management.cattle.io.setting.vue +1 -1
- package/edit/management.cattle.io.user.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +3 -3
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +5 -5
- package/edit/monitoring.coreos.com.prometheusrule/duration.js +1 -1
- package/edit/monitoring.coreos.com.receiver/auth.vue +2 -2
- package/edit/monitoring.coreos.com.receiver/tls.vue +3 -4
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +53 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +3 -3
- package/edit/monitoring.coreos.com.receiver/types/webhook.add.vue +1 -1
- package/edit/monitoring.coreos.com.route.vue +2 -2
- package/edit/namespace.vue +21 -13
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -2
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/RulePath.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rules.vue +2 -2
- package/edit/networking.k8s.io.ingress/index.vue +4 -4
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +4 -4
- package/edit/persistentvolumeclaim.vue +3 -3
- package/edit/provisioning.cattle.io.cluster/RegistryMirrors.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/index.vue +7 -7
- package/edit/provisioning.cattle.io.cluster/rke2.vue +28 -29
- package/edit/resources.cattle.io.backup.vue +2 -2
- package/edit/resources.cattle.io.restore.vue +3 -3
- package/edit/secret/generic.vue +1 -1
- package/edit/secret/index.vue +3 -3
- package/edit/service.vue +3 -21
- package/edit/serviceaccount.vue +2 -2
- package/edit/storage.k8s.io.storageclass/index.vue +4 -4
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +1 -1
- package/edit/token.vue +5 -5
- package/edit/workload/index.vue +1 -1
- package/edit/workload/mixins/workload.js +8 -8
- package/edit/workload/storage/ContainerMountPaths.vue +9 -9
- package/edit/workload/storage/Mount.vue +2 -2
- package/edit/workload/storage/csi/index.vue +1 -1
- package/edit/workload/storage/ephemeralVolume/index.vue +1 -1
- package/edit/workload/storage/index.vue +6 -6
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +2 -2
- package/initialize/client.js +8 -8
- package/initialize/index.js +1 -4
- package/layouts/default.vue +38 -11
- package/list/catalog.cattle.io.clusterrepo.vue +9 -1
- package/list/cis.cattle.io.clusterscan.vue +1 -1
- package/list/fleet.cattle.io.cluster.vue +2 -2
- package/list/group.principal.vue +1 -1
- package/list/helm.cattle.io.projecthelmchart.vue +2 -2
- package/list/management.cattle.io.cluster.vue +1 -1
- package/list/management.cattle.io.feature.vue +1 -1
- package/list/management.cattle.io.user.vue +2 -2
- package/list/node.vue +5 -5
- package/list/provisioning.cattle.io.cluster.vue +4 -5
- package/machine-config/amazonec2.vue +2 -2
- package/machine-config/digitalocean.vue +4 -4
- package/machine-config/linode.vue +4 -4
- package/machine-config/vmwarevsphere.vue +12 -12
- package/middleware/authenticated.js +7 -6
- package/mixins/brand.js +1 -1
- package/mixins/chart.js +6 -6
- package/mixins/fetch.client.js +2 -2
- package/mixins/form-validation.js +7 -7
- package/mixins/resource-fetch-namespaced.js +1 -1
- package/mixins/resource-fetch.js +2 -2
- package/models/apps.statefulset.js +2 -2
- package/models/batch.cronjob.js +1 -1
- package/models/catalog.cattle.io.app.js +4 -4
- package/models/cis.cattle.io.clusterscan.js +1 -1
- package/models/cis.cattle.io.clusterscanbenchmark.js +1 -1
- package/models/cis.cattle.io.clusterscanreport.js +1 -1
- package/models/cloudcredential.js +1 -1
- package/models/cluster/node.js +5 -5
- package/models/cluster.x-k8s.io.machinedeployment.js +2 -2
- package/models/fleet.cattle.io.gitrepo.js +3 -3
- package/models/group.principal.js +4 -4
- package/models/helm.cattle.io.projecthelmchart.js +2 -2
- package/models/logging.banzaicloud.io.clusterflow.js +2 -2
- package/models/logging.banzaicloud.io.flow.js +5 -5
- package/models/logging.banzaicloud.io.output.js +2 -2
- package/models/management.cattle.io.cluster.js +10 -14
- package/models/management.cattle.io.globalrole.js +4 -4
- package/models/management.cattle.io.node.js +2 -2
- package/models/management.cattle.io.nodepool.js +3 -3
- package/models/management.cattle.io.nodetemplate.js +4 -4
- package/models/management.cattle.io.project.js +2 -2
- package/models/management.cattle.io.roletemplate.js +1 -1
- package/models/management.cattle.io.setting.js +1 -1
- package/models/management.cattle.io.user.js +5 -5
- package/models/monitoring.coreos.com.receiver.js +9 -9
- package/models/namespace.js +1 -1
- package/models/networking.k8s.io.ingress.js +5 -5
- package/models/persistentvolume.js +3 -3
- package/models/pod.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +39 -27
- package/models/rbac.authorization.k8s.io.clusterrole.js +2 -2
- package/models/rbac.authorization.k8s.io.role.js +3 -3
- package/models/secret.js +1 -1
- package/models/service.js +2 -2
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/token.js +1 -1
- package/models/workload.js +6 -6
- package/models/workload.service.js +5 -21
- package/package.json +2 -1
- package/pages/about.vue +9 -9
- package/pages/account/index.vue +2 -2
- package/pages/auth/login.vue +15 -12
- package/pages/auth/verify.vue +6 -0
- package/pages/c/_cluster/apps/charts/index.vue +4 -4
- package/pages/c/_cluster/apps/charts/install.vue +28 -20
- package/pages/c/_cluster/auth/roles/index.vue +9 -9
- package/pages/c/_cluster/explorer/index.vue +41 -16
- package/pages/c/_cluster/explorer/tools/index.vue +8 -8
- package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +1 -1
- package/pages/c/_cluster/fleet/index.vue +11 -11
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/settings/links.vue +3 -3
- package/pages/c/_cluster/settings/performance.vue +1 -1
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +6 -6
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +3 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +3 -3
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +3 -3
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +6 -6
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +4 -4
- package/pages/c/_cluster/uiplugins/index.vue +22 -19
- package/pages/diagnostic.vue +6 -6
- package/pages/home.vue +3 -3
- package/pages/prefs.vue +2 -2
- package/pages/rio/mesh.vue +3 -3
- package/pages/support/index.vue +10 -1
- package/pkg/auto-import.js +1 -1
- package/pkg/tsconfig.json +1 -0
- package/pkg/vue.config.js +1 -1
- package/plugins/axios.js +1 -1
- package/plugins/clean-html-directive.js +1 -1
- package/plugins/dashboard-store/__tests__/mutations.spec.js +4 -4
- package/plugins/dashboard-store/actions.js +4 -4
- package/plugins/dashboard-store/getters.js +1 -1
- package/plugins/dashboard-store/index.js +1 -1
- package/plugins/dashboard-store/mutations.js +2 -2
- package/plugins/dashboard-store/resource-class.js +8 -8
- package/plugins/i18n.js +1 -1
- package/plugins/plugin.js +5 -1
- package/plugins/steve/actions.js +3 -3
- package/plugins/steve/getters.js +3 -3
- package/plugins/steve/hybrid-class.js +1 -1
- package/plugins/steve/mutations.js +1 -1
- package/plugins/steve/performanceTesting.js +1 -1
- package/plugins/steve/resourceWatcher.js +1 -1
- package/plugins/steve/subscribe.js +6 -6
- package/plugins/steve/worker/web-worker.basic.js +1 -1
- package/promptRemove/management.cattle.io.project.vue +3 -3
- package/promptRemove/mixin/roleDeletionCheck.js +4 -4
- package/promptRemove/pod.vue +1 -1
- package/rancher-components/StringList/StringList.vue +34 -50
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +2 -2
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +1 -1
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +1 -1
- package/rancher-components/components/Form/Radio/RadioButton.vue +2 -2
- package/rancher-components/components/Form/Radio/RadioGroup.vue +2 -2
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +1 -1
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +7 -7
- package/rancher-components/components/StringList/StringList.test.ts +10 -9
- package/rancher-components/components/StringList/StringList.vue +5 -5
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
- package/store/action-menu.js +4 -4
- package/store/auth.js +40 -7
- package/store/aws.js +1 -1
- package/store/catalog.js +12 -11
- package/store/digitalocean.js +4 -4
- package/store/features.js +1 -0
- package/store/github.js +70 -213
- package/store/gitlab.js +159 -0
- package/store/growl.js +1 -1
- package/store/i18n.js +7 -7
- package/store/index.js +63 -22
- package/store/linode.js +1 -1
- package/store/plugins.js +5 -5
- package/store/pnap.js +1 -1
- package/store/prefs.js +6 -6
- package/store/resource-fetch.js +3 -3
- package/store/type-map.js +61 -42
- package/store/uiplugins.ts +2 -1
- package/store/wm.js +5 -4
- package/tsconfig.default.json +10 -0
- package/tsconfig.json +2 -9
- package/types/shell/index.d.ts +21 -13
- package/utils/__tests__/version.test.ts +28 -0
- package/utils/alertmanagerconfig.js +4 -4
- package/utils/array.ts +4 -4
- package/utils/async.ts +1 -1
- package/utils/auth.js +3 -3
- package/utils/axios.js +5 -5
- package/utils/cluster.js +4 -3
- package/utils/color.js +10 -0
- package/utils/create-yaml.js +4 -4
- package/utils/crypto/browserHashUtils.js +1 -1
- package/utils/crypto/browserMd5.js +1 -1
- package/utils/crypto/browserSha1.js +1 -1
- package/utils/crypto/browserSha256.js +1 -1
- package/utils/crypto/index.js +3 -3
- package/utils/favicon.js +2 -3
- package/utils/gatekeeper/util.js +3 -3
- package/utils/gc/gc.ts +2 -2
- package/utils/git.ts +92 -0
- package/utils/grafana.js +4 -4
- package/utils/monitoring.js +2 -2
- package/utils/nuxt.js +2 -2
- package/utils/object.js +5 -5
- package/utils/pod-security-admission.ts +1 -1
- package/utils/projectAndNamespaceFiltering.utils.ts +1 -1
- package/utils/select.js +2 -2
- package/utils/selector.js +2 -2
- package/utils/settings.ts +17 -2
- package/utils/socket.js +30 -6
- package/utils/sort.js +1 -1
- package/utils/string.js +1 -1
- package/utils/url.ts +1 -1
- package/utils/validators/formRules/index.ts +3 -3
- package/utils/validators/role-template.js +4 -4
- package/utils/version.js +14 -1
- package/vue.config.js +19 -13
- package/components/.DS_Store +0 -0
- package/components/__tests__/.DS_Store +0 -0
- package/components/form/GithubPicker.vue +0 -390
- package/creators/pkg/package-lock.json +0 -37
- package/yarn-error.log +0 -196
package/vue.config.js
CHANGED
|
@@ -162,7 +162,7 @@ module.exports = function(dir, _appConfig) {
|
|
|
162
162
|
const items = fs.readdirSync(path.relative(dir, './pkg'));
|
|
163
163
|
|
|
164
164
|
// Ignore hidden folders
|
|
165
|
-
items.filter(name => !name.startsWith('.')).forEach((name) => {
|
|
165
|
+
items.filter((name) => !name.startsWith('.')).forEach((name) => {
|
|
166
166
|
const f = require(path.join(dir, 'pkg', name, 'package.json'));
|
|
167
167
|
|
|
168
168
|
// Package file must have rancher field to be a plugin
|
|
@@ -200,7 +200,7 @@ module.exports = function(dir, _appConfig) {
|
|
|
200
200
|
const pkgImport = new webpack.NormalModuleReplacementPlugin(/^@pkg/, (resource) => {
|
|
201
201
|
const ctx = resource.context.split('/');
|
|
202
202
|
// Find 'pkg' folder in the contxt
|
|
203
|
-
const index = ctx.findIndex(s => s === 'pkg');
|
|
203
|
+
const index = ctx.findIndex((s) => s === 'pkg');
|
|
204
204
|
|
|
205
205
|
if (index !== -1 && (index + 1) < ctx.length) {
|
|
206
206
|
const pkg = ctx[index + 1];
|
|
@@ -271,6 +271,9 @@ module.exports = function(dir, _appConfig) {
|
|
|
271
271
|
}
|
|
272
272
|
const rancherEnv = process.env.RANCHER_ENV || 'web';
|
|
273
273
|
|
|
274
|
+
const loginLocaleSelector = process.env.LOGIN_LOCALE_SELECTOR || 'true';
|
|
275
|
+
const excludeOperatorPkg = process.env.EXCLUDE_OPERATOR_PKG || 'false';
|
|
276
|
+
|
|
274
277
|
console.log(`API: '${ api }'. Env: '${ rancherEnv }'`); // eslint-disable-line no-console
|
|
275
278
|
const proxy = {
|
|
276
279
|
...appConfig.proxies,
|
|
@@ -330,7 +333,7 @@ module.exports = function(dir, _appConfig) {
|
|
|
330
333
|
|
|
331
334
|
server.websocketProxies.push({
|
|
332
335
|
upgrade(req, socket, head) {
|
|
333
|
-
const path = Object.keys(socketProxies).find(path => req.url.startsWith(path));
|
|
336
|
+
const path = Object.keys(socketProxies).find((path) => req.url.startsWith(path));
|
|
334
337
|
|
|
335
338
|
if (path) {
|
|
336
339
|
const proxy = socketProxies[path];
|
|
@@ -381,6 +384,7 @@ module.exports = function(dir, _appConfig) {
|
|
|
381
384
|
config.resolve.alias['@pkg'] = path.join(dir, 'pkg');
|
|
382
385
|
config.resolve.alias['./node_modules'] = path.join(dir, 'node_modules');
|
|
383
386
|
config.resolve.alias['@components'] = COMPONENTS_DIR;
|
|
387
|
+
config.resolve.alias['vue$'] = dev ? path.resolve(process.cwd(), 'node_modules', 'vue') : 'vue';
|
|
384
388
|
config.resolve.modules.push(__dirname);
|
|
385
389
|
config.plugins.push(virtualModules);
|
|
386
390
|
config.plugins.push(autoImport);
|
|
@@ -389,17 +393,19 @@ module.exports = function(dir, _appConfig) {
|
|
|
389
393
|
// DefinePlugin does string replacement within our code. We may want to consider replacing it with something else. In code we'll see something like
|
|
390
394
|
// process.env.commit even though process and env aren't even defined objects. This could cause people to be mislead.
|
|
391
395
|
config.plugins.push(new webpack.DefinePlugin({
|
|
392
|
-
'process.client':
|
|
393
|
-
'process.env.commit':
|
|
394
|
-
'process.env.version':
|
|
395
|
-
'process.env.dev':
|
|
396
|
-
'process.env.pl':
|
|
397
|
-
'process.env.perfTest':
|
|
398
|
-
'process.env.
|
|
399
|
-
'process.env.
|
|
400
|
-
'process.env.
|
|
396
|
+
'process.client': JSON.stringify(true),
|
|
397
|
+
'process.env.commit': JSON.stringify(commit),
|
|
398
|
+
'process.env.version': JSON.stringify(dashboardVersion),
|
|
399
|
+
'process.env.dev': JSON.stringify(dev),
|
|
400
|
+
'process.env.pl': JSON.stringify(pl),
|
|
401
|
+
'process.env.perfTest': JSON.stringify(perfTest),
|
|
402
|
+
'process.env.loginLocaleSelector': JSON.stringify(loginLocaleSelector),
|
|
403
|
+
'process.env.excludeOperatorPkg': JSON.stringify(excludeOperatorPkg),
|
|
404
|
+
'process.env.rancherEnv': JSON.stringify(rancherEnv),
|
|
405
|
+
'process.env.harvesterPkgUrl': JSON.stringify(process.env.HARVESTER_PKG_URL),
|
|
406
|
+
'process.env.api': JSON.stringify(api),
|
|
401
407
|
// Store the Router Base as env variable that we can use in `shell/config/router.js`
|
|
402
|
-
'process.env.routerBase':
|
|
408
|
+
'process.env.routerBase': JSON.stringify(routerBasePath),
|
|
403
409
|
|
|
404
410
|
// This is a replacement of the nuxt publicRuntimeConfig
|
|
405
411
|
'nuxt.publicRuntimeConfig': JSON.stringify({
|
package/components/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { mapState } from 'vuex';
|
|
3
|
-
import debounce from 'lodash/debounce';
|
|
4
|
-
import { findBy } from '@shell/utils/array';
|
|
5
|
-
import { EXTENDED_SCOPES } from '@shell/store/github';
|
|
6
|
-
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
7
|
-
|
|
8
|
-
export const FILE_PATTERNS = {
|
|
9
|
-
dockerfile: /^Dockerfile(\..*)?$/i,
|
|
10
|
-
riofile: /^Riofile(\..*)?$/i,
|
|
11
|
-
yaml: /^.*\.ya?ml?$/i,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
components: { LabeledSelect },
|
|
16
|
-
props: {
|
|
17
|
-
value: {
|
|
18
|
-
type: Object,
|
|
19
|
-
required: true,
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
// Filter files displayed in dropdown by keys in FILE_PATTERNS
|
|
23
|
-
filePattern: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: null,
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
preferredFile: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: null,
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
fileKey: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: 'dockerfile',
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
repos: [],
|
|
42
|
-
branches: [],
|
|
43
|
-
files: [],
|
|
44
|
-
|
|
45
|
-
loadingRecentRepos: true,
|
|
46
|
-
loadingBranches: true,
|
|
47
|
-
loadingFiles: true,
|
|
48
|
-
|
|
49
|
-
selectedRepo: null,
|
|
50
|
-
selectedBranch: null,
|
|
51
|
-
selectedFile: null
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
computed: {
|
|
56
|
-
...mapState({
|
|
57
|
-
scopes: state => state.github.scopes,
|
|
58
|
-
recentRepos: state => state.github.repos,
|
|
59
|
-
}),
|
|
60
|
-
|
|
61
|
-
hasPrivate() {
|
|
62
|
-
return this.scopes.includes('repo');
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
repoPlaceholder() {
|
|
66
|
-
if ( this.loadingRecentRepos ) {
|
|
67
|
-
return 'Loading...';
|
|
68
|
-
} else {
|
|
69
|
-
return 'Select a Repository...';
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
branchPlaceholder() {
|
|
74
|
-
if ( this.selectedRepo ) {
|
|
75
|
-
if ( this.loadingBranches ) {
|
|
76
|
-
return 'Loading...';
|
|
77
|
-
} else {
|
|
78
|
-
return 'Select a Branch...';
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
return 'Select a Repository First';
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
filePlaceholder() {
|
|
86
|
-
if ( this.selectedBranch ) {
|
|
87
|
-
if ( this.loadingFiles ) {
|
|
88
|
-
return 'Loading...';
|
|
89
|
-
} else {
|
|
90
|
-
return 'Select a File...';
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
return 'Select a Branch First';
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
created() {
|
|
99
|
-
this.queueSearchRepos = debounce(this.searchRepos, 300);
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
async mounted() {
|
|
103
|
-
await this.fetchRepos();
|
|
104
|
-
|
|
105
|
-
if ( this.value && this.value.repo ) {
|
|
106
|
-
const repo = await this.$store.dispatch('github/fetchRepoByUrl', this.value.repo);
|
|
107
|
-
|
|
108
|
-
if ( !repo ) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.selectRepo(repo);
|
|
113
|
-
|
|
114
|
-
const branch = await this.$store.dispatch('github/fetchBranch', { repo, branch: this.value.branch });
|
|
115
|
-
|
|
116
|
-
if ( !branch ) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
this.selectBranch(branch);
|
|
121
|
-
|
|
122
|
-
const file = await this.$store.dispatch('github/fetchFile', {
|
|
123
|
-
repo,
|
|
124
|
-
branch,
|
|
125
|
-
file: this.value.file || this.preferredFile
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
if ( !file ) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
this.selectFile(file);
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
methods: {
|
|
137
|
-
update() {
|
|
138
|
-
if ( this.selectedRepo && this.selectedBranch && this.selectedFile ) {
|
|
139
|
-
// Do something
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
selectRepo(repo) {
|
|
144
|
-
this.selectedFile = null;
|
|
145
|
-
this.selectedBranch = null;
|
|
146
|
-
this.selectedRepo = repo;
|
|
147
|
-
if ( repo ) {
|
|
148
|
-
this.fetchBranches(repo);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
this.update();
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
selectBranch(branch) {
|
|
155
|
-
this.selectedFile = null;
|
|
156
|
-
this.selectedBranch = branch;
|
|
157
|
-
if ( branch ) {
|
|
158
|
-
this.fetchFiles(this.selectedRepo, branch);
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
selectFile(file) {
|
|
163
|
-
this.selectedFile = file;
|
|
164
|
-
this.value.repo = this.selectedRepo.clone_url;
|
|
165
|
-
this.value.branch = this.selectedBranch.name;
|
|
166
|
-
delete this.value.revision;
|
|
167
|
-
this.value[this.fileKey] = file.path;
|
|
168
|
-
this.$emit('input', this.value);
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
async expandScope() {
|
|
172
|
-
await this.$store.dispatch('github/forgetCache');
|
|
173
|
-
this.$store.dispatch('auth/redirectTo', {
|
|
174
|
-
provider: 'github',
|
|
175
|
-
scopes: EXTENDED_SCOPES,
|
|
176
|
-
backTo: this.$route.fullPath
|
|
177
|
-
});
|
|
178
|
-
},
|
|
179
|
-
|
|
180
|
-
onSearchRepos(search, loading) {
|
|
181
|
-
loading(true);
|
|
182
|
-
this.queueSearchRepos(search, loading);
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
async searchRepos(search, loading) {
|
|
186
|
-
const recent = await this.$store.dispatch('github/fetchRecentRepos');
|
|
187
|
-
|
|
188
|
-
if ( !search ) {
|
|
189
|
-
this.repos = recent;
|
|
190
|
-
loading(false);
|
|
191
|
-
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
try {
|
|
196
|
-
loading(true);
|
|
197
|
-
|
|
198
|
-
const remote = await this.$store.dispatch('github/searchRepos', { search });
|
|
199
|
-
let matchingRecent = [];
|
|
200
|
-
|
|
201
|
-
if ( recent ) {
|
|
202
|
-
matchingRecent = recent.filter((x) => {
|
|
203
|
-
return x.full_name.toLowerCase().includes(search.toLowerCase()) &&
|
|
204
|
-
!findBy(remote, 'full_name', x.full_name);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
this.repos = [...matchingRecent, ...remote];
|
|
209
|
-
} catch (err) {
|
|
210
|
-
this.repos = recent;
|
|
211
|
-
} finally {
|
|
212
|
-
loading(false);
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
async fetchRepos() {
|
|
217
|
-
try {
|
|
218
|
-
const res = await this.$store.dispatch('github/fetchRecentRepos');
|
|
219
|
-
|
|
220
|
-
this.repos = res;
|
|
221
|
-
} finally {
|
|
222
|
-
this.loadingRecentRepos = false;
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
async fetchBranches(repo) {
|
|
227
|
-
this.loadingBranches = true;
|
|
228
|
-
|
|
229
|
-
try {
|
|
230
|
-
const res = await this.$store.dispatch('github/fetchBranches', { repo: this.selectedRepo });
|
|
231
|
-
|
|
232
|
-
this.branches = res;
|
|
233
|
-
|
|
234
|
-
if ( !this.selectedBranch ) {
|
|
235
|
-
const master = findBy(this.branches, 'name', 'master');
|
|
236
|
-
|
|
237
|
-
if ( master ) {
|
|
238
|
-
this.selectBranch(master);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
} finally {
|
|
242
|
-
this.loadingBranches = false;
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
async fetchFiles(repo, branch) {
|
|
247
|
-
try {
|
|
248
|
-
const res = await this.$store.dispatch('github/fetchFiles', {
|
|
249
|
-
repo: this.selectedRepo,
|
|
250
|
-
branch: this.selectedBranch,
|
|
251
|
-
pattern: FILE_PATTERNS[(this.filePattern || '').toLowerCase()],
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
this.files = res;
|
|
255
|
-
|
|
256
|
-
if ( !this.selectedFile && this.preferredFile ) {
|
|
257
|
-
const file = findBy(this.files, 'path', this.preferredFile);
|
|
258
|
-
|
|
259
|
-
if ( file ) {
|
|
260
|
-
this.selectFile(file);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
} finally {
|
|
264
|
-
this.loadingFiles = false;
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
},
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
</script>
|
|
271
|
-
|
|
272
|
-
<template>
|
|
273
|
-
<div class="picker">
|
|
274
|
-
<div
|
|
275
|
-
v-if="!hasPrivate && !loadingRecentRepos"
|
|
276
|
-
class="expand-scope pb-20"
|
|
277
|
-
>
|
|
278
|
-
<i class="icon icon-info" /> Showing only public repos. <a
|
|
279
|
-
href="#"
|
|
280
|
-
class="text-primary bg-transparent"
|
|
281
|
-
@click="expandScope"
|
|
282
|
-
>
|
|
283
|
-
Click here
|
|
284
|
-
</a>
|
|
285
|
-
to grant Rio access to read private repos.
|
|
286
|
-
</div>
|
|
287
|
-
<div class="row">
|
|
288
|
-
<div class="col span-4">
|
|
289
|
-
<LabeledSelect
|
|
290
|
-
:placeholder="repoPlaceholder"
|
|
291
|
-
:disabled="loadingRecentRepos"
|
|
292
|
-
:options="repos"
|
|
293
|
-
label="full_name"
|
|
294
|
-
:value="selectedRepo"
|
|
295
|
-
:clearable="false"
|
|
296
|
-
@search="onSearchRepos"
|
|
297
|
-
@input="selectRepo"
|
|
298
|
-
>
|
|
299
|
-
<template #spinner="{loading}">
|
|
300
|
-
<span v-show="loading">
|
|
301
|
-
<i class="icon icon-spinner icon-spin" /> Loading…
|
|
302
|
-
</span>
|
|
303
|
-
</template>
|
|
304
|
-
<template #no-options>
|
|
305
|
-
Type to search GitHub repositories
|
|
306
|
-
</template>
|
|
307
|
-
<template
|
|
308
|
-
slot="option"
|
|
309
|
-
slot-scope="option"
|
|
310
|
-
>
|
|
311
|
-
<div class="d-center">
|
|
312
|
-
<img :src="option.owner.avatar_url">
|
|
313
|
-
{{ option.full_name }}
|
|
314
|
-
</div>
|
|
315
|
-
</template>
|
|
316
|
-
<template
|
|
317
|
-
slot="selected-option"
|
|
318
|
-
slot-scope="option"
|
|
319
|
-
>
|
|
320
|
-
<div class="selected d-center">
|
|
321
|
-
<img :src="option.owner.avatar_url">
|
|
322
|
-
{{ option.full_name }}
|
|
323
|
-
</div>
|
|
324
|
-
</template>
|
|
325
|
-
</LabeledSelect>
|
|
326
|
-
</div>
|
|
327
|
-
<div class="col span-4">
|
|
328
|
-
<LabeledSelect
|
|
329
|
-
:disabled="!selectedRepo || loadingBranches"
|
|
330
|
-
:placeholder="branchPlaceholder"
|
|
331
|
-
:options="branches"
|
|
332
|
-
label="name"
|
|
333
|
-
:value="selectedBranch"
|
|
334
|
-
:clearable="false"
|
|
335
|
-
@input="selectBranch"
|
|
336
|
-
/>
|
|
337
|
-
</div>
|
|
338
|
-
<div class="col span-4">
|
|
339
|
-
<LabeledSelect
|
|
340
|
-
:disabled="!selectedBranch"
|
|
341
|
-
:placeholder="filePlaceholder"
|
|
342
|
-
:options="files"
|
|
343
|
-
label="path"
|
|
344
|
-
:value="selectedFile"
|
|
345
|
-
:clearable="false"
|
|
346
|
-
@input="selectFile"
|
|
347
|
-
/>
|
|
348
|
-
</div>
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
</template>
|
|
352
|
-
|
|
353
|
-
<style lang="scss" scoped>
|
|
354
|
-
.picker {
|
|
355
|
-
img {
|
|
356
|
-
height: 30px;
|
|
357
|
-
margin-right: 1rem;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.d-center {
|
|
361
|
-
display: flex;
|
|
362
|
-
align-items: center;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.selected img {
|
|
366
|
-
width: auto;
|
|
367
|
-
max-height: 23px;
|
|
368
|
-
margin-right: 0.5rem;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.v-select .dropdown li {
|
|
372
|
-
border-bottom: 1px solid rgba(112, 128, 144, 0.1);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.v-select .dropdown li:last-child {
|
|
376
|
-
border-bottom: none;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.v-select .dropdown li a {
|
|
380
|
-
padding: 10px 20px;
|
|
381
|
-
width: 100%;
|
|
382
|
-
font-size: 1.25em;
|
|
383
|
-
color: #3c3c3c;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.v-select .dropdown-menu .active > a {
|
|
387
|
-
color: #fff;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
</style>
|
|
@@ -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
|
-
}
|