<commit_before><Route
  @name={{routeName}}
as |route|>
    <DataLoader
      @src={{uri '/${partition}/${nspace}/${dc}/service-instances/for-service/${name}'
        (hash
          partition=route.params.partition
          nspace=route.params.nspace
          dc=route.params.dc
          name=route.params.name
        )
      }}
    as |loader|>

      <BlockSlot @name="error">
        <AppError
          @error={{loader.error}}
          @login={{route.model.app.login.open}}
        />
      </BlockSlot>

      <BlockSlot @name="disconnected" as |after|>
        {{#if (eq loader.error.status "404")}}
          <Notice
            {{notification
              sticky=true
            }}
            class="notification-update"
            @type="warning"
          as |notice|>
            <notice.Header>
              <strong>Warning!</strong>
            </notice.Header>
            <notice.Body>
              <p>
                This service has been deregistered and no longer exists in the catalog.
              </p>
            </notice.Body>
          </Notice>
        {{else if (eq loader.error.status "403")}}
          <Notice
            {{notification
              sticky=true
            }}
            class="notification-update"
            @type="error"
          as |notice|>
            <notice.Header>
              <strong>Error!</strong>
            </notice.Header>
            <notice.Body>
              <p>
                You no longer have access to this service
              </p>
            </notice.Body>
          </Notice>
        {{else}}
          <Notice
            {{notification
              sticky=true
            }}
            class="notification-update"
            @type="warning"
          as |notice|>
            <notice.Header>
              <strong>Warning!</strong>
            </notice.Header>
            <notice.Body>
              <p>
                An error was returned whilst loading this data, refresh to try again.
              </p>
            </notice.Body>
          </Notice>
        {{/if}}
      </BlockSlot>

      <BlockSlot @name="loaded">
{{#let
  loader.data
  loader.data.firstObject
  route.model.dc
as |items item dc|}}

    {{#if item.IsOrigin}}
      <DataSource
        @src={{uri '/${partition}/${nspace}/${dc}/proxies/for-service/${name}'
          (hash
            partition=route.params.partition
            nspace=route.params.nspace
            dc=route.params.dc
            name=route.params.name
          )
        }}
        @onchange={{action (mut proxies) value="data"}}
      />
        {{! currently we use the discovery chain endpoint to understand whether }}
        {{! connect is enabled/disabled. We get a 500 error when its disabled }}
        {{! and use this to set MeshEnabled on the Datacenter }}
        {{! if once chain is set, i.e. we've checked this dc we remove the DataSource }}
        {{! which will mark it for closure, which possibly could be reopened if }}
        {{! the user clicks the routing/disco-chain tab}}
        {{#if (not chain)}}
          <DataSource
            @src={{uri '/${partition}/${nspace}/${dc}/discovery-chain/${name}'
              (hash
                partition=route.params.partition
                nspace=route.params.nspace
                dc=route.params.dc
                name=route.params.name
              )
            }}
            @onchange={{action (mut chain) value="data"}}
          />
        {{/if}}
        {{did-insert (set this 'chain' undefined) route.params.dc}}
      {{/if}}
  {{#let
  (hash
      topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (eq item.Service.Kind 'ingress-gateway')))
      services=(eq item.Service.Kind 'terminating-gateway')
      upstreams=(eq item.Service.Kind 'ingress-gateway')
      instances=true
      intentions=(and (not-eq item.Service.Kind 'terminating-gateway') (can 'read intention for service' item=item.Service))
      routing=(and dc.MeshEnabled item.IsOrigin)
      tags=(not item.Service.Kind)
  )
  as |tabs|}}
        <AppView>
          <BlockSlot @name="notification" as |status type item error|>
            <TopologyMetrics::Notifications
              @type={{type}}
              @status={{status}}
              @error={{error}}
            />
          </BlockSlot>
          <BlockSlot @name="breadcrumbs">
            <ol>
                <li><a data-test-back href={{href-to 'dc.services'}}>All Services</a></li>
            </ol>
          </BlockSlot>
          <BlockSlot @name="header">
              <h1>
                <route.Title @title={{item.Service.Service}} />
              </h1>
              <Consul::ExternalSource @item={{item.Service}} @withInfo={{true}} />
              <Consul::Kind @item={{item.Service}} @withInfo={{true}} />
          </BlockSlot>
          <BlockSlot @name="nav">
            {{#if (not-eq item.Service.Kind 'mesh-gateway')}}<commit_msg>fix: Added Tags tab to gateways(just like exists for non-gateway services)<commit_after><Route
  @name={{routeName}}
as |route|>
    <DataLoader
      @src={{uri '/${partition}/${nspace}/${dc}/service-instances/for-service/${name}'
        (hash
          partition=route.params.partition
          nspace=route.params.nspace
          dc=route.params.dc
          name=route.params.name
        )
      }}
    as |loader|>

      <BlockSlot @name="error">
        <AppError
          @error={{loader.error}}
          @login={{route.model.app.login.open}}
        />
      </BlockSlot>

      <BlockSlot @name="disconnected" as |after|>
        {{#if (eq loader.error.status "404")}}
          <Notice
            {{notification
              sticky=true
            }}
            class="notification-update"
            @type="warning"
          as |notice|>
            <notice.Header>
              <strong>Warning!</strong>
            </notice.Header>
            <notice.Body>
              <p>
                This service has been deregistered and no longer exists in the catalog.
              </p>
            </notice.Body>
          </Notice>
        {{else if (eq loader.error.status "403")}}
          <Notice
            {{notification
              sticky=true
            }}
            class="notification-update"
            @type="error"
          as |notice|>
            <notice.Header>
              <strong>Error!</strong>
            </notice.Header>
            <notice.Body>
              <p>
                You no longer have access to this service
              </p>
            </notice.Body>
          </Notice>
        {{else}}
          <Notice
            {{notification
              sticky=true
            }}
            class="notification-update"
            @type="warning"
          as |notice|>
            <notice.Header>
              <strong>Warning!</strong>
            </notice.Header>
            <notice.Body>
              <p>
                An error was returned whilst loading this data, refresh to try again.
              </p>
            </notice.Body>
          </Notice>
        {{/if}}
      </BlockSlot>

      <BlockSlot @name="loaded">
{{#let
  loader.data
  loader.data.firstObject
  route.model.dc
as |items item dc|}}

    {{#if item.IsOrigin}}
      <DataSource
        @src={{uri '/${partition}/${nspace}/${dc}/proxies/for-service/${name}'
          (hash
            partition=route.params.partition
            nspace=route.params.nspace
            dc=route.params.dc
            name=route.params.name
          )
        }}
        @onchange={{action (mut proxies) value="data"}}
      />
        {{! currently we use the discovery chain endpoint to understand whether }}
        {{! connect is enabled/disabled. We get a 500 error when its disabled }}
        {{! and use this to set MeshEnabled on the Datacenter }}
        {{! if once chain is set, i.e. we've checked this dc we remove the DataSource }}
        {{! which will mark it for closure, which possibly could be reopened if }}
        {{! the user clicks the routing/disco-chain tab}}
        {{#if (not chain)}}
          <DataSource
            @src={{uri '/${partition}/${nspace}/${dc}/discovery-chain/${name}'
              (hash
                partition=route.params.partition
                nspace=route.params.nspace
                dc=route.params.dc
                name=route.params.name
              )
            }}
            @onchange={{action (mut chain) value="data"}}
          />
        {{/if}}
        {{did-insert (set this 'chain' undefined) route.params.dc}}
      {{/if}}
  {{#let
  (hash
      topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (eq item.Service.Kind 'ingress-gateway')))
      services=(eq item.Service.Kind 'terminating-gateway')
      upstreams=(eq item.Service.Kind 'ingress-gateway')
      instances=true
      intentions=(and (not-eq item.Service.Kind 'terminating-gateway') (can 'read intention for service' item=item.Service))
      routing=(and dc.MeshEnabled item.IsOrigin)
      tags=true
  )
  as |tabs|}}
        <AppView>
          <BlockSlot @name="notification" as |status type item error|>
            <TopologyMetrics::Notifications
              @type={{type}}
              @status={{status}}
              @error={{error}}
            />
          </BlockSlot>
          <BlockSlot @name="breadcrumbs">
            <ol>
                <li><a data-test-back href={{href-to 'dc.services'}}>All Services</a></li>
            </ol>
          </BlockSlot>
          <BlockSlot @name="header">
              <h1>
                <route.Title @title={{item.Service.Service}} />
              </h1>
              <Consul::ExternalSource @item={{item.Service}} @withInfo={{true}} />
              <Consul::Kind @item={{item.Service}} @withInfo={{true}} />
          </BlockSlot>
          <BlockSlot @name="nav">
            {{#if (not-eq item.Service.Kind 'mesh-gateway')}}
{'fraction_non_alphanumeric': 0.13857602574416733, 'fraction_numerical': 0.002413515687851971, 'mean_word_length': 1.5932203389830508, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 123, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1560713', 'n_tokens_mistral': 2767, 'n_tokens_neox': 2724, 'n_words': 608}