-
Notifications
You must be signed in to change notification settings - Fork 0
Dev/70/carles show details #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev/70/alex_hierarchy
Are you sure you want to change the base?
Changes from all commits
ab64e4e
5d8bc98
73eb225
b444203
53d9f79
8f90e16
9405ff3
e62effc
d72b156
869d8c6
bc6a1ab
3ed11cf
b4f1385
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Settings for pretenders projects | ||
|
|
||
| GITHUB_CONFIG = { | ||
| 'organization': 'pretenders', | ||
| } | ||
|
|
||
| # GIT_CONFIG = { | ||
| # 'feature_breakup_regex': "(?P<project>[a-zA-Z]+)-?(?P<id>[0-9]+)", | ||
| # 'branch_finder_template': ".*(?i){project}.*" | ||
| # } | ||
|
|
||
| HIERARCHY_REGEXES = [ | ||
| 'master', | ||
| 'develop', | ||
| 'story/{FEATURE_ID}', | ||
| 'story/{FEATURE_ID}/[a-z_]*', | ||
| '{PARENT}[/_][a-z]*', | ||
| 'dev/{FEATURE_ID}/[a-z]*', | ||
| '{PARENT}[/_][a-z]*', | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,11 +42,13 @@ def __init__(self, provider, project, id, title, | |
| self._extras = kwargs | ||
|
|
||
| self.branches = defaultdict(dict) | ||
| self.branch_list = [] | ||
| self.trees = [] | ||
|
|
||
| def add_branch(self, branch): | ||
| assert isinstance(branch, Branch) | ||
| self.branches[branch.repo_name][branch.branch_name] = branch | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This data structure doesn't lend itself well to being iterated in Javascript / front-end code. For want of something better, I am using a flat list of branches for now (see line below). |
||
| self.branch_list.append(branch) | ||
|
|
||
| def create_hierarchy_trees(self): | ||
| "Create hierarchy trees - one for each repo." | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ def list_features(providers): | |
| return features | ||
|
|
||
|
|
||
| @app.route('/features/<source_id>/<feature_id>', methods=['GET']) | ||
| @app.route('/features/<source_id>-<feature_id>', methods=['GET']) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. I would have expected
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's more related to using the |
||
| @needs_providers | ||
| @as_json | ||
| def view_feature(source_id, feature_id, providers): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../components/font-awesome/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Structure seems fine to me. Presumably additional details could be added to the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main idea as described in the original google doc was: "Status/health is a single square with a color code. It represents an aggregated view of a number of indicators. Upon clicking/hovering one can see the detailed decomposition (e.g. build status, branch relevance, branch staleness, ready to deploy...) " I will add some more details for illustration and completeness. |
||
| "description": "", | ||
| "title": "Ability to view the branch hierarchy for a feature, and what is merged into what.", | ||
| "url": "https://github.com/pretenders/deploystream/issues/70", | ||
| "project": "pretenders/deploystream", | ||
| "owner": "alexcouper", | ||
| "provider": "github", | ||
| "type": "story", | ||
| "id": 70, | ||
| "repositories": [ | ||
| { | ||
| "name": "deploystream", | ||
| "branches": [ | ||
| { | ||
| "latest_commit": "9770a5e", | ||
| "branch_name": "master", | ||
| "health": { | ||
| "status": "green", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "green", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| } | ||
| ] | ||
| }, | ||
| "children": [ | ||
| { | ||
| "latest_commit": "dfa9217", | ||
| "branch_name": "develop", | ||
| "health": { | ||
| "status": "green", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "green", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| }, | ||
| { | ||
| "type": "relevant", | ||
| "provider": "git", | ||
| "status": "green" | ||
| } | ||
| ] | ||
| }, | ||
| "children": [ | ||
| { | ||
| "latest_commit": "98457ab", | ||
| "branch_name": "story/70/view-hierarchy", | ||
| "health": { | ||
| "status": "red", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "red", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| }, | ||
| { | ||
| "type": "relevant", | ||
| "provider": "git", | ||
| "status": "green" | ||
| }, | ||
| { | ||
| "type": "updated", | ||
| "provider": "git", | ||
| "status": "yellow", | ||
| "message": "this branch is not up to date with develop" | ||
| } | ||
| ] | ||
| }, | ||
| "children": [ | ||
| { | ||
| "latest_commit": "5719681", | ||
| "branch_name": "dev/70/alex", | ||
| "repo_name": "deploystream", | ||
| "health": { | ||
| "status": "unknown", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "unknown", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| } | ||
| ] | ||
| }, | ||
| "children": [] | ||
| }, | ||
| { | ||
| "latest_commit": "aace02c", | ||
| "branch_name": "dev/70/carles", | ||
| "health": { | ||
| "status": "yellow", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "yellow", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| } | ||
| ] | ||
| }, | ||
| "children": [] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "somecomponent", | ||
| "branches": [ | ||
| { | ||
| "latest_commit": "7923a5e", | ||
| "branch_name": "develop", | ||
| "health": { | ||
| "status": "green", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "green", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| } | ||
| ] | ||
| }, | ||
| "children": [ | ||
| { | ||
| "latest_commit": "e3457ab", | ||
| "branch_name": "story/70/view-hierarchy", | ||
| "health": { | ||
| "status": "green", | ||
| "details": [ | ||
| { | ||
| "type": "build", | ||
| "provider": "travis-ci", | ||
| "status": "green", | ||
| "url": "https://travis-ci.org/pretenders/deploystream/builds/8604410" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,4 +11,21 @@ function FeatureListCtrl($scope, Feature) { | |
| $scope.features = features; | ||
| }); | ||
| } | ||
|
|
||
|
|
||
| function FeatureDetailCtrl($scope, $routeParams, Feature) { | ||
|
|
||
| var featureId = $routeParams.featureId; | ||
|
|
||
| Feature.query('', function (features) { | ||
| $scope.features = features; | ||
| }); | ||
|
|
||
| Feature.get({featureId: featureId}, function (feature) { | ||
| $scope.feature = feature; | ||
| $scope.root = 'master'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is something that will need to come from the backend, as part of the feature branch data.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we address this now?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe. I believe at the feature "repo" level we may have a couple of pieces of data that will be useful: 1) which is the root branch of the hierarchy to display and 2) which is the "main" feature branch for this feature - as both have display relevance in different situations. |
||
| }); | ||
| } | ||
|
|
||
|
|
||
| //FeatureListCtrl.$inject = []; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,14 @@ | ||
| // global angular | ||
| /* global angular */ | ||
| 'use strict'; | ||
|
|
||
| /* Directives */ | ||
|
|
||
|
|
||
| angular.module('deploystream.directives', []) | ||
| .directive('appVersion', ['version', function (version) { | ||
| return function (scope, elm, attrs) { | ||
| elm.text(version); | ||
| return function ($scope, $element) { | ||
| $element.text(version); | ||
| }; | ||
| }]); | ||
| // .directive('featureHealth', function() { | ||
| // }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using our personal ones, I believe this should be the reference settings file that we use when working on code improvements for everything github/git related, which I believe is going to be most of our next body of work.