Browse Source

services->controllers

pull/1/head
Alexey Velikiy 7 years ago
parent
commit
9e11c9e34a
  1. 2
      server/src/config.ts
  2. 0
      server/src/controllers/alerts_service.ts
  3. 0
      server/src/controllers/analytics_connection.ts
  4. 0
      server/src/controllers/analytics_service.ts
  5. 0
      server/src/controllers/data.ts
  6. 0
      server/src/controllers/json.ts
  7. 0
      server/src/controllers/metrics.ts
  8. 0
      server/src/controllers/notification_service.ts
  9. 0
      server/src/controllers/segments.ts
  10. 2
      server/src/index.ts
  11. 2
      server/src/models/analytic_unit.ts
  12. 2
      server/src/routes/alerts_router.ts
  13. 4
      server/src/routes/analytic_units_router.ts
  14. 4
      server/src/routes/segments_router.ts

2
server/src/config.ts

@ -1,6 +1,6 @@
import * as path from 'path';
import * as fs from 'fs';
import { getJsonDataSync } from './services/json';
import { getJsonDataSync } from './controllers/json';
let configFile = path.join(__dirname, '../../config.json');

0
server/src/services/alerts_service.ts → server/src/controllers/alerts_service.ts

0
server/src/services/analytics_connection.ts → server/src/controllers/analytics_connection.ts

0
server/src/services/analytics_service.ts → server/src/controllers/analytics_service.ts

0
server/src/services/data.ts → server/src/controllers/data.ts

0
server/src/services/json.ts → server/src/controllers/json.ts

0
server/src/services/metrics.ts → server/src/controllers/metrics.ts

0
server/src/services/notification_service.ts → server/src/controllers/notification_service.ts

0
server/src/services/segments.ts → server/src/controllers/segments.ts

2
server/src/index.ts

@ -2,7 +2,7 @@ import { router as anomaliesRouter } from './routes/analytic_units_router';
import { router as segmentsRouter } from './routes/segments_router';
import { router as alertsRouter } from './routes/alerts_router';
import * as Data from './services/data';
import * as Data from './controllers/data';
import { HASTIC_PORT } from './config';

2
server/src/models/analytic_unit.ts

@ -1,4 +1,4 @@
import { getJsonDataSync, writeJsonDataSync } from '../services/json'
import { getJsonDataSync, writeJsonDataSync } from '../controllers/json'
import { ANALYTIC_UNITS_PATH } from '../config'
import * as crypto from 'crypto';

2
server/src/routes/alerts_router.ts

@ -1,5 +1,5 @@
import * as AnalyticUnit from '../models/analytic_unit';
import { getAlertsAnomalies, saveAlertsAnomalies } from '../services/alerts_service';
import { getAlertsAnomalies, saveAlertsAnomalies } from '../controllers/alerts_service';
import * as Router from 'koa-router';

4
server/src/routes/analytic_units_router.ts

@ -2,8 +2,8 @@ import * as Router from 'koa-router';
import * as AnalyticUnit from '../models/analytic_unit';
import { runLearning } from '../services/analytics_service'
import { saveTargets } from '../services/metrics';
import { runLearning } from '../controllers/analytics_service'
import { saveTargets } from '../controllers/metrics';
async function sendStatus(ctx: Router.IRouterContext) {
try {

4
server/src/routes/segments_router.ts

@ -4,10 +4,10 @@ import {
getLabeledSegments,
insertSegments,
removeSegments,
} from '../services/segments';
} from '../controllers/segments';
import { AnalyticUnitId } from '../models/analytic_unit';
import { runLearning } from '../services/analytics_service';
import { runLearning } from '../controllers/analytics_service';
async function sendSegments(ctx: Router.IRouterContext) {

Loading…
Cancel
Save