Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a89e7bc96 | ||
|
|
d8ad061ad7 | ||
|
|
c1da21b300 | ||
|
|
ef2dba3b92 | ||
|
|
cf0af07104 | ||
|
|
874d5dfed2 | ||
|
|
91af36866e | ||
|
|
534bc307a7 | ||
|
|
53424f0a7c | ||
|
|
49b5300887 | ||
|
|
c5d730ae22 | ||
|
|
40438fcc1b | ||
|
|
71be18b21f | ||
|
|
1263805d61 | ||
|
|
0e6e4899e5 | ||
|
|
29e50253af | ||
|
|
68b793ea60 | ||
|
|
5f0594c93c | ||
|
|
e7ee226b66 | ||
|
|
ff2f5a1c34 | ||
|
|
fc36794b22 | ||
|
|
75ccca8caf | ||
|
|
c4dfb0283c | ||
|
|
57acdb0300 | ||
|
|
aee28f604f | ||
|
|
8375e53fdf | ||
|
|
db7a9c727d | ||
|
|
6e91af551e | ||
|
|
de5479cc07 | ||
|
|
807058e40d | ||
|
|
c6022b0e22 | ||
|
|
9aed6e0d43 | ||
|
|
64b664e625 | ||
|
|
49f1a2fbf2 | ||
|
|
6bfe890cd9 | ||
|
|
3e70f85644 | ||
|
|
482805b5cf | ||
|
|
ffda17e6b1 | ||
|
|
7396843bc6 | ||
|
|
4f75ecb3e0 | ||
|
|
7c1a487114 | ||
|
|
47e9fb92e3 | ||
|
|
7f735dcada | ||
|
|
bd315f42a3 | ||
|
|
e8c1f46430 | ||
|
|
fa96ca81bd | ||
|
|
c384f44c0c | ||
|
|
50df914ca9 | ||
|
|
e0bd888c45 | ||
|
|
02b82fcaf8 | ||
|
|
557afc348f | ||
|
|
1dec787062 | ||
|
|
8853cf75cf | ||
|
|
ad57f11f8a | ||
|
|
9b775a8c63 | ||
|
|
cf4fc1be93 | ||
|
|
4c135c4901 | ||
|
|
0b738ca7ca | ||
|
|
1b17bb706d | ||
|
|
f740076d60 | ||
|
|
bedcc0822d | ||
|
|
87810acc9e | ||
|
|
96b90e5dbd | ||
|
|
ced99e0940 | ||
|
|
4f82ae8698 | ||
|
|
e6779e8f34 | ||
|
|
82425d5377 | ||
|
|
2995328ec1 | ||
|
|
afc2c1f8a1 | ||
|
|
418b02acd7 | ||
|
|
cdd752469c | ||
|
|
cdcf1e07c7 | ||
|
|
c6ad8b5c2f | ||
|
|
98e0908920 | ||
|
|
8266bfdc01 | ||
|
|
f2b6a4d145 | ||
|
|
02f37a1bc5 | ||
|
|
f24138cfbd | ||
|
|
aade12d6ff | ||
|
|
6c01e71d04 | ||
|
|
f60657ca64 |
@@ -97,6 +97,7 @@ export class LoginPageComponent implements OnInit {
|
|||||||
.subscribe(
|
.subscribe(
|
||||||
resp => {
|
resp => {
|
||||||
console.log('API Response received:', resp);
|
console.log('API Response received:', resp);
|
||||||
|
// Always reset loading state when response is received
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
||||||
// Handle different response formats
|
// Handle different response formats
|
||||||
@@ -106,7 +107,7 @@ export class LoginPageComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Handle different response formats
|
// Handle different response formats
|
||||||
if (resp.success === 'false') {
|
if (resp.success === 'false' || resp.success === false) {
|
||||||
this.isError = true;
|
this.isError = true;
|
||||||
this.errMsg = resp.message || 'Login failed';
|
this.errMsg = resp.message || 'Login failed';
|
||||||
return;
|
return;
|
||||||
@@ -123,6 +124,7 @@ export class LoginPageComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
(errResponse: HttpErrorResponse) => {
|
(errResponse: HttpErrorResponse) => {
|
||||||
console.log('API Error received:', errResponse);
|
console.log('API Error received:', errResponse);
|
||||||
|
// Always reset loading state when error occurs
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.isError = true;
|
this.isError = true;
|
||||||
|
|
||||||
|
|||||||
@@ -71,19 +71,13 @@
|
|||||||
Calculated Fields
|
Calculated Fields
|
||||||
</ng-container></clr-dg-column>
|
</ng-container></clr-dg-column>
|
||||||
|
|
||||||
<!-- Webhook Status Column -->
|
|
||||||
<clr-dg-column>
|
|
||||||
<ng-container *clrDgHideableColumn="{hidden: false}">
|
|
||||||
Webhook Status
|
|
||||||
</ng-container>
|
|
||||||
</clr-dg-column>
|
|
||||||
|
|
||||||
<!-- who column -->
|
<!-- who column -->
|
||||||
<clr-dg-column>
|
<clr-dg-column>
|
||||||
<ng-container *clrDgHideableColumn="{hidden: false}">
|
<ng-container *clrDgHideableColumn="{hidden: false}">
|
||||||
<clr-icon shape="bars"></clr-icon> Action
|
<clr-icon shape="bars"></clr-icon> Action
|
||||||
</ng-container>
|
</ng-container></clr-dg-column>
|
||||||
</clr-dg-column>
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
||||||
@@ -144,11 +138,7 @@
|
|||||||
style="cursor: pointer; align-items: center;"><clr-icon shape="details"
|
style="cursor: pointer; align-items: center;"><clr-icon shape="details"
|
||||||
*ngIf="user.calculated_field_json"></clr-icon></clr-dg-cell>
|
*ngIf="user.calculated_field_json"></clr-icon></clr-dg-cell>
|
||||||
|
|
||||||
<!-- Webhook Status Cell -->
|
|
||||||
<clr-dg-cell>
|
|
||||||
<span *ngIf="user.webhook_url && user.webhook_url.trim() !== ''" class="webhook-enabled">Enabled</span>
|
|
||||||
<span *ngIf="!user.webhook_url || user.webhook_url.trim() === ''" class="webhook-disabled">Disabled</span>
|
|
||||||
</clr-dg-cell>
|
|
||||||
|
|
||||||
<!-- who column -->
|
<!-- who column -->
|
||||||
<clr-dg-cell>
|
<clr-dg-cell>
|
||||||
@@ -202,21 +192,6 @@
|
|||||||
title="Scheduler">
|
title="Scheduler">
|
||||||
<clr-icon shape="clock"></clr-icon>
|
<clr-icon shape="clock"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Webhook toggle button -->
|
|
||||||
<button class="btn btn-icon"
|
|
||||||
(click)="toggleWebhook(user)"
|
|
||||||
title="Toggle Webhook">
|
|
||||||
<clr-icon shape="network-globe"></clr-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Copy Webhook URL button -->
|
|
||||||
<button class="btn btn-icon"
|
|
||||||
(click)="copyWebhookUrl(user.webhook_url)"
|
|
||||||
title="Copy Webhook URL"
|
|
||||||
*ngIf="user.webhook_url && user.webhook_url.trim() !== ''">
|
|
||||||
<clr-icon shape="copy-to-clipboard"></clr-icon>
|
|
||||||
</button>
|
|
||||||
</clr-dg-cell>
|
</clr-dg-cell>
|
||||||
|
|
||||||
<!-- who colmn -->
|
<!-- who colmn -->
|
||||||
@@ -1205,5 +1180,4 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-outline" (click)="closeSchedulerModal()">Close</button>
|
<button type="button" class="btn btn-outline" (click)="closeSchedulerModal()">Close</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</clr-modal>
|
</clr-modal>
|
||||||
@@ -806,72 +806,125 @@
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
/* Scheduler Modal Styles */
|
||||||
/* Webhook Status Styles */
|
.scheduler-container {
|
||||||
.webhook-enabled {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: #4caf50;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.webhook-disabled {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: #f44336;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Webhook Status Styles */
|
|
||||||
.webhook-status {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.webhook-status.enabled {
|
|
||||||
background-color: #4caf50;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.webhook-status.disabled {
|
|
||||||
background-color: #f44336;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Webhook Modal Styles */
|
|
||||||
.webhook-container {
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.webhook-container .data-lake-info h4 {
|
.data-lake-info h4 {
|
||||||
margin: 0 0 20px 0;
|
margin: 0 0 20px 0;
|
||||||
color: #333;
|
color: #333;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.webhook-form {
|
.job-info-section {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #e0e0e0;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.webhook-info {
|
.job-header {
|
||||||
background-color: #e3f2fd;
|
display: flex;
|
||||||
border: 1px solid #bbdefb;
|
justify-content: space-between;
|
||||||
border-radius: 4px;
|
align-items: center;
|
||||||
padding: 15px;
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-header h5 {
|
||||||
|
margin: 0;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-success {
|
||||||
|
background-color: #4caf50;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-warning {
|
||||||
|
background-color: #ff9800;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-danger {
|
||||||
|
background-color: #f44336;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-light {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-details {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-row {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-row label {
|
||||||
|
font-weight: 500;
|
||||||
|
width: 120px;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-row span {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job-actions .btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-job-section {
|
||||||
|
text-align: center;
|
||||||
|
padding: 30px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-job-message p {
|
||||||
|
margin: 10px 0;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-job-message p:first-child {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.create-job-actions {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.webhook-info p {
|
.create-job-actions .btn {
|
||||||
margin: 0;
|
display: inline-flex;
|
||||||
color: #1976d2;
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,10 +128,6 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
schedulerJob: any = null;
|
schedulerJob: any = null;
|
||||||
selectedSchedulerItem: any = null;
|
selectedSchedulerItem: any = null;
|
||||||
|
|
||||||
// New properties for webhook functionality
|
|
||||||
showWebhookModal = false;
|
|
||||||
selectedWebhookItem: any = null;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private extensionService: ExtensionService,
|
private extensionService: ExtensionService,
|
||||||
private userInfoService: UserInfoService,
|
private userInfoService: UserInfoService,
|
||||||
@@ -167,8 +163,7 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
sure_connect_id: [null],
|
sure_connect_id: [null],
|
||||||
ref_datalake_id: [null],
|
ref_datalake_id: [null],
|
||||||
datalake_type: ['normal'], // Default to normal
|
datalake_type: ['normal'], // Default to normal
|
||||||
blending_lakeids: [[]], // Array for multiple selections
|
blending_lakeids: [[]] // Array for multiple selections
|
||||||
webhook_url: [null] // Add webhook_url field
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// form code start
|
// form code start
|
||||||
@@ -1574,7 +1569,6 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Method to open scheduler modal
|
// Method to open scheduler modal
|
||||||
openSchedulerModal(item: any) {
|
openSchedulerModal(item: any) {
|
||||||
this.selectedSchedulerItem = item;
|
this.selectedSchedulerItem = item;
|
||||||
@@ -1730,34 +1724,4 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
return 'badge-light';
|
return 'badge-light';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method to toggle webhook for a data lake item
|
|
||||||
toggleWebhook(item: any) {
|
|
||||||
// Call the enableWebhook service method
|
|
||||||
this.mainService.enableWebhook(item.id).subscribe(
|
|
||||||
(updatedItem: any) => {
|
|
||||||
// Update the local data with the response from the server
|
|
||||||
const index = this.product.findIndex(p => p.id === item.id);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.product[index] = {...updatedItem};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show success message based on the new webhook status
|
|
||||||
if (updatedItem.webhook_url && updatedItem.webhook_url.trim() !== '') {
|
|
||||||
this.toastr.success('Webhook enabled successfully');
|
|
||||||
} else {
|
|
||||||
this.toastr.success('Webhook disabled successfully');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
console.error('Error toggling webhook:', error);
|
|
||||||
this.toastr.error('Failed to toggle webhook');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Method to copy webhook URL to clipboard
|
|
||||||
copyWebhookUrl(webhookUrl: string) {
|
|
||||||
this.copyToClipboard(webhookUrl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,11 +57,5 @@ export class Data_lakeservice{
|
|||||||
};
|
};
|
||||||
return this.apiRequest.put(_http, data);
|
return this.apiRequest.put(_http, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method to enable webhook for a data lake item
|
|
||||||
enableWebhook(id: number): Observable<any> {
|
|
||||||
const _http = `${this.baseURL}/webhook/${id}`;
|
|
||||||
return this.apiRequest.get(_http);
|
|
||||||
}
|
|
||||||
// updateaction
|
// updateaction
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,25 @@
|
|||||||
|
import { Ad10Component } from './BuilderComponents/angulardatatype/Ad10/Ad10.component';
|
||||||
|
|
||||||
|
import { DefatestComponent } from './BuilderComponents/defu/Defatest/Defatest.component';
|
||||||
|
|
||||||
|
|
||||||
|
import { ChildformComponent } from './BuilderComponents/stpkg/Childform/Childform.component';
|
||||||
|
import { DistrictComponent } from './BuilderComponents/testdata/District/District.component';
|
||||||
|
import { StateComponent } from './BuilderComponents/testdata/State/State.component';
|
||||||
|
import { CountryComponent } from './BuilderComponents/testdata/Country/Country.component';
|
||||||
|
import { Ad9Component } from './BuilderComponents/angulardatatype/Ad9/Ad9.component';
|
||||||
|
import { Ad8Component } from './BuilderComponents/angulardatatype/Ad8/Ad8.component';
|
||||||
|
import { Ad7Component } from './BuilderComponents/angulardatatype/Ad7/Ad7.component';
|
||||||
|
import { Ad6Component } from './BuilderComponents/angulardatatype/Ad6/Ad6.component';
|
||||||
|
import { Adv5Component } from './BuilderComponents/angulardatatype/Adv5/Adv5.component';
|
||||||
|
import { Adv4Component } from './BuilderComponents/angulardatatype/Adv4/Adv4.component';
|
||||||
|
import { SupportComponent } from './BuilderComponents/angulardatatype/Support/Support.component';
|
||||||
|
import { Adv3Component } from './BuilderComponents/angulardatatype/Adv3/Adv3.component';
|
||||||
|
import { Dv2Component } from './BuilderComponents/angulardatatype/Dv2/Dv2.component';
|
||||||
|
import { Adv1Component } from './BuilderComponents/angulardatatype/Adv1/Adv1.component';
|
||||||
|
import { Basicp3Component } from './BuilderComponents/angulardatatype/Basicp3/Basicp3.component';
|
||||||
|
import { Basicp2Component } from './BuilderComponents/angulardatatype/Basicp2/Basicp2.component';
|
||||||
|
import { Basicp1Component } from './BuilderComponents/angulardatatype/Basicp1/Basicp1.component';
|
||||||
|
|
||||||
|
|
||||||
import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component';
|
import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component';
|
||||||
@@ -38,7 +60,10 @@ import { AccesstypeComponent } from './admin/accesstype/accesstype.component';
|
|||||||
import { ModulesComponent } from './admin/modules/modules.component';
|
import { ModulesComponent } from './admin/modules/modules.component';
|
||||||
|
|
||||||
import { SessionloggerComponent } from './admin/sessionlogger/sessionlogger.component';
|
import { SessionloggerComponent } from './admin/sessionlogger/sessionlogger.component';
|
||||||
|
import { ReportRunnerComponent } from './builder/report-runner/report-runner.component';
|
||||||
import { ReportrunnerallComponent } from './builder/report-runner/reportrunnerall/reportrunnerall.component';
|
import { ReportrunnerallComponent } from './builder/report-runner/reportrunnerall/reportrunnerall.component';
|
||||||
|
import { Reportrunneredit2Component } from './builder/report-runner/reportrunneredit2/reportrunneredit2.component';
|
||||||
|
import { ReportrunnereditComponent } from './builder/report-runner/reportrunneredit/reportrunneredit.component';
|
||||||
import { ReportBuildComponent } from './builder/report-build/report-build.component';
|
import { ReportBuildComponent } from './builder/report-build/report-build.component';
|
||||||
import { ReportbuildallComponent } from './builder/report-build/reportbuildall/reportbuildall.component';
|
import { ReportbuildallComponent } from './builder/report-build/reportbuildall/reportbuildall.component';
|
||||||
import { ReportbuildaddComponent } from './builder/report-build/reportbuildadd/reportbuildadd.component';
|
import { ReportbuildaddComponent } from './builder/report-build/reportbuildadd/reportbuildadd.component';
|
||||||
@@ -84,6 +109,13 @@ import { AllapiregisteryComponent } from './fnd/apiregistery/allapiregistery/all
|
|||||||
import { AddapiregisteryComponent } from './fnd/apiregistery/addapiregistery/addapiregistery.component';
|
import { AddapiregisteryComponent } from './fnd/apiregistery/addapiregistery/addapiregistery.component';
|
||||||
import { EditapiregisteryComponent } from './fnd/apiregistery/editapiregistery/editapiregistery.component';
|
import { EditapiregisteryComponent } from './fnd/apiregistery/editapiregistery/editapiregistery.component';
|
||||||
import { ApiregisterylineComponent } from './fnd/apiregistery/Apiregisteryline/Apiregisteryline.component';
|
import { ApiregisterylineComponent } from './fnd/apiregistery/Apiregisteryline/Apiregisteryline.component';
|
||||||
|
import { Customer_informationComponent } from './BuilderComponents/angulardatatype/Customer_information/Customer_information.component';
|
||||||
|
import { Deployment_typeComponent } from './BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component';
|
||||||
|
import { ManufacturerComponent } from './BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component';
|
||||||
|
import { Order_summaryComponent } from './BuilderComponents/angulardatatype/Order_summary/Order_summary.component';
|
||||||
|
import { ProductComponent } from './BuilderComponents/angulardatatype/Product/Product.component';
|
||||||
|
import { TypesComponent } from './BuilderComponents/angulardatatype/Types/Types.component';
|
||||||
|
import { Test2Component } from './BuilderComponents/testdata/Test2/Test2.component';
|
||||||
import { Token_registeryComponent } from './fnd/Token_registery/Token_registery.component';
|
import { Token_registeryComponent } from './fnd/Token_registery/Token_registery.component';
|
||||||
import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component';
|
import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component';
|
||||||
import { ThemeCustomizationComponent } from './theme-customization/theme-customization.component';
|
import { ThemeCustomizationComponent } from './theme-customization/theme-customization.component';
|
||||||
@@ -95,14 +127,10 @@ import { QueryComponent } from './superadmin/query/query.component';
|
|||||||
import { QueryaddComponent } from './superadmin/queryadd/queryadd.component';
|
import { QueryaddComponent } from './superadmin/queryadd/queryadd.component';
|
||||||
import { QueryeditComponent } from './superadmin/queryedit/queryedit.component';
|
import { QueryeditComponent } from './superadmin/queryedit/queryedit.component';
|
||||||
import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manager/chart-type-page.component';
|
import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manager/chart-type-page.component';
|
||||||
import { AddChartTypeComponent } from './builder/dashboardnew/chart-type-manager/add-chart-type.component';
|
|
||||||
import { EditChartTypeComponent } from './builder/dashboardnew/chart-type-manager/edit-chart-type.component';
|
|
||||||
import { ChartTypeUiComponentsComponent } from './builder/dashboardnew/chart-type-manager/chart-type-ui-components.component';
|
|
||||||
import { ChartTypeTemplatesComponent } from './builder/dashboardnew/chart-type-manager/chart-type-templates.component';
|
|
||||||
import { ChartTypeFieldsComponent } from './builder/dashboardnew/chart-type-manager/chart-type-fields.component';
|
|
||||||
import { ReportRunnerComponent } from './builder/report-runner/report-runner.component';
|
|
||||||
import { ReportrunnereditComponent } from './builder/report-runner/reportrunneredit/reportrunneredit.component';
|
|
||||||
import { Reportrunneredit2Component } from './builder/report-runner/reportrunneredit2/reportrunneredit2.component';
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
//Important: The sequence of path is important as the router go over then in sequential manner
|
//Important: The sequence of path is important as the router go over then in sequential manner
|
||||||
{ path: '', redirectTo: '/cns-portal/dashboard', pathMatch: 'full' },
|
{ path: '', redirectTo: '/cns-portal/dashboard', pathMatch: 'full' },
|
||||||
@@ -196,11 +224,6 @@ const routes: Routes = [
|
|||||||
{ path: 'editdashn/:id', component: EditnewdashComponent },
|
{ path: 'editdashn/:id', component: EditnewdashComponent },
|
||||||
{ path: 'schedule/:id', component: ScheduleComponent },
|
{ path: 'schedule/:id', component: ScheduleComponent },
|
||||||
{ path: 'chart-types', component: ChartTypePageComponent },
|
{ path: 'chart-types', component: ChartTypePageComponent },
|
||||||
{ path: 'chart-types/add', component: AddChartTypeComponent },
|
|
||||||
{ path: 'chart-types/edit/:id', component: EditChartTypeComponent },
|
|
||||||
{ path: 'chart-types/:id/ui-components', component: ChartTypeUiComponentsComponent },
|
|
||||||
{ path: 'chart-types/:id/templates', component: ChartTypeTemplatesComponent },
|
|
||||||
{ path: 'chart-types/:id/fields', component: ChartTypeFieldsComponent },
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -308,8 +331,178 @@ const routes: Routes = [
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Country', component: CountryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv3', component: Adv3Component },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad10', component: Ad10Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Childform', component: ChildformComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'District', component: DistrictComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'State', component: StateComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Country', component: CountryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad9', component: Ad9Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad8', component: Ad8Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad7', component: Ad7Component },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad6', component: Ad6Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv5', component: Adv5Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Support', component: SupportComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv3', component: Adv3Component },
|
||||||
|
|
||||||
|
|
||||||
{ path: 'tokenregistery', component: Token_registeryComponent },
|
{ path: 'tokenregistery', component: Token_registeryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Defatest', component: DefatestComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Country', component: CountryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Defatest', component: DefatestComponent },
|
||||||
|
|
||||||
|
{ path: 'Test2', component: Test2Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Country', component: CountryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Test2', component: Test2Component },
|
||||||
|
|
||||||
|
{ path: 'Childform', component: ChildformComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'District', component: DistrictComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'State', component: StateComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Country', component: CountryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad9', component: Ad9Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad8', component: Ad8Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad7', component: Ad7Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Ad6', component: Ad6Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv5', component: Adv5Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv4', component: Adv4Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Support', component: SupportComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv3', component: Adv3Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Dv2', component: Dv2Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Adv1', component: Adv1Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Basicp3', component: Basicp3Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Basicp2', component: Basicp2Component },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Basicp1', component: Basicp1Component },
|
||||||
|
{ path: 'cust', component: Customer_informationComponent },
|
||||||
|
|
||||||
|
{ path: 'Order_summary', component: Order_summaryComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Types', component: TypesComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Product', component: ProductComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Manufacturer', component: ManufacturerComponent },
|
||||||
|
|
||||||
|
|
||||||
|
{ path: 'Deployment_type', component: Deployment_typeComponent },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ path: 'Stepper_workflow', component: Stepper_workflowComponent },
|
{ path: 'Stepper_workflow', component: Stepper_workflowComponent },
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,25 @@
|
|||||||
|
import { Ad10Component } from './BuilderComponents/angulardatatype/Ad10/Ad10.component';
|
||||||
|
|
||||||
|
import { DefatestComponent } from './BuilderComponents/defu/Defatest/Defatest.component';
|
||||||
|
|
||||||
|
import { ChildformComponent } from './BuilderComponents/stpkg/Childform/Childform.component';
|
||||||
|
import { DistrictComponent } from './BuilderComponents/testdata/District/District.component';
|
||||||
|
import { StateComponent } from './BuilderComponents/testdata/State/State.component';
|
||||||
|
import { CountryComponent } from './BuilderComponents/testdata/Country/Country.component';
|
||||||
|
import { Ad9Component } from './BuilderComponents/angulardatatype/Ad9/Ad9.component';
|
||||||
|
import { Ad8Component } from './BuilderComponents/angulardatatype/Ad8/Ad8.component';
|
||||||
|
import { Ad7Component } from './BuilderComponents/angulardatatype/Ad7/Ad7.component';
|
||||||
|
import { Ad6Component } from './BuilderComponents/angulardatatype/Ad6/Ad6.component';
|
||||||
|
import { Adv5Component } from './BuilderComponents/angulardatatype/Adv5/Adv5.component';
|
||||||
|
import { Adv4Component } from './BuilderComponents/angulardatatype/Adv4/Adv4.component';
|
||||||
|
import { SupportComponent } from './BuilderComponents/angulardatatype/Support/Support.component';
|
||||||
|
import { Adv3Component } from './BuilderComponents/angulardatatype/Adv3/Adv3.component';
|
||||||
|
import { Dv2Component } from './BuilderComponents/angulardatatype/Dv2/Dv2.component';
|
||||||
|
import { Adv1Component } from './BuilderComponents/angulardatatype/Adv1/Adv1.component';
|
||||||
|
import { Basicp3Component } from './BuilderComponents/angulardatatype/Basicp3/Basicp3.component';
|
||||||
|
import { Basicp2Component } from './BuilderComponents/angulardatatype/Basicp2/Basicp2.component';
|
||||||
|
import { Basicp1Component } from './BuilderComponents/angulardatatype/Basicp1/Basicp1.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
@@ -53,6 +75,9 @@ import { ReportbuildeditComponent } from './builder/report-build/reportbuildedit
|
|||||||
import { ReportbuildqueryComponent } from './builder/report-build/reportbuildquery/reportbuildquery.component';
|
import { ReportbuildqueryComponent } from './builder/report-build/reportbuildquery/reportbuildquery.component';
|
||||||
import { ReportBuild2Component } from './builder/report-build2/report-build2.component';
|
import { ReportBuild2Component } from './builder/report-build2/report-build2.component';
|
||||||
import { ReportBuild2editComponent } from './builder/report-build2/report-build2edit/report-build2edit.component';
|
import { ReportBuild2editComponent } from './builder/report-build2/report-build2edit/report-build2edit.component';
|
||||||
|
import { ReportRunnerComponent } from './builder/report-runner/report-runner.component';
|
||||||
|
import { ReportrunnereditComponent } from './builder/report-runner/reportrunneredit/reportrunneredit.component';
|
||||||
|
import { Reportrunneredit2Component } from './builder/report-runner/reportrunneredit2/reportrunneredit2.component';
|
||||||
|
|
||||||
|
|
||||||
import { DashboardnewComponent } from './builder/dashboardnew/dashboardnew.component';
|
import { DashboardnewComponent } from './builder/dashboardnew/dashboardnew.component';
|
||||||
@@ -113,7 +138,13 @@ import { AllapiregisteryComponent } from './fnd/apiregistery/allapiregistery/all
|
|||||||
import { AddapiregisteryComponent } from './fnd/apiregistery/addapiregistery/addapiregistery.component';
|
import { AddapiregisteryComponent } from './fnd/apiregistery/addapiregistery/addapiregistery.component';
|
||||||
import { EditapiregisteryComponent } from './fnd/apiregistery/editapiregistery/editapiregistery.component';
|
import { EditapiregisteryComponent } from './fnd/apiregistery/editapiregistery/editapiregistery.component';
|
||||||
import { ApiregisterylineComponent } from './fnd/apiregistery/Apiregisteryline/Apiregisteryline.component';
|
import { ApiregisterylineComponent } from './fnd/apiregistery/Apiregisteryline/Apiregisteryline.component';
|
||||||
|
import { Customer_informationComponent } from './BuilderComponents/angulardatatype/Customer_information/Customer_information.component';
|
||||||
|
import { Deployment_typeComponent } from './BuilderComponents/angulardatatype/Deployment_type/Deployment_type.component';
|
||||||
|
import { ManufacturerComponent } from './BuilderComponents/angulardatatype/Manufacturer/Manufacturer.component';
|
||||||
|
import { Order_summaryComponent } from './BuilderComponents/angulardatatype/Order_summary/Order_summary.component';
|
||||||
|
import { ProductComponent } from './BuilderComponents/angulardatatype/Product/Product.component';
|
||||||
|
import { TypesComponent } from './BuilderComponents/angulardatatype/Types/Types.component';
|
||||||
|
import { Test2Component } from './BuilderComponents/testdata/Test2/Test2.component';
|
||||||
import { Token_registeryComponent } from './fnd/Token_registery/Token_registery.component';
|
import { Token_registeryComponent } from './fnd/Token_registery/Token_registery.component';
|
||||||
import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component';
|
import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component';
|
||||||
import { ThemeCustomizationComponent } from './theme-customization/theme-customization.component';
|
import { ThemeCustomizationComponent } from './theme-customization/theme-customization.component';
|
||||||
@@ -134,34 +165,11 @@ import { ShieldDashboardModule } from './builder/dashboardnew/gadgets/shield-das
|
|||||||
// Import UnifiedChartComponent
|
// Import UnifiedChartComponent
|
||||||
import { UnifiedChartComponent } from './builder/dashboardnew/gadgets/unified-chart/unified-chart.component';
|
import { UnifiedChartComponent } from './builder/dashboardnew/gadgets/unified-chart/unified-chart.component';
|
||||||
// Import ChartConfigManagerComponent
|
// Import ChartConfigManagerComponent
|
||||||
import { ChartConfigManagerComponent } from './builder/dashboardnew/chart-config/chart-config-manager.component';
|
import { ChartConfigManagerComponent } from './builder/dashboardnew/chart-config-manager/chart-config-manager.component';
|
||||||
// Import ChartTypeManagerComponent
|
// Import ChartTypeManagerComponent
|
||||||
import { ChartTypeManagerComponent } from './builder/dashboardnew/chart-type-manager/chart-type-manager.component';
|
import { ChartTypeManagerComponent } from './builder/dashboardnew/chart-type-manager/chart-type-manager.component';
|
||||||
// Import ChartTypePageComponent
|
// Import ChartTypePageComponent
|
||||||
import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manager/chart-type-page.component';
|
import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manager/chart-type-page.component';
|
||||||
// Import AddChartTypeComponent
|
|
||||||
import { AddChartTypeComponent } from './builder/dashboardnew/chart-type-manager/add-chart-type.component';
|
|
||||||
// Import EditChartTypeComponent
|
|
||||||
import { EditChartTypeComponent } from './builder/dashboardnew/chart-type-manager/edit-chart-type.component';
|
|
||||||
// Import ChartTypeUiComponentsComponent
|
|
||||||
import { ChartTypeUiComponentsComponent } from './builder/dashboardnew/chart-type-manager/chart-type-ui-components.component';
|
|
||||||
// Import ChartTypeTemplatesComponent
|
|
||||||
import { ChartTypeTemplatesComponent } from './builder/dashboardnew/chart-type-manager/chart-type-templates.component';
|
|
||||||
// Import ChartTypeFieldsComponent
|
|
||||||
import { ChartTypeFieldsComponent } from './builder/dashboardnew/chart-type-manager/chart-type-fields.component';
|
|
||||||
// Import new form components
|
|
||||||
import { ChartTypeFormComponent } from './builder/dashboardnew/chart-config/forms/chart-type-form.component';
|
|
||||||
import { UiComponentFormComponent } from './builder/dashboardnew/chart-config/forms/ui-component-form.component';
|
|
||||||
import { ComponentPropertyFormComponent } from './builder/dashboardnew/chart-config/forms/component-property-form.component';
|
|
||||||
import { ChartTemplateFormComponent } from './builder/dashboardnew/chart-config/forms/chart-template-form.component';
|
|
||||||
import { DynamicFieldFormComponent } from './builder/dashboardnew/chart-config/forms/dynamic-field-form.component';
|
|
||||||
// Import ChartConfigModalComponent
|
|
||||||
import { ChartConfigModalComponent } from './builder/dashboardnew/editnewdash/chart-config-modal.component';
|
|
||||||
// Import DynamicChartLoaderService
|
|
||||||
import { DynamicChartLoaderService } from './builder/dashboardnew/chart-config/dynamic-chart-loader.service';
|
|
||||||
import { ReportRunnerComponent } from './builder/report-runner/report-runner.component';
|
|
||||||
import { ReportrunnereditComponent } from './builder/report-runner/reportrunneredit/reportrunneredit.component';
|
|
||||||
import { Reportrunneredit2Component } from './builder/report-runner/reportrunneredit2/reportrunneredit2.component';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@@ -181,27 +189,6 @@ import { Reportrunneredit2Component } from './builder/report-runner/reportrunner
|
|||||||
ChartTypeManagerComponent,
|
ChartTypeManagerComponent,
|
||||||
// Add ChartTypePageComponent to declarations
|
// Add ChartTypePageComponent to declarations
|
||||||
ChartTypePageComponent,
|
ChartTypePageComponent,
|
||||||
// Add AddChartTypeComponent to declarations
|
|
||||||
AddChartTypeComponent,
|
|
||||||
// Add EditChartTypeComponent to declarations
|
|
||||||
EditChartTypeComponent,
|
|
||||||
// Add ChartTypeUiComponentsComponent to declarations
|
|
||||||
ChartTypeUiComponentsComponent,
|
|
||||||
// Add ChartTypeTemplatesComponent to declarations
|
|
||||||
ChartTypeTemplatesComponent,
|
|
||||||
// Add ChartTypeFieldsComponent to declarations
|
|
||||||
ChartTypeFieldsComponent,
|
|
||||||
// Add new form components to declarations
|
|
||||||
ChartTypeFormComponent,
|
|
||||||
UiComponentFormComponent,
|
|
||||||
ComponentPropertyFormComponent,
|
|
||||||
ChartTemplateFormComponent,
|
|
||||||
DynamicFieldFormComponent,
|
|
||||||
// Add ChartConfigModalComponent to declarations
|
|
||||||
ChartConfigModalComponent,
|
|
||||||
// Add ChartTypeDisplayComponent to declarations
|
|
||||||
|
|
||||||
|
|
||||||
DashrunnerlineComponent, BarRunnerComponent, LineRunnerComponent, DoughnutRunnerComponent, GridRunnerComponent, PieRunnerComponent, PolarRunnerComponent, RadarRunnerComponent, ScatterRunnerComponent, TodoRunnerComponent, BubbleRunnerComponent,
|
DashrunnerlineComponent, BarRunnerComponent, LineRunnerComponent, DoughnutRunnerComponent, GridRunnerComponent, PieRunnerComponent, PolarRunnerComponent, RadarRunnerComponent, ScatterRunnerComponent, TodoRunnerComponent, BubbleRunnerComponent,
|
||||||
// Add CompactFilterRunnerComponent to declarations
|
// Add CompactFilterRunnerComponent to declarations
|
||||||
CompactFilterRunnerComponent,
|
CompactFilterRunnerComponent,
|
||||||
@@ -227,8 +214,32 @@ import { Reportrunneredit2Component } from './builder/report-runner/reportrunner
|
|||||||
|
|
||||||
|
|
||||||
ThemeCustomizationComponent,
|
ThemeCustomizationComponent,
|
||||||
|
Ad10Component,
|
||||||
Token_registeryComponent,
|
Token_registeryComponent,
|
||||||
|
DefatestComponent,
|
||||||
|
Test2Component,
|
||||||
|
Order_summaryComponent,
|
||||||
|
TypesComponent,
|
||||||
|
ProductComponent,
|
||||||
|
ManufacturerComponent,
|
||||||
|
Deployment_typeComponent,
|
||||||
|
ChildformComponent,
|
||||||
|
DistrictComponent,
|
||||||
|
StateComponent,
|
||||||
|
CountryComponent,
|
||||||
|
Ad9Component,
|
||||||
|
Ad8Component,
|
||||||
|
Ad7Component,
|
||||||
|
Ad6Component,
|
||||||
|
Adv5Component,
|
||||||
|
Adv4Component,
|
||||||
|
SupportComponent,
|
||||||
|
Adv3Component,
|
||||||
|
Dv2Component,
|
||||||
|
Adv1Component,
|
||||||
|
Basicp3Component,
|
||||||
|
Basicp2Component,
|
||||||
|
Basicp1Component,
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
QRCodeModule,
|
QRCodeModule,
|
||||||
@@ -255,10 +266,8 @@ import { Reportrunneredit2Component } from './builder/report-runner/reportrunner
|
|||||||
providers: [
|
providers: [
|
||||||
CookieService,
|
CookieService,
|
||||||
WireframeService,
|
WireframeService,
|
||||||
DynamicChartLoaderService
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
ChartConfigManagerComponent
|
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import { Observable, BehaviorSubject } from 'rxjs';
|
import { Observable, BehaviorSubject, Subject } from 'rxjs';
|
||||||
import { UserInfoService, LoginInfoInStorage} from '../user-info.service';
|
import { UserInfoService, LoginInfoInStorage} from '../user-info.service';
|
||||||
import { ApiRequestService } from './api-request.service';
|
import { ApiRequestService } from './api-request.service';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
@@ -43,11 +43,14 @@ export class LoginService {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let loginDataSubject:BehaviorSubject<any> = new BehaviorSubject<any>([]); // Will use this BehaviorSubject to emit data that we want after ajax login attempt
|
// let loginDataSubject:BehaviorSubject<any> = new BehaviorSubject<any>([]); // Will use this BehaviorSubject to emit data that we want after ajax login attempt
|
||||||
|
let loginDataSubject: Subject<any> = new Subject<any>();
|
||||||
|
|
||||||
let loginInfoReturn:LoginInfoInStorage; // Object that we want to send back to Login Page
|
let loginInfoReturn:LoginInfoInStorage; // Object that we want to send back to Login Page
|
||||||
|
|
||||||
this.apiRequest.loginAuthentication('token/session', bodyData)
|
this.apiRequest.loginAuthentication('token/session', bodyData)
|
||||||
.subscribe(jsonResp => {
|
.subscribe({
|
||||||
|
next: (jsonResp) => {
|
||||||
console.log('login response in service : ', jsonResp);
|
console.log('login response in service : ', jsonResp);
|
||||||
if (jsonResp.operationMessage=='Login Failed') {
|
if (jsonResp.operationMessage=='Login Failed') {
|
||||||
this.toastr.warning('Not Login Getting Error check your Username and password');
|
this.toastr.warning('Not Login Getting Error check your Username and password');
|
||||||
@@ -78,7 +81,7 @@ export class LoginService {
|
|||||||
this.userInfoService.storeUserInfo(JSON.stringify(loginInfoReturn.user));
|
this.userInfoService.storeUserInfo(JSON.stringify(loginInfoReturn.user));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//Create a faliure object that we want to send back to login page
|
//Create a failure object that we want to send back to login page
|
||||||
loginInfoReturn = {
|
loginInfoReturn = {
|
||||||
"success":false,
|
"success":false,
|
||||||
"message":jsonResp.operationMessage,
|
"message":jsonResp.operationMessage,
|
||||||
@@ -86,8 +89,9 @@ export class LoginService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
loginDataSubject.next(loginInfoReturn);
|
loginDataSubject.next(loginInfoReturn);
|
||||||
|
loginDataSubject.complete(); // Complete the subject
|
||||||
},
|
},
|
||||||
err => {
|
error: (err) => {
|
||||||
console.log('login error ', err);
|
console.log('login error ', err);
|
||||||
loginInfoReturn = {
|
loginInfoReturn = {
|
||||||
"success": false,
|
"success": false,
|
||||||
@@ -97,6 +101,9 @@ export class LoginService {
|
|||||||
if (err) {
|
if (err) {
|
||||||
this.toastr.error('Getting Server Error');
|
this.toastr.error('Getting Server Error');
|
||||||
}
|
}
|
||||||
|
loginDataSubject.next(loginInfoReturn); // Send the error response
|
||||||
|
loginDataSubject.complete(); // Complete the subject
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return loginDataSubject;
|
return loginDataSubject;
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { Observable } from "rxjs";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
|
||||||
import { ApiRequestService } from "src/app/services/api/api-request.service";
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class SchedulerService {
|
|
||||||
private baseURL = "scheduler";
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private http: HttpClient,
|
|
||||||
private apiRequest: ApiRequestService,
|
|
||||||
) { }
|
|
||||||
|
|
||||||
// Get job by lake ID
|
|
||||||
getJobByLakeId(lakeId: number): Observable<any> {
|
|
||||||
const _http = `${this.baseURL}/lake/${lakeId}`;
|
|
||||||
return this.apiRequest.get(_http);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a new job
|
|
||||||
createJob(jobData: any): Observable<any> {
|
|
||||||
const _http = `${this.baseURL}/create`;
|
|
||||||
return this.apiRequest.post(_http, jobData);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pause a job
|
|
||||||
pauseJob(jobId: number): Observable<any> {
|
|
||||||
const _http = `${this.baseURL}/pause/${jobId}`;
|
|
||||||
return this.apiRequest.post(_http, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resume a job
|
|
||||||
resumeJob(jobId: number): Observable<any> {
|
|
||||||
const _http = `${this.baseURL}/resume/${jobId}`;
|
|
||||||
return this.apiRequest.post(_http, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop a job
|
|
||||||
stopJob(jobId: number): Observable<any> {
|
|
||||||
const _http = `${this.baseURL}/stop/${jobId}`;
|
|
||||||
return this.apiRequest.delete(_http);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user