You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/10/11 17:33:20 UTC

[GitHub] [incubator-devlake] e2corporation opened a new issue, #3372: [Refactor][Config-UI] Add Blueprint and Pipeline Data Model(s)

e2corporation opened a new issue, #3372:
URL: https://github.com/apache/incubator-devlake/issues/3372

   ## Config-UI / Data Models / Blueprint, Pipeline+
   
   Create the **Blueprint**, **Pipeline** and associated Data Models and adapt/integrate with existing Blueprint Components.
   
   ```
   /*
    * Licensed to the Apache Software Foundation (ASF) under one or more
    * contributor license agreements.  See the NOTICE file distributed with
    * this work for additional information regarding copyright ownership.
    * The ASF licenses this file to You under the Apache License, Version 2.0
    * (the "License"); you may not use this file except in compliance with
    * the License.  You may obtain a copy of the License at
    *
    *     http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    *
    */
   import BlueprintSettings from './BlueprintSettings'
   import BlueprintMode from './BlueprintMode'
   import Connection from './Connection'
   import Pipeline from './Pipeline'
   
   /**
    * @typedef {object} Blueprint
    * @property {number} id
    * @property {Connection} connection
    * @property {string} name
    * @property {string?} description
    * @property {Date?} createdAt
    * @property {Date?} updatedAt
    * @property {array} plan
    * @typedef {BlueprintSettings} settings
    * @property {'daily'|'weekly'|'monthly'|'hourly'|'custom'|'manual'} interval
    * @property {string} cronConfig
    * @property {'NORMAL'|'ADVANCED'} mode
    * @property {bool} enable
    * @property {bool} isManual
    * @property {<Array<Pipeline>>} pipelines
    * @property {function(string): string} get
    * @property {function(string, string): string} set
    * @property {function(): string} asJSON
    * @property {function(): <Array<Connection>>} connections
    * @property {function(): <BlueprintSettings>} getSettings
    * @property {function(): bool} isAdvanced
    * @property {function(): bool} isNormal
    */
   class Blueprint {
     constructor(data = {}) {
       this.id = data?.id
       this.connection = data?.connection
         ? new Connection(data?.connection)
         : new Connection()
       this.name = data?.name || 'MY BLUEPRINT'
       this.createdAt = new Date()
       this.updatedAt = null
       this.settings = new BlueprintSettings({
         version: data?.settings?.version || '1.0.0',
         connections: data?.settings?.connections || []
       })
       this.cronConfig = data?.cronConfig || '0 0 * * *'
       this.mode = data?.mode || 'NORMAL'
       this.enable = data?.enable || false
       this.isManual = data?.isManual || false
       this.description = data?.description || ''
       this.pipelines = data?.pipelines || []
     }
   
     get(property) {
       return this[property]
     }
   
     set(property, value) {
       this[property] = value
       return this[property]
     }
   
     asJSON() {
       return JSON.stringify(this, null, ' ')
     }
   
     getConnections() {
       return this.settings.connections
     }
   
     getSettings() {
       return this.settings
     }
   
     isAdvanced() {
       return this.mode === 'ADVANCED'
     }
   
     isNormal() {
       return this.mode === 'NORMAL'
     }
   }
   
   export default Blueprint
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] commented on issue #3372: [Refactor][Config-UI] Add Blueprint and Pipeline Data Model(s)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3372:
URL: https://github.com/apache/incubator-devlake/issues/3372#issuecomment-1332932229

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] commented on issue #3372: [Refactor][Config-UI] Add Blueprint and Pipeline Data Model(s)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3372:
URL: https://github.com/apache/incubator-devlake/issues/3372#issuecomment-1343614353

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] github-actions[bot] closed issue #3372: [Refactor][Config-UI] Add Blueprint and Pipeline Data Model(s)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #3372: [Refactor][Config-UI] Add Blueprint and Pipeline Data Model(s)
URL: https://github.com/apache/incubator-devlake/issues/3372


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org