yarn-app.js 685 B

12345678910111213141516171819202122232425
  1. import DS from 'ember-data';
  2. export default DS.JSONAPIAdapter.extend({
  3. headers: {
  4. Accept: 'application/json'
  5. },
  6. host: 'http://localhost:1337/localhost:8088', // configurable
  7. namespace: 'ws/v1/cluster', // common const
  8. pathForType(modelName) {
  9. return 'apps'; // move to some common place, return path by modelname.
  10. },
  11. /*
  12. urlForQuery(query, modelName) {
  13. var url = this._buildURL();
  14. return url + '/apps/' + query.appId + "/appattempts";
  15. },
  16. */
  17. ajax(url, method, hash) {
  18. hash = hash || {};
  19. hash.crossDomain = true;
  20. hash.xhrFields = {withCredentials: true};
  21. hash.targetServer = "RM";
  22. return this._super(url, method, hash);
  23. }
  24. });