import Watchable from './watchable';

export default class JobSummaryAdapter extends Watchable {
  urlForFindRecord(id, type, hash) {
    const [name, namespace] = JSON.parse(id);
    let url = super.urlForFindRecord(name, 'job', hash) + '/summary';
    if (namespace && namespace !== 'default') {
      url += `?namespace=${namespace}`;
    }
    return url;
  }
}

import WatchableNamespaceIDs from './watchable-namespace-ids';

export default class JobSummaryAdapter extends WatchableNamespaceIDs {}

Refactor job summary adapter to use the namespace ID base class
Refactor job summary adapter to use the namespace ID base class
