web-installer/src/redux/actions/substrateActions.js
// and a unique id is generated for it.
and a unique id is generated for it.
and a unique id is generated for it .
function addNodeSubstrate(payload) {
  let id = `node_${uuidv4()}`;
  if ('id' in payload) {
    id = payload.id;
  }
  return {
    type: ADD_NODE_SUBSTRATE,
    payload: {
      id,
      parent_id: payload.parent_id,
      name: payload.name,
      node_ws_url: payload.node_ws_url,
      monitor_ws: payload.monitor_ws,
      telemetry_url: payload.telemetry_url,
      monitor_telemetry: payload.monitor_telemetry,
      prometheus_url: payload.prometheus_url,
      monitor_prometheus: payload.monitor_prometheus,
      exporter_url: payload.exporter_url,
      monitor_system: payload.monitor_system,
      stash_address: payload.stash_address,
      is_validator: payload.is_validator,
      monitor_node: payload.monitor_node,
      is_archive_node: payload.is_archive_node,
      use_as_data_source: payload.use_as_data_source,
    },
  };
}
function addNodeSubstrate ( payload ) { let id = ` ${ uuidv4 ( ) } ` ; if ( 'id' in payload ) { id = payload . id ; } return { type : ADD_NODE_SUBSTRATE , payload : { id , parent_id : payload . parent_id , name : payload . name , node_ws_url : payload . node_ws_url , monitor_ws : payload . monitor_ws , telemetry_url : payload . telemetry_url , monitor_telemetry : payload . monitor_telemetry , prometheus_url : payload . prometheus_url , monitor_prometheus : payload . monitor_prometheus , exporter_url : payload . exporter_url , monitor_system : payload . monitor_system , stash_address : payload . stash_address , is_validator : payload . is_validator , monitor_node : payload . monitor_node , is_archive_node : payload . is_archive_node , use_as_data_source : payload . use_as_data_source , } , } ; }
and a unique id is generated for it.
and a unique id is generated for it .
// Generate a unique id for the repository // If an ID already exists in the payload use it