Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS699-Project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Meet Narendra
CS699-Project
Commits
129a0544
Commit
129a0544
authored
Nov 21, 2022
by
Abuhujair Javed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jira Fetch Tickets
parent
26404a14
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
16 deletions
+13
-16
frontend/sitcomm/src/app/jira/jira.component.ts
frontend/sitcomm/src/app/jira/jira.component.ts
+0
-16
sitcomm/api/urls.py
sitcomm/api/urls.py
+1
-0
sitcomm/api/views.py
sitcomm/api/views.py
+12
-0
No files found.
frontend/sitcomm/src/app/jira/jira.component.ts
View file @
129a0544
...
...
@@ -10,22 +10,10 @@ import { FetcherService } from '../fetcher.service';
export
class
JiraComponent
implements
OnInit
{
id
:
number
;
name
:
string
;
/*
to_do: { tid: number; name: string; content: string; }[];
in_prog: { tid: number; name: string; content: string; }[];
done: { tid: number; name: string; content: string; }[];
backlog: { tid: number; name: string; content: string; }[];
*/
constructor
(
private
fetcherService
:
FetcherService
)
{
console
.
log
(
window
.
history
.
state
);
this
.
id
=
window
.
history
.
state
.
id
;
this
.
name
=
window
.
history
.
state
.
name
;
/*
this.to_do = TO_DO;
this.in_prog = IN_PROGRESS;
this.done = DONE;
this.backlog = BACKLOG;
*/
}
calColCount
(){
console
.
log
(
window
.
innerWidth
);
...
...
@@ -42,10 +30,6 @@ export class JiraComponent implements OnInit {
let
max_issue
=
Math
.
max
(
this
.
to_do
.
length
,
this
.
in_prog
.
length
,
this
.
done
.
length
,
this
.
backlog
.
length
)
let
str
=
''
;
str
=
'
1:
'
+
(
max_issue
/
3
);
/*
console.log(max_issue);
console.log(str);
*/
return
str
;
}
...
...
sitcomm/api/urls.py
View file @
129a0544
...
...
@@ -16,5 +16,6 @@ urlpatterns = [
path
(
'register/'
,
registerViewSet
.
as_view
()),
path
(
'getRepos/'
,
getReposViewSet
.
as_view
()),
path
(
'getGitFiles/'
,
getGitFilesViewSet
.
as_view
()),
path
(
'getJiraTickets/'
,
getJiraTicketsViewSet
.
as_view
()),
path
(
'api-auth/'
,
include
(
'rest_framework.urls'
))
]
sitcomm/api/views.py
View file @
129a0544
...
...
@@ -52,6 +52,18 @@ class registerViewSet(views.APIView):
except
:
return
Response
({
'status'
:
False
})
class
getJiraTicketsViewSet
(
views
.
APIView
):
def
get
(
self
,
request
):
pid
=
request
.
GET
.
get
(
'pid'
)
try
:
project
=
Projects
.
objects
.
filter
(
pid
=
pid
)
if
project
is
None
:
return
Response
({
'status'
:
False
})
return
Response
({
'files'
:
project
.
values
(
'jira_id'
),
'status'
:
True
})
except
Exception
as
e
:
print
(
e
)
return
Response
({
'status'
:
False
})
class
getReposViewSet
(
views
.
APIView
):
def
get
(
self
,
request
):
uid
=
request
.
GET
.
get
(
'uid'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment