<commit_before>import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import notifyError from 'nomad-ui/utils/notify-error';
import classic from 'ember-classic-decorator';

@classic
export default class JobRoute extends Route {
  @service can;
  @service store;
  @service token;

  serialize(model) {
    return { job_name: JSON.parse(model.get('id')).join('@') };
  }

  model(params) {
    const [name, namespace = 'default'] = params.job_name.split('@');

    const fullId = JSON.stringify([name, namespace]);

    return this.store
      .findRecord('job', fullId, { reload: true })<commit_msg>refact: use `idWithNamespace` in serialize hook jobs.job<commit_after>import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import notifyError from 'nomad-ui/utils/notify-error';
import classic from 'ember-classic-decorator';

@classic
export default class JobRoute extends Route {
  @service can;
  @service store;
  @service token;

  serialize(model) {
    return { job_name: model.get('idWithNamespace') };
  }

  model(params) {
    const [name, namespace = 'default'] = params.job_name.split('@');

    const fullId = JSON.stringify([name, namespace]);

    return this.store
      .findRecord('job', fullId, { reload: true })
{'fraction_non_alphanumeric': 0.14044117647058824, 'fraction_numerical': 0.0, 'mean_word_length': 4.400793650793651, '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': '7189355', 'n_tokens_mistral': 424, 'n_tokens_neox': 412, 'n_words': 116}