Browse Source

Fix paths

pull/1/head
rozetko 7 years ago
parent
commit
4ec5af5977
  1. 3
      analytics/config.py
  2. 1
      server/src/config.ts
  3. 3
      server/src/services/data.ts

3
analytics/config.py

@ -1,7 +1,6 @@
import os import os
DATA_FOLDER = '../../data' DATA_FOLDER = '../data'
DATASOURCE_FOLDER = os.path.join(DATA_FOLDER, "datasources/")
DATASET_FOLDER = os.path.join(DATA_FOLDER, "datasets/") DATASET_FOLDER = os.path.join(DATA_FOLDER, "datasets/")
ANOMALIES_FOLDER = os.path.join(DATA_FOLDER, "anomalies/") ANOMALIES_FOLDER = os.path.join(DATA_FOLDER, "anomalies/")
MODELS_FOLDER = os.path.join(DATA_FOLDER, "models/") MODELS_FOLDER = os.path.join(DATA_FOLDER, "models/")

1
server/src/config.ts

@ -4,7 +4,6 @@ export const ANALYTICS_PATH = path.join(__dirname, '../../analytics');
export const DATA_PATH = path.join(__dirname, '../../data'); export const DATA_PATH = path.join(__dirname, '../../data');
export const DATASOURCES_PATH = path.join(DATA_PATH, 'datasources');
export const DATASETS_PATH = path.join(DATA_PATH, 'datasets'); export const DATASETS_PATH = path.join(DATA_PATH, 'datasets');
export const ANOMALIES_PATH = path.join(DATA_PATH, 'anomalies'); export const ANOMALIES_PATH = path.join(DATA_PATH, 'anomalies');
export const MODELS_PATH = path.join(DATA_PATH, 'models'); export const MODELS_PATH = path.join(DATA_PATH, 'models');

3
server/src/services/data.ts

@ -5,7 +5,7 @@ import * as fs from 'fs';
// see analytics/pattern_detection_model.py with folders available // see analytics/pattern_detection_model.py with folders available
function maybeCreate(path: string): void { function maybeCreate(path: string): void {
if(fs.existsSync(config.DATA_PATH)) { if(fs.existsSync(path)) {
return; return;
} }
fs.mkdirSync(path); fs.mkdirSync(path);
@ -14,7 +14,6 @@ function maybeCreate(path: string): void {
export function checkDataFolders(): void { export function checkDataFolders(): void {
var folders = [ var folders = [
config.DATA_PATH, config.DATA_PATH,
config.DATASOURCES_PATH,
config.DATASETS_PATH, config.DATASETS_PATH,
config.ANOMALIES_PATH, config.ANOMALIES_PATH,
config.MODELS_PATH, config.MODELS_PATH,

Loading…
Cancel
Save