Skip to content

Commit

Permalink
Merge pull request #379 from Digital-Engineering/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
DnOberon authored and GitHub Enterprise committed May 30, 2023
2 parents b983da0 + c7efd2c commit fecbafc
Show file tree
Hide file tree
Showing 284 changed files with 11,089 additions and 10,886 deletions.
2 changes: 1 addition & 1 deletion .docker-env
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ QUEUE_SYSTEM=rabbitmq
# RabbitMQ connection string
RABBITMQ_URL=amqp://deeplynx:root@rabbitmq:5672

# controls whether or not Deep Lynx should emit data events
# controls whether or not DeepLynx should emit data events
EMIT_EVENTS=true

# whether or not to create a superuser on initial boot, along with the values
Expand Down
4 changes: 2 additions & 2 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# express.js application configuration
SERVER_PORT=8090
ROOT_ADDRESS=http://localhost:8090
# the maximum size in megabytes of request bodies sent to Deep Lynx
# the maximum size in megabytes of request bodies sent to DeepLynx
# requests with payloads over this limit will return a 413 note that
# this does not apply to file size, only raw body size
MAX_REQUEST_BODY_SIZE=50
Expand Down Expand Up @@ -99,7 +99,7 @@ EDGE_INSERTION_QUEUE_NAME=edge_insertion
EDGE_INSERTION_BACKOFF_MULTIPLIER=5
EDGE_INSERTION_MAX_RETRY=10

# controls whether or not Deep Lynx should emit data events
# controls whether or not DeepLynx should emit data events
EMIT_EVENTS=true

# whether or not to create a superuser on initial boot, along with the values
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/kubernetes @Digital-Engineering/infrastructure
/.github @Digital-Engineering/infrastructure
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to Deep Lynx
# Contributing to DeepLynx

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

