Skip to content

Commit 32dbbe6

Browse files
Merge pull request #21 from FifthTry/frontend
Frontend changes
2 parents b4f64ff + de3cd79 commit 32dbbe6

File tree

6 files changed

+127
-1
lines changed

6 files changed

+127
-1
lines changed

app/templates/all_pr_for_org.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@
2626
<div class="doc-history">
2727
<!--Row-->
2828
{% for monitored_pr in open_prs %}
29+
2930
{% with code_pr_number=monitored_pr.code_pull_request.pr_number|stringformat:"s" documentation_pr_number=monitored_pr.documentation_pull_request.pr_number|stringformat:"s" %}
3031
{% with code_pr_name="#"|add:code_pr_number|add:" "|add:monitored_pr.code_pull_request.pr_title %}
32+
{ % 'title':"{{'jjj'}} %s"}
3133
<div class="doc-history-row">
3234
{% if monitored_pr.pull_request_status == "NOT_CONNECTED" %}
3335
<div class="row-left">
3436
<div class="cell-group">
3537
<a href="{{monitored_pr.code_pull_request.get_url}}" class="cell-item item-top main-text"><span class="iconify"
3638
data-icon="octicon:code-16"></span>{{ code_pr_name }}</a>
3739
<span class="cell-item main-error-text"><span class="iconify"
38-
data-icon="octicon:note-16"></span>{{monitored_pr.pull_request_status}}</span>
40+
data-icon="octicon:note-16"></span>{{monitored_pr.get_pull_request_status_display}}</span>
3941
</div>
4042
</div>
4143
<div class="row-right">

samples/all_pr_for_org-empty.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"template": "all_pr_for_org.html",
3+
"repo_mapping": {
4+
"code_repo": {
5+
"owner": {
6+
"account_name": "Acme, Inc"
7+
},
8+
"repo_full_name": "acme/mono-repo"
9+
},
10+
"documentation_repo": {
11+
"repo_full_name": "acme/documentation"
12+
}
13+
},
14+
"open_prs": []
15+
}

samples/all_pr_for_org.json

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"template": "all_pr_for_org.html",
3+
"repo_mapping": {
4+
"code_repo": {
5+
"owner": {
6+
"account_name": "Acme, Inc"
7+
},
8+
"repo_full_name": "acme/mono-repo"
9+
},
10+
"documentation_repo": {
11+
"repo_full_name": "acme/documentation"
12+
}
13+
},
14+
"open_prs": [
15+
{
16+
"pull_request_status": "NOT_CONNECTED",
17+
"get_pull_request_status_display": "Not Connected",
18+
"get_latest_approval": {
19+
"approver": {
20+
"github_user":{
21+
"account_name": "Amit Upadhyay"
22+
}
23+
},
24+
"created_on": "2 minutes"
25+
},
26+
"code_pull_request": {
27+
"pr_number": 20,
28+
"pr_title" : "Code PR title here",
29+
"get_url" : "https://github.com/fifthtry"
30+
},
31+
"documentation_pull_request":{
32+
"pr_number": 10,
33+
"pr_title" : "Document PR title here"
34+
}
35+
},
36+
{
37+
"pull_request_status": "APPROVED",
38+
"get_pull_request_status_display": "Approved",
39+
"get_latest_approval": {
40+
"approver": {
41+
"github_user":{
42+
"account_name": "Amit Upadhyay"
43+
}
44+
},
45+
"created_on": "2 minutes"
46+
},
47+
"code_pull_request": {
48+
"pr_number": 20,
49+
"pr_title" : "Code PR title here",
50+
"get_url" : "https://github.com/fifthtry"
51+
},
52+
"documentation_pull_request":{
53+
"pr_number": 10,
54+
"pr_title" : "Document PR title here"
55+
}
56+
},
57+
{
58+
"pull_request_status": "APPROVAL_PENDING",
59+
"get_pull_request_status_display": "Approval Pending",
60+
"get_latest_approval": {
61+
"approver": {
62+
"github_user":{
63+
"account_name": "Amit Upadhyay"
64+
}
65+
},
66+
"created_on": "2 minutes"
67+
},
68+
"code_pull_request": {
69+
"pr_number": 20,
70+
"pr_title" : "Code PR title here",
71+
"get_url" : "https://github.com/fifthtry"
72+
},
73+
"documentation_pull_request":{
74+
"pr_number": 10,
75+
"pr_title" : "Document PR title here"
76+
}
77+
},
78+
{
79+
"pull_request_status": "STALE_CODE",
80+
"get_pull_request_status_display": "Stale Code",
81+
"get_latest_approval": {
82+
"approver": {
83+
"github_user":{
84+
"account_name": "Amit Upadhyay"
85+
}
86+
},
87+
"created_on": "2 minutes"
88+
},
89+
"code_pull_request": {
90+
"pr_number": 20,
91+
"pr_title" : "Code PR title here",
92+
"get_url" : "https://github.com/fifthtry"
93+
},
94+
"documentation_pull_request":{
95+
"pr_number": 10,
96+
"pr_title" : "Document PR title here"
97+
}
98+
}
99+
]
100+
}

samples/login.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"template": "login.html"
3+
}

samples/pr_approval.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"template": "pr_approval.html"
3+
}

samples/pr_approval_base.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"template": "pr_approval_base.html"
3+
}

0 commit comments

Comments
 (0)