Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@geoman-io/leaflet-geoman-free": "^2.18.3",
"@tanstack/react-query": "^5.76.1",
"@tapis/tapisui-hooks": "^0.0.3",
"@types/leaflet-draw": "^1.0.11",
"@types/lodash": "^4.17.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/upstream-api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ apis/ProjectsApi.ts
apis/SensorVariablesApi.ts
apis/SensorsApi.ts
apis/StationsApi.ts
apis/UploadfileApi.ts
apis/UploadfileCsvApi.ts
apis/index.ts
index.ts
Expand Down Expand Up @@ -41,6 +40,7 @@ models/PyTASProject.ts
models/PyTASUser.ts
models/ResponsePostSensorAndMeasurementApiV1UploadfileCsvCampaignCampaignIdStationStationIdSensorPostValue.ts
models/SensorItem.ts
models/SensorStatistics.ts
models/SensorSummaryForStations.ts
models/StationCreate.ts
models/StationCreateResponse.ts
Expand Down
1 change: 0 additions & 1 deletion packages/upstream-api/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ export * from './ProjectsApi';
export * from './SensorVariablesApi';
export * from './SensorsApi';
export * from './StationsApi';
export * from './UploadfileApi';
export * from './UploadfileCsvApi';
56 changes: 12 additions & 44 deletions packages/upstream-api/models/GetSensorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
*/

import { mapValues } from '../runtime';
import type { SensorStatistics } from './SensorStatistics';
import {
SensorStatisticsFromJSON,
SensorStatisticsFromJSONTyped,
SensorStatisticsToJSON,
SensorStatisticsToJSONTyped,
} from './SensorStatistics';

/**
*
* @export
Expand Down Expand Up @@ -63,40 +71,10 @@ export interface GetSensorResponse {
variablename?: string | null;
/**
*
* @type {number}
* @memberof GetSensorResponse
*/
maxValue?: number | null;
/**
*
* @type {number}
* @memberof GetSensorResponse
*/
minValue?: number | null;
/**
*
* @type {number}
* @memberof GetSensorResponse
*/
avgValue?: number | null;
/**
*
* @type {number}
* @memberof GetSensorResponse
*/
count?: number | null;
/**
*
* @type {Date}
* @memberof GetSensorResponse
*/
firstMeasurementTime?: Date | null;
/**
*
* @type {Date}
* @type {SensorStatistics}
* @memberof GetSensorResponse
*/
lastMeasurementTime?: Date | null;
statistics?: SensorStatistics | null;
}

/**
Expand Down Expand Up @@ -124,12 +102,7 @@ export function GetSensorResponseFromJSONTyped(json: any, ignoreDiscriminator: b
'postprocessscript': json['postprocessscript'] == null ? undefined : json['postprocessscript'],
'units': json['units'] == null ? undefined : json['units'],
'variablename': json['variablename'] == null ? undefined : json['variablename'],
'maxValue': json['max_value'] == null ? undefined : json['max_value'],
'minValue': json['min_value'] == null ? undefined : json['min_value'],
'avgValue': json['avg_value'] == null ? undefined : json['avg_value'],
'count': json['count'] == null ? undefined : json['count'],
'firstMeasurementTime': json['first_measurement_time'] == null ? undefined : (new Date(json['first_measurement_time'])),
'lastMeasurementTime': json['last_measurement_time'] == null ? undefined : (new Date(json['last_measurement_time'])),
'statistics': json['statistics'] == null ? undefined : SensorStatisticsFromJSON(json['statistics']),
};
}

Expand All @@ -151,12 +124,7 @@ export function GetSensorResponseToJSONTyped(value?: GetSensorResponse | null, i
'postprocessscript': value['postprocessscript'],
'units': value['units'],
'variablename': value['variablename'],
'max_value': value['maxValue'],
'min_value': value['minValue'],
'avg_value': value['avgValue'],
'count': value['count'],
'first_measurement_time': value['firstMeasurementTime'] == null ? undefined : ((value['firstMeasurementTime'] as any).toISOString()),
'last_measurement_time': value['lastMeasurementTime'] == null ? undefined : ((value['lastMeasurementTime'] as any).toISOString()),
'statistics': SensorStatisticsToJSON(value['statistics']),
};
}

16 changes: 16 additions & 0 deletions packages/upstream-api/models/SensorItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
*/

import { mapValues } from '../runtime';
import type { SensorStatistics } from './SensorStatistics';
import {
SensorStatisticsFromJSON,
SensorStatisticsFromJSONTyped,
SensorStatisticsToJSON,
SensorStatisticsToJSONTyped,
} from './SensorStatistics';

/**
*
* @export
Expand Down Expand Up @@ -61,6 +69,12 @@ export interface SensorItem {
* @memberof SensorItem
*/
variablename?: string | null;
/**
*
* @type {SensorStatistics}
* @memberof SensorItem
*/
statistics?: SensorStatistics | null;
}

/**
Expand Down Expand Up @@ -88,6 +102,7 @@ export function SensorItemFromJSONTyped(json: any, ignoreDiscriminator: boolean)
'postprocessscript': json['postprocessscript'] == null ? undefined : json['postprocessscript'],
'units': json['units'] == null ? undefined : json['units'],
'variablename': json['variablename'] == null ? undefined : json['variablename'],
'statistics': json['statistics'] == null ? undefined : SensorStatisticsFromJSON(json['statistics']),
};
}

Expand All @@ -109,6 +124,7 @@ export function SensorItemToJSONTyped(value?: SensorItem | null, ignoreDiscrimin
'postprocessscript': value['postprocessscript'],
'units': value['units'],
'variablename': value['variablename'],
'statistics': SensorStatisticsToJSON(value['statistics']),
};
}

161 changes: 161 additions & 0 deletions packages/upstream-api/models/SensorStatistics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/* tslint:disable */
/* eslint-disable */
/**
* Upstream Sensor Storage
* Sensor Storage for Upstream data
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { mapValues } from '../runtime';
/**
*
* @export
* @interface SensorStatistics
*/
export interface SensorStatistics {
/**
*
* @type {number}
* @memberof SensorStatistics
*/
maxValue?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
minValue?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
avgValue?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
stddevValue?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
percentile90?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
percentile95?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
percentile99?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
count?: number | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
firstMeasurementValue?: number | null;
/**
*
* @type {Date}
* @memberof SensorStatistics
*/
firstMeasurementCollectiontime?: Date | null;
/**
*
* @type {Date}
* @memberof SensorStatistics
*/
lastMeasurementTime?: Date | null;
/**
*
* @type {number}
* @memberof SensorStatistics
*/
lastMeasurementValue?: number | null;
/**
*
* @type {Date}
* @memberof SensorStatistics
*/
statsLastUpdated?: Date | null;
}

/**
* Check if a given object implements the SensorStatistics interface.
*/
export function instanceOfSensorStatistics(value: object): value is SensorStatistics {
return true;
}

export function SensorStatisticsFromJSON(json: any): SensorStatistics {
return SensorStatisticsFromJSONTyped(json, false);
}

export function SensorStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SensorStatistics {
if (json == null) {
return json;
}
return {

'maxValue': json['max_value'] == null ? undefined : json['max_value'],
'minValue': json['min_value'] == null ? undefined : json['min_value'],
'avgValue': json['avg_value'] == null ? undefined : json['avg_value'],
'stddevValue': json['stddev_value'] == null ? undefined : json['stddev_value'],
'percentile90': json['percentile_90'] == null ? undefined : json['percentile_90'],
'percentile95': json['percentile_95'] == null ? undefined : json['percentile_95'],
'percentile99': json['percentile_99'] == null ? undefined : json['percentile_99'],
'count': json['count'] == null ? undefined : json['count'],
'firstMeasurementValue': json['first_measurement_value'] == null ? undefined : json['first_measurement_value'],
'firstMeasurementCollectiontime': json['first_measurement_collectiontime'] == null ? undefined : (new Date(json['first_measurement_collectiontime'])),
'lastMeasurementTime': json['last_measurement_time'] == null ? undefined : (new Date(json['last_measurement_time'])),
'lastMeasurementValue': json['last_measurement_value'] == null ? undefined : json['last_measurement_value'],
'statsLastUpdated': json['stats_last_updated'] == null ? undefined : (new Date(json['stats_last_updated'])),
};
}

export function SensorStatisticsToJSON(json: any): SensorStatistics {
return SensorStatisticsToJSONTyped(json, false);
}

export function SensorStatisticsToJSONTyped(value?: SensorStatistics | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}

return {

'max_value': value['maxValue'],
'min_value': value['minValue'],
'avg_value': value['avgValue'],
'stddev_value': value['stddevValue'],
'percentile_90': value['percentile90'],
'percentile_95': value['percentile95'],
'percentile_99': value['percentile99'],
'count': value['count'],
'first_measurement_value': value['firstMeasurementValue'],
'first_measurement_collectiontime': value['firstMeasurementCollectiontime'] == null ? undefined : ((value['firstMeasurementCollectiontime'] as any).toISOString()),
'last_measurement_time': value['lastMeasurementTime'] == null ? undefined : ((value['lastMeasurementTime'] as any).toISOString()),
'last_measurement_value': value['lastMeasurementValue'],
'stats_last_updated': value['statsLastUpdated'] == null ? undefined : ((value['statsLastUpdated'] as any).toISOString()),
};
}

1 change: 1 addition & 0 deletions packages/upstream-api/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export * from './PyTASProject';
export * from './PyTASUser';
export * from './ResponsePostSensorAndMeasurementApiV1UploadfileCsvCampaignCampaignIdStationStationIdSensorPostValue';
export * from './SensorItem';
export * from './SensorStatistics';
export * from './SensorSummaryForStations';
export * from './StationCreate';
export * from './StationCreateResponse';
Expand Down
8 changes: 1 addition & 7 deletions src/app/Home/_components/CampaignList/CampaignList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ const CampaignList: React.FC = () => {
[startDate, endDate, bounds, sensorVariables],
);

const {
data: campaigns,
isLoading,
error,
} = useList({
filters,
});
const { data: campaigns, isLoading, error } = useList({ filters });

// Define filter configurations with proper typing
const filterConfigs = [
Expand Down
Loading
Loading