e8593ec1bb
This rethinks namespaces as a filter on list pages rather than a global setting. The biggest net-new feature here is being able to select All (*) to list all jobs or CSI volumes across namespaces.
14 lines
385 B
JavaScript
14 lines
385 B
JavaScript
import Watchable from './watchable';
|
|
import codesForError from '../utils/codes-for-error';
|
|
|
|
export default class NamespaceAdapter extends Watchable {
|
|
findRecord(store, modelClass, id) {
|
|
return super.findRecord(...arguments).catch(error => {
|
|
const errorCodes = codesForError(error);
|
|
if (errorCodes.includes('501')) {
|
|
return { Name: id };
|
|
}
|
|
});
|
|
}
|
|
}
|