<commit_before>import C from 'ui/utils/constants';
import Resource from 'ember-api-store/models/resource';
import { reference } from 'ember-api-store/utils/denormalize';
import { get, computed } from '@ember/object';
import { inject as service } from '@ember/service';
import { strPad } from 'ui/utils/util';
import { formatSi } from 'shared/utils/parse-unit';
import { later } from '@ember/runloop';
import { gt } from '@ember/object/computed';
import DisplayImage from 'shared/mixins/display-image';

var Pod = Resource.extend(DisplayImage, {
  router:       service(),
  modalService:  service('modal'),
  globalStore:  service(),
  clusterStore:  service(),
  scope:        service(),

  canHaveLabels: true,
  escToClose:    true,

  canEdit:      false,
  canClone: false,

  namespace:    reference('namespaceId', 'namespace', 'clusterStore'),
  node:          reference('nodeId', 'node', 'globalStore'),
  workload:      reference('workloadId'),
  hasSidekicks:  gt('containers.length', 1),
  canEditYaml:  computed('links.update', 'actions.edit', function() {
    return !!get(this, 'links.update') && !!get(this, 'actions.edit');
  }),

  availableActions: computed('combinedState', function() {
    let isRunning = get(this, 'combinedState') === 'running';

    var choices = [
      {
        label:     'action.execute',
        icon:      'icon icon-terminal',
        action:    'shell',
        enabled:   isRunning,<commit_msg>Fix edit pod yaml issue<commit_after>import C from 'ui/utils/constants';
import Resource from 'ember-api-store/models/resource';
import { reference } from 'ember-api-store/utils/denormalize';
import { get, computed } from '@ember/object';
import { inject as service } from '@ember/service';
import { strPad } from 'ui/utils/util';
import { formatSi } from 'shared/utils/parse-unit';
import { later } from '@ember/runloop';
import { gt } from '@ember/object/computed';
import DisplayImage from 'shared/mixins/display-image';

var Pod = Resource.extend(DisplayImage, {
  router:       service(),
  modalService:  service('modal'),
  globalStore:  service(),
  clusterStore:  service(),
  scope:        service(),

  canHaveLabels: true,
  escToClose:    true,

  canEdit:      false,
  canClone: false,

  namespace:    reference('namespaceId', 'namespace', 'clusterStore'),
  node:          reference('nodeId', 'node', 'globalStore'),
  workload:      reference('workloadId'),
  hasSidekicks:  gt('containers.length', 1),
  canEditYaml:  computed('links.update', 'links.yaml', function() {
    return !!get(this, 'links.update') && !!get(this, 'links.yaml');
  }),

  availableActions: computed('combinedState', function() {
    let isRunning = get(this, 'combinedState') === 'running';

    var choices = [
      {
        label:     'action.execute',
        icon:      'icon icon-terminal',
        action:    'shell',
        enabled:   isRunning,
{'fraction_non_alphanumeric': 0.15342087076710437, 'fraction_numerical': 0.000691085003455425, 'mean_word_length': 3.707317073170732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2436845', 'n_tokens_mistral': 874, 'n_tokens_neox': 862, 'n_words': 213}