@rancher/shell 0.3.14 → 0.3.16
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 +84 -3
- package/assets/translations/zh-hans.yaml +68 -26
- 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/generic.vue +1 -1
- 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/BannerGraphic.vue +1 -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 +3 -2
- package/components/DashboardMetrics.vue +8 -0
- package/components/DetailTop.vue +1 -1
- package/components/EmberPage.vue +1 -0
- 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 +14 -2
- 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/SimpleBox.vue +1 -0
- 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 +14 -10
- 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 +7 -2
- 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 +5 -5
- package/config/product/explorer.js +14 -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/catalog.cattle.io.clusterrepo.vue +8 -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/__tests__/monitoring.coreos.com.prometheusrule.test.ts +56 -0
- 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.prometheusrule/index.vue +8 -3
- 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 +3 -2
- package/pages/about.vue +9 -9
- package/pages/account/index.vue +2 -2
- package/pages/auth/login.vue +25 -12
- package/pages/auth/setup.vue +4 -0
- 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 +10 -10
- 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 +8 -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 +25 -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/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 +10 -2
- 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/form/GithubPicker.vue +0 -390
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
return true;
|
|
77
77
|
})
|
|
78
78
|
.sort((a, b) => a.name.localeCompare(b.name))
|
|
79
|
-
.map(x => x.id);
|
|
79
|
+
.map((x) => x.id);
|
|
80
80
|
|
|
81
81
|
return out;
|
|
82
82
|
},
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
if (this.principals) {
|
|
103
|
-
const selected = this.principals.find(p => p.id === this.newValue);
|
|
103
|
+
const selected = this.principals.find((p) => p.id === this.newValue);
|
|
104
104
|
|
|
105
105
|
this.tooltipContent = selected?.name;
|
|
106
106
|
} else {
|
|
@@ -159,7 +159,7 @@ export default {
|
|
|
159
159
|
|
|
160
160
|
if ( this.searchStr === str ) {
|
|
161
161
|
// If not, they've already typed something else
|
|
162
|
-
this.options = res.map(x => x.id);
|
|
162
|
+
this.options = res.map((x) => x.id);
|
|
163
163
|
}
|
|
164
164
|
} catch (e) {
|
|
165
165
|
this.options = [];
|
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
|
|
33
33
|
for ( const c of clusters ) {
|
|
34
34
|
let state = r.state;
|
|
35
|
-
const perEntry = r.perClusterState?.find(x => x.clusterId === c.id );
|
|
35
|
+
const perEntry = r.perClusterState?.find((x) => x.clusterId === c.id );
|
|
36
36
|
const tooMany = r.perClusterState?.length >= 10 || false;
|
|
37
37
|
|
|
38
38
|
if ( perEntry ) {
|
|
@@ -50,8 +50,8 @@ export default {
|
|
|
50
50
|
computed: {
|
|
51
51
|
meta() {
|
|
52
52
|
return {
|
|
53
|
-
total: this.values.map(x => x.value).reduce((a, b) => a + b),
|
|
54
|
-
readyCount: this.values.filter(x => x.label === 'Success' || x.label === 'Ready').map(x => x.value).reduce((a, b) => a + b)
|
|
53
|
+
total: this.values.map((x) => x.value).reduce((a, b) => a + b),
|
|
54
|
+
readyCount: this.values.filter((x) => x.label === 'Success' || x.label === 'Ready').map((x) => x.value).reduce((a, b) => a + b)
|
|
55
55
|
};
|
|
56
56
|
},
|
|
57
57
|
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
if ( !this.max ) {
|
|
84
84
|
max = 100;
|
|
85
85
|
if ( out.length ) {
|
|
86
|
-
max = out.map(x => x.value).reduce((a, b) => a + b);
|
|
86
|
+
max = out.map((x) => x.value).reduce((a, b) => a + b);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -112,7 +112,7 @@ export default {
|
|
|
112
112
|
return obj;
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
-
return [...out].filter(obj => obj.percent);
|
|
115
|
+
return [...out].filter((obj) => obj.percent);
|
|
116
116
|
},
|
|
117
117
|
},
|
|
118
118
|
|
|
@@ -80,7 +80,7 @@ export default {
|
|
|
80
80
|
},
|
|
81
81
|
|
|
82
82
|
bundleCounts() {
|
|
83
|
-
const resources = this.bundles.filter(item => item.metadata.name.startsWith(`${ this.repoName }-`));
|
|
83
|
+
const resources = this.bundles.filter((item) => item.metadata.name.startsWith(`${ this.repoName }-`));
|
|
84
84
|
|
|
85
85
|
if (!resources.length) {
|
|
86
86
|
return [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This is to mitigate an issue where the SVG icons being imported from the project weren't being rendered on Firefox
|
|
2
2
|
// To know more about this technique, check this doc: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs
|
|
3
|
-
export const getChartIcon = type => `<defs>
|
|
3
|
+
export const getChartIcon = (type) => `<defs>
|
|
4
4
|
<!-- GIT REPO ICON -->
|
|
5
5
|
<svg id="git" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" style="enable-background:new 0 0 96 96" xml:space="preserve"><path class="st0" d="M92.138 43.888 52.018 3.77a5.918 5.918 0 0 0-8.369 0l-8.33 8.332L45.887 22.67a7.025 7.025 0 0 1 7.23 1.684 7.031 7.031 0 0 1 1.67 7.275l10.185 10.185a7.03 7.03 0 0 1 7.275 1.67 7.04 7.04 0 0 1 0 9.958 7.042 7.042 0 0 1-11.492-7.658l-9.5-9.499v24.997a7.09 7.09 0 0 1 1.861 1.331 7.042 7.042 0 1 1-7.65-1.537V35.849a7.04 7.04 0 0 1-3.822-9.234l-10.418-10.42-27.51 27.508a5.921 5.921 0 0 0 0 8.371l40.121 40.118a5.919 5.919 0 0 0 8.37 0l39.93-39.932a5.92 5.92 0 0 0 0-8.37z"/></svg>
|
|
6
6
|
<!-- GENERIC BUNDLE ICON -->
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
let hasStatusChange = false;
|
|
58
58
|
|
|
59
59
|
flattenedData.forEach((item) => {
|
|
60
|
-
const index = this.allNodesData.findIndex(nodeData => item.matchingId === nodeData.data.matchingId);
|
|
60
|
+
const index = this.allNodesData.findIndex((nodeData) => item.matchingId === nodeData.data.matchingId);
|
|
61
61
|
|
|
62
62
|
// apply status change to each node
|
|
63
63
|
if (index > -1 && this.allNodesData[index].data.state !== item.state) {
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
default: () => [],
|
|
83
83
|
type: Array,
|
|
84
84
|
// we only want functions in the rules array
|
|
85
|
-
validator: rules => rules.every(rule => ['function'].includes(typeof rule))
|
|
85
|
+
validator: (rules) => rules.every((rule) => ['function'].includes(typeof rule))
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
data() {
|
|
@@ -124,7 +124,7 @@ export default {
|
|
|
124
124
|
watch: {
|
|
125
125
|
value() {
|
|
126
126
|
this.lastUpdateWasFromValue = true;
|
|
127
|
-
this.rows = (this.value || []).map(v => ({ value: v }));
|
|
127
|
+
this.rows = (this.value || []).map((v) => ({ value: v }));
|
|
128
128
|
},
|
|
129
129
|
rows: {
|
|
130
130
|
deep: true,
|
|
@@ -186,9 +186,17 @@ export default {
|
|
|
186
186
|
}
|
|
187
187
|
event.preventDefault();
|
|
188
188
|
const text = event.clipboardData.getData('text/plain');
|
|
189
|
-
const split = text.split('\n').map(value => ({ value }));
|
|
189
|
+
const split = text.split('\n').map((value) => ({ value }));
|
|
190
|
+
|
|
191
|
+
if (split.length === 1) {
|
|
192
|
+
// It's not multi-line, so don't treat it as such
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
event.preventDefault();
|
|
190
197
|
|
|
191
198
|
this.rows.splice(index, 1, ...split);
|
|
199
|
+
|
|
192
200
|
this.update();
|
|
193
201
|
}
|
|
194
202
|
},
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
computed: {
|
|
30
30
|
filteredOptions() {
|
|
31
31
|
return this.options
|
|
32
|
-
.filter(option => !this.value.includes(option.value));
|
|
32
|
+
.filter((option) => !this.value.includes(option.value));
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
addAllowed() {
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
this.$emit(value);
|
|
44
44
|
},
|
|
45
45
|
calculateOptions(value) {
|
|
46
|
-
const valueOption = this.options.find(o => o.value === value);
|
|
46
|
+
const valueOption = this.options.find((o) => o.value === value);
|
|
47
47
|
|
|
48
48
|
if (valueOption) {
|
|
49
49
|
return [valueOption, ...this.filteredOptions];
|
|
@@ -58,6 +58,11 @@ export default {
|
|
|
58
58
|
rawData: {
|
|
59
59
|
type: Boolean,
|
|
60
60
|
default: false
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
accept: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '*'
|
|
61
66
|
}
|
|
62
67
|
},
|
|
63
68
|
|
|
@@ -151,6 +156,7 @@ export default {
|
|
|
151
156
|
class="hide"
|
|
152
157
|
:multiple="multiple"
|
|
153
158
|
:webkitdirectory="directory"
|
|
159
|
+
:accept="accept"
|
|
154
160
|
@change="fileChange"
|
|
155
161
|
>
|
|
156
162
|
</button>
|
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Vue from 'vue';
|
|
3
|
+
import SortableTable from '@shell/components/SortableTable/index.vue';
|
|
4
|
+
import RadioButton from '@components/Form/Radio/RadioButton.vue';
|
|
5
|
+
import debounce from 'lodash/debounce';
|
|
6
|
+
import { isArray } from '@shell/utils/array';
|
|
7
|
+
import LabeledSelect from '@shell/components/form/LabeledSelect.vue';
|
|
8
|
+
import LabeledInput from '@components/Form/LabeledInput/LabeledInput.vue';
|
|
9
|
+
import { GitUtils } from '../../utils/git';
|
|
10
|
+
|
|
11
|
+
interface commit {
|
|
12
|
+
[key: string]: any,
|
|
13
|
+
sha: string,
|
|
14
|
+
}
|
|
15
|
+
interface Data {
|
|
16
|
+
hasError: {
|
|
17
|
+
repo: boolean,
|
|
18
|
+
branch: boolean,
|
|
19
|
+
commits: boolean,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
repos: object[],
|
|
23
|
+
branches: object[],
|
|
24
|
+
commits: commit[],
|
|
25
|
+
|
|
26
|
+
selectedAccOrOrg: string| null,
|
|
27
|
+
selectedRepo: object| null,
|
|
28
|
+
selectedBranch: object| null,
|
|
29
|
+
selectedCommit: object | null,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const debounceTime = 1000;
|
|
33
|
+
|
|
34
|
+
export default Vue.extend<Data, any, any, any>({
|
|
35
|
+
|
|
36
|
+
components: {
|
|
37
|
+
LabeledSelect,
|
|
38
|
+
SortableTable,
|
|
39
|
+
RadioButton,
|
|
40
|
+
LabeledInput,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
props: {
|
|
44
|
+
value: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: null
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
type: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: null
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
debounceTime,
|
|
58
|
+
|
|
59
|
+
hasError: {
|
|
60
|
+
repo: false,
|
|
61
|
+
branch: false,
|
|
62
|
+
commits: false,
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
repos: [],
|
|
66
|
+
branches: [],
|
|
67
|
+
commits: [] as commit[],
|
|
68
|
+
|
|
69
|
+
selectedAccOrOrg: null,
|
|
70
|
+
selectedRepo: null,
|
|
71
|
+
selectedBranch: null,
|
|
72
|
+
selectedCommit: {},
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
created() {
|
|
77
|
+
this.onSearchRepo = this.searchForResult(this.searchRepo);
|
|
78
|
+
this.onSearchBranch = this.searchForResult(this.searchBranch);
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
watch: {
|
|
82
|
+
value: {
|
|
83
|
+
async handler(neu, old) {
|
|
84
|
+
if (JSON.stringify(neu) === JSON.stringify(old)) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (neu?.type !== old?.type) {
|
|
88
|
+
this.reset();
|
|
89
|
+
await this.loadSourceCache(neu.selectedAccOrOrg, neu.selectedRepo, neu.selectedBranch, neu.selectedCommit);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
immediate: true,
|
|
93
|
+
deep: true,
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
computed: {
|
|
98
|
+
commitHeaders() {
|
|
99
|
+
return [
|
|
100
|
+
{
|
|
101
|
+
name: 'index',
|
|
102
|
+
label: this.t(`gitPicker.${ this.type }.tableHeaders.choose.label`),
|
|
103
|
+
width: 60,
|
|
104
|
+
}, {
|
|
105
|
+
name: 'sha',
|
|
106
|
+
label: this.t(`gitPicker.${ this.type }.tableHeaders.sha.label`),
|
|
107
|
+
width: 90,
|
|
108
|
+
formatter: 'Link',
|
|
109
|
+
formatterOpts: { urlKey: 'htmlUrl' },
|
|
110
|
+
value: 'sha'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'author',
|
|
114
|
+
label: this.t(`gitPicker.${ this.type }.tableHeaders.author.label`),
|
|
115
|
+
width: 190,
|
|
116
|
+
value: 'author.login',
|
|
117
|
+
sort: 'author.login',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'message',
|
|
121
|
+
label: this.t(`gitPicker.${ this.type }.tableHeaders.message.label`),
|
|
122
|
+
value: 'message',
|
|
123
|
+
sort: 'message',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'date',
|
|
127
|
+
width: 220,
|
|
128
|
+
label: this.t(`gitPicker.${ this.type }.tableHeaders.date.label`),
|
|
129
|
+
value: 'date',
|
|
130
|
+
sort: ['date:desc'],
|
|
131
|
+
formatter: 'Date',
|
|
132
|
+
defaultSort: true,
|
|
133
|
+
},
|
|
134
|
+
];
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
preparedRepos() {
|
|
138
|
+
return this.normalizeArray(this.repos, (item: any) => ({ id: item.id, name: item.name }));
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
preparedBranches() {
|
|
142
|
+
return this.normalizeArray(this.branches, (item: any) => ({ id: item.id, name: item.name }));
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
preparedCommits() {
|
|
146
|
+
return this.normalizeArray(this.commits, (c: any) => GitUtils[this.type].normalize.commit(c));
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
methods: {
|
|
151
|
+
debounceRequest(callback: (param: any) => Promise<any>, timeout = debounceTime) {
|
|
152
|
+
return debounce(async(param) => await callback(param), timeout);
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
searchForResult(callback: (query: string) => Promise<any>) {
|
|
156
|
+
return this.debounceRequest(async(query: string) => {
|
|
157
|
+
if (!query.length) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return await callback(query);
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
reset() {
|
|
166
|
+
this.repos = [];
|
|
167
|
+
this.selectedAccOrOrg = null;
|
|
168
|
+
this.selectedRepo = null;
|
|
169
|
+
this.selectedBranch = null;
|
|
170
|
+
this.selectedCommit = {};
|
|
171
|
+
|
|
172
|
+
this.communicateReset();
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
communicateReset() {
|
|
176
|
+
this.$emit('change', {
|
|
177
|
+
selectedAccOrOrg: this.selectedAccOrOrg,
|
|
178
|
+
repo: this.selectedRepo,
|
|
179
|
+
commit: this.selectedCommit,
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
async loadSourceCache(accOrOrg: string, repo: { name: string}, branch: { name: string}, commit: { sha: string}) {
|
|
184
|
+
this.selectedAccOrOrg = accOrOrg;
|
|
185
|
+
if (this.selectedAccOrOrg) {
|
|
186
|
+
await this.fetchRepos()
|
|
187
|
+
.then(() => {
|
|
188
|
+
if (this.repos.length && !this.hasError.repo) {
|
|
189
|
+
this.selectedRepo = repo;
|
|
190
|
+
|
|
191
|
+
return this.fetchBranches();
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
.then(() => {
|
|
195
|
+
if (this.branches.length && !this.hasError.branch) {
|
|
196
|
+
if (branch?.name) {
|
|
197
|
+
this.selectedBranch = branch;
|
|
198
|
+
|
|
199
|
+
return this.fetchCommits();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
const selectedCommit = this.commits?.find((c: commit) => {
|
|
205
|
+
// Github has sha's
|
|
206
|
+
// Gitlab has id's as sha's
|
|
207
|
+
const sha = c.sha || c.id;
|
|
208
|
+
|
|
209
|
+
return sha === commit.sha;
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
if (selectedCommit) {
|
|
213
|
+
this.final(selectedCommit.sha || selectedCommit.id);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
async fetchRepos() {
|
|
219
|
+
this.repos = [];
|
|
220
|
+
this.selectedRepo = null;
|
|
221
|
+
this.selectedBranch = null;
|
|
222
|
+
this.selectedCommit = {};
|
|
223
|
+
|
|
224
|
+
this.communicateReset();
|
|
225
|
+
|
|
226
|
+
if (this.selectedAccOrOrg.length) {
|
|
227
|
+
try {
|
|
228
|
+
const res = await this.$store.dispatch(`${ this.type }/fetchRecentRepos`, { username: this.selectedAccOrOrg });
|
|
229
|
+
|
|
230
|
+
this.repos = res;
|
|
231
|
+
|
|
232
|
+
this.hasError.repo = false;
|
|
233
|
+
} catch (error) {
|
|
234
|
+
this.hasError.repo = true;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
async fetchBranches() {
|
|
240
|
+
this.selectedBranch = null;
|
|
241
|
+
this.selectedCommit = {};
|
|
242
|
+
|
|
243
|
+
this.communicateReset();
|
|
244
|
+
|
|
245
|
+
try {
|
|
246
|
+
const res = await this.$store.dispatch(`${ this.type }/fetchBranches`, { repo: this.selectedRepo, username: this.selectedAccOrOrg });
|
|
247
|
+
|
|
248
|
+
this.branches = res;
|
|
249
|
+
this.hasError.branch = false;
|
|
250
|
+
} catch (error) {
|
|
251
|
+
this.hasError.branch = true;
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
async fetchCommits() {
|
|
256
|
+
this.selectedCommit = {};
|
|
257
|
+
|
|
258
|
+
this.communicateReset();
|
|
259
|
+
|
|
260
|
+
try {
|
|
261
|
+
const res = await this.$store.dispatch(`${ this.type }/fetchCommits`, {
|
|
262
|
+
repo: this.selectedRepo,
|
|
263
|
+
username: this.selectedAccOrOrg,
|
|
264
|
+
branch: this.selectedBranch,
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
this.commits = res as commit[];
|
|
268
|
+
|
|
269
|
+
this.hasError.branch = false;
|
|
270
|
+
} catch (error) {
|
|
271
|
+
this.hasError.commits = true;
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
normalizeArray(elem: any, normalize: (v: any) => object) {
|
|
276
|
+
const arr = isArray(elem) ? elem : [elem];
|
|
277
|
+
|
|
278
|
+
return arr.map((item: any) => normalize(item));
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
final(commitId: string) {
|
|
282
|
+
this.selectedCommit = this.preparedCommits.find((c: { commitId?: string }) => c.commitId === commitId);
|
|
283
|
+
|
|
284
|
+
if (this.selectedAccOrOrg && this.selectedRepo && this.selectedCommit?.commitId) {
|
|
285
|
+
this.$emit('change', {
|
|
286
|
+
selectedAccOrOrg: this.selectedAccOrOrg,
|
|
287
|
+
repo: this.selectedRepo,
|
|
288
|
+
branch: this.selectedBranch,
|
|
289
|
+
commit: this.selectedCommit.commitId,
|
|
290
|
+
sourceData: {
|
|
291
|
+
repos: this.repos,
|
|
292
|
+
branches: this.branches,
|
|
293
|
+
commits: this.commits
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
async searchRepo(query: string) {
|
|
301
|
+
if (query.length) {
|
|
302
|
+
// Check if the result is already in the fetched list.
|
|
303
|
+
const resultInCurrentState = this.repos.filter((r: any) => r.name.startsWith(query));
|
|
304
|
+
|
|
305
|
+
if (!resultInCurrentState.length) {
|
|
306
|
+
// Search for specific repo under the username
|
|
307
|
+
const res = await this.$store.dispatch(`${ this.type }/search`, {
|
|
308
|
+
repo: { id: query, name: query },
|
|
309
|
+
username: this.selectedAccOrOrg
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
this.hasError.branches = !!res.hasError;
|
|
313
|
+
|
|
314
|
+
if (!res.hasError) {
|
|
315
|
+
if (res.length >= 1) {
|
|
316
|
+
this.repos = res;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
return resultInCurrentState;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
async searchBranch(query: string) {
|
|
326
|
+
const res = await this.$store.dispatch(`${ this.type }/search`, {
|
|
327
|
+
repo: this.selectedRepo,
|
|
328
|
+
branch: { name: query },
|
|
329
|
+
username: this.selectedAccOrOrg,
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
this.hasError.branch = !!res.hasError;
|
|
333
|
+
|
|
334
|
+
if (!this.hasError) {
|
|
335
|
+
this.branches = res;
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
status(value: boolean) {
|
|
340
|
+
return value ? 'error' : null;
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
reposRules() {
|
|
344
|
+
return this.hasError.repo ? this.t(`gitPicker.${ this.type }.errors.noAccount`) : null;
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
branchesRules() {
|
|
348
|
+
return this.hasError.branch ? this.t(`gitPicker.${ this.type }.errors.noBranch`) : null;
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
});
|
|
352
|
+
</script>
|
|
353
|
+
|
|
354
|
+
<template>
|
|
355
|
+
<div class="picker">
|
|
356
|
+
<div class="row">
|
|
357
|
+
<div class="spacer">
|
|
358
|
+
<LabeledInput
|
|
359
|
+
v-model="selectedAccOrOrg"
|
|
360
|
+
data-testid="git_picker-username-or-org"
|
|
361
|
+
:tooltip="t(`gitPicker.${ type }.username.tooltip`)"
|
|
362
|
+
:label="t(`gitPicker.${ type }.username.inputLabel`)"
|
|
363
|
+
:required="true"
|
|
364
|
+
:rules="[reposRules]"
|
|
365
|
+
:delay="debounceTime"
|
|
366
|
+
:status="status(hasError.repo)"
|
|
367
|
+
@input="fetchRepos"
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<div
|
|
372
|
+
v-if="repos.length && !hasError.repo"
|
|
373
|
+
class="spacer"
|
|
374
|
+
>
|
|
375
|
+
<LabeledSelect
|
|
376
|
+
v-model="selectedRepo"
|
|
377
|
+
:required="true"
|
|
378
|
+
:label="t(`gitPicker.${ type }.repo.inputLabel`)"
|
|
379
|
+
:options="preparedRepos"
|
|
380
|
+
:clearable="true"
|
|
381
|
+
:searchable="true"
|
|
382
|
+
:reduce="(e) => e"
|
|
383
|
+
:rules="[reposRules]"
|
|
384
|
+
:status="status(hasError.repo)"
|
|
385
|
+
:option-label="'name'"
|
|
386
|
+
@search="onSearchRepo"
|
|
387
|
+
@input="fetchBranches"
|
|
388
|
+
/>
|
|
389
|
+
</div>
|
|
390
|
+
<!-- Deals with Branches -->
|
|
391
|
+
<div
|
|
392
|
+
v-if="selectedRepo"
|
|
393
|
+
class="spacer"
|
|
394
|
+
>
|
|
395
|
+
<LabeledSelect
|
|
396
|
+
v-model="selectedBranch"
|
|
397
|
+
:required="true"
|
|
398
|
+
:label="t(`gitPicker.${ type }.branch.inputLabel`)"
|
|
399
|
+
:options="preparedBranches"
|
|
400
|
+
:clearable="false"
|
|
401
|
+
:reduce="(e) => e"
|
|
402
|
+
:searchable="true"
|
|
403
|
+
:rules="[branchesRules]"
|
|
404
|
+
:status="status(hasError.branch)"
|
|
405
|
+
:option-label="'name'"
|
|
406
|
+
@search="onSearchBranch"
|
|
407
|
+
@input="fetchCommits"
|
|
408
|
+
/>
|
|
409
|
+
</div>
|
|
410
|
+
<!-- Deals with Commits, display & allow to pick from it -->
|
|
411
|
+
<div
|
|
412
|
+
v-if="selectedBranch && preparedCommits.length"
|
|
413
|
+
class="commits-table mt-20"
|
|
414
|
+
>
|
|
415
|
+
<SortableTable
|
|
416
|
+
:rows="preparedCommits"
|
|
417
|
+
:headers="commitHeaders"
|
|
418
|
+
mode="view"
|
|
419
|
+
key-field="sha"
|
|
420
|
+
:search="true"
|
|
421
|
+
:paging="true"
|
|
422
|
+
:table-actions="false"
|
|
423
|
+
:row-actions="false"
|
|
424
|
+
:rows-per-page="10"
|
|
425
|
+
>
|
|
426
|
+
<template #cell:index="{row}">
|
|
427
|
+
<RadioButton
|
|
428
|
+
:value="selectedCommit.commitId"
|
|
429
|
+
:val="row.commitId"
|
|
430
|
+
@input="final($event)"
|
|
431
|
+
/>
|
|
432
|
+
</template>
|
|
433
|
+
|
|
434
|
+
<template #cell:author="{row}">
|
|
435
|
+
<div class="sortable-table-avatar">
|
|
436
|
+
<template v-if="row.author">
|
|
437
|
+
<img
|
|
438
|
+
:src="row.author.avatarUrl"
|
|
439
|
+
alt=""
|
|
440
|
+
>
|
|
441
|
+
<a
|
|
442
|
+
:href="row.author.htmlUrl"
|
|
443
|
+
target="_blank"
|
|
444
|
+
rel="nofollow noopener noreferrer"
|
|
445
|
+
>
|
|
446
|
+
{{ row.author.name }}
|
|
447
|
+
</a>
|
|
448
|
+
</template>
|
|
449
|
+
<template v-else>
|
|
450
|
+
{{ t(`gitPicker.${ type }.tableHeaders.author.unknown`) }}
|
|
451
|
+
</template>
|
|
452
|
+
</div>
|
|
453
|
+
</template>
|
|
454
|
+
</SortableTable>
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
</template>
|
|
459
|
+
|
|
460
|
+
<style lang="scss" scoped>
|
|
461
|
+
.picker {
|
|
462
|
+
.row {
|
|
463
|
+
display: flex;
|
|
464
|
+
flex-direction: column;
|
|
465
|
+
margin: 6px 0;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
img {
|
|
469
|
+
height: 30px;
|
|
470
|
+
margin-right: 1rem;
|
|
471
|
+
|
|
472
|
+
.labeled-input {
|
|
473
|
+
width: 100%;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.sortable-table-avatar {
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: center;
|
|
480
|
+
justify-content: flex-start;
|
|
481
|
+
|
|
482
|
+
img {
|
|
483
|
+
width: 30px;
|
|
484
|
+
height: 30px;
|
|
485
|
+
border-radius: var(--border-radius);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.spacer {
|
|
490
|
+
max-width: 700px;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.commits-table {
|
|
494
|
+
margin: 0 1px;
|
|
495
|
+
max-width: 1400px;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.d-center {
|
|
499
|
+
display: flex;
|
|
500
|
+
align-items: center;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.selected img {
|
|
504
|
+
width: auto;
|
|
505
|
+
max-height: 23px;
|
|
506
|
+
margin-right: 0.5rem;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.v-select .dropdown li {
|
|
510
|
+
border-bottom: 1px solid rgba(112, 128, 144, 0.1);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.v-select .dropdown li:last-child {
|
|
514
|
+
border-bottom: none;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.v-select .dropdown li a {
|
|
518
|
+
padding: 10px 20px;
|
|
519
|
+
width: 100%;
|
|
520
|
+
font-size: 1.25em;
|
|
521
|
+
color: #3c3c3c;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.v-select .dropdown-menu .active > a {
|
|
525
|
+
color: #fff;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
</style>
|