-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from caskdata/feature/flows
Feature/flows status (flow diagrams)
- Loading branch information
Showing
16 changed files
with
176 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
angular.module(PKG.name + '.feature.flows') | ||
.controller('FlowsDetailRunStatusController', function($state, $scope, MyDataSource) { | ||
var dataSrc = new MyDataSource($scope), | ||
basePath = '/apps/' + $state.params.appId + '/flows/' + $state.params.programId; | ||
$scope.data = {}; | ||
$scope.status = null; | ||
$scope.duration = null; | ||
$scope.startTime = null; | ||
dataSrc.request({ | ||
_cdapNsPath: basePath | ||
}) | ||
.then(function(res) { | ||
var nodes = []; | ||
angular.forEach(res.connections, function(conn) { | ||
if (conn.sourceType === 'STREAM') { | ||
nodes.push(conn.sourceName); | ||
} | ||
}); | ||
|
||
nodes = nodes.concat(Object.keys(res.flowlets)); | ||
|
||
$scope.data = { | ||
nodes: nodes, | ||
edges: res.connections | ||
}; | ||
}); | ||
|
||
|
||
dataSrc.poll({ | ||
_cdapNsPath: basePath + '/runs' | ||
}, function(res) { | ||
angular.forEach(res, function(run) { | ||
if (run.runid === $state.params.runId) { | ||
$scope.status = run.status; | ||
$scope.duration = (run.end? run.end - run.start: Date.now() - run.start); | ||
$scope.startTime = run.start; | ||
} | ||
}); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<h2> Flows -> History </h2> | ||
<div class="well well-lg text-center h2"> | ||
<div> Flows: History - Work In Progress</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<h2> Flows -> Metadata </h2> | ||
<div class="well well-lg text-center h2"> | ||
<div> Flows: Metadata - Work In Progress</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<h2> Flows -> Resources </h2> | ||
<div class="well well-lg text-center h2"> | ||
<div> Flows: Resources - Work In Progress</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="well well-lg text-center h2"> | ||
<div> Flow: Configuration - Work In Progress for Run:{{$state.params.runId}}</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="well well-lg text-center h2"> | ||
<div> Flow: Data - Work In Progress for Run:{{$state.params.runId}}</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="well well-lg text-center h2"> | ||
<div> Flow: Flowlets - Work In Progress for Run:{{$state.params.runId}}</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="well well-lg text-center h2"> | ||
<div> Flow: Logs - Work In Progress for Run:{{$state.params.runId}}</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="row h4"> | ||
<div class="col-sm-3"> | ||
<span> Status </span> | ||
<div ng-bind="status"></div> | ||
</div> | ||
<div class="col-sm-3"> | ||
<span> Started </span> | ||
<div ng-bind="startTime"></div> | ||
</div> | ||
<div class="col-sm-3"> | ||
<span> Duration </span> | ||
<div ng-bind="duration"></div> | ||
</div> | ||
<div class="col-sm-3 text-right"> | ||
<div ng-show="status == 'RUNNING'" | ||
class="btn btn-default btn-md" | ||
ng-click="toggleFlow('stop')"> | ||
<span class="fa fa-stop"> </span> | ||
</div> | ||
|
||
<div ng-show="status == 'STOPPED' || status == 'COMPLETED'" | ||
ng-disabled="true" | ||
class="btn btn-default btn-md" | ||
ng-click="toggleFlow('start')"> | ||
<span class="fa fa-play"> </span> | ||
</div> | ||
<div ng-show="status == 'start' || status == 'stop'" | ||
class="btn btn-default btn-md"> | ||
<span class="fa fa-refresh fa-spin"></span> | ||
</div> | ||
</div> | ||
</div> | ||
<my-flow-graph data-model="data"></my-flow-graph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<h2> Flows -> Schedules </h2> | ||
<div class="well well-lg text-center h2"> | ||
<div> Flows: Schedules - Work In Progress</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<h1>Graph</h1> | ||
|
||
<my-flow-graph model="data"></my-flow-graph> | ||
<my-flow-graph data-model="data"></my-flow-graph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters