@rancher/shell 3.0.0-rc.3 → 3.0.0-rc.5

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.
Files changed (295) hide show
  1. package/assets/styles/base/_variables.scss +12 -4
  2. package/assets/styles/global/_layout.scss +1 -1
  3. package/assets/styles/global/_tooltip.scss +1 -1
  4. package/assets/translations/en-us.yaml +61 -26
  5. package/assets/translations/zh-hans.yaml +6 -5
  6. package/chart/istio.vue +2 -0
  7. package/chart/monitoring/ClusterSelector.vue +2 -0
  8. package/chart/monitoring/StorageClassSelector.vue +4 -1
  9. package/chart/monitoring/index.vue +2 -0
  10. package/chart/rancher-backup/S3.vue +2 -0
  11. package/chart/rancher-backup/index.vue +2 -0
  12. package/cloud-credential/aws.vue +2 -0
  13. package/cloud-credential/azure.vue +2 -0
  14. package/cloud-credential/digitalocean.vue +2 -0
  15. package/cloud-credential/gcp.vue +2 -0
  16. package/cloud-credential/generic.vue +2 -0
  17. package/cloud-credential/harvester.vue +2 -0
  18. package/cloud-credential/linode.vue +2 -0
  19. package/cloud-credential/pnap.vue +2 -0
  20. package/cloud-credential/s3.vue +2 -0
  21. package/cloud-credential/vmwarevsphere.vue +2 -0
  22. package/components/ActionMenu.vue +4 -1
  23. package/components/AppModal.vue +4 -1
  24. package/components/ButtonDropdown.vue +3 -0
  25. package/components/ButtonGroup.vue +2 -0
  26. package/components/ButtonMultiAction.vue +41 -0
  27. package/components/Carousel.vue +3 -0
  28. package/components/CodeMirror.vue +6 -4
  29. package/components/Collapse.vue +4 -1
  30. package/components/CollapsibleCard.vue +4 -1
  31. package/components/ContainerResourceLimit.vue +2 -0
  32. package/components/CopyCode.vue +8 -4
  33. package/components/CopyToClipboardText.vue +2 -0
  34. package/components/CruResource.vue +2 -0
  35. package/components/CruResourceFooter.vue +2 -0
  36. package/components/Dialog.vue +2 -0
  37. package/components/DisableAuthProviderModal.vue +4 -1
  38. package/components/EmberPage.vue +2 -0
  39. package/components/ExplorerProjectsNamespaces.vue +11 -8
  40. package/components/GlobalRoleBindings.vue +2 -0
  41. package/components/Import.vue +2 -0
  42. package/components/InputOrDisplay.vue +23 -18
  43. package/components/Loading.vue +4 -1
  44. package/components/Markdown.vue +2 -0
  45. package/components/ModalWithCard.vue +2 -0
  46. package/components/MoveModal.vue +2 -0
  47. package/components/PodSecurityAdmission.vue +2 -0
  48. package/components/Questions/Array.vue +2 -0
  49. package/components/Questions/Boolean.vue +2 -0
  50. package/components/Questions/CloudCredential.vue +2 -0
  51. package/components/Questions/Enum.vue +2 -0
  52. package/components/Questions/Float.vue +2 -0
  53. package/components/Questions/Int.vue +2 -0
  54. package/components/Questions/QuestionMap.vue +4 -1
  55. package/components/Questions/Radio.vue +2 -0
  56. package/components/Questions/Reference.vue +2 -0
  57. package/components/Questions/String.vue +2 -0
  58. package/components/Questions/Yaml.vue +2 -0
  59. package/components/Questions/index.vue +2 -0
  60. package/components/ResourceCancelModal.vue +2 -0
  61. package/components/ResourceDetail/Masthead.vue +4 -3
  62. package/components/ResourceDetail/index.vue +17 -15
  63. package/components/ResourceTable.vue +2 -0
  64. package/components/ResourceYaml.vue +2 -0
  65. package/components/SelectIconGrid.vue +2 -0
  66. package/components/SimpleBox.vue +2 -0
  67. package/components/SortableTable/THead.vue +2 -0
  68. package/components/SortableTable/index.vue +15 -19
  69. package/components/StatusTable.vue +2 -0
  70. package/components/Tabbed/Tab.vue +2 -0
  71. package/components/Tabbed/index.vue +2 -0
  72. package/components/Wizard.vue +2 -0
  73. package/components/YamlEditor.vue +2 -0
  74. package/components/__tests__/ButtonMultiAction.test.ts +31 -0
  75. package/components/auth/RoleDetailEdit.vue +2 -0
  76. package/components/auth/SelectPrincipal.vue +2 -0
  77. package/components/auth/login/ldap.vue +2 -0
  78. package/components/fleet/FleetStatus.vue +3 -2
  79. package/components/form/ArrayList.vue +16 -1
  80. package/components/form/ArrayListSelect.vue +2 -0
  81. package/components/form/ChangePassword.vue +2 -0
  82. package/components/form/ColorInput.vue +2 -0
  83. package/components/form/Command.vue +2 -0
  84. package/components/form/FileImageSelector.vue +2 -0
  85. package/components/form/FileSelector.vue +2 -0
  86. package/components/form/Footer.vue +2 -0
  87. package/components/form/GitPicker.vue +1 -0
  88. package/components/form/HealthCheck.vue +5 -3
  89. package/components/form/HookOption.vue +22 -18
  90. package/components/form/InputWithSelect.vue +3 -1
  91. package/components/form/KeyValue.vue +2 -0
  92. package/components/form/LabeledSelect.vue +13 -3
  93. package/components/form/LifecycleHooks.vue +2 -0
  94. package/components/form/MatchExpressions.vue +2 -0
  95. package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
  96. package/components/form/Members/MembershipEditor.vue +2 -0
  97. package/components/form/NameNsDescription.vue +4 -1
  98. package/components/form/Networking.vue +2 -0
  99. package/components/form/NodeAffinity.vue +4 -1
  100. package/components/form/Password.vue +2 -0
  101. package/components/form/PlusMinus.vue +2 -0
  102. package/components/form/PodAffinity.vue +4 -1
  103. package/components/form/Ports.vue +2 -0
  104. package/components/form/Probe.vue +8 -4
  105. package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
  106. package/components/form/ResourceQuota/Project.vue +2 -0
  107. package/components/form/ResourceQuota/ProjectRow.vue +2 -0
  108. package/components/form/RuleSelector.vue +2 -0
  109. package/components/form/SecretSelector.vue +1 -0
  110. package/components/form/Security.vue +5 -2
  111. package/components/form/Select.vue +2 -1
  112. package/components/form/SelectOrCreateAuthSecret.vue +2 -0
  113. package/components/form/ServiceNameSelect.vue +2 -0
  114. package/components/form/ServicePorts.vue +2 -0
  115. package/components/form/ShellInput.vue +2 -0
  116. package/components/form/SimpleSecretSelector.vue +2 -0
  117. package/components/form/Taints.vue +2 -0
  118. package/components/form/Tolerations.vue +2 -0
  119. package/components/form/ValueFromResource.vue +2 -0
  120. package/components/form/WorkloadPorts.vue +5 -3
  121. package/components/form/__tests__/HookOption.test.ts +28 -0
  122. package/components/form/__tests__/LabeledSelect.test.ts +42 -0
  123. package/components/form/__tests__/Probe.test.ts +12 -0
  124. package/components/nav/Header.vue +26 -128
  125. package/components/nav/HeaderPageActionMenu.vue +151 -0
  126. package/components/nav/Jump.vue +2 -0
  127. package/components/nav/NamespaceFilter.vue +5 -1
  128. package/components/nav/Type.vue +28 -2
  129. package/components/nav/WindowManager/ContainerShell.vue +6 -12
  130. package/components/nav/WindowManager/index.vue +2 -0
  131. package/components/nav/__tests__/Type.test.ts +68 -24
  132. package/composables/useClickOutside.ts +81 -0
  133. package/config/product/cis.js +4 -3
  134. package/config/product/manager.js +1 -0
  135. package/config/router/routes.js +1 -1
  136. package/config/table-headers.js +0 -10
  137. package/config/uiplugins.js +186 -143
  138. package/config/version.js +10 -0
  139. package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
  140. package/detail/configmap.vue +2 -0
  141. package/detail/fleet.cattle.io.cluster.vue +2 -0
  142. package/detail/fleet.cattle.io.clustergroup.vue +2 -0
  143. package/detail/fleet.cattle.io.gitrepo.vue +2 -0
  144. package/detail/harvesterhci.io.management.cluster.vue +2 -0
  145. package/detail/management.cattle.io.roletemplate.vue +4 -4
  146. package/detail/management.cattle.io.user.vue +2 -0
  147. package/detail/namespace.vue +2 -0
  148. package/detail/networking.k8s.io.ingress.vue +1 -0
  149. package/detail/node.vue +2 -0
  150. package/detail/provisioning.cattle.io.cluster.vue +2 -0
  151. package/detail/secret.vue +2 -0
  152. package/detail/service.vue +2 -0
  153. package/detail/workload/index.vue +1 -1
  154. package/dialog/AddClusterMemberDialog.vue +2 -0
  155. package/dialog/AddCustomBadgeDialog.vue +3 -1
  156. package/dialog/AddProjectMemberDialog.vue +2 -0
  157. package/dialog/AddonConfigConfirmationDialog.vue +2 -0
  158. package/dialog/DeactivateDriverDialog.vue +2 -0
  159. package/dialog/DiagnosticTimingsDialog.vue +2 -0
  160. package/dialog/DrainNode.vue +2 -0
  161. package/dialog/ForceMachineRemoveDialog.vue +2 -0
  162. package/dialog/GenericPrompt.vue +2 -0
  163. package/dialog/RollbackWorkloadDialog.vue +2 -0
  164. package/dialog/RotateCertificatesDialog.vue +2 -0
  165. package/dialog/RotateEncryptionKeyDialog.vue +2 -0
  166. package/dialog/SaveAsRKETemplateDialog.vue +2 -0
  167. package/dialog/ScaleMachineDownDialog.vue +2 -0
  168. package/dialog/ScalePoolDownDialog.vue +2 -0
  169. package/dialog/SloDialog.vue +2 -0
  170. package/edit/auth/ldap/config.vue +2 -0
  171. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
  172. package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
  173. package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
  174. package/edit/cis.cattle.io.clusterscan.vue +38 -18
  175. package/edit/cloudcredential.vue +2 -0
  176. package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
  177. package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
  178. package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
  179. package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
  180. package/edit/fleet.cattle.io.cluster.vue +2 -0
  181. package/edit/fleet.cattle.io.clustergroup.vue +4 -1
  182. package/edit/fleet.cattle.io.gitrepo.vue +2 -0
  183. package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
  184. package/edit/logging-flow/Match.vue +2 -0
  185. package/edit/logging-flow/index.vue +10 -8
  186. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
  187. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
  188. package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
  189. package/edit/management.cattle.io.fleetworkspace.vue +4 -1
  190. package/edit/management.cattle.io.project.vue +2 -0
  191. package/edit/management.cattle.io.roletemplate.vue +1 -1
  192. package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
  193. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
  194. package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
  195. package/edit/namespace.vue +1 -0
  196. package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
  197. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
  198. package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
  199. package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
  200. package/edit/networking.k8s.io.ingress/index.vue +1 -0
  201. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
  202. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
  203. package/edit/node.vue +2 -0
  204. package/edit/persistentvolumeclaim.vue +1 -0
  205. package/edit/policy.poddisruptionbudget.vue +3 -1
  206. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
  207. package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
  208. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
  209. package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
  210. package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
  211. package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
  212. package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
  213. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
  214. package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
  215. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
  216. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
  217. package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
  218. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
  219. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
  220. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
  221. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -0
  222. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
  223. package/edit/resources.cattle.io.backup.vue +2 -2
  224. package/edit/secret/index.vue +2 -0
  225. package/edit/service.vue +2 -1
  226. package/edit/ui.cattle.io.navlink.vue +1 -0
  227. package/edit/workload/Job.vue +3 -2
  228. package/edit/workload/Upgrading.vue +1 -0
  229. package/edit/workload/index.vue +18 -7
  230. package/edit/workload/storage/ContainerMountPaths.vue +37 -97
  231. package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
  232. package/edit/workload/storage/azureDisk.vue +1 -1
  233. package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
  234. package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
  235. package/edit/workload/storage/gcePersistentDisk.vue +1 -1
  236. package/edit/workload/storage/index.vue +38 -22
  237. package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
  238. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
  239. package/edit/workload/storage/vsphereVolume.vue +1 -1
  240. package/initialize/install-components.js +0 -12
  241. package/initialize/install-plugins.js +4 -5
  242. package/machine-config/azure.vue +2 -0
  243. package/machine-config/generic.vue +2 -0
  244. package/machine-config/vmwarevsphere.vue +2 -0
  245. package/mixins/resource-manager.js +1 -1
  246. package/models/cis.cattle.io.clusterscan.js +17 -16
  247. package/models/cis.cattle.io.clusterscanprofile.js +17 -0
  248. package/models/management.cattle.io.cluster.js +1 -1
  249. package/models/management.cattle.io.user.js +3 -3
  250. package/models/provisioning.cattle.io.cluster.js +2 -1
  251. package/models/steve-schema.ts +1 -1
  252. package/models/workload.js +2 -1
  253. package/package.json +5 -7
  254. package/pages/c/_cluster/apps/charts/chart.vue +3 -1
  255. package/pages/c/_cluster/apps/charts/install.vue +5 -56
  256. package/pages/c/_cluster/fleet/index.vue +0 -1
  257. package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
  258. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
  259. package/pages/c/_cluster/settings/performance.vue +2 -2
  260. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +11 -16
  261. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
  262. package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
  263. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
  264. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
  265. package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
  266. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
  267. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
  268. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
  269. package/pages/c/_cluster/uiplugins/index.vue +93 -92
  270. package/pkg/vue.config.js +2 -0
  271. package/plugins/plugin.js +27 -19
  272. package/plugins/version.js +3 -13
  273. package/promptRemove/pod.vue +2 -0
  274. package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
  275. package/rancher-components/Form/Radio/RadioButton.vue +0 -1
  276. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
  277. package/rancher-components/StringList/StringList.vue +6 -15
  278. package/scripts/extension/bundle +1 -1
  279. package/scripts/extension/publish +174 -99
  280. package/scripts/publish-shell.sh +3 -4
  281. package/scripts/typegen.sh +1 -1
  282. package/store/catalog.js +0 -26
  283. package/store/growl.js +8 -5
  284. package/types/shell/index.d.ts +22 -0
  285. package/utils/cluster.js +9 -0
  286. package/utils/versions.ts +39 -0
  287. package/vue.config.js +5 -0
  288. package/components/form/PodSecurity.vue +0 -168
  289. package/components/formatter/Weight.vue +0 -147
  290. package/components/nuxt/nuxt-build-indicator.vue +0 -170
  291. package/components/nuxt/nuxt-child.js +0 -52
  292. package/components/nuxt/nuxt-error.vue +0 -128
  293. package/components/nuxt/nuxt-link.client.js +0 -17
  294. package/components/nuxt/nuxt-loading.vue +0 -165
  295. package/shell/types/shell/index.d.ts +0 -2
@@ -9,15 +9,19 @@ function flatten(node) {
9
9
  } else if ( isArray(node) ) {
10
10
  return node.map(flatten).join(' ');
11
11
  } else if ( node.children ) {
12
- return node.children.map(flatten).join(' ');
13
- } else if ( node.child ) {
14
- return flatten(node.child);
12
+ if ( isArray(node.children) ) {
13
+ return node.children.map(flatten).join(' ');
14
+ } else {
15
+ return node.children;
16
+ }
15
17
  } else {
16
18
  return '';
17
19
  }
18
20
  }
19
21
 
20
22
  export default {
23
+ emits: ['copied', 'error'],
24
+
21
25
  data() {
22
26
  return { copied: false };
23
27
  },
@@ -27,7 +31,7 @@ export default {
27
31
  $event.stopPropagation();
28
32
  $event.preventDefault();
29
33
 
30
- const content = flatten(this.$slots.default).trim();
34
+ const content = flatten(this.$slots.default()).trim();
31
35
 
32
36
  copyTextToClipboard(content).then(() => {
33
37
  this.copied = true;
@@ -2,6 +2,8 @@
2
2
  import { copyTextToClipboard } from '@shell/utils/clipboard';
3
3
  import { exceptionToErrorsArray } from '@shell/utils/error';
4
4
  export default {
5
+ emits: ['error'],
6
+
5
7
  props: {
6
8
  text: {
7
9
  type: String,
@@ -23,6 +23,8 @@ export default {
23
23
 
24
24
  name: 'CruResource',
25
25
 
26
+ emits: ['select-type', 'error', 'cancel', 'finish'],
27
+
26
28
  components: {
27
29
  AsyncButton,
28
30
  Banner,
@@ -6,6 +6,8 @@ import ResourceCancelModal from '@shell/components/ResourceCancelModal';
6
6
  import { _VIEW } from '@shell/config/query-params';
7
7
 
8
8
  export default {
9
+ emits: ['cancel-confirmed', 'finish'],
10
+
9
11
  components: { AsyncButton, ResourceCancelModal },
10
12
  props: {
11
13
  mode: {
@@ -3,6 +3,8 @@ import AsyncButton from '@shell/components/AsyncButton';
3
3
  import AppModal from '@shell/components/AppModal.vue';
4
4
 
5
5
  export default {
6
+ emits: ['okay', 'closed'],
7
+
6
8
  components: { AsyncButton, AppModal },
7
9
 
8
10
  props: {
@@ -3,7 +3,10 @@ import { Card } from '@components/Card';
3
3
  import AppModal from '@shell/components/AppModal.vue';
4
4
 
5
5
  export default {
6
- name: 'PromptRemove',
6
+ name: 'PromptRemove',
7
+
8
+ emits: ['disable'],
9
+
7
10
  components: { Card, AppModal },
8
11
  props: {
9
12
  /**
@@ -43,6 +43,8 @@ const INTERCEPTS = {
43
43
  };
44
44
 
45
45
  export default {
46
+ emits: ['before-nav'],
47
+
46
48
  components: { Loading },
47
49
 
48
50
  props: {
@@ -10,6 +10,7 @@ import ExtensionPanel from '@shell/components/ExtensionPanel';
10
10
  import Masthead from '@shell/components/ResourceList/Masthead';
11
11
  import { mapPref, GROUP_RESOURCES, ALL_NAMESPACES } from '@shell/store/prefs';
12
12
  import MoveModal from '@shell/components/MoveModal';
13
+ import ButtonMultiAction from '@shell/components/ButtonMultiAction.vue';
13
14
 
14
15
  import { NAMESPACE_FILTER_ALL_ORPHANS } from '@shell/utils/namespace-filter';
15
16
  import ResourceFetch from '@shell/mixins/resource-fetch';
@@ -18,7 +19,11 @@ import DOMPurify from 'dompurify';
18
19
  export default {
19
20
  name: 'ListProjectNamespace',
20
21
  components: {
21
- ExtensionPanel, Masthead, MoveModal, ResourceTable
22
+ ExtensionPanel,
23
+ Masthead,
24
+ MoveModal,
25
+ ResourceTable,
26
+ ButtonMultiAction,
22
27
  },
23
28
  mixins: [ResourceFetch],
24
29
 
@@ -430,14 +435,12 @@ export default {
430
435
  >
431
436
  {{ t('projectNamespaces.createNamespace') }}
432
437
  </router-link>
433
- <button
434
- type="button"
435
- class="project-action btn btn-sm role-multi-action actions mr-10"
436
- :class="{invisible: !showProjectActionButton(group.group)}"
438
+ <ButtonMultiAction
439
+ class="project-action mr-10"
440
+ :borderless="true"
441
+ :invisible="!showProjectActionButton(group.group)"
437
442
  @click="showProjectAction($event, group.group)"
438
- >
439
- <i class="icon icon-actions" />
440
- </button>
443
+ />
441
444
  </div>
442
445
  </div>
443
446
  </template>
@@ -15,6 +15,8 @@ import { Card } from '@components/Card';
15
15
  * Display checkboxes for each global role, checked for given user or principal (group). Can save changes.
16
16
  */
17
17
  export default {
18
+ emits: ['hasChanges', 'canLogIn', 'changed'],
19
+
18
20
  components: {
19
21
  Checkbox,
20
22
  Loading,
@@ -14,6 +14,8 @@ import { NAMESPACE } from '@shell/config/types';
14
14
  import { NAME as NAME_COL, TYPE, NAMESPACE as NAMESPACE_COL, AGE } from '@shell/config/table-headers';
15
15
 
16
16
  export default {
17
+ emits: ['close'],
18
+
17
19
  components: {
18
20
  AsyncButton,
19
21
  Banner,
@@ -1,5 +1,4 @@
1
1
  <script>
2
- import { h, computed } from 'vue';
3
2
  import { _VIEW } from '@shell/config/query-params';
4
3
 
5
4
  export default {
@@ -18,31 +17,37 @@ export default {
18
17
  default: 'edit'
19
18
  }
20
19
  },
21
- setup(props, { slots }) {
22
- const isView = computed(() => props.mode === _VIEW);
20
+ computed: {
21
+ isView() {
22
+ return this.mode === _VIEW;
23
+ },
23
24
 
24
- const displayValue = computed(() => {
25
- if (Array.isArray(props.value) && props.value.length === 0) {
25
+ displayValue() {
26
+ if (Array.isArray(this.value) && this.value.length === 0) {
26
27
  return '';
27
28
  } else {
28
- return props.value;
29
- }
30
- });
31
-
32
- return () => {
33
- if (isView.value) {
34
- return h('div', { class: 'label' }, [
35
- h('div', { class: 'text-label' }, slots.name ? slots.name : props.name),
36
- h('div', { class: 'value' }, slots.value ? slots.value : displayValue.value)
37
- ]);
38
- } else {
39
- return slots.default;
29
+ return this.value;
40
30
  }
41
- };
31
+ }
42
32
  }
43
33
  };
44
34
  </script>
45
35
 
36
+ <template>
37
+ <div
38
+ v-if="isView"
39
+ class="label"
40
+ >
41
+ <div class="text-label">
42
+ {{ $slots.name || name }}
43
+ </div>
44
+ <div class="value">
45
+ {{ $slots.value || displayValue }}
46
+ </div>
47
+ </div>
48
+ <slot v-else />
49
+ </template>
50
+
46
51
  <style lang="scss" scoped>
47
52
  .label {
48
53
  display: flex;
@@ -68,10 +68,13 @@ export default {
68
68
  left: 0;
69
69
  right: 0;
70
70
  text-align: center;
71
- z-index: z-index('loadingContent');
71
+
72
+ // Covers both default `content` mode, an often used `relative` mode and any other value of mode
73
+ z-index: z-index('loading');
72
74
 
73
75
  &-main-mode {
74
76
  top: var(--header-height);
77
+ z-index: z-index('loadingMain');
75
78
  }
76
79
 
77
80
  &-content-mode {
@@ -2,6 +2,8 @@
2
2
  import Loading from '@shell/components/Loading';
3
3
 
4
4
  export default {
5
+ emits: ['loaded'],
6
+
5
7
  components: { Loading },
6
8
 
7
9
  props: {
@@ -7,6 +7,8 @@ import AppModal from '@shell/components/AppModal.vue';
7
7
  export default {
8
8
  name: 'ModalWithCard',
9
9
 
10
+ emits: ['close', 'finish'],
11
+
10
12
  components: {
11
13
  Card, Banner, AsyncButton, AppModal
12
14
  },
@@ -9,6 +9,8 @@ import Loading from '@shell/components/Loading';
9
9
  import { PROJECT } from '@shell/config/labels-annotations';
10
10
 
11
11
  export default {
12
+ emits: ['moving'],
13
+
12
14
  components: {
13
15
  AsyncButton, Card, LabeledSelect, Loading, AppModal
14
16
  },
@@ -26,6 +26,8 @@ const getExemptionControl = (): PSAExemptionControl => ({
26
26
  });
27
27
 
28
28
  export default defineComponent({
29
+ emits: ['updateLabels', 'updateExemptions'],
30
+
29
31
  components: {
30
32
  Checkbox, LabeledSelect, LabeledInput
31
33
  },
@@ -3,6 +3,8 @@ import ArrayList from '@shell/components/form/ArrayList';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { ArrayList },
7
9
  mixins: [Question],
8
10
 
@@ -3,6 +3,8 @@ import { Checkbox } from '@components/Form/Checkbox';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { Checkbox },
7
9
  mixins: [Question]
8
10
  };
@@ -4,6 +4,8 @@ import { NORMAN } from '@shell/config/types';
4
4
  import Question from './Question';
5
5
 
6
6
  export default {
7
+ emits: ['update:value'],
8
+
7
9
  components: { LabeledSelect },
8
10
  mixins: [Question],
9
11
 
@@ -3,6 +3,8 @@ import LabeledSelect from '@shell/components/form/LabeledSelect';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { LabeledSelect },
7
9
  mixins: [Question],
8
10
  computed: {
@@ -3,6 +3,8 @@ import { LabeledInput } from '@components/Form/LabeledInput';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { LabeledInput },
7
9
  mixins: [Question]
8
10
  };
@@ -3,6 +3,8 @@ import { LabeledInput } from '@components/Form/LabeledInput';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { LabeledInput },
7
9
  mixins: [Question]
8
10
  };
@@ -3,7 +3,10 @@ import KeyValue from '@shell/components/form/KeyValue';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
- name: 'QuestionMap',
6
+ name: 'QuestionMap',
7
+
8
+ emits: ['update:value'],
9
+
7
10
  components: { KeyValue },
8
11
  mixins: [Question],
9
12
 
@@ -3,6 +3,8 @@ import RadioGroup from '@components/Form/Radio/RadioGroup.vue';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { RadioGroup },
7
9
  mixins: [Question]
8
10
  };
@@ -12,6 +12,8 @@ const LEGACY_MAP = {
12
12
  };
13
13
 
14
14
  export default {
15
+ emits: ['update:value'],
16
+
15
17
  components: { LabeledInput, LabeledSelect },
16
18
  mixins: [Question],
17
19
 
@@ -3,6 +3,8 @@ import { LabeledInput } from '@components/Form/LabeledInput';
3
3
  import Question from './Question';
4
4
 
5
5
  export default {
6
+ emits: ['update:value'],
7
+
6
8
  components: { LabeledInput },
7
9
  mixins: [Question],
8
10
 
@@ -4,6 +4,8 @@ import Question from './Question';
4
4
  import { _VIEW } from '@shell/config/query-params';
5
5
 
6
6
  export default {
7
+ emits: ['update:value'],
8
+
7
9
  components: { YamlEditor },
8
10
  mixins: [Question],
9
11
  data() {
@@ -116,6 +116,8 @@ function migrate(expr) {
116
116
  }
117
117
 
118
118
  export default {
119
+ emits: ['updated'],
120
+
119
121
  components: {
120
122
  ...knownTypes,
121
123
  Tab,
@@ -2,6 +2,8 @@
2
2
  import AppModal from '@shell/components/AppModal.vue';
3
3
 
4
4
  export default {
5
+ emits: ['cancel-cancel', 'confirm-cancel'],
6
+
5
7
  components: { AppModal },
6
8
 
7
9
  props: {
@@ -442,7 +442,7 @@ export default {
442
442
  <span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
443
443
  <t
444
444
  v-else
445
- class="mastehead-resource-title"
445
+ class="masthead-resource-title"
446
446
  :k="'resourceDetail.header.' + realMode"
447
447
  :subtype="resourceSubtype"
448
448
  :name="displayName"
@@ -584,7 +584,7 @@ export default {
584
584
  flex-direction: row;
585
585
  align-items: center;
586
586
 
587
- .mastehead-resource-title {
587
+ .masthead-resource-title {
588
588
  padding: 0 8px;
589
589
  text-overflow: ellipsis;
590
590
  overflow: hidden;
@@ -602,7 +602,8 @@ export default {
602
602
  }
603
603
 
604
604
  .live-data {
605
- color: var(--body-text)
605
+ color: var(--body-text);
606
+ margin-left: 3px;
606
607
  }
607
608
  }
608
609
 
@@ -39,6 +39,8 @@ async function getYaml(store, model) {
39
39
  }
40
40
 
41
41
  export default {
42
+ emits: ['input'],
43
+
42
44
  components: {
43
45
  Loading,
44
46
  DetailTop,
@@ -85,9 +87,9 @@ export default {
85
87
  const store = this.$store;
86
88
  const route = this.$route;
87
89
  const params = route.params;
88
- let resource = this.resourceOverride || params.resource;
90
+ let resourceType = this.resourceOverride || params.resource;
89
91
 
90
- const inStore = this.storeOverride || store.getters['currentStore'](resource);
92
+ const inStore = this.storeOverride || store.getters['currentStore'](resourceType);
91
93
  const realMode = this.realMode;
92
94
 
93
95
  // eslint-disable-next-line prefer-const
@@ -98,10 +100,10 @@ export default {
98
100
  // know about: view, edit, create (stage, import and clone become "create")
99
101
  const mode = ([_CLONE, _IMPORT, _STAGE].includes(realMode) ? _CREATE : realMode);
100
102
 
101
- const getGraphConfig = store.getters['type-map/hasGraph'](resource);
103
+ const getGraphConfig = store.getters['type-map/hasGraph'](resourceType);
102
104
  const hasGraph = !!getGraphConfig;
103
- const hasCustomDetail = store.getters['type-map/hasCustomDetail'](resource, id);
104
- const hasCustomEdit = store.getters['type-map/hasCustomEdit'](resource, id);
105
+ const hasCustomDetail = store.getters['type-map/hasCustomDetail'](resourceType, id);
106
+ const hasCustomEdit = store.getters['type-map/hasCustomEdit'](resourceType, id);
105
107
 
106
108
  const schemas = store.getters[`${ inStore }/all`](SCHEMA);
107
109
 
@@ -122,16 +124,16 @@ export default {
122
124
 
123
125
  this.as = as;
124
126
 
125
- const options = store.getters[`type-map/optionsFor`](resource);
127
+ const options = store.getters[`type-map/optionsFor`](resourceType);
126
128
 
127
129
  this.showMasthead = [_CREATE, _EDIT].includes(mode) ? options.resourceEditMasthead : true;
128
130
  const canViewYaml = options.canYaml;
129
131
 
130
132
  if ( options.resource ) {
131
- resource = options.resource;
133
+ resourceType = options.resource;
132
134
  }
133
135
 
134
- const schema = store.getters[`${ inStore }/schemaFor`](resource);
136
+ const schema = store.getters[`${ inStore }/schemaFor`](resourceType);
135
137
  let model, initialModel, liveModel, yaml;
136
138
 
137
139
  if ( realMode === _CREATE || realMode === _IMPORT ) {
@@ -139,7 +141,7 @@ export default {
139
141
  namespace = store.getters['defaultNamespace'];
140
142
  }
141
143
 
142
- const data = { type: resource };
144
+ const data = { type: resourceType };
143
145
 
144
146
  if ( schema?.attributes?.namespaced ) {
145
147
  data.metadata = { namespace };
@@ -160,7 +162,7 @@ export default {
160
162
  await schema.fetchResourceFields();
161
163
  }
162
164
 
163
- yaml = createYaml(schemas, resource, data);
165
+ yaml = createYaml(schemas, resourceType, data);
164
166
  }
165
167
  } else {
166
168
  if ( as === _GRAPH ) {
@@ -192,13 +194,13 @@ export default {
192
194
 
193
195
  try {
194
196
  liveModel = await store.dispatch(`${ inStore }/find`, {
195
- type: resource,
197
+ type: resourceType,
196
198
  id: fqid,
197
199
  opt: { watch: true }
198
200
  });
199
201
  } catch (e) {
200
202
  if (e.status === 404 || e.status === 403) {
201
- store.dispatch('loadingError', new Error(this.t('nav.failWhale.resourceIdNotFound', { resource, fqid }, true)));
203
+ store.dispatch('loadingError', new Error(this.t('nav.failWhale.resourceIdNotFound', { resource: resourceType, fqid }, true)));
202
204
  }
203
205
  liveModel = {};
204
206
  notFound = fqid;
@@ -235,7 +237,7 @@ export default {
235
237
  hasCustomDetail,
236
238
  hasCustomEdit,
237
239
  canViewYaml,
238
- resource,
240
+ resourceType,
239
241
  as,
240
242
  yaml,
241
243
  initialModel,
@@ -262,7 +264,7 @@ export default {
262
264
  hasGraph: null,
263
265
  hasCustomDetail: null,
264
266
  hasCustomEdit: null,
265
- resource: null,
267
+ resourceType: null,
266
268
  asYaml: null,
267
269
  yaml: null,
268
270
  liveModel: null,
@@ -379,7 +381,7 @@ export default {
379
381
  <div v-else>
380
382
  <Masthead
381
383
  v-if="showMasthead"
382
- :resource="resource"
384
+ :resource="resourceType"
383
385
  :value="liveModel"
384
386
  :mode="mode"
385
387
  :real-mode="realMode"
@@ -41,6 +41,8 @@ export default {
41
41
 
42
42
  name: 'ResourceTable',
43
43
 
44
+ emits: ['clickedActionButton'],
45
+
44
46
  components: { ButtonGroup, SortableTable },
45
47
 
46
48
  props: {
@@ -19,6 +19,8 @@ import { BEFORE_SAVE_HOOKS, AFTER_SAVE_HOOKS } from '@shell/mixins/child-hook';
19
19
  import { exceptionToErrorsArray } from '@shell/utils/error';
20
20
 
21
21
  export default {
22
+ emits: ['error'],
23
+
22
24
  components: {
23
25
  Footer,
24
26
  FileSelector,
@@ -4,6 +4,8 @@ import { get } from '@shell/utils/object';
4
4
  import capitalize from 'lodash/capitalize';
5
5
 
6
6
  export default {
7
+ emits: ['clicked'],
8
+
7
9
  components: { LazyImage },
8
10
 
9
11
  props: {
@@ -4,6 +4,8 @@ import Closeable from '@shell/mixins/closeable';
4
4
  export default {
5
5
  name: 'SimpleBox',
6
6
 
7
+ emits: ['close'],
8
+
7
9
  mixins: [Closeable],
8
10
 
9
11
  props: {
@@ -5,6 +5,8 @@ import { AUTO, CENTER, fitOnScreen } from '@shell/utils/position';
5
5
  import LabeledSelect from '@shell/components/form/LabeledSelect';
6
6
 
7
7
  export default {
8
+ emits: ['update-cols-options', 'on-toggle-all', 'group-value-change', 'on-sort-change', 'col-visibility-change'],
9
+
8
10
  components: { Checkbox, LabeledSelect },
9
11
  props: {
10
12
  columns: {