2021-04-12 13:32:25 +00:00
|
|
|
import createRequestMock from "test/mocks/create_request_mock";
|
2017-03-02 22:07:01 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
loadAll: {
|
2021-06-04 19:13:59 +00:00
|
|
|
valid: (bearerToken, query, queryId) => {
|
2017-03-02 22:07:01 +00:00
|
|
|
return createRequestMock({
|
|
|
|
bearerToken,
|
2021-04-12 13:32:25 +00:00
|
|
|
endpoint: "/api/v1/fleet/targets",
|
|
|
|
method: "post",
|
2017-03-02 22:07:01 +00:00
|
|
|
params: {
|
|
|
|
query,
|
2021-06-04 19:13:59 +00:00
|
|
|
query_id: queryId,
|
2017-03-02 22:07:01 +00:00
|
|
|
selected: {
|
|
|
|
hosts: [],
|
|
|
|
labels: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
response: {
|
|
|
|
targets_count: 1234,
|
|
|
|
targets: [
|
|
|
|
{
|
|
|
|
id: 3,
|
2021-04-12 13:32:25 +00:00
|
|
|
label: "OS X El Capitan 10.11",
|
|
|
|
name: "osx-10.11",
|
|
|
|
platform: "darwin",
|
|
|
|
target_type: "hosts",
|
2017-03-02 22:07:01 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 4,
|
2021-04-12 13:32:25 +00:00
|
|
|
label: "Jason Meller's Macbook Pro",
|
|
|
|
name: "jmeller.local",
|
|
|
|
platform: "darwin",
|
|
|
|
target_type: "hosts",
|
2017-03-02 22:07:01 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 4,
|
2021-04-12 13:32:25 +00:00
|
|
|
label: "All Macs",
|
|
|
|
name: "macs",
|
2017-03-02 22:07:01 +00:00
|
|
|
count: 1234,
|
2021-04-12 13:32:25 +00:00
|
|
|
target_type: "labels",
|
2017-03-02 22:07:01 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|