Skip to content

Commit

Permalink
[FEAT] Add inspect store button to data pane in Ember Inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
SYU15 committed Mar 27, 2020
1 parent 651046b commit af75ade
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/controllers/model-types.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Controller from '@ember/controller';
import { get, computed } from '@ember/object';
import { action, get, computed } from '@ember/object';
import { sort } from '@ember/object/computed';
import { inject as service } from '@ember/service';

Expand Down Expand Up @@ -48,9 +48,14 @@ export default Controller.extend({
return true;
}
});
})
});
}),

getStore: action(function() {
this.port.send('objectInspector:inspectByContainerLookup', {
name: 'service:store'
});
}),
});
/**
* Returns whether or not a given key has been set in storage.
* @param {*} storage
Expand Down
4 changes: 4 additions & 0 deletions app/templates/model-types-toolbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
Order Models By Record Count
</label>
</div>
<button class="send-to-console" {{on "click" this.getStore}} data-test-inspect-store>
{{svg-jar "send-with-chevron" width="6px" height="9px"}}
Inspect Store
</button>
</div>

0 comments on commit af75ade

Please sign in to comment.