Expand Down
48 changes: 35 additions & 13 deletions API Documentation/Core.swagger_collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ openapi: 3.0.1
x-stoplight:
id: tnc6hl9b9eimk
info:
title: Deep Lynx
title: DeepLynx
description: |-
The construction of megaprojects has consistently demonstrated challenges for project managers in regard to meeting cost, schedule, and performance requirements. Megaproject construction challenges are common place within megaprojects with many active projects in the United States failing to meet cost and schedule efforts by significant margins. Currently, engineering teams operate in siloed tools and disparate teams where connections across design, procurement, and construction systems are translated manually or over brittle point-to-point integrations. The manual nature of data exchange increases the risk of silent errors in the reactor design, with each silent error cascading across the design. These cascading errors lead to uncontrollable risk during construction, resulting in significant delays and cost overruns. Deep Lynx allows for an integrated platform during design and operations of mega projects.
The Deep Lynx Core API delivers a few main features.
The construction of megaprojects has consistently demonstrated challenges for project managers in regard to meeting cost, schedule, and performance requirements. Megaproject construction challenges are common place within megaprojects with many active projects in the United States failing to meet cost and schedule efforts by significant margins. Currently, engineering teams operate in siloed tools and disparate teams where connections across design, procurement, and construction systems are translated manually or over brittle point-to-point integrations. The manual nature of data exchange increases the risk of silent errors in the reactor design, with each silent error cascading across the design. These cascading errors lead to uncontrollable risk during construction, resulting in significant delays and cost overruns. DeepLynx allows for an integrated platform during design and operations of mega projects.
The DeepLynx Core API delivers a few main features.
1. Provides a set of methods and endpoints for manipulating data in an object oriented database. This allows us to store complex datatypes as records and then to compile them into actual, modifiable objects at run-time. Users can store taxonomies or ontologies in a readable format.
2. Provides methods for storing and retrieving data in a graph database. This data is structured and validated against the aformentioned object oriented database before storage.
contact: {}
Expand All @@ -20,7 +20,7 @@ tags:
- name: Containers
description: 'Containers are considered a root object with only users and organizations as potential parents. Containers separate object defintions (as declared in Metatypes) from each other and allow for versioning and access control. '
- name: Data Query
description: 'Deep Lynx gives you the ability to query data using a GraphQL enabled endpoint. Please see the documentation on GraphQL and run a schema query to learn more about what search methods, query arguments, and fields are available to you.'
description: 'DeepLynx gives you the ability to query data using a GraphQL enabled endpoint. Please see the documentation on GraphQL and run a schema query to learn more about what search methods, query arguments, and fields are available to you.'
- name: Graph
description: 'These endpoints give you the ability to add nodes and edges to the graph manually as well as perform some basic queries. For all advanced queries, please use the GraphQL query endpoint.'
- name: Metatypes
Expand All @@ -46,9 +46,9 @@ tags:
- name: Imports
description: These endpoints allow for retrieving or deleting the data associated with a given import from a Data Source.
- name: Events
description: 'An application may create a Registered Event with Deep Lynx in order to receive messages from Deep Lynx concerning the event type registered. This system may be used to receive alerts when other Data Sources have ingested data, a new data source is created, etc.'
description: 'An application may create a Registered Event with DeepLynx in order to receive messages from DeepLynx concerning the event type registered. This system may be used to receive alerts when other Data Sources have ingested data, a new data source is created, etc.'
- name: Authentication
description: These endpoints provide users and applications the ability to authenticate with Deep Lynx.
description: These endpoints provide users and applications the ability to authenticate with DeepLynx.
- name: Tasks
description: 'These endpoints provide functionality for the creation, retrieval, and updating of tasks.'
- name: Tags
Expand Down Expand Up @@ -1023,6 +1023,28 @@ paths:
tags:
- Graph
- TimeSeries
get:
summary: List Timeseries Sources for Node
operationId: list-ts-for-node
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
x-examples:
Example 1:
value:
sourceA: '123'
sourceB: '456'
isError: false
properties:
value:
type: object
isError:
type: boolean
description: Returns a dictionary of source names and source IDs for each source attached to the given node.
'/containers/{container_id}/import/datasources/{data_source_id}/data':
post:
summary: Timeseries Data Source Query
Expand Down Expand Up @@ -1174,7 +1196,7 @@ paths:
type: array
items:
$ref: '#/components/schemas/Edge'
description: 'This endpoint will attempt to create a connection between two nodes. You can either pass in the node''s Deep Lynx IDs, or the node''s original id, metatype id, and data source id to create these edges.'
description: 'This endpoint will attempt to create a connection between two nodes. You can either pass in the node''s DeepLynx IDs, or the node''s original id, metatype id, and data source id to create these edges.'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -2909,9 +2931,9 @@ paths:
- Data Sources
summary: Upload File
description: |-
Uploads a file and it's metadata to Deep Lynx. All additional fields on the multipart form will be processed and added as metadata to the file upload itself.
This should be a collection of files and normal fields. If you include a file field and call that "metadata" - you can include a normal metadata upload as either a json, csv, or xml file. This data will be processed like a normal import and the files attached to the processed data. Once Deep Lynx generates nodes and edges from that data, any files attached will automatically be attached to the resulting nodes/edges as well.
NOTE: The metadata file you upload, if json, must be wrapped in an array. If you do not pass in an array of objects, even if it's a single object, then Deep Lynx will attempt to split up your metadata into its parts instead of treating it like a whole object.
Uploads a file and it's metadata to DeepLynx. All additional fields on the multipart form will be processed and added as metadata to the file upload itself.
This should be a collection of files and normal fields. If you include a file field and call that "metadata" - you can include a normal metadata upload as either a json, csv, or xml file. This data will be processed like a normal import and the files attached to the processed data. Once DeepLynx generates nodes and edges from that data, any files attached will automatically be attached to the resulting nodes/edges as well.
NOTE: The metadata file you upload, if json, must be wrapped in an array. If you do not pass in an array of objects, even if it's a single object, then DeepLynx will attempt to split up your metadata into its parts instead of treating it like a whole object.
operationId: UploadFile
parameters:
- name: container_id
Expand Down Expand Up @@ -2950,8 +2972,8 @@ paths:
type: string
format: binary
description: |-
This should be a collection of files and normal fields. If you include a file field and call that "metadata" - you can include a normal metadata upload as either a json, csv, or xml file. This data will be processed like a normal import and the files attached to the processed data. Once Deep Lynx generates nodes and edges from that data, any files attached will automatically be attached to the resulting nodes/edges as well.
NOTE: The metadata file you upload, if json, must be wrapped in an array. If you do not pass in an array of objects, even if it's a single object, then Deep Lynx will attempt to split up your metadata into its parts instead of treating it like a whole object.
This should be a collection of files and normal fields. If you include a file field and call that "metadata" - you can include a normal metadata upload as either a json, csv, or xml file. This data will be processed like a normal import and the files attached to the processed data. Once DeepLynx generates nodes and edges from that data, any files attached will automatically be attached to the resulting nodes/edges as well.
NOTE: The metadata file you upload, if json, must be wrapped in an array. If you do not pass in an array of objects, even if it's a single object, then DeepLynx will attempt to split up your metadata into its parts instead of treating it like a whole object.
'/containers/{container_id}/files/{file_id}/download':
get:
tags:
Expand Down Expand Up @@ -4554,7 +4576,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TokenExchangeRequest'
description: 'Exchanges credentials for a JSON Web Token (JWT). Multiple authentication flows are supported, see Deep Lynx documentation for details.'
description: 'Exchanges credentials for a JSON Web Token (JWT). Multiple authentication flows are supported, see DeepLynx documentation for details.'
/health:
get:
tags:
Expand Down
3 changes: 1 addition & 2 deletions AdminWebApp/.env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ VUE_APP_DEEP_LYNX_API_URL=http://localhost:8090
VUE_APP_DEEP_LYNX_API_AUTH_METHOD=token
VUE_APP_APP_URL=http://localhost:8080
VUE_APP_TIME_SERIES_ENABLED=false
VUE_APP_DATA_EDITOR_ENABLED=false

# application URL created through Deep Lynx's Applications page
# application URL created through DeepLynx's Applications page
VUE_APP_DEEP_LYNX_APP_ID=root
VUE_APP_BUNDLED_BUILD=false

Expand Down
6 changes: 3 additions & 3 deletions AdminWebApp/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ export class Client {
return this.get<NodeT[]>(`/containers/${containerID}/graphs/nodes`, query);
}

listTimeseriesTables(containerID: string, nodeID: string): Promise<Map<string, [boolean, string]>> {
return this.get<Map<string, [boolean, string]>>(`/containers/${containerID}/graphs/nodes/${nodeID}/timeseries`);
listTimeseriesTables(containerID: string, nodeID: string): Promise<Map<string, string>> {
return this.get<Map<string, string>>(`/containers/${containerID}/graphs/nodes/${nodeID}/timeseries`);
}

downloadTimeseriesData(containerID: string, dataSourceID: string) {
Expand Down Expand Up @@ -1063,7 +1063,7 @@ export class Client {
}

// only use this function when exporting type mappings from one data source to another WITHIN THE SAME DL INSTANCE
// this will not work for exporting to a separate instance of Deep Lynx
// this will not work for exporting to a separate instance of DeepLynx
exportTypeMappings(containerID: string, dataSourceID: string, targetDataSource: string, ...typeMappings: TypeMappingT[]): Promise<ResultT<any>[]> {
return this.postRawReturn<ResultT<any>[]>(`/containers/${containerID}/import/datasources/${dataSourceID}/mappings/export`, {
mapping_ids: typeMappings.map((mapping) => mapping.id),
Expand Down
8 changes: 2 additions & 6 deletions AdminWebApp/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,6 @@ export type TypeMappingTransformationT = {
destination_id_key?: string;
destination_metatype_id?: string;
destination_data_source_id?: string;
tab_data_source_id?: string;
tab_metatype_id?: string;
tab_node_id?: string;
tab_node_key?: string;
unique_identifier_key?: string;
on_conflict?: 'create' | 'update' | 'ignore';
metatype_name?: string;
Expand Down Expand Up @@ -653,9 +649,9 @@ export type TimeseriesRowCount = {
count: number;
};

// DefaultAvevaDataSourceConfig are sane defaults found through trial and error with the Aveva Deep Lynx Adapter
// DefaultAvevaDataSourceConfig are sane defaults found through trial and error with the Aveva DeepLynx Adapter
// while we could include this on the createDataSourceDialog component, it's so large that it clutters
// that component - better to pull it out and maintain it here so the connection to Deep Lynx is clear.
// that component - better to pull it out and maintain it here so the connection to DeepLynx is clear.
export function DefaultAvevaDataSourceConfig(): AvevaDataSourceConfig {
return {
kind: 'aveva',
Expand Down
2 changes: 1 addition & 1 deletion AdminWebApp/src/auth/authentication_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class Authentication {

// Verifies that a user has the proper permissions for performing a given action on
// a resource. Keep in mind that this DOES NOT dictate what the user is authorized to do
// on the Deep Lynx backend. This is purely for display control purposes and should always
// on the DeepLynx backend. This is purely for display control purposes and should always
// be taken with a grain of salt because as of July 2020 we do not have an auto-renew on
// JWTs in place
Auth(resource: string, action: string, containerID: string): boolean {
Expand Down
22 changes: 11 additions & 11 deletions AdminWebApp/src/components/accessManagement/createApiKeyDialog.vue
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<template>
<v-dialog v-model="dialog" max-width="700px" @click:outside="errorMessage = ''; dialog = false; returnedKey = null">
<template v-slot:activator="{ on }">
<v-btn color="primary" dark class="mt-2" v-on="on">{{$t("createApiKey.createApiKey")}}</v-btn>
<v-btn color="primary" dark class="mt-2" v-on="on">{{$t("apiKeys.create")}}</v-btn>
</template>

<v-card class="pt-1 pb-3 px-2">
<v-card-title>
<span class="headline text-h3">{{$t("createApiKey.formTitle")}}</span>
<span class="headline text-h3">{{$t("apiKeys.create")}}</span>
</v-card-title>
<v-card-text>
<error-banner :message="errorMessage"></error-banner>
<v-alert type="success" v-if="returnedKey" class="multi-line">
<p>{{$t('createApiKey.successfullyCreated')}}</p>
<p><strong>{{$t('createApiKey.key')}}</strong></p>
<p>{{$t('apiKeys.success')}}</p>
<p><strong>{{$t('general.key')}}</strong></p>
<p>{{returnedKey.key}}</p>
<p><strong>{{$t('createApiKey.secret')}}</strong></p>
<p><strong>{{$t('general.secret')}}</strong></p>
<p>{{returnedKey.secret_raw}}</p>
</v-alert>
<v-row>
<v-col :cols="12" v-if="serviceUserID === null">
<p>{{$t('createApiKey.description')}}</p>
<p>{{$t('apiKeys.userKey')}}</p>
</v-col>
<v-col :cols="12" v-else>
<p>{{$t('createApiKey.descriptionService')}}</p>
<p>{{$t('apiKeys.serviceKey')}}</p>
</v-col>
</v-row>
<v-row v-if="returnedKey === null">
<v-text-field :label="$t('createApiKey.note')" v-model="note"></v-text-field>
<v-text-field :label="$t('general.note')" v-model="note"></v-text-field>
</v-row>
</v-card-text>

<v-card-actions>
<v-spacer></v-spacer>
<div v-if="returnedKey !== null">
<v-btn color="blue darken-1" text @click="dialog = false; returnedKey = null" >{{$t("createApiKey.close")}}</v-btn>
<v-btn color="primary" text @click="dialog = false; returnedKey = null" >{{$t("general.close")}}</v-btn>
</div>
<div v-else>
<v-btn color="blue darken-1" text @click="dialog = false; returnedKey = null" >{{$t("createApiKey.cancel")}}</v-btn>
<v-btn color="blue darken-1" text @click="generateApiKey">{{$t("createApiKey.create")}}</v-btn>
<v-btn color="primary" text @click="dialog = false; returnedKey = null" >{{$t("general.cancel")}}</v-btn>
<v-btn color="primary" text @click="generateApiKey">{{$t("general.create")}}</v-btn>
</div>

</v-card-actions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@
>
mdi-delete
</v-icon>
<v-btn v-if="!displayIcon" color="primary" dark class="mt-2" v-on="on">{{$t("deleteApiKey.deleteApiKey")}}</v-btn>
<v-btn v-if="!displayIcon" color="primary" dark class="mt-2" v-on="on">{{$t("apiKeys.delete")}}</v-btn>
</template>

<v-card class="pt-1 pb-3 px-2">
<v-card-title>
<span class="headline text-h3">{{$t('deleteApiKey.deleteTitle')}}</span>
<span class="headline text-h3">{{$t('apiKeys.delete')}}</span>
</v-card-title>
<v-card-text>
<error-banner :message="errorMessage"></error-banner>
<v-row>
<v-col :cols="12">
<v-alert type="warning">
{{$t('deleteApiKey.deleteWarning')}}
{{$t('warnings.deleteApiKey')}}
</v-alert>
</v-col>
</v-row>
</v-card-text>

<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" text @click="dialog = false">{{$t("deleteApiKey.cancel")}}</v-btn>
<v-btn color="red darken-1" text @click="deleteApiKey">
<span>{{$t("deleteApiKey.delete")}}</span>
<v-btn color="primary" text @click="dialog = false">{{$t("general.cancel")}}</v-btn>
<v-btn color="error" text @click="deleteApiKey">
<span>{{$t("general.delete")}}</span>
</v-btn>
</v-card-actions>
</v-card>
Expand Down
Loading

0 comments on commit fecbafc

Please sign in to comment.