[]) {
11 | const group: { [key: string]: AbstractControl } = {};
12 |
13 | controls.forEach(control => {
14 | group[control.key] = control.required ? new FormControl(control.value || '', Validators.required)
15 | : new FormControl(control.value || '');
16 | });
17 |
18 | return new FormGroup(group);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/action-list/action-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow-y: hidden;
5 | }
6 |
7 | .list-header {
8 | display: flex;
9 | border-bottom: 1px solid #E9E9E9;
10 | height: 30px;
11 | flex-shrink: 0;
12 | }
13 |
14 | .list-header>.column {
15 | display: flex;
16 | justify-content: flex-start;
17 | align-items: center;
18 | font-family: SegoeUI;
19 | font-size: 12px;
20 | height: 30px;
21 | color: rgba(0, 0, 0, 0.6);
22 | margin-right: 10px;
23 | }
24 |
25 | .list-header>.column:first-child {
26 | padding-left: 13px;
27 | }
28 |
29 | .actions {
30 | display: flex;
31 | justify-content: center;
32 | align-items: center;
33 | margin: 0 10px;
34 | width: 15px;
35 | flex-shrink: 0;
36 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/action-list/action-list.component.html:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/actions.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | flex-grow: 1;
3 | display: flex;
4 | flex-direction: row;
5 | overflow: hidden;
6 | }
7 |
8 | .page-content {
9 | display: flex;
10 | overflow: hidden;
11 | flex-direction: column;
12 | flex-grow: 1;
13 | margin-right: 10px;
14 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.25);
15 | }
16 |
17 | .actions {
18 | flex-grow: 1;
19 | display: flex;
20 | flex-direction: column;
21 | overflow: hidden;
22 | }
23 |
24 | .header-title {
25 | font-family: SegoeUI;
26 | font-size: 20px;
27 | color: #2D2D2D;
28 | margin-top: 7px;
29 | text-transform: capitalize;
30 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/actions.component.html:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/invoke-action-form/invoke-action-form.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | z-index: 2;
3 | position: fixed;
4 | top: 0px;
5 | right: 0px;
6 | bottom: 0px;
7 | left: 0px;
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | }
12 |
13 | .background {
14 | position: absolute;
15 | width: 100%;
16 | height: 100%;
17 | background: rgba(0, 0, 0, 0.7);
18 | }
19 |
20 | .form-container {
21 | flex-grow: 0;
22 | flex-shrink: 0;
23 | z-index: 1;
24 | width: 340px;
25 | position: relative;
26 | }
27 |
28 | .form-container>svg {
29 | position: absolute;
30 | top: 15px;
31 | right: 15px;
32 | cursor: pointer;
33 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/invoke-action-form/invoke-action-form.component.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/boolean-clickable-property/boolean-clickable-property.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .title {
8 | font-family: SegoeUI;
9 | font-size: 12px;
10 | font-weight: bolder;
11 | color: rgba(0, 0, 0, 0.6);
12 | margin-bottom: 5px;
13 | }
14 |
15 | .value {
16 | font-family: SegoeUI;
17 | font-size: 14px;
18 | color: rgba(0, 0, 0, 0.6);
19 | }
20 |
21 | .value.clickable {
22 | color: #0078D7;
23 | cursor: pointer;
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/boolean-clickable-property/boolean-clickable-property.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}
2 |
3 | {{ value | boolean }}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/boolean-pipe/boolean.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'boolean' })
4 | export class BooleanPipe implements PipeTransform {
5 | transform(value: boolean): string {
6 | return typeof value === 'boolean'
7 | ? value === true
8 | ? 'Yes'
9 | : 'No'
10 | : 'No data';
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/clickable-property/clickable-property.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .title {
8 | font-family: SegoeUI;
9 | font-size: 12px;
10 | font-weight: bolder;
11 | color: rgba(0, 0, 0, 0.6);
12 | margin-bottom: 5px;
13 | }
14 |
15 | .value {
16 | font-family: SegoeUI;
17 | font-size: 14px;
18 | color: rgba(0, 0, 0, 0.6);
19 | }
20 |
21 | .value:not(.untouched) {
22 | overflow: hidden;
23 | white-space: nowrap;
24 | text-overflow: ellipsis;
25 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/clickable-property/clickable-property.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}
2 |
4 | {{ value || 'No data' }}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/datetime-clickable-property/datetime-clickable-property.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .title {
8 | font-family: SegoeUI;
9 | font-size: 12px;
10 | font-weight: bolder;
11 | color: rgba(0, 0, 0, 0.6);
12 | margin-bottom: 5px;
13 | }
14 |
15 | .value {
16 | font-family: SegoeUI;
17 | font-size: 14px;
18 | color: rgba(0, 0, 0, 0.6);
19 | overflow: hidden;
20 | white-space: nowrap;
21 | text-overflow: ellipsis;
22 | }
23 |
24 | .value.clickable {
25 | color: #0078D7;
26 | cursor: pointer;
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/datetime-clickable-property/datetime-clickable-property.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}
2 |
3 | {{ (value | date : 'M/d/yyyy, h:mm a') || 'No data' }}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/host-clickable-property/host-clickable-property.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .title {
8 | font-family: SegoeUI;
9 | font-size: 12px;
10 | font-weight: bolder;
11 | color: rgba(0, 0, 0, 0.6);
12 | margin-bottom: 5px;
13 | }
14 |
15 | .value {
16 | display: flex;
17 | align-items: center;
18 | font-family: SegoeUI;
19 | font-size: 14px;
20 | color: rgba(0, 0, 0, 0.6);
21 | }
22 |
23 | .value.clickable {
24 | color: #0078D7;
25 | cursor: pointer;
26 | }
27 |
28 | .value>svg {
29 | flex-shrink: 0;
30 | margin-right: 5px;
31 | }
32 |
33 | .value>div {
34 | overflow: hidden;
35 | white-space: nowrap;
36 | text-overflow: ellipsis;
37 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/radio-clickable-property/radio-clickable-property.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .title {
8 | font-family: SegoeUI;
9 | font-size: 12px;
10 | font-weight: bolder;
11 | color: rgba(0, 0, 0, 0.6);
12 | margin-bottom: 5px;
13 | }
14 |
15 | .value {
16 | display: flex;
17 | align-items: center;
18 | font-family: SegoeUI;
19 | font-size: 14px;
20 | color: rgba(0, 0, 0, 0.6);
21 | }
22 |
23 | .value.clickable {
24 | color: #0078D7;
25 | cursor: pointer;
26 | }
27 | .value>div {
28 | overflow: hidden;
29 | white-space: nowrap;
30 | text-overflow: ellipsis;
31 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/radio-clickable-property/radio-clickable-property.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}
2 |
3 |
4 |
5 | {{ value || 'No data' }}
6 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/user-clickable-property/user-clickable-property.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .title {
8 | font-family: SegoeUI;
9 | font-size: 12px;
10 | font-weight: bolder;
11 | color: rgba(0, 0, 0, 0.6);
12 | margin-bottom: 2px;
13 | }
14 |
15 | .value {
16 | display: flex;
17 | align-items: center;
18 | font-family: SegoeUI;
19 | font-size: 14px;
20 | color: rgba(0, 0, 0, 0.6);
21 | }
22 |
23 | .value.clickable {
24 | color: #0078D7;
25 | cursor: pointer;
26 | }
27 |
28 | .value>app-user-logo {
29 | margin-right: 5px;
30 | }
31 |
32 | .value>div {
33 | overflow: hidden;
34 | white-space: nowrap;
35 | text-overflow: ellipsis;
36 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/user-clickable-property/user-clickable-property.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}
2 |
3 |
4 |
5 | {{ getDisplayValue() || 'No data' }}
6 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history-item/activity-history-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | // models
3 | import { AlertHistoryState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-activity-history-item',
7 | templateUrl: './activity-history-item.component.html',
8 | styleUrls: ['./activity-history-item.component.css']
9 | })
10 | export class ActivityHistoryItemComponent {
11 | @Input() item: AlertHistoryState;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-activity-history-item:not(:last-child) {
6 | margin-bottom: 15px;
7 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | // models
3 | import { AlertHistoryState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-activity-history',
7 | templateUrl: './activity-history.component.html',
8 | styleUrls: ['./activity-history.component.css']
9 | })
10 | export class ActivityHistoryComponent {
11 | public title = 'Activity History';
12 | @Input() isExpanded = true;
13 | @Input() items: AlertHistoryState[];
14 | }
15 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-item/cloud-app-state-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | height: 60px;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | :host>.column {
11 | display: flex;
12 | justify-content: flex-start;
13 | align-items: center;
14 | flex: 1;
15 | font-family: SegoeUI;
16 | font-size: 14px;
17 | color: rgba(0, 0, 0, 0.6);
18 | text-transform: capitalize;
19 | overflow: hidden;
20 | word-break: break-word;
21 | margin-right: 10px;
22 | }
23 |
24 | :host>.column:first-child {
25 | padding-left: 13px;
26 | color: black;
27 | }
28 |
29 | .severity-wrapper {
30 | display: flex;
31 | justify-content: flex-start;
32 | align-items: center;
33 | }
34 |
35 | .severity-wrapper>div:nth-child(2) {
36 | text-transform: capitalize;
37 | margin-left: 10px;
38 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-item/cloud-app-state-item.component.html:
--------------------------------------------------------------------------------
1 |
3 | {{ item.destinationServiceName || 'No Data' }}
4 |
5 |
7 | {{ item.destinationServiceIp || 'No Data' }}
8 |
9 |
11 | {{ item.riskScore || 'No Data' }}
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-item/cloud-app-state-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { CloudAppSecurityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-cloud-app-state-item',
7 | templateUrl: './cloud-app-state-item.component.html',
8 | styleUrls: ['./cloud-app-state-item.component.css']
9 | })
10 | export class CloudAppStateItemComponent {
11 | @Input() public item: CloudAppSecurityState;
12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(key: string, value: string): void {
19 | if (value) {
20 | this.valueClick.emit({ key, value });
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .list-header {
7 | display: flex;
8 | border-bottom: 1px solid #E9E9E9;
9 | height: 30px;
10 | flex-shrink: 0;
11 | }
12 |
13 | .list-header>.column {
14 | display: flex;
15 | flex: 1;
16 | justify-content: flex-start;
17 | align-items: center;
18 | font-family: SegoeUI;
19 | font-size: 12px;
20 | height: 30px;
21 | color: rgba(0, 0, 0, 0.6);
22 | margin-right: 10px;
23 | }
24 |
25 | .list-header>.column:first-child {
26 | padding-left: 13px;
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { CloudAppSecurityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-cloud-app-state-list',
7 | templateUrl: './cloud-app-state-list.component.html',
8 | styleUrls: ['./cloud-app-state-list.component.css']
9 | })
10 | export class CloudAppStateListComponent {
11 | public title = 'Cloud Application States';
12 | @Input() isExpanded = true;
13 | @Input() items: CloudAppSecurityState[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list-item/file-list-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | height: 60px;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | :host>.column {
11 | display: flex;
12 | justify-content: flex-start;
13 | align-items: center;
14 | font-family: SegoeUI;
15 | font-size: 14px;
16 | color: rgba(0, 0, 0, 0.6);
17 | text-transform: capitalize;
18 | overflow: hidden;
19 | word-break: break-word;
20 | margin-right: 10px;
21 | }
22 |
23 | :host>.column:first-child {
24 | padding-left: 13px;
25 | color: black;
26 | }
27 |
28 | .severity-wrapper {
29 | display: flex;
30 | justify-content: flex-start;
31 | align-items: center;
32 | }
33 |
34 | .severity-wrapper>div:nth-child(2) {
35 | text-transform: capitalize;
36 | margin-left: 10px;
37 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list-item/file-list-item.component.html:
--------------------------------------------------------------------------------
1 |
3 | {{ item.name || 'No Data' }}
4 |
5 | {{ item.path || 'No Data' }}
7 | {{ item.riskScore || 'No Data' }}
9 | {{ item.fileHash?.hashType || 'No Data' }}
10 | {{ item.fileHash?.hashValue || 'No Data' }}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list-item/file-list-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
2 | // models
3 | import { FileSecurityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-file-list-item',
7 | templateUrl: './file-list-item.component.html',
8 | styleUrls: ['./file-list-item.component.css']
9 | })
10 | export class FileListItemComponent {
11 | @Input() public item: FileSecurityState;
12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(key: string, value: string): void {
19 | if (value) {
20 | this.valueClick.emit({ key, value });
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .list-header {
7 | display: flex;
8 | border-bottom: 1px solid #E9E9E9;
9 | height: 30px;
10 | flex-shrink: 0;
11 | }
12 |
13 | .list-header>.column {
14 | display: flex;
15 | justify-content: flex-start;
16 | align-items: center;
17 | font-family: SegoeUI;
18 | font-size: 12px;
19 | height: 30px;
20 | color: rgba(0, 0, 0, 0.6);
21 | margin-right: 10px;
22 | }
23 |
24 | .list-header>.column:first-child {
25 | padding-left: 13px;
26 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { FileSecurityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-file-list',
7 | templateUrl: './file-list.component.html',
8 | styleUrls: ['./file-list.component.css']
9 | })
10 | export class FileListComponent {
11 | public title = 'Files';
12 | @Input() isExpanded = true;
13 | @Input() items: FileSecurityState[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-item/host-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-grow: 1;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | .column {
11 | display: flex;
12 | flex-direction: column;
13 | flex: 1;
14 | overflow: hidden;
15 | padding: 10px;
16 | }
17 |
18 | .column:not(:last-child) {
19 | margin-right: 10px;
20 | }
21 |
22 | .column>*:not(:last-child) {
23 | margin-bottom: 15px;
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-item/host-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { HostSecurityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-host-item',
7 | templateUrl: './host-item.component.html',
8 | styleUrls: ['./host-item.component.css']
9 | })
10 | export class HostItemComponent {
11 | @Input() host: HostSecurityState;
12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(filterValue: { key: string, value: string }): void {
19 | if (filterValue.value) {
20 | this.valueClick.emit(filterValue);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-user-item:not(:last-child) {
6 | padding-bottom: 10px;
7 | border-bottom: 1px solid #E9E9E9;
8 | margin-bottom: 10px;
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { HostSecurityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-host-list',
7 | templateUrl: './host-list.component.html',
8 | styleUrls: ['./host-list.component.css']
9 | })
10 | export class HostListComponent {
11 | public title = 'Hosts';
12 | @Input() isExpanded = true;
13 | @Input() hosts: HostSecurityState[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-item/malware-state-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-grow: 1;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | .column {
11 | display: flex;
12 | flex-direction: column;
13 | flex: 1;
14 | overflow: hidden;
15 | padding: 10px;
16 | }
17 |
18 | .column:not(:last-child) {
19 | margin-right: 10px;
20 | }
21 |
22 | .column>*:not(:last-child) {
23 | margin-bottom: 15px;
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-item/malware-state-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { MalwareState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-malware-state-item',
7 | templateUrl: './malware-state-item.component.html',
8 | styleUrls: ['./malware-state-item.component.css']
9 | })
10 | export class MalwareStateItemComponent {
11 | @Input() item: MalwareState;
12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(filterValue: { key: string, value: string }): void {
19 | if (filterValue.value) {
20 | this.valueClick.emit(filterValue);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-user-item:not(:last-child) {
6 | padding-bottom: 10px;
7 | border-bottom: 1px solid #E9E9E9;
8 | margin-bottom: 10px;
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { MalwareState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-malware-state-list',
7 | templateUrl: './malware-state-list.component.html',
8 | styleUrls: ['./malware-state-list.component.css']
9 | })
10 | export class MalwareStateListComponent {
11 | public title = 'Malware States';
12 | @Input() isExpanded = true;
13 | @Input() items: MalwareState[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/network-connection-list/network-connection-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-user-item:not(:last-child) {
6 | padding-bottom: 10px;
7 | border-bottom: 1px solid #E9E9E9;
8 | margin-bottom: 10px;
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/network-connection-list/network-connection-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-item/process-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-grow: 1;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | .column {
11 | display: flex;
12 | flex-direction: column;
13 | flex: 1;
14 | overflow: hidden;
15 | padding: 10px;
16 | }
17 |
18 | .column:not(:last-child) {
19 | margin-right: 10px;
20 | }
21 |
22 | .column>*:not(:last-child) {
23 | margin-bottom: 15px;
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-item/process-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { Process } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-process-item',
7 | templateUrl: './process-item.component.html',
8 | styleUrls: ['./process-item.component.css']
9 | })
10 | export class ProcessItemComponent {
11 | @Input() item: Process;
12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(filterValue: { key: string, value: string }): void {
19 | if (filterValue.value) {
20 | this.valueClick.emit(filterValue);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-user-item:not(:last-child) {
6 | padding-bottom: 10px;
7 | border-bottom: 1px solid #E9E9E9;
8 | margin-bottom: 10px;
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { Process } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-process-list',
7 | templateUrl: './process-list.component.html',
8 | styleUrls: ['./process-list.component.css']
9 | })
10 | export class ProcessListComponent {
11 | public title = 'Processes';
12 | @Input() isExpanded = true;
13 | @Input() items: Process[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-item/registry-key-update-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-grow: 1;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | .column {
11 | display: flex;
12 | flex-direction: column;
13 | flex: 1;
14 | overflow: hidden;
15 | padding: 10px;
16 | }
17 |
18 | .column:not(:last-child) {
19 | margin-right: 10px;
20 | }
21 |
22 | .column>*:not(:last-child) {
23 | margin-bottom: 15px;
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-item/registry-key-update-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { RegistryKeyState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-registry-key-update-item',
7 | templateUrl: './registry-key-update-item.component.html',
8 | styleUrls: ['./registry-key-update-item.component.css']
9 | })
10 | export class RegistryKeyUpdateItemComponent {
11 | @Input() item: RegistryKeyState;
12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(filterValue: { key: string, value: string }): void {
19 | if (filterValue.value) {
20 | this.valueClick.emit(filterValue);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-user-item:not(:last-child) {
6 | padding-bottom: 10px;
7 | border-bottom: 1px solid #E9E9E9;
8 | margin-bottom: 10px;
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { RegistryKeyState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-registry-key-update-list',
7 | templateUrl: './registry-key-update-list.component.html',
8 | styleUrls: ['./registry-key-update-list.component.css']
9 | })
10 | export class RegistryKeyUpdateListComponent {
11 | public title = 'Registry Key Updates';
12 | @Input() isExpanded = true;
13 | @Input() items: RegistryKeyState[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/string-list/string-list.component.css:
--------------------------------------------------------------------------------
1 | .value {
2 | display: flex;
3 | align-items: center;
4 | font-family: SegoeUI;
5 | font-size: 14px;
6 | color: rgba(0, 0, 0, 0.6);
7 | height: 40px;
8 | padding: 0 15px;
9 | }
10 |
11 | .value:nth-child(even) {
12 | background: #F6F6F6;
13 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/string-list/string-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
4 | {{ item }}
5 |
6 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/string-list/string-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-alert-string-list',
5 | templateUrl: './string-list.component.html',
6 | styleUrls: ['./string-list.component.css']
7 | })
8 | export class StringListComponent {
9 | @Input() title: string;
10 | @Input() isExpanded = true;
11 | @Input() items: string[];
12 | @Input() filterKey: string;
13 | @Input() clickable = true;
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(value: string): void {
21 | if (this.clickable && this.filterKey && value) {
22 | this.valueClick.emit({
23 | key: this.filterKey,
24 | value
25 | });
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-item/trigger-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | height: 60px;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | :host>.column {
11 | display: flex;
12 | justify-content: flex-start;
13 | align-items: center;
14 | font-family: SegoeUI;
15 | font-size: 14px;
16 | color: rgba(0, 0, 0, 0.6);
17 | text-transform: capitalize;
18 | overflow: hidden;
19 | word-break: break-word;
20 | margin-right: 10px;
21 | }
22 |
23 | :host>.column:first-child {
24 | padding-left: 13px;
25 | color: black;
26 | }
27 |
28 | .severity-wrapper {
29 | display: flex;
30 | justify-content: flex-start;
31 | align-items: center;
32 | }
33 |
34 | .severity-wrapper>div:nth-child(2) {
35 | text-transform: capitalize;
36 | margin-left: 10px;
37 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-item/trigger-item.component.html:
--------------------------------------------------------------------------------
1 |
3 | {{ item.name || 'No Data' }}
4 |
5 |
7 | {{ item.type || 'No Data' }}
8 |
9 |
11 | {{ item.value || 'No Data' }}
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-item/trigger-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { Trigger } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-trigger-item',
7 | templateUrl: './trigger-item.component.html',
8 | styleUrls: ['./trigger-item.component.css']
9 | })
10 | export class TriggerListItemComponent {
11 | @Input() public item: Trigger;
12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(key: string, value: string): void {
19 | if (value) {
20 | this.valueClick.emit({ key, value });
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .list-header {
7 | display: flex;
8 | border-bottom: 1px solid #E9E9E9;
9 | height: 30px;
10 | flex-shrink: 0;
11 | }
12 |
13 | .list-header>.column {
14 | display: flex;
15 | justify-content: flex-start;
16 | align-items: center;
17 | font-family: SegoeUI;
18 | font-size: 12px;
19 | height: 30px;
20 | color: rgba(0, 0, 0, 0.6);
21 | margin-right: 10px;
22 | }
23 |
24 | .list-header>.column:first-child {
25 | padding-left: 13px;
26 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { Trigger } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-trigger-list',
7 | templateUrl: './trigger-list.component.html',
8 | styleUrls: ['./trigger-list.component.css']
9 | })
10 | export class TriggerListComponent {
11 | public title = 'Triggers';
12 | @Input() isExpanded = true;
13 | @Input() items: Trigger[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/url-list/url-list.component.css:
--------------------------------------------------------------------------------
1 | .url {
2 | display: flex;
3 | align-items: center;
4 | font-family: SegoeUI;
5 | font-size: 14px;
6 | color: rgba(0, 0, 0, 0.6);
7 | height: 40px;
8 | padding: 0 15px;
9 | overflow: hidden;
10 | }
11 |
12 | .url:nth-child(even) {
13 | background: #F6F6F6;
14 | }
15 |
16 | .url>div {
17 | overflow: hidden;
18 | white-space: nowrap;
19 | text-overflow: ellipsis;
20 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/url-list/url-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/url-list/url-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import * as isUrl from 'is-url';
3 |
4 | @Component({
5 | selector: 'app-url-list',
6 | templateUrl: './url-list.component.html',
7 | styleUrls: ['./url-list.component.css']
8 | })
9 | export class UrlListComponent {
10 | @Input() title: string;
11 | @Input() isExpanded = true;
12 | @Input() items: string[];
13 |
14 | public isUrl(value: string): boolean {
15 | return isUrl(value);
16 | }
17 |
18 | public onUrlClick(value: string): void {
19 | // tslint:disable-next-line:no-unused-expression
20 | value && window.open(value, '_blank');
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/user-list/user-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | }
4 |
5 | :host app-user-item:not(:last-child) {
6 | padding-bottom: 10px;
7 | border-bottom: 1px solid #E9E9E9;
8 | margin-bottom: 10px;
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/user-list/user-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/user-list/user-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { User } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-user-list',
7 | templateUrl: './user-list.component.html',
8 | styleUrls: ['./user-list.component.css']
9 | })
10 | export class UserListComponent {
11 | public title = 'User Accounts/Devices';
12 | @Input() isExpanded = true;
13 | @Input() users: User[];
14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
15 |
16 | constructor() {
17 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
18 | }
19 |
20 | public onValueClick(filterValue: { key: string, value: string }): void {
21 | if (filterValue.value) {
22 | this.valueClick.emit(filterValue);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-item/vulnerability-state-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | height: 60px;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | :host>.column {
11 | display: flex;
12 | justify-content: flex-start;
13 | align-items: center;
14 | flex: 1;
15 | font-family: SegoeUI;
16 | font-size: 14px;
17 | color: rgba(0, 0, 0, 0.6);
18 | text-transform: capitalize;
19 | overflow: hidden;
20 | word-break: break-word;
21 | margin-right: 10px;
22 | }
23 |
24 | :host>.column:first-child {
25 | padding-left: 13px;
26 | color: black;
27 | }
28 |
29 | .severity-wrapper {
30 | display: flex;
31 | justify-content: flex-start;
32 | align-items: center;
33 | }
34 |
35 | .severity-wrapper>div:nth-child(2) {
36 | text-transform: capitalize;
37 | margin-left: 10px;
38 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-item/vulnerability-state-item.component.html:
--------------------------------------------------------------------------------
1 |
2 | {{ item.cve || 'No Data' }}
3 |
4 |
6 | {{ item.severity || 'No Data' }}
7 |
8 |
10 | {{ item.wasRunning || 'No Data' }}
11 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-item/vulnerability-state-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | // models
3 | import { VulnerabilityState } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-vulnerability-state-item',
7 | templateUrl: './vulnerability-state-item.component.html',
8 | styleUrls: ['./vulnerability-state-item.component.css']
9 | })
10 | export class VulnerabilityStateItemComponent {
11 | @Input() public item: VulnerabilityState;
12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(key: string, value: any): void {
19 | if (value) {
20 | this.valueClick.emit({ key, value: String(value) });
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 | .list-header {
7 | display: flex;
8 | border-bottom: 1px solid #E9E9E9;
9 | height: 30px;
10 | flex-shrink: 0;
11 | }
12 |
13 | .list-header>.column {
14 | display: flex;
15 | flex: 1;
16 | justify-content: flex-start;
17 | align-items: center;
18 | font-family: SegoeUI;
19 | font-size: 12px;
20 | height: 30px;
21 | color: rgba(0, 0, 0, 0.6);
22 | margin-right: 10px;
23 | }
24 |
25 | .list-header>.column:first-child {
26 | padding-left: 13px;
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/header/header.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | margin-top: 10px;
4 | }
5 |
6 | :host>label {
7 | font-family: SegoeUI;
8 | font-size: 20px;
9 | color: black;
10 | font-weight: bold;
11 | }
12 |
13 | .severity-container {
14 | margin: 5px 25px 0 25px;
15 | }
16 |
17 | .status {
18 | font-family: SegoeUI;
19 | font-size: 20px;
20 | color: rgba(0, 0, 0, 0.6);
21 | font-weight: bold;
22 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/header/header.component.html:
--------------------------------------------------------------------------------
1 |
2 |
5 | / {{ status }}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/header/header.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-alert-details-header',
5 | templateUrl: './header.component.html',
6 | styleUrls: ['./header.component.css']
7 | })
8 | export class AlertDetailsHeaderComponent {
9 | @Input() title: string;
10 | @Input() severity: string;
11 | @Input() status: string;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/main-info/main-info.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-shrink: 0;
4 | background: white;
5 | border-bottom: 1px solid #E9E9E9;
6 | }
7 |
8 | .container {
9 | display: flex;
10 | flex-direction: column;
11 | padding: 15px 20px;
12 | overflow: hidden;
13 | }
14 |
15 | .container:not(.fixed-width) {
16 | flex: 3;
17 | }
18 |
19 | .container.fixed-width {
20 | flex: 1;
21 | }
22 |
23 | .container:not(:last-child) {
24 | border-right: 1px solid #E9E9E9;
25 | }
26 |
27 | .container>label {
28 | font-family: SegoeUI;
29 | font-size: 14px;
30 | font-weight: bolder;
31 | color: rgba(0, 0, 0, 0.6);
32 | margin-bottom: 10px;
33 | }
34 |
35 | .row {
36 | display: flex;
37 | }
38 |
39 | .row:not(:last-child) {
40 | margin-bottom: 15px;
41 | }
42 |
43 | .row>* {
44 | flex: 1;
45 | }
46 |
47 | .row>*:not(:last-child) {
48 | margin-right: 10px;
49 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/update-alert-form/update-alert-form.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | background: white;
5 | flex-grow: 1;
6 | padding: 16px 22px;
7 | }
8 |
9 | :host>label {
10 | font-family: SegoeUI;
11 | font-size: 20px;
12 | color: black;
13 | font-weight: bold;
14 | }
15 |
16 | .form-row {
17 | margin-top: 12px;
18 | }
19 |
20 | .form-actions {
21 | margin-top: 16px;
22 | display: flex;
23 | justify-content: flex-end;
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-item/alert-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
2 | // models
3 | import { Alert } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-alert-item',
7 | templateUrl: './alert-item.component.html',
8 | styleUrls: ['./alert-item.component.css']
9 | })
10 | export class AlertItemComponent {
11 | @Input() public item: Alert;
12 | @Output() public itemSelect: EventEmitter;
13 |
14 | @HostListener('click')
15 | onClick() { this.itemSelect.emit(this.item.id); }
16 |
17 | constructor() {
18 | this.itemSelect = new EventEmitter();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow-y: hidden;
5 | }
6 |
7 | .container-header {
8 | font-family: SegoeUI;
9 | font-size: 14px;
10 | color: #2D2D2D;
11 | margin-bottom: 19px;
12 | flex-shrink: 0;
13 | }
14 |
15 | .list-header {
16 | display: flex;
17 | border-bottom: 1px solid #E9E9E9;
18 | height: 30px;
19 | flex-shrink: 0;
20 | }
21 |
22 | .list-header>.column {
23 | display: flex;
24 | justify-content: flex-start;
25 | align-items: center;
26 | font-family: SegoeUI;
27 | font-size: 12px;
28 | height: 30px;
29 | color: rgba(0, 0, 0, 0.6);
30 | margin-right: 10px;
31 | }
32 |
33 | .list-header>.column:first-child {
34 | padding-left: 13px;
35 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, HostBinding } from '@angular/core';
2 | import { Router } from '@angular/router';
3 | // models
4 | import { Alert } from 'src/app/models/graph';
5 |
6 | @Component({
7 | selector: 'app-alert-list',
8 | templateUrl: './alert-list.component.html',
9 | styleUrls: ['./alert-list.component.css']
10 | })
11 | export class AlertListComponent {
12 | public title = 'Matching Alerts';
13 |
14 | @Input() public alerts: Alert[];
15 | @HostBinding('class.page-content-linear-container') hostClass = true;
16 |
17 | constructor(private router: Router) { }
18 |
19 | public itemSelect(alertId: string): void {
20 | if (alertId) {
21 | // navigate to the alert details page
22 | this.router.navigate([`/alerts/${alertId}`]);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/display-name-pipe/display-name.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'displayName' })
4 | export class DisplayNamePipe implements PipeTransform {
5 | transform(value: string): string {
6 | if (value && typeof value === 'string' && value.indexOf('@') > -1) {
7 | return value.split('@')[0];
8 | }
9 | return value;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alerts.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | flex-grow: 1;
3 | display: flex;
4 | flex-direction: row;
5 | overflow: hidden;
6 | }
7 |
8 | .page-content {
9 | display: flex;
10 | overflow: hidden;
11 | flex-direction: column;
12 | flex-grow: 1;
13 | margin-right: 10px;
14 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.25);
15 | }
16 |
17 | .alerts {
18 | flex-grow: 1;
19 | display: flex;
20 | flex-direction: column;
21 | overflow: hidden;
22 | }
23 |
24 | .header-title {
25 | font-family: SegoeUI;
26 | font-size: 20px;
27 | color: #2D2D2D;
28 | margin-top: 7px;
29 | text-transform: capitalize;
30 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alerts.component.html:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-item/query-item.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}:
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-item/query-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, ViewEncapsulation } from '@angular/core';
2 | // services
3 | import { ClipboardService } from 'ngx-clipboard';
4 |
5 | @Component({
6 | selector: 'app-query-item',
7 | templateUrl: './query-item.component.html',
8 | styleUrls: ['./query-item.component.css'],
9 | // encapsulation: ViewEncapsulation.None,
10 | })
11 | export class QueryItemComponent {
12 | @Input() title: string;
13 | @Input() value: string;
14 |
15 | public constructor(private clipboardService: ClipboardService) { }
16 |
17 | public copyToClipboard(text: string): void {
18 | this.clipboardService.copyFromContent(text);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-shrink: 0;
4 | }
5 |
6 | .queries-list-container {
7 | flex-grow: 1;
8 | flex-shrink: 1;
9 | overflow: hidden;
10 | }
11 |
12 | .action-button {
13 | display: flex;
14 | justify-content: flex-end;
15 | align-items: flex-end;
16 | width: 137px;
17 | flex-shrink: 0;
18 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-list.component.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-item/dashboard-item.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | height: 60px;
4 | }
5 |
6 | :host(:nth-child(even)) {
7 | background: #F6F6F6;
8 | }
9 |
10 | :host>.column {
11 | display: flex;
12 | justify-content: flex-start;
13 | align-items: center;
14 | font-family: SegoeUI;
15 | font-size: 14px;
16 | color: rgba(0, 0, 0, 0.6);
17 | overflow: hidden;
18 | word-break: break-word;
19 | }
20 |
21 | :host>.column:not(:last-child) {
22 | margin-right: 10px;
23 | }
24 |
25 | :host>.column:first-child {
26 | padding-left: 13px;
27 | color: black;
28 | }
29 | :host>.column:last-child {
30 | justify-content: flex-end;
31 | margin-right: 20px;
32 | }
33 | .title{
34 | white-space: nowrap;
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | }
38 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-item/dashboard-item.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.specification.title}}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-item/dashboard-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { ModelWithTheMostAlert } from 'src/app/models/graph/alert-statistic.model';
3 |
4 | @Component({
5 | selector: 'app-dashboard-item',
6 | templateUrl: './dashboard-item.component.html',
7 | styleUrls: ['./dashboard-item.component.css']
8 | })
9 | export class DashboardItemComponent {
10 |
11 | public row = 'row';
12 | @Input() public item: ModelWithTheMostAlert;
13 | @Output() valueClick: EventEmitter<{value: string}>;
14 |
15 | constructor() {
16 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
17 | }
18 |
19 | onClick() {
20 | if (this.item.specification.filterValue) {
21 | this.valueClick.emit({
22 | value: this.item.specification.filterValue
23 | });
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-direction: column;
4 | overflow-y: hidden;
5 | flex-shrink: 0;
6 | }
7 |
8 | app-dashboard-item {
9 | height: 40px;
10 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-list.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { ModelWithTheMostAlert } from 'src/app/models/graph/alert-statistic.model';
3 |
4 | @Component({
5 | selector: 'app-dashboard-list',
6 | templateUrl: './dashboard-list.component.html',
7 | styleUrls: ['./dashboard-list.component.css']
8 | })
9 | export class DashboardListComponent {
10 | @Input() public key: string;
11 | @Input() public items: ModelWithTheMostAlert[];
12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>;
13 |
14 | constructor() {
15 | this.valueClick = new EventEmitter<{ key: string, value: string }>();
16 | }
17 |
18 | public onValueClick(filterValue: {value: string }): void {
19 | if (filterValue.value) {
20 | this.valueClick.emit({
21 | key: this.key,
22 | value: filterValue.value
23 | });
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/doughnut-chart/doughnut-chart.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/doughnut-chart/doughnut-chart.component.css
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/doughnut-chart/doughnut-chart.component.html:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/operation-status-alerts.component.css:
--------------------------------------------------------------------------------
1 | p{
2 | font-family: "Segoe UI";
3 | margin-bottom: 0px;
4 | margin-top:0px;
5 | font-size: 14px;
6 | font-weight: 500;
7 | }
8 | .statuses{
9 | display: flex;
10 | flex-direction: row;
11 | justify-content: space-between;
12 | flex-basis: 100%;
13 | }
14 | .operationStatus-sum{
15 | display: flex;
16 | flex:10;
17 | flex-direction: column;
18 | margin-left: 5px;
19 | }
20 | .operation-status{
21 | font-size: 18px;
22 | }
23 | p.sum{
24 | font-size: 40px;
25 | color:black;
26 | font-weight: normal;
27 | }
28 | .status-labels{
29 | display: flex;
30 | flex:3;
31 | flex-direction: column;
32 | justify-content: space-between;
33 | margin-left: 10px;
34 | margin-right: 10px;
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | }
38 | app-severity-levels-alerts{
39 | flex:3;
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/operation-status-alerts.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
{{alertByStatus.statusName}}
6 |
{{sumValue}}
7 |
8 |
9 |
10 |
High
11 |
Medium
12 |
Low
13 |
Informational
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/operation-status-alerts.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Input } from '@angular/core';
2 | import { Value, ActiveAlert } from 'src/app/models/graph/alert-statistic.model';
3 |
4 | @Component({
5 | selector: 'app-operation-status-alerts',
6 | templateUrl: './operation-status-alerts.component.html',
7 | styleUrls: ['./operation-status-alerts.component.css']
8 | })
9 | export class OperationStatusAlertsComponent implements OnInit {
10 |
11 | public statusValues: string[];
12 | public values: Value[];
13 | public sumValue: number;
14 | public column = 'column';
15 |
16 | @Input() public alertByStatus: ActiveAlert;
17 |
18 | ngOnInit(): void {
19 | this.statusValues = this.alertByStatus.values.map(el => el.amount);
20 | this.values = this.alertByStatus.values;
21 | this.sumValue = this.statusValues.reduce((a, b) => (+a) + (+b), 0);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-statuses-alerts.component.css:
--------------------------------------------------------------------------------
1 | .alert-statuses-box{
2 | display:flex;
3 | flex-direction: column;
4 | justify-content: stretch;
5 | }
6 | .alert-statuses-box > * {
7 | display: flex;
8 | margin-top: 20px;
9 | flex:1;
10 | }
11 | .alert-statuses-box > *:first-child{
12 | margin-top: 0px;
13 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-statuses-alerts.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-statuses-alerts.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Input } from '@angular/core';
2 | import { ActiveAlert } from 'src/app/models/graph/alert-statistic.model';
3 |
4 | @Component({
5 | selector: 'app-operation-statuses-alerts',
6 | templateUrl: './operation-statuses-alerts.component.html',
7 | styleUrls: ['./operation-statuses-alerts.component.css']
8 | })
9 | export class OperationStatusesAlertsComponent {
10 |
11 | @Input() public alertsByStatus: ActiveAlert[];
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-level-alerts/severity-level-alerts.component.css:
--------------------------------------------------------------------------------
1 | div,p{
2 | display: inline-block;
3 | margin-top: auto;
4 | margin-bottom: auto;
5 | }
6 | div {
7 | height: 8px;
8 | width: 8px;
9 | min-width: 8px;
10 | border-radius: 200%;
11 | }
12 | p{
13 | margin-left: 5px;
14 | font-family: "SegoeUI";
15 | font-size: 14px;
16 | font-weight: 500;
17 | }
18 |
19 | .severity-level.High {
20 | background: #C00000;
21 | }
22 |
23 | .severity-level.Medium {
24 | background: #FFC700;
25 | }
26 |
27 | .severity-level.Low {
28 | background: #F2994A;
29 | }
30 |
31 | .severity-level.Informational {
32 | background: #C4C4C4;
33 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-level-alerts/severity-level-alerts.component.html:
--------------------------------------------------------------------------------
1 |
2 | {{value}}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-level-alerts/severity-level-alerts.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, OnInit } from '@angular/core';
2 | import { Value } from 'src/app/models/graph/alert-statistic.model';
3 |
4 | @Component({
5 | selector: 'app-severity-level-alerts',
6 | templateUrl: './severity-level-alerts.component.html',
7 | styleUrls: ['./severity-level-alerts.component.css']
8 | })
9 | export class SeverityLevelAlertsComponent implements OnInit {
10 | public name: string;
11 | public value: string;
12 |
13 | @Input() public Value: Value;
14 |
15 | ngOnInit(): void {
16 | this.name = this.Value.name;
17 | this.value = this.Value.amount;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-levels-alerts.component.css:
--------------------------------------------------------------------------------
1 | :host{
2 | display: flex;
3 | justify-content: space-between;
4 | flex-basis: 100%;
5 | }
6 | .box.row{
7 | display: flex;
8 | flex-basis: 100%;
9 | justify-content: space-between;
10 | }
11 | .box.column{
12 | display: flex;
13 | flex-direction: column;
14 | flex-basis: 100%;
15 | justify-content: space-between;
16 | }
17 | app-severity-levels-alerts{
18 | min-width: 30px;
19 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-levels-alerts.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-levels-alerts.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, OnInit } from '@angular/core';
2 | import { ActiveAlert, Value } from 'src/app/models/graph/alert-statistic.model';
3 |
4 | @Component({
5 | selector: 'app-severity-levels-alerts',
6 | templateUrl: './severity-levels-alerts.component.html',
7 | styleUrls: ['./severity-levels-alerts.component.css']
8 | })
9 | export class SeverityLevelsAlertsComponent {
10 | @Input() public direction: string;
11 | @Input() public values: Value[];
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/secure-score/components/secure-score-expandable-list/secure-score-expandable-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, AfterContentInit } from '@angular/core';
2 | // models
3 | import { SecureScoreControlProfile } from 'src/app/models/graph';
4 |
5 | @Component({
6 | selector: 'app-secure-score-expandable-list',
7 | templateUrl: './secure-score-expandable-list.component.html',
8 | styleUrls: ['./secure-score-expandable-list.component.css']
9 | })
10 | export class SecureScoreExpandableListComponent implements AfterContentInit {
11 | @Input() public action: SecureScoreControlProfile;
12 | @Input() public isExpanded = false;
13 |
14 | public secureStateUpdates = [];
15 |
16 | ngAfterContentInit() {
17 | this.secureStateUpdates = this.action && this.action.secureStateUpdates;
18 | }
19 |
20 | public toggle(): void {
21 | this.isExpanded = !this.isExpanded;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-item/query-item.component.html:
--------------------------------------------------------------------------------
1 | {{ title }}:
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-item/query-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, ViewEncapsulation } from '@angular/core';
2 | // services
3 | import { ClipboardService } from 'ngx-clipboard';
4 |
5 | @Component({
6 | selector: 'app-subscription-query-item',
7 | templateUrl: './query-item.component.html',
8 | styleUrls: ['./query-item.component.css'],
9 | })
10 | export class SubscriptionQueryItemComponent {
11 | @Input() title: string;
12 | @Input() value: string;
13 |
14 | public constructor(private clipboardService: ClipboardService) { }
15 |
16 | public copyToClipboard(text: string): void {
17 | this.clipboardService.copyFromContent(text);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-list.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | display: flex;
3 | flex-shrink: 0;
4 | }
5 |
6 | .queries-list-container {
7 | flex-grow: 1;
8 | flex-shrink: 1;
9 | overflow: hidden;
10 | }
11 |
12 | .action-button {
13 | display: flex;
14 | justify-content: flex-end;
15 | align-items: flex-end;
16 | width: 137px;
17 | flex-shrink: 0;
18 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-list.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, HostBinding } from '@angular/core';
2 | import { Queries } from 'src/app/models/response';
3 |
4 | @Component({
5 | selector: 'app-subscription-query-list',
6 | templateUrl: './query-list.component.html',
7 | styleUrls: ['./query-list.component.css']
8 | })
9 | export class SubscriptionQueryListComponent {
10 | @Input() queries: Queries;
11 | @HostBinding('class.page-content-linear-container') hostClass = true;
12 |
13 | // have Object.keys accessible in the template and use it in *ngFor
14 | public objectKeys = Object.keys;
15 | }
16 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-item/subscription-item.component.html:
--------------------------------------------------------------------------------
1 | {{item.id}}
2 | {{item.resource}}
3 | {{item.changeType || 'No data'}}
4 |
5 | {{ item.expirationDateTime | date : 'M/d/yyyy, h:mm a' }}
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-item/subscription-item.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | // models
3 | import { Subscription } from 'src/app/models/graph/subscription.model';
4 |
5 | @Component({
6 | selector: 'app-subscription-item',
7 | templateUrl: './subscription-item.component.html',
8 | styleUrls: ['./subscription-item.component.css']
9 | })
10 | export class SubscriptionItemComponent {
11 | @Input() public item: Subscription;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-list.component.html:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-list.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | // models
3 | import { Subscription } from 'src/app/models/graph/subscription.model';
4 |
5 | @Component({
6 | selector: 'app-subscription-list',
7 | templateUrl: './subscription-list.component.html',
8 | styleUrls: ['./subscription-list.component.css']
9 | })
10 | export class SubscriptionListComponent {
11 | @Input() public subscriptions: Subscription[];
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscriptions.component.css:
--------------------------------------------------------------------------------
1 | :host {
2 | flex-grow: 1;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .page-content {
8 | display: flex;
9 | overflow: hidden;
10 | flex-grow: 1;
11 | }
12 |
13 | .subscriptions {
14 | flex-grow: 1;
15 | display: flex;
16 | flex-direction: column;
17 | margin-right: 10px;
18 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.25);
19 | background-color: white;
20 | }
21 |
22 | .header-content {
23 | display: flex;
24 | }
25 |
26 | .header-title {
27 | font-family: SegoeUI;
28 | font-size: 20px;
29 | color: #2D2D2D;
30 | margin-top: 7px;
31 | text-transform: capitalize;
32 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscriptions.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/app/index.ts:
--------------------------------------------------------------------------------
1 | export { LoaderState } from './loader-state.model';
2 | export { ModalValue, StateModal, RouteModal, ModalWindow } from './modal-window.model';
3 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/app/loader-state.model.ts:
--------------------------------------------------------------------------------
1 | export class LoaderState {
2 | constructor(public IsVisible: boolean,
3 | public Message: string = 'Loading...') { }
4 | }
5 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/action.model.ts:
--------------------------------------------------------------------------------
1 | import { SecurityVendorInformation } from '.';
2 |
3 | export class Action {
4 | public name: string;
5 | public submittedDateTime: Date | string | null;
6 | public target: ActionTarget;
7 | public reason: ActionReason;
8 | public securityVendorInformation: SecurityVendorInformation;
9 | public status: OperationStatus;
10 | public statusUpdateTime: Date | string | null;
11 | }
12 |
13 | export class ActionTarget {
14 | public name: string;
15 | public value: string;
16 | }
17 |
18 | export class ActionReason {
19 | public comment: string;
20 | public alertId?: string;
21 | }
22 |
23 | export enum OperationStatus {
24 | Pending = 'Pending',
25 | Complete = 'Complete'
26 | }
27 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/alert-history-state.model.ts:
--------------------------------------------------------------------------------
1 | import { User } from '.';
2 |
3 | export class AlertHistoryState {
4 | public appId: string;
5 | public assignedTo: User;
6 | public feedback: string;
7 | public updatedDateTime: Date;
8 | public user: User;
9 | public status: string;
10 | public comments: string[];
11 | }
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/alert.model.ts:
--------------------------------------------------------------------------------
1 | export class Alert {
2 | id: string;
3 | title: string;
4 | severity: string;
5 | category: string;
6 | status: string;
7 | createdDateTime: Date | string | null;
8 | provider: string;
9 | assignedTo: string;
10 | }
11 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/average-comparative-score.model.ts:
--------------------------------------------------------------------------------
1 | export class AverageComparativeScore {
2 | averageScore?: number;
3 | // basis: string;
4 | comparedBy: string;
5 | value: string;
6 | amount: number;
7 | name: string;
8 | // additionalData: IDictionary;
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/cloud-app-security-state.model.ts:
--------------------------------------------------------------------------------
1 | export class CloudAppSecurityState {
2 | public destinationServiceIp: string;
3 | public destinationServiceName: string;
4 | public riskScore: string;
5 | public additionalData: { [key: string]: any };
6 | }
7 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/control-score.model.ts:
--------------------------------------------------------------------------------
1 | export class ControlScore {
2 | controlCategory: string;
3 | controlName: string;
4 | description: string;
5 | score?: number;
6 | // additionalData: IDictionary;
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/control-state-update.model.ts:
--------------------------------------------------------------------------------
1 | export class ControlStateUpdate {
2 | upnAssignedTo: string;
3 | displayNameAssignedTo: string;
4 | state: string;
5 | comment: string;
6 | upnUpdatedBy: string;
7 | displayNameUpdatedBy: string;
8 | updatedDateTime: string;
9 | assignTo: string;
10 | updatedBy: string;
11 | }
12 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/device.model.ts:
--------------------------------------------------------------------------------
1 | export class Device {
2 | public deviceId: string;
3 | public displayName: string;
4 | public deviceMetadata: string;
5 | public deviceVersion: string;
6 | public isCompliant: boolean | null;
7 | public operatingSystem: string;
8 | public operatingSystemVersion: string;
9 | public isManaged: boolean | null;
10 | public accountEnabled: boolean | null;
11 | public approximateLastSignInDateTime: Date | string | null;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/file-security-state.model.ts:
--------------------------------------------------------------------------------
1 | export class FileSecurityState {
2 | public fileHash: FileHash;
3 | public name: string;
4 | public path: string;
5 | public riskScore: string;
6 | public additionalData: { [key: string]: any };
7 | }
8 |
9 | export class FileHash {
10 | hashType: FileHashType | null;
11 | hashValue: string;
12 | additionalData: { [key: string]: any };
13 | }
14 |
15 | export enum FileHashType {
16 | Unknown = 0,
17 | Sha1 = 1,
18 | Sha256 = 2,
19 | Md5 = 3,
20 | AuthenticodeHash256 = 4,
21 | LsHash = 5,
22 | Ctph = 6,
23 | PeSha1 = 7,
24 | PeSha256 = 8,
25 | UnknownFutureValue = 127
26 | }
27 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/host-security-state.model.ts:
--------------------------------------------------------------------------------
1 | export class HostSecurityState {
2 | public fqdn: string;
3 | public isAzureAdJoined: boolean | null;
4 | public isAzureAdRegistered: boolean | null;
5 | public isHybridAzureDomainJoined: boolean | null;
6 | public netBiosName: string;
7 | public os: string;
8 | public privateIpAddress: string;
9 | public publicIpAddress: string;
10 | public riskScore: string;
11 | public additionalData: { [key: string]: any };
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/malware-state.model.ts:
--------------------------------------------------------------------------------
1 | export class MalwareState {
2 | public category: string;
3 | public family: string;
4 | public name: string;
5 | public severity: string;
6 | public wasRunning: boolean | null;
7 | public additionalData: { [key: string]: any };
8 | }
9 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/process.model.ts:
--------------------------------------------------------------------------------
1 | import { FileHash } from '.';
2 |
3 | export class Process {
4 | public accountName: string;
5 | public commandLine: string;
6 | public createdDateTime: Date | string | null;
7 | public fileHash: FileHash;
8 | public integrityLevel: ProcessIntegrityLevel | null;
9 | public isElevated: boolean | null;
10 | public name: string;
11 | public parentProcessCreatedDateTime: Date | string | null;
12 | public parentProcessId: number | null;
13 | public parentProcessName: string;
14 | public path: string;
15 | public processId: number | null;
16 | public additionalData: { [key: string]: any };
17 | }
18 |
19 | export enum ProcessIntegrityLevel {
20 | Unknown = 0,
21 | Untrusted = 1,
22 | Low = 2,
23 | Medium = 3,
24 | High = 4,
25 | System = 5,
26 | UnknownFutureValue = 127
27 | }
28 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/risky-user.model.ts:
--------------------------------------------------------------------------------
1 | export class RiskyUser {
2 | id: string;
3 | isDeleted: boolean;
4 | isGuest: boolean;
5 | isProcessing: boolean;
6 | riskLevel: string;
7 | riskState: string;
8 | riskDetail: string;
9 | riskLastUpdatedDateTime: Date;
10 | userDisplayName: string;
11 | userPrincipalName: string;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/secure-score-control-profile.model.ts:
--------------------------------------------------------------------------------
1 | import { ControlStateUpdate } from './control-state-update.model';
2 |
3 | export class SecureScoreControlProfile {
4 | controlCategory: string;
5 | rank: number;
6 | title: string;
7 | maxScore?: number;
8 | userImpact: string;
9 | implementationCost: string;
10 | lastModifiedDateTime?: Date;
11 | actionUrl: string;
12 | deprecated?: boolean;
13 | remediation: string;
14 | remediationImpact: string;
15 | service: string;
16 | tier: string;
17 | azureTenantId: string;
18 | tenantSetState: string;
19 | tenantNote: string;
20 | threats: string[];
21 | secureStateUpdates: ControlStateUpdate[];
22 | }
23 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/secure-score-details.model.ts:
--------------------------------------------------------------------------------
1 | import { SecureScore } from './secure-score.model';
2 | import { SecureScoreControlProfile } from './secure-score-control-profile.model';
3 |
4 | export class SecureScoreDetails {
5 | topSecureScore: SecureScore;
6 | secureScoreControlProfiles: SecureScoreControlProfile[];
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/secure-score.model.ts:
--------------------------------------------------------------------------------
1 | import { SecurityVendorInformation } from './security-vendor.model';
2 | import { AverageComparativeScore } from './average-comparative-score.model';
3 | import { ControlScore } from './control-score.model';
4 |
5 | export class SecureScore {
6 | activeUserCount?: number;
7 | averageComparativeScores: AverageComparativeScore[];
8 | azureTenantId: string;
9 | controlScores: ControlScore[];
10 | createdDateTime?: Date;
11 | currentScore?: number;
12 | enabledServices: string[];
13 | id: string;
14 | licensedUserCount?: number;
15 | maxScore?: number;
16 | vendorInformation: SecurityVendorInformation;
17 | oDataType: string;
18 | // additionalData: IDictionary;
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/security-vendor.model.ts:
--------------------------------------------------------------------------------
1 | export class SecurityVendorInformation {
2 | public provider: string;
3 | public providerVersion: string;
4 | public subProvider: string;
5 | public vendor: string;
6 | public additionalData: { [key: string]: any };
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/subscription.model.ts:
--------------------------------------------------------------------------------
1 | export class Subscription {
2 | id: string;
3 | changeType: string;
4 | clientState: string;
5 | expirationDateTime: string | null;
6 | notificationUrl: string;
7 | resource: string;
8 | error: string;
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/trigger.model.ts:
--------------------------------------------------------------------------------
1 | export class Trigger {
2 | public name: string;
3 | public type: string;
4 | public value: string;
5 | public additionalData: { [key: string]: any };
6 | }
7 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/user.model.ts:
--------------------------------------------------------------------------------
1 | import { Device, RiskyUser } from '.';
2 |
3 | export class User {
4 | public displayName: string;
5 | public email: string;
6 | public upn: string;
7 | public jobTitle: string;
8 | public manager: User;
9 | public officeLocation: string;
10 | public contactVia: string;
11 | public picture: string;
12 | public emailRole: string;
13 | public riskScore: string;
14 | public logonId: string;
15 | public riskyUser: RiskyUser;
16 | public domainName: string;
17 | public registeredDevices: Device[];
18 | public ownedDevices: Device[];
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/vulnerability-state.model.ts:
--------------------------------------------------------------------------------
1 | export class VulnerabilityState {
2 | public cve: string;
3 | public severity: string;
4 | public wasRunning: boolean | null;
5 | public additionalData: { [key: string]: any };
6 | }
7 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/request/action-create.model.ts:
--------------------------------------------------------------------------------
1 | import { ActionTarget, ActionReason } from '../graph/action.model';
2 |
3 | export class ActionCreateModel {
4 | public name: string;
5 | public target: ActionTarget;
6 | public reason: ActionReason;
7 | public vendor: string;
8 | public user: string;
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/request/alert-update.model.ts:
--------------------------------------------------------------------------------
1 | export class AlertUpdateModel {
2 | id: string;
3 | userUpn: string;
4 | status: string;
5 | feedback: string;
6 | assignedTo: string;
7 | comments: string[];
8 | }
9 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/request/index.ts:
--------------------------------------------------------------------------------
1 | export { AlertUpdateModel } from './alert-update.model';
2 | export { ActionCreateModel } from './action-create.model';
3 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/action-filter-data.model.ts:
--------------------------------------------------------------------------------
1 | export class ActionFilterData {
2 | [key: string]: any;
3 | }
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/action-values.model.ts:
--------------------------------------------------------------------------------
1 | export class ActionValues {
2 | constructor(
3 | public actionProviders: string[] = [],
4 | public actionStatuses: string[] = [],
5 | public actionNames: string[] = [],
6 | public actionTargets: string[] = []
7 | ) { }
8 | }
9 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/alert-filter-data.model.ts:
--------------------------------------------------------------------------------
1 | export class AlertFilterData {
2 | [key: string]: any;
3 | }
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/alert-search-result.model.ts:
--------------------------------------------------------------------------------
1 | import { Alert, AlertDetails } from '../graph';
2 | import { Queries } from '.';
3 |
4 | export interface AlertSearchResult {
5 | alerts: Alert[];
6 | queries: Queries;
7 | }
8 |
9 | export interface AlertDetailsResult {
10 | alertDetails: AlertDetails;
11 | queries: Queries;
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/alert-values.model.ts:
--------------------------------------------------------------------------------
1 | export class AlertValues {
2 | constructor(
3 | public alertStatuses: string[] = [],
4 | public alertSeverities: string[] = [],
5 | public alertFeedbacks: string[] = [],
6 | public alertProviders: string[] = [],
7 | public alertCategories: string[] = []
8 | ) { }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/index.ts:
--------------------------------------------------------------------------------
1 | export { AlertSearchResult, AlertDetailsResult } from './alert-search-result.model';
2 | export { ActionFilterData } from './action-filter-data.model';
3 | export { AlertFilterData } from './alert-filter-data.model';
4 | export { AlertValues } from './alert-values.model';
5 | export { ActionValues } from './action-values.model';
6 | export { SubscriptionFilterData } from './subscription-filter-data.model';
7 | export { SecureScoreResult } from './secure-score-result.model';
8 | export { SecureScoreDetailsResponse } from './secure-score-details-response.model';
9 | export { Queries } from './queries.model';
10 | export { SubscriptionSearchResult } from './subscruption-search-result.model';
11 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/queries.model.ts:
--------------------------------------------------------------------------------
1 | export class Queries {
2 | sDKQuery: string;
3 | rESTQuery: string;
4 | }
5 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/secure-score-details-response.model.ts:
--------------------------------------------------------------------------------
1 | import { SecureScoreDetails } from '../graph';
2 | import { Queries } from '.';
3 |
4 | export class SecureScoreDetailsResponse {
5 | secureScoreDetails: SecureScoreDetails;
6 | queries: Queries;
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/secure-score-result.model.ts:
--------------------------------------------------------------------------------
1 | import { SecureScore } from '../graph/secure-score.model';
2 |
3 | export class SecureScoreResult {
4 | oDataContext: string;
5 | oDataNextLink: string;
6 | value: SecureScore[];
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/subscription-filter-data.model.ts:
--------------------------------------------------------------------------------
1 | export class SubscriptionFilterData {
2 | [key: string]: any;
3 | }
4 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/subscruption-search-result.model.ts:
--------------------------------------------------------------------------------
1 | import { Subscription } from '../graph';
2 | import { Queries } from '.';
3 |
4 | export interface SubscriptionSearchResult {
5 | subscriptions: Subscription[];
6 | queries: Queries;
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/routing/app-routing.module.spec.ts:
--------------------------------------------------------------------------------
1 | import { AppRoutingModule } from './app-routing.module';
2 |
3 | describe('AppRoutingModule', () => {
4 | let appRoutingModule: AppRoutingModule;
5 |
6 | beforeEach(() => {
7 | appRoutingModule = new AppRoutingModule();
8 | });
9 |
10 | it('should create an instance', () => {
11 | expect(appRoutingModule).toBeTruthy();
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/alert.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { Observable } from 'rxjs';
3 |
4 | // models
5 | import { AlertSearchResult, AlertDetailsResult } from '../models/response';
6 | import { AlertFilterData } from '../models/response';
7 | // services
8 | import { HttpService } from './http.service';
9 | import { AlertUpdateModel } from '../models/request';
10 |
11 | @Injectable({ providedIn: 'root' })
12 | export class AlertService {
13 | constructor(
14 | private http: HttpService) { }
15 |
16 | getAlertsByFilter(filter: AlertFilterData): Observable {
17 | return this.http.post('alerts', filter);
18 | }
19 |
20 | getAlertDetails(id: string): Observable {
21 | return this.http.get(`alerts/${id}`);
22 | }
23 |
24 | updateAlert(alert: AlertUpdateModel): Observable {
25 | return this.http.patch(`alerts/${alert.id}`, alert);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/dashboard.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 |
3 | import { Observable, of } from 'rxjs';
4 | import { catchError, map } from 'rxjs/operators';
5 | import { environment } from 'src/environments/environment';
6 |
7 |
8 | // models
9 | import { AlertStatistics } from '../models/graph/alert-statistic.model';
10 | // services
11 | import { HttpService } from './http.service';
12 |
13 | @Injectable({ providedIn: 'root' })
14 | export class DashboardService {
15 | constructor(
16 | private http: HttpService) { }
17 |
18 | getAlertStatistics(): Observable {
19 | return this.http.get(`alerts/Statistics/200`);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/index.ts:
--------------------------------------------------------------------------------
1 | // user
2 | export { UserService } from './user.service';
3 | // alerts
4 | export { AlertValuesService } from './alert-values.service';
5 | export { AlertFilterService } from './alert-filter.service';
6 | export { AlertService } from './alert.service';
7 | // actions
8 | export { ActionFilterService } from './action-filter.service';
9 | export { ActionValuesService } from './action-values.service';
10 | export { ActionService } from './action.service';
11 | // secure score
12 | export { SecureScoreService } from './secure-score.service';
13 | export { SubscriptionFilterService } from './subscription-filter.service';
14 | export { SubscriptionService } from './subscription.service';
15 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/loader.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, EventEmitter } from '@angular/core';
2 | // models
3 | import { LoaderState } from '../models/app';
4 |
5 | @Injectable({ providedIn: 'root' })
6 | export class LoaderService {
7 | public Event: EventEmitter;
8 |
9 | constructor() {
10 | this.Event = new EventEmitter();
11 | }
12 |
13 | public Show(message: string): void {
14 | this.Event.emit(new LoaderState(true, message));
15 | }
16 |
17 | public Hide(): void {
18 | this.Event.emit({ IsVisible: false, Message: '' });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/secure-score.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { Observable } from 'rxjs';
3 |
4 | // models
5 | import { SecureScoreDetailsResponse } from '../models/response';
6 |
7 | // services
8 | import { HttpService } from './http.service';
9 |
10 |
11 | @Injectable({ providedIn: 'root' })
12 | export class SecureScoreService {
13 | constructor(
14 | private http: HttpService) { }
15 |
16 | getSecureScoreDetails(): Observable {
17 | return this.http.get('securescores/GetSecureDetails');
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/.gitkeep
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeui.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeui.ttf
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuib.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuib.ttf
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuii.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuii.ttf
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuiz.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuiz.ttf
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/environments/environment.interface.ts:
--------------------------------------------------------------------------------
1 | export interface IEnvironment {
2 | production: boolean;
3 | baseUrl: string;
4 | MSAL: {
5 | clientID: string;
6 | redirectUri: string;
7 | cacheLocation: 'localStorage' | 'sessionStorage';
8 | piiLoggingEnabled: boolean;
9 | authority: string,
10 | validateAuthority: boolean,
11 | protectedResourceMap: [[string, string[]]]
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | import { IEnvironment } from './environment.interface';
2 |
3 | export const environment: IEnvironment = {
4 | production: true,
5 | baseUrl: '/api',
6 | MSAL: {
7 | clientID: 'Enter_Your_Appid',
8 | redirectUri: 'Enter_Your_URL',
9 | cacheLocation: 'localStorage',
10 | piiLoggingEnabled: true,
11 | authority: 'https://login.microsoftonline.com/common',
12 | validateAuthority: true,
13 | protectedResourceMap: [['/api', ['Enter_Your_Appid']]]
14 | }
15 | };
16 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Graph Security API
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
22 |
25 |
28 |
31 |
32 |
Loading...
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | // export function getBaseUrl() {
8 | // return document.getElementsByTagName('base')[0].href;
9 | // }
10 |
11 | // const providers = [
12 | // { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
13 | // ];
14 |
15 | if (environment.production) {
16 | enableProdMode();
17 | }
18 |
19 | platformBrowserDynamic(/*providers*/).bootstrapModule(AppModule)
20 | .catch(err => console.log(err));
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tsconfig.server.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs"
5 | },
6 | "angularCompilerOptions": {
7 | "entryModule": "app/app.server.module#AppServerModule"
8 | }
9 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Extensions/DeviceExtensions.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.Graph;
8 | using System.Collections.Generic;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Extensions
11 | {
12 | public static class DeviceExtensions
13 | {
14 | public static IEnumerable ToDevices(this IUserRegisteredDevicesCollectionWithReferencesPage page)
15 | {
16 | List devices = new List();
17 |
18 | return devices;
19 | }
20 |
21 | public static IEnumerable ToDevices(this IUserOwnedDevicesCollectionWithReferencesPage page)
22 | {
23 | List devices = new List();
24 |
25 | return devices;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Extensions/GlobalExtensions.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System;
8 |
9 | using System.Collections.Generic;
10 |
11 | namespace MicrosoftGraph_Security_API_Sample.Extensions
12 | {
13 | public static class GlobalExtensions
14 | {
15 | public static void AddRange(this ICollection target, IEnumerable source)
16 | {
17 | if (target == null)
18 | throw new ArgumentNullException(nameof(target));
19 | if (source == null)
20 | throw new ArgumentNullException(nameof(source));
21 | foreach (var element in source)
22 | target.Add(element);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Helpers/IAuthProvider.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.Configurations;
8 | using System.Threading.Tasks;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Helpers
11 | {
12 | public interface IAuthProvider
13 | {
14 | Task GetUserAccessTokenAsync(AzureConfiguration azureConfiguration, string jwtToken);
15 | }
16 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Helpers/JsonStringResult.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.AspNetCore.Mvc;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Helpers
10 | {
11 | public class JsonStringResult : ContentResult
12 | {
13 | public JsonStringResult(string json)
14 | {
15 | Content = json;
16 | ContentType = "application/json";
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/DomainModels/AlertTestSecurityDev.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Newtonsoft.Json;
8 | using System.Collections.Generic;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels
11 | {
12 | public class AlertTestSecurityDev : Microsoft.Graph.Alert
13 | {
14 | [JsonProperty(PropertyName = "historyStates")]
15 | public IEnumerable HistoryStates { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/DomainModels/SecurityActionBase.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels
8 | {
9 | public class SecurityActionBase
10 | {
11 | public string Name { get; set; }
12 |
13 | public Target Target { get; set; }
14 |
15 | public Reason Reason { get; set; }
16 | }
17 |
18 | public class Reason
19 | {
20 | public string Comment { get; set; }
21 | public string AlertId { get; set; }
22 | }
23 |
24 | public class Target
25 | {
26 | public string Name { get; set; }
27 | public string Value { get; set; }
28 | }
29 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/DomainModels/SecurityActionState.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.Graph;
8 | using Newtonsoft.Json;
9 | using System;
10 |
11 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels
12 | {
13 | public class SecurityActionState
14 | {
15 | [JsonProperty(PropertyName = "user")]
16 | public string User { get; set; }
17 |
18 | [JsonProperty(PropertyName = "appId")]
19 | public string AppId { get; set; }
20 |
21 | [JsonProperty(PropertyName = "status")]
22 | public OperationStatus Status { get; set; }
23 |
24 | [JsonProperty(PropertyName = "updatedDateTime")]
25 | public DateTimeOffset UpdatedDateTime { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/NotificationCollection.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System.Collections.Generic;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models
10 | {
11 | public class NotificationCollection
12 | {
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | public NotificationCollection()
17 | {
18 | this.Value = new List();
19 | }
20 |
21 | ///
22 | /// Gets or sets the top level element that contains the array
23 | ///
24 | public List Value { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/NotificationHub.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.AspNetCore.SignalR;
8 | using System.Threading.Tasks;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Models
11 | {
12 | public class NotificationHub : Hub
13 | {
14 | public async Task SendMessage(string message)
15 | {
16 | await Clients.All.SendAsync("ReceiveMessage", message);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Requests/SecurityActionRequest.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.DomainModels;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models.Requests
10 | {
11 | public class SecurityActionRequest : SecurityActionBase
12 | {
13 | public string User { get; set; }
14 |
15 | public string Vendor { get; set; }
16 |
17 | public string Provider { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/ActionResponse.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.DomainModels;
8 | using System;
9 | using System.Collections.Generic;
10 |
11 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses
12 | {
13 | public class ActionResponse
14 | {
15 | public string Id { get; set; }
16 | public string Name { get; set; }
17 | public DateTimeOffset? CreatedDateTime { get; set; }
18 | public DateTimeOffset? LastActionDateTime { get; set; }
19 | public string Provider { get; set; }
20 | public IEnumerable Parameters { get; set; }
21 | public IEnumerable States { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertDetailsResponse.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses
10 | {
11 | public class AlertDetailsResponse
12 | {
13 | public AlertDetailsResponse()
14 | {
15 | }
16 |
17 | public AlertDetailsResponse(AlertDetailsViewModel alertDetails, ResultQueriesViewModel queries)
18 | {
19 | AlertDetails = alertDetails;
20 | Queries = queries;
21 | }
22 |
23 | public AlertDetailsViewModel AlertDetails { get; set; }
24 |
25 | public ResultQueriesViewModel Queries { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertFilterResponse.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System.Collections.Generic;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses
10 | {
11 | public class AlertFilterResponse
12 | {
13 | public string Name { get; set; }
14 |
15 | public IEnumerable Values { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertUpdatedResponse.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses
10 | {
11 | public class AlertUpdatedResponse
12 | {
13 | public AlertUpdatedResponse()
14 | {
15 | }
16 |
17 | public AlertUpdatedResponse(AlertDetailsViewModel alert, ResultQueriesViewModel queries)
18 | {
19 | Alert = alert;
20 | Queries = queries;
21 | }
22 |
23 | public AlertDetailsViewModel Alert { get; set; }
24 |
25 | public ResultQueriesViewModel Queries { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertsResponse.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels;
8 | using System.Collections.Generic;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses
11 | {
12 | public class AlertsResponse
13 | {
14 | public AlertsResponse(IEnumerable alerts, ResultQueriesViewModel queries)
15 | {
16 | Alerts = alerts;
17 | Queries = queries;
18 | }
19 |
20 | public IEnumerable Alerts { get; set; }
21 |
22 | public ResultQueriesViewModel Queries { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/SecureScoreDetailsResponse.cs:
--------------------------------------------------------------------------------
1 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels;
2 |
3 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses
4 | {
5 | public class SecureScoreDetailsResponse
6 | {
7 | public SecureScoreDetailsResponse(SecureScoreDetailsViewModel secureScoreDetails, ResultQueriesViewModel queries)
8 | {
9 | SecureScoreDetails = secureScoreDetails;
10 | Queries = queries;
11 | }
12 |
13 | public SecureScoreDetailsViewModel SecureScoreDetails { get; set; }
14 |
15 | public ResultQueriesViewModel Queries { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/SecurityActionResponse.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.Graph;
8 | using System;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels
11 | {
12 | public class SecurityActionResponse : SecurityActionBase
13 | {
14 | public string Id { get; set; }
15 |
16 | public DateTimeOffset? SubmittedDateTime { get; set; }
17 |
18 | public DateTimeOffset? StatusUpdateDateTime { get; set; }
19 |
20 | public Microsoft.Graph.SecurityVendorInformation SecurityVendorInformation { get; set; }
21 |
22 | public OperationStatus Status { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/SubscriptionResultModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models
10 | {
11 | public class SubscriptionResultModel
12 | {
13 | public string Id { get; set; }
14 |
15 | public string Resource { get; set; }
16 |
17 | public string ChangeType { get; set; }
18 |
19 | public string ClientState { get; set; }
20 |
21 | public string NotificationUrl { get; set; }
22 |
23 | public DateTimeOffset? ExpirationDateTime { get; set; }
24 |
25 | public string Error { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/UpdateAlertResultItemModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | namespace MicrosoftGraph_Security_API_Sample.Models
8 | {
9 | public class UpdateAlertResultItemModel
10 | {
11 | public string Title { get; set; }
12 |
13 | public string Category { get; set; }
14 |
15 | public string Severity { get; set; }
16 |
17 | public string Status { get; set; }
18 |
19 | public string Feedback { get; set; }
20 |
21 | public string Provider { get; set; }
22 |
23 | public string AssignedTo { get; set; }
24 |
25 | public string Comments { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/UpdateAlertResultModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | namespace MicrosoftGraph_Security_API_Sample.Models
8 | {
9 | public class UpdateAlertResultModel
10 | {
11 | public string Error { get; set; }
12 |
13 | public string Id { get; set; }
14 |
15 | public UpdateAlertResultItemModel Before { get; set; }
16 |
17 | public UpdateAlertResultItemModel After { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/UserPictureModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | namespace MicrosoftGraph_Security_API_Sample.Models
8 | {
9 | public class UserPictureModel
10 | {
11 | public int? Height { get; set; }
12 |
13 | public int? Width { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/AlertResultItemModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.Graph;
8 | using System;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Models
11 | {
12 | public class AlertResultItemModel
13 | {
14 | public string Id { get; set; }
15 |
16 | public string Title { get; set; }
17 |
18 | public string Severity { get; set; }
19 |
20 | public string Category { get; set; }
21 |
22 | public AlertStatus? Status { get; set; }
23 |
24 | public DateTimeOffset? CreatedDateTime { get; set; }
25 |
26 | public string Provider { get; set; }
27 |
28 | public string AssignedTo { get; set; }
29 | }
30 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/ManageAlertViewModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | namespace MicrosoftGraph_Security_API_Sample.Models.ViewModels
8 | {
9 | public class ManageAlertViewModel
10 | {
11 | public AlertDetailsViewModel CurrentAlert { get; set; }
12 |
13 | public UpdateAlertResultModel UpdateAlertResult { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/ResultQueriesViewModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System.Web;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Models.ViewModels
10 | {
11 | public class ResultQueriesViewModel
12 | {
13 | public ResultQueriesViewModel(string sdkQuery, string restQuery)
14 | {
15 | SDKQuery = HttpUtility.HtmlEncode(sdkQuery);
16 | RESTQuery = HttpUtility.HtmlEncode(restQuery);
17 | }
18 |
19 | public string SDKQuery { get; set; }
20 |
21 | public string RESTQuery { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/SecureScoreDetailsViewModel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models.DomainModels;
8 | using System.Collections.Generic;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Models.ViewModels
11 | {
12 | public class SecureScoreDetailsViewModel
13 | {
14 | public SecureScoreModel TopSecureScore { get; set; }
15 |
16 | public IEnumerable SecureScoreControlProfiles { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Program.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.AspNetCore;
8 | using Microsoft.AspNetCore.Hosting;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample
11 | {
12 | public class Program
13 | {
14 | public static void Main(string[] args)
15 | {
16 | CreateWebHostBuilder(args)
17 | .Build()
18 | .Run();
19 | }
20 |
21 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
22 | WebHost.CreateDefaultBuilder(args)
23 | .UseStartup();
24 | }
25 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Providers/IGraphServiceProvider.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Services.Interfaces;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Providers
10 | {
11 | public interface IGraphServiceProvider
12 | {
13 | IGraphService GetService(string token);
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Providers/ITokenProvider.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using Microsoft.Extensions.Caching.Memory;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Providers
10 | {
11 | public interface ITokenProvider
12 | {
13 | string GetGraphTokenByIdToken(string idToken, IMemoryCache cache);
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/ActionService.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Extensions;
8 | using MicrosoftGraph_Security_API_Sample.Services.Interfaces;
9 | using System;
10 | using System.Collections.Generic;
11 | using System.Linq;
12 |
13 | namespace MicrosoftGraph_Security_API_Sample.Services
14 | {
15 | public class ActionService : IActionService
16 | {
17 | public Dictionary> GetStatuses()
18 | {
19 | // Enum to List
20 | List statuses = Enum.GetNames(typeof(Microsoft.Graph.ActionState)).ToList();
21 |
22 | return statuses.ToFilter("ActionStatuses", new List() { "None", "NotSupported" });
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/Interfaces/IActionService.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System.Collections.Generic;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Services.Interfaces
10 | {
11 | public interface IActionService
12 | {
13 | Dictionary> GetStatuses();
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/Interfaces/IAlertService.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using System.Collections.Generic;
8 |
9 | namespace MicrosoftGraph_Security_API_Sample.Services.Interfaces
10 | {
11 | public interface IAlertService
12 | {
13 | Dictionary> GetStatuses();
14 |
15 | Dictionary> GetSeverities();
16 |
17 | Dictionary> GetFeedbacks();
18 | }
19 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/Interfaces/INotificationService.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | //
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
4 | //
5 | // -----------------------------------------------------------------------
6 |
7 | using MicrosoftGraph_Security_API_Sample.Models;
8 | using System.Collections.Generic;
9 |
10 | namespace MicrosoftGraph_Security_API_Sample.Services.Interfaces
11 | {
12 | public interface INotificationService
13 | {
14 | void SendNotificationToClient(List messages);
15 | }
16 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "AzureAd": {
3 | "ClientId": "Enter_Your_Appid",
4 | "ClientSecret": "Enter_Your_AppSecret",
5 | "RedirectUri": "http://localhost:5000",
6 | "NotificationUri": "Enter_Your_URL/notifications/listen",
7 | "BaseUrl": "https://graph.microsoft.com/",
8 | "UrlVersion": "beta",
9 | "Scope": "https://graph.microsoft.com/.default",
10 | "Instance": "https://login.microsoftonline.com/",
11 | "Audience": "https://graph.microsoft.com"
12 | },
13 | "UseMockFilters": false,
14 | "CacheTime": {
15 | "GetActions": 5,
16 | "ActionsFilters": 60,
17 | "GetAlerts": 5,
18 | "GetAlertById": 5,
19 | "AlertsFilters": 60,
20 | "Dashboard": 60,
21 | "GetSecureScores": 60,
22 | "GetSecureDetails": 60,
23 | "GetSubscriptions": 5
24 | },
25 | "Logging": {
26 | "LogLevel": {
27 | "Default": "Debug",
28 | "System": "Information",
29 | "Microsoft": "Information"
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/appsettings.Production.json:
--------------------------------------------------------------------------------
1 | {
2 | "AzureAd": {
3 | "ClientId": "Enter_Your_Appid",
4 | "ClientSecret": "Enter_Your_AppSecret",
5 | "RedirectUri": "Enter_Your_URL",
6 | "NotificationUri": "Enter_Your_URL/notifications/listen",
7 | "BaseUrl": "https://graph.microsoft.com/",
8 | "UrlVersion": "beta",
9 | "Scope": "https://graph.microsoft.com/.default",
10 | "Instance": "https://login.microsoftonline.com/",
11 | "Audience": "https://graph.microsoft.com"
12 | },
13 | "UseMockFilters": false,
14 | "CacheTime": {
15 | "GetActions": 5,
16 | "ActionsFilters": 60,
17 | "GetAlerts": 5,
18 | "GetAlertById": 5,
19 | "AlertsFilters": 60,
20 | "Dashboard": 60,
21 | "GetSecureScores": 60,
22 | "GetSecureDetails": 60,
23 | "GetSubscriptions": 5
24 | },
25 | "publishOptions": {
26 | "include": [
27 | "Views",
28 | "appsettings*.json"
29 | ]
30 | }
31 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/1.dashboardcollapsed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/1.dashboardcollapsed.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/2.dashboardexpanded.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/2.dashboardexpanded.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/3.alertslist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/3.alertslist.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/4.alertdetails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/4.alertdetails.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/5.managealert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/5.managealert.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/6.invokeaction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/6.invokeaction.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/7.actionslist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/7.actionslist.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/8.subscriptionslist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/8.subscriptionslist.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/9.securescore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/9.securescore.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/ActiveSubscriptions.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ActiveSubscriptions.PNG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/AdminConsent.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/AdminConsent.PNG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/GrantError.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/GrantError.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/NotificationPage.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/NotificationPage.JPG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/Scope.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/Scope.PNG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/SecurityRole.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/SecurityRole.png
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/UI1.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/UI1.JPG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/VSSettings.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/VSSettings.JPG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/ngrok.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ngrok.JPG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/ngrok1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ngrok1.PNG
--------------------------------------------------------------------------------
/Samples/aspnet-angular/readme-images/ngrok2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ngrok2.PNG
--------------------------------------------------------------------------------