MCPcopy
hub / github.com/dockersamples/docker-swarm-visualizer / start

Method start

src/data-provider.js:246–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244 }
245
246 start() {
247 STARTED = 1;
248 //console.log(STARTED);
249 var clusterInit = Promise.all([
250 getAllNodes(),
251 getAllTasks(),
252 getAllServices()
253 ])
254 .then((resources) => {
255 _.remove(resources[1], (nc) => nc.state === 'Empty cluster' || nc.state === 'Terminated');
256 return resources;
257 });
258
259 Promise.all([clusterInit])
260 .then(([resources]) => {
261 PHYSICAL_STRUCT = physicalStructProvider(resources);
262 this.emit('infrastructure-data', PHYSICAL_STRUCT.data());
263 this.emit('start-reload');
264 });
265 }
266
267 reload() {
268 if (STARTED == 0) return;

Callers 2

main.jsFile · 0.80
restartFunction · 0.80

Calls 4

getAllNodesFunction · 0.90
getAllTasksFunction · 0.90
getAllServicesFunction · 0.90
physicalStructProviderFunction · 0.85

Tested by

no test coverage detected