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
4cbcc81d
Commit
4cbcc81d
authored
Nov 20, 2022
by
Meet Narendra
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Github by meet
parent
cd8cb6a7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
17 deletions
+77
-17
frontend/sitcomm/src/app/app.module.ts
frontend/sitcomm/src/app/app.module.ts
+3
-2
frontend/sitcomm/src/app/confluence/confluence.component.html
...tend/sitcomm/src/app/confluence/confluence.component.html
+1
-1
frontend/sitcomm/src/app/confluence/confluence.component.ts
frontend/sitcomm/src/app/confluence/confluence.component.ts
+6
-0
frontend/sitcomm/src/app/github/github.component.css
frontend/sitcomm/src/app/github/github.component.css
+7
-0
frontend/sitcomm/src/app/github/github.component.html
frontend/sitcomm/src/app/github/github.component.html
+28
-1
frontend/sitcomm/src/app/github/github.component.ts
frontend/sitcomm/src/app/github/github.component.ts
+32
-13
No files found.
frontend/sitcomm/src/app/app.module.ts
View file @
4cbcc81d
...
@@ -25,7 +25,7 @@ import { ProjectComponent } from './project/project.component';
...
@@ -25,7 +25,7 @@ import { ProjectComponent } from './project/project.component';
import
{
MatTab
,
MatTabsModule
}
from
'
@angular/material/tabs
'
;
import
{
MatTab
,
MatTabsModule
}
from
'
@angular/material/tabs
'
;
import
{
MatStepperModule
}
from
'
@angular/material/stepper
'
;
import
{
MatStepperModule
}
from
'
@angular/material/stepper
'
;
import
{
MatListModule
}
from
'
@angular/material/list
'
;
import
{
MatListModule
}
from
'
@angular/material/list
'
;
import
{
MatExpansionModule
}
from
'
@angular/material/expansion
'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
...
@@ -55,7 +55,8 @@ import { MatListModule } from '@angular/material/list';
...
@@ -55,7 +55,8 @@ import { MatListModule } from '@angular/material/list';
MatCardModule
,
MatCardModule
,
MatTabsModule
,
MatTabsModule
,
MatStepperModule
,
MatStepperModule
,
MatListModule
MatListModule
,
MatExpansionModule
],
],
providers
:
[
CookieService
],
providers
:
[
CookieService
],
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
...
...
frontend/sitcomm/src/app/confluence/confluence.component.html
View file @
4cbcc81d
<
p>
confluence works!
</p
>
<
div
[innerHTML]=
"file"
></div
>
\ No newline at end of file
frontend/sitcomm/src/app/confluence/confluence.component.ts
View file @
4cbcc81d
...
@@ -14,5 +14,11 @@ export class ConfluenceComponent implements OnInit {
...
@@ -14,5 +14,11 @@ export class ConfluenceComponent implements OnInit {
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
}
}
file
=
this
.
fetchData
(
this
.
projectId
);
fetchData
(
id
:
number
)
{
//return dummy data of type entry
const
file
=
"
<h1>Test file</h1>
"
;
return
file
;
}
}
}
frontend/sitcomm/src/app/github/github.component.css
View file @
4cbcc81d
.mat-mdc-list-item-icon
{
color
:
rgba
(
0
,
0
,
0
,
0.54
);
}
.form-field-css
{
width
:
100%
;
height
:
auto
;
}
\ No newline at end of file
frontend/sitcomm/src/app/github/github.component.html
View file @
4cbcc81d
<!--<mat-list>
<div mat-subheader>Folders</div>
<mat-list-item *ngFor="let folder of files">
<mat-icon matListItemIcon>insert_drive_file</mat-icon>
<div matListItemTitle>{{folder.name}}</div>
<span matListItemLine>{{folder.commitDate | date}}</span>
</mat-list-item>
</mat-list>
-->
<mat-accordion>
<div
mat-subheader
>
Files
</div>
<mat-list-item
*ngFor=
"let file of files"
>
<mat-expansion-panel
hideToggle
>
<mat-expansion-panel-header>
<mat-panel-title>
{{file.name}}
</mat-panel-title>
</mat-expansion-panel-header>
<div>
<mat-form-field
class=
"form-field-css"
>
<textarea
matInput
id=
"file-text"
type=
"text"
readonly=
"True"
[rows]=
"file.url.split('\n').length"
[(ngModel)]=
"file.url"
></textarea>
</mat-form-field>
<button
mat-raised-button
color=
"primary"
style=
"margin-right: 10px;"
(click)=
"allowEditFile()"
>
Edit
</button>
<button
mat-raised-button
color=
"primary"
(click)=
"submitFile(file.id,file.url)"
>
Save
</button>
</div>
</mat-expansion-panel>
</mat-list-item>
</mat-accordion>
frontend/sitcomm/src/app/github/github.component.ts
View file @
4cbcc81d
...
@@ -7,11 +7,18 @@ export interface entry{
...
@@ -7,11 +7,18 @@ export interface entry{
id
:
number
;
id
:
number
;
name
:
string
;
name
:
string
;
commitMessage
:
string
;
commitMessage
:
string
;
commitDate
:
string
;
commitDate
:
Date
;
type
:
string
;
type
:
string
;
url
:
string
;
url
:
string
;
}
}
export
interface
Section
{
id
:
number
;
name
:
string
;
commitDate
:
Date
;
url
:
string
;
}
@
Component
({
@
Component
({
selector
:
'
app-github
'
,
selector
:
'
app-github
'
,
templateUrl
:
'
./github.component.html
'
,
templateUrl
:
'
./github.component.html
'
,
...
@@ -19,23 +26,35 @@ export interface entry{
...
@@ -19,23 +26,35 @@ export interface entry{
})
})
export
class
GithubComponent
implements
OnInit
{
export
class
GithubComponent
implements
OnInit
{
projectId
=
NaN
;
projectId
=
NaN
;
constructor
(
private
fetcherService
:
FetcherService
)
{
constructor
(
private
fetcherService
:
FetcherService
)
{
}
}
fetchData
(
id
:
number
)
{
fetchData
(
id
:
number
)
{
//return dummy data of type entry
//return dummy data of type entry
return
[
var
files
:
entry
[]
=
[
{
id
:
1
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
1
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/27/2022
'
),
type
:
"
folder
"
,
url
:
"
test
\n
"
.
repeat
(
10
)
},
{
id
:
2
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
2
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
3
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
3
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
4
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
4
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
5
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
5
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
1
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
6
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
2
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
7
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
3
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
8
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
4
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
9
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
5
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
10
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
new
Date
(
'
1/1/2022
'
)
,
type
:
"
file
"
,
url
:
"
test
"
},
]
]
return
files
;
}
submitFile
(
id
:
number
,
data
:
string
)
{
//submit data to server
console
.
log
(
"
submitting file
"
);
console
.
log
(
data
);
console
.
log
(
data
.
split
(
"
\n
"
).
length
);
document
.
getElementById
(
"
file-text
"
)?.
setAttribute
(
"
readonly
"
,
"
true
"
);
}
allowEditFile
(){
document
.
getElementById
(
"
file-text
"
)?.
removeAttribute
(
"
readonly
"
);
}
}
files
:
entry
[]
=
this
.
fetchData
(
this
.
projectId
);
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
...
...
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