Mirage clean up (#14320)
* remove uneeded endpoints in base mirage * remove factory * remove unusage page
This commit is contained in:
parent
ba49365ecb
commit
ed8240fb05
|
@ -1,13 +0,0 @@
|
|||
import Mirage from 'ember-cli-mirage';
|
||||
|
||||
export default Mirage.Factory.extend({
|
||||
end_time: '2020-10-31T23:59:59Z',
|
||||
start_time: '2020-09-01T00:00:00Z',
|
||||
total: function () {
|
||||
return {
|
||||
clients: 20,
|
||||
direct_entities: 10,
|
||||
non_entity_tokens: 10,
|
||||
};
|
||||
},
|
||||
});
|
|
@ -1,8 +0,0 @@
|
|||
import Mirage from 'ember-cli-mirage';
|
||||
|
||||
export default Mirage.Factory.extend({
|
||||
default_report_months: 12,
|
||||
enabled: 'default-enable',
|
||||
queries_available: false,
|
||||
retention_months: 24,
|
||||
});
|
|
@ -2,25 +2,6 @@
|
|||
const EXPIRY_DATE = '2021-05-12T23:20:50.52Z';
|
||||
|
||||
export default function (server) {
|
||||
server.get('sys/internal/counters/activity', function (db) {
|
||||
let data = {};
|
||||
const firstRecord = db['clients/activities'].first();
|
||||
if (firstRecord) {
|
||||
data = firstRecord;
|
||||
}
|
||||
return {
|
||||
data,
|
||||
request_id: '0001',
|
||||
};
|
||||
});
|
||||
|
||||
server.get('sys/internal/counters/config', function (db) {
|
||||
return {
|
||||
request_id: '00001',
|
||||
data: db['clients/configs'].first(),
|
||||
};
|
||||
});
|
||||
|
||||
server.get('/sys/internal/ui/feature-flags', (db) => {
|
||||
const featuresResponse = db.features.first();
|
||||
return {
|
||||
|
@ -30,199 +11,6 @@ export default function (server) {
|
|||
};
|
||||
});
|
||||
|
||||
// ARG TODO eventually remove from base it should all come from activity after 1.10 release.
|
||||
server.get('/sys/internal/counters/activity/monthly', function () {
|
||||
return {
|
||||
data: {
|
||||
by_namespace: [
|
||||
{
|
||||
namespace_id: 'Z4Rzh',
|
||||
namespace_path: 'namespace1/',
|
||||
counts: {
|
||||
distinct_entities: 867,
|
||||
non_entity_tokens: 939,
|
||||
clients: 1806,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'DcgzU',
|
||||
namespace_path: 'namespace17/',
|
||||
counts: {
|
||||
distinct_entities: 966,
|
||||
non_entity_tokens: 550,
|
||||
clients: 1516,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: '5SWT8',
|
||||
namespace_path: 'namespacelonglonglong4/',
|
||||
counts: {
|
||||
distinct_entities: 996,
|
||||
non_entity_tokens: 417,
|
||||
clients: 1413,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'XGu7R',
|
||||
namespace_path: 'namespace12/',
|
||||
counts: {
|
||||
distinct_entities: 829,
|
||||
non_entity_tokens: 540,
|
||||
clients: 1369,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'yHcL9',
|
||||
namespace_path: 'namespace11/',
|
||||
counts: {
|
||||
distinct_entities: 563,
|
||||
non_entity_tokens: 705,
|
||||
clients: 1268,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'F0xGm',
|
||||
namespace_path: 'namespace10/',
|
||||
counts: {
|
||||
distinct_entities: 925,
|
||||
non_entity_tokens: 255,
|
||||
clients: 1180,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'aJuQG',
|
||||
namespace_path: 'namespace9/',
|
||||
counts: {
|
||||
distinct_entities: 935,
|
||||
non_entity_tokens: 239,
|
||||
clients: 1174,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'bw5UO',
|
||||
namespace_path: 'namespace6/',
|
||||
counts: {
|
||||
distinct_entities: 810,
|
||||
non_entity_tokens: 363,
|
||||
clients: 1173,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'IeyJp',
|
||||
namespace_path: 'namespace14/',
|
||||
counts: {
|
||||
distinct_entities: 774,
|
||||
non_entity_tokens: 392,
|
||||
clients: 1166,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'Uc0o8',
|
||||
namespace_path: 'namespace16/',
|
||||
counts: {
|
||||
distinct_entities: 408,
|
||||
non_entity_tokens: 743,
|
||||
clients: 1151,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'R6L40',
|
||||
namespace_path: 'namespace2/',
|
||||
counts: {
|
||||
distinct_entities: 292,
|
||||
non_entity_tokens: 736,
|
||||
clients: 1028,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'Rqa3W',
|
||||
namespace_path: 'namespace13/',
|
||||
counts: {
|
||||
distinct_entities: 160,
|
||||
non_entity_tokens: 803,
|
||||
clients: 963,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'MSgZE',
|
||||
namespace_path: 'namespace7/',
|
||||
counts: {
|
||||
distinct_entities: 201,
|
||||
non_entity_tokens: 657,
|
||||
clients: 858,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'kxU4t',
|
||||
namespace_path: 'namespacelonglonglong3/',
|
||||
counts: {
|
||||
distinct_entities: 742,
|
||||
non_entity_tokens: 26,
|
||||
clients: 768,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: '5xKya',
|
||||
namespace_path: 'namespace15/',
|
||||
counts: {
|
||||
distinct_entities: 663,
|
||||
non_entity_tokens: 19,
|
||||
clients: 682,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: '5KxXA',
|
||||
namespace_path: 'namespace18anotherlong/',
|
||||
counts: {
|
||||
distinct_entities: 470,
|
||||
non_entity_tokens: 196,
|
||||
clients: 666,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'AAidI',
|
||||
namespace_path: 'namespace20/',
|
||||
counts: {
|
||||
distinct_entities: 429,
|
||||
non_entity_tokens: 60,
|
||||
clients: 489,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'BCl56',
|
||||
namespace_path: 'namespace8/',
|
||||
counts: {
|
||||
distinct_entities: 61,
|
||||
non_entity_tokens: 201,
|
||||
clients: 262,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'yYNw2',
|
||||
namespace_path: 'namespace19/',
|
||||
counts: {
|
||||
distinct_entities: 165,
|
||||
non_entity_tokens: 85,
|
||||
clients: 250,
|
||||
},
|
||||
},
|
||||
{
|
||||
namespace_id: 'root',
|
||||
namespace_path: '',
|
||||
counts: {
|
||||
distinct_entities: 67,
|
||||
non_entity_tokens: 9,
|
||||
clients: 76,
|
||||
},
|
||||
},
|
||||
],
|
||||
distinct_entities: 11323,
|
||||
non_entity_tokens: 7935,
|
||||
clients: 19258,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
server.get('/sys/health', function () {
|
||||
return {
|
||||
initialized: true,
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
import { create, visitable, fillable, clickable } from 'ember-cli-page-object';
|
||||
|
||||
export default create({
|
||||
metrics: visitable('/vault/metrics'),
|
||||
config: visitable('/vault/metrics/config'),
|
||||
configEdit: visitable('/vault/metrics/edit'),
|
||||
startInput: fillable('[data-test-start-input]'),
|
||||
endInput: fillable('[data-test-end-input]'),
|
||||
queryButton: clickable('[data-test-metrics-query]'),
|
||||
configTab: clickable('[data-test-configuration-tab]'),
|
||||
metricsTab: clickable('[data-test-usage-tab]'),
|
||||
});
|
Loading…
Reference in New Issue