Frontend API
@Injectable() export class Workspace
A workspace is the same concept as the workspace in an IDE. So one workspace correspond to a project as a user point of view. It has a directory, and specifically to padins, it has a workflow. This workflow is the flow.json file in the root of the folder. Take a look the Flow.ts file to know more about it.
In this project, that is the client side of padins, the workspace class store the network connexion information, the running state and the id and name of the project.
Created by antoine on 20/06/17.
setRunningStatus (network: string, running: boolean): void
Set the running status of the given network.
- Parameters:
network
— the id of the targeted network. A network can be the Flow or a Grouprunning
— the running state
setNetworkStatus (msg: Object): void
Set the network status information from the received message.
- Parameters:
msg
— the network:status message received over the socket
setNetworkLastStopTime (network: string, time: string): void
Set the last stop time information of the given network.
- Parameters:
network
— the id of the targeted networktime
— last stop time as a timestamp
setNetworkLastStartTime (network: string, time: string): void
Set the last start time information of the given network.
- Parameters:
network
— the id of the targeted networktime
— last start time as a timestamp
networkConnected (network: string): void
Set the connexion state of the given network to True
- Parameters:
network
— the id of the targeted network
networkDisconnected (network: string): void
Set the connexion state of the given network to False
- Parameters:
network
— the id of the targeted network
private network (id: string): Network
Retrieve the Network instance from its id.
- Parameters:
id
— the id of the targeted network - Returns:
Network
— the Network instance with the given id
@Injectable() export class Network
Class Network that stores the workspace’s network information.