hunk.code_window:             if (endpoint.Type === PortainerEndpointTypes.EdgeAgentOnKubernetesEnvironment && endpoint.Status === EnvironmentStatus.Down) {
                 throw new Error('Unable to contact Edge agent, please ensure that the agent is properly running on the remote environment.');
               }
               await KubernetesNamespaceService.get();
             } catch (e) {
               let params = {};
               if (endpoint.Type == PortainerEndpointTypes.EdgeAgentOnKubernetesEnvironment) {
                 params = { redirect: true, environmentId: endpoint.Id, environmentName: endpoint.Name, route: 'kubernetes.dashboard' };
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:             // use selfsubject access review to check if we can connect to the kubernetes environment
               // because it's gets a fast response, and is accessible to all users
               try {
                 await getSelfSubjectAccessReview(endpoint.Id, 'default');
               } catch (e) {
                 throw new Error('Environment is unreachable.');
               }
  
hunk.file_path: app/kubernetes/__module.js
hunk.type: replace
file: import angular from 'angular';
  
  import { EdgeGroupsSelector } from '@/react/edge/edge-stacks/components/EdgeGroupsSelector';
  import { r2a } from '@/react-tools/react2angular';
  import { withReactQuery } from '@/react-tools/withReactQuery';
  import { EdgeCheckinIntervalField } from '@/react/edge/components/EdgeCheckInIntervalField';
  import { EdgeScriptForm } from '@/react/edge/components/EdgeScriptForm';
  import { EdgeAsyncIntervalsForm } from '@/react/edge/components/EdgeAsyncIntervalsForm';
  import { EdgeStackDeploymentTypeSelector } from '@/react/edge/edge-stacks/components/EdgeStackDeploymentTypeSelector';
  import { withUIRouter } from '@/react-tools/withUIRouter';
  
  export const componentsModule = angular
    .module('portainer.edge.react.components', [])
    .component(
      'edgeGroupsSelector',
      r2a(withUIRouter(withReactQuery(EdgeGroupsSelector)), [
        'onChange',
        'value',
        'error',
        'horizontal',
        'isGroupVisible',
      ])
    )
    .component(
      'edgeScriptForm',
      r2a(withReactQuery(EdgeScriptForm), [
        'edgeInfo',
        'commands',
        'isNomadTokenVisible',
        'asyncMode',
        'showMetaFields',
      ])
    )
    .component(
      'edgeCheckinIntervalField',
      r2a(withReactQuery(EdgeCheckinIntervalField), [
        'value',
        'onChange',
        'isDefaultHidden',
        'tooltip',
        'label',
        'readonly',
        'size',
      ])
    )
    .component(
      'edgeAsyncIntervalsForm',
      r2a(withReactQuery(EdgeAsyncIntervalsForm), [
        'values',
        'onChange',
        'isDefaultHidden',
        'readonly',
        'fieldSettings',
      ])
    )
    .component(
      'edgeStackDeploymentTypeSelector',
      r2a(withReactQuery(EdgeStackDeploymentTypeSelector), [
        'value',
        'onChange',
        'hasDockerEndpoint',
        'hasKubeEndpoint',
        'allowKubeToSelectCompose',
      ])
    ).name;
  