Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deb505e32b | ||
|
|
452c4cf600 | ||
|
|
f19f633e2d | ||
|
|
970c3fb17e | ||
|
|
44f48b545d | ||
|
|
bee89fc12b | ||
|
|
fe6dd92ef4 | ||
|
|
d8edd81fae |
@@ -97,7 +97,6 @@ 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
|
||||||
@@ -107,7 +106,7 @@ export class LoginPageComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Handle different response formats
|
// Handle different response formats
|
||||||
if (resp.success === 'false' || resp.success === false) {
|
if (resp.success === 'false') {
|
||||||
this.isError = true;
|
this.isError = true;
|
||||||
this.errMsg = resp.message || 'Login failed';
|
this.errMsg = resp.message || 'Login failed';
|
||||||
return;
|
return;
|
||||||
@@ -124,7 +123,6 @@ 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;
|
||||||
|
|
||||||
@@ -169,4 +167,4 @@ export class LoginPageComponent implements OnInit {
|
|||||||
this.showPassword = !this.showPassword;
|
this.showPassword = !this.showPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -174,47 +174,37 @@
|
|||||||
<button class="btn btn-icon" (click)="fetchAvailableKeys(user)" title="Create Calculated Field">
|
<button class="btn btn-icon" (click)="fetchAvailableKeys(user)" title="Create Calculated Field">
|
||||||
<clr-icon shape="calculator"></clr-icon>
|
<clr-icon shape="calculator"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Group By button -->
|
<!-- Group By button -->
|
||||||
<button class="btn btn-icon" (click)="openGroupByModal(user)" title="Group By Configuration">
|
<button class="btn btn-icon" (click)="openGroupByModal(user)" title="Group By Configuration">
|
||||||
<clr-icon shape="group"></clr-icon>
|
<clr-icon shape="group"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Blending Keys button (only shown for blending type with non-empty blending_lakeids) -->
|
<!-- Blending Keys button (only shown for blending type with non-empty blending_lakeids) -->
|
||||||
<button class="btn btn-icon"
|
<button class="btn btn-icon" (click)="fetchBlendingKeys(user)" title="Configure Blending Query"
|
||||||
(click)="fetchBlendingKeys(user)"
|
*ngIf="canShowBlendingAction(user)">
|
||||||
title="Configure Blending Query"
|
|
||||||
*ngIf="canShowBlendingAction(user)">
|
|
||||||
<clr-icon shape="code"></clr-icon>
|
<clr-icon shape="code"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Field Mapping button -->
|
<!-- Field Mapping button -->
|
||||||
<button class="btn btn-icon"
|
<button class="btn btn-icon" (click)="openFieldMappingModal(user)" title="Field Mapping"
|
||||||
(click)="openFieldMappingModal(user)"
|
*ngIf="user.url && user.sure_connect_id">
|
||||||
title="Field Mapping"
|
|
||||||
*ngIf="user.url && user.sure_connect_id">
|
|
||||||
<clr-icon shape="map"></clr-icon>
|
<clr-icon shape="map"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Scheduler button -->
|
<!-- Scheduler button -->
|
||||||
<button class="btn btn-icon"
|
<button class="btn btn-icon" (click)="openSchedulerModal(user)" title="Scheduler">
|
||||||
(click)="openSchedulerModal(user)"
|
|
||||||
title="Scheduler">
|
|
||||||
<clr-icon shape="clock"></clr-icon>
|
<clr-icon shape="clock"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Webhook toggle button -->
|
<!-- Webhook toggle button -->
|
||||||
<button class="btn btn-icon"
|
<button class="btn btn-icon" (click)="toggleWebhook(user)" title="Toggle Webhook">
|
||||||
(click)="toggleWebhook(user)"
|
|
||||||
title="Toggle Webhook">
|
|
||||||
<clr-icon shape="network-globe"></clr-icon>
|
<clr-icon shape="network-globe"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Copy Webhook URL button -->
|
<!-- Copy Webhook URL button -->
|
||||||
<button class="btn btn-icon"
|
<button class="btn btn-icon" (click)="copyWebhookUrl(user.webhook_url)" title="Copy Webhook URL"
|
||||||
(click)="copyWebhookUrl(user.webhook_url)"
|
*ngIf="user.webhook_url && user.webhook_url.trim() !== ''">
|
||||||
title="Copy Webhook URL"
|
|
||||||
*ngIf="user.webhook_url && user.webhook_url.trim() !== ''">
|
|
||||||
<clr-icon shape="copy-to-clipboard"></clr-icon>
|
<clr-icon shape="copy-to-clipboard"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
</clr-dg-cell>
|
</clr-dg-cell>
|
||||||
@@ -455,16 +445,16 @@
|
|||||||
instanceId="edit-form-{{rowSelected.id}}"></app-cron-job-builder>
|
instanceId="edit-form-{{rowSelected.id}}"></app-cron-job-builder>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<!-- <div class="clr-col-sm-12">
|
||||||
<label> json</label>
|
<label> json</label>
|
||||||
<input id="name" type="Text" class="form-control" style="border: none; outline: none; height:33px !important;"
|
<input id="name" type="Text" class="form-control" style="border: none; outline: none; height:33px !important;"
|
||||||
[(ngModel)]="rowSelected.json" name=" json " />
|
[(ngModel)]="rowSelected.json" name=" json " />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label>Url</label>
|
<label>Url Endpoint</label>
|
||||||
<input class="clr-input" type="text" [(ngModel)]="rowSelected.url_endpoint" name="url_endpoint" />
|
<input class="clr-input" type="text" [(ngModel)]="rowSelected.url_endpoint" name="url_endpoint" />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label>Batch Volume</label>
|
<label>Batch Volume</label>
|
||||||
@@ -493,9 +483,7 @@
|
|||||||
<label>Blending Data Lakes</label>
|
<label>Blending Data Lakes</label>
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<div *ngFor="let dataLake of dataLakeList" class="checkbox-item">
|
<div *ngFor="let dataLake of dataLakeList" class="checkbox-item">
|
||||||
<input
|
<input type="checkbox" [value]="dataLake.id"
|
||||||
type="checkbox"
|
|
||||||
[value]="dataLake.id"
|
|
||||||
(change)="onEditBlendingLakeCheckboxChange($event, dataLake.id)"
|
(change)="onEditBlendingLakeCheckboxChange($event, dataLake.id)"
|
||||||
[checked]="isEditBlendingLakeSelected(dataLake.id)">
|
[checked]="isEditBlendingLakeSelected(dataLake.id)">
|
||||||
<label>{{ dataLake.name }}</label>
|
<label>{{ dataLake.name }}</label>
|
||||||
@@ -608,16 +596,16 @@
|
|||||||
(cronExpressionChange)="onAddCronExpressionChange($event)" instanceId="add-form"></app-cron-job-builder>
|
(cronExpressionChange)="onAddCronExpressionChange($event)" instanceId="add-form"></app-cron-job-builder>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<!-- <div class="clr-col-sm-12">
|
||||||
<label>json</label>
|
<label>json</label>
|
||||||
<input class="form-control" type="Text" formControlName="json"
|
<input class="form-control" type="Text" formControlName="json"
|
||||||
style="border: none; outline: none; height:33px !important;" />
|
style="border: none; outline: none; height:33px !important;" />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<!-- <div class="clr-col-sm-12">
|
||||||
<label> Url Endpoint</label>
|
<label> Url Endpoint</label>
|
||||||
<input class="clr-input" type="text" formControlName="url_endpoint" />
|
<input class="clr-input" type="text" formControlName="url_endpoint" />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Batch Volume</label>
|
<label> Batch Volume</label>
|
||||||
@@ -646,10 +634,7 @@
|
|||||||
<label>Blending Data Lakes</label>
|
<label>Blending Data Lakes</label>
|
||||||
<div class="checkbox-container">
|
<div class="checkbox-container">
|
||||||
<div *ngFor="let dataLake of dataLakeList" class="checkbox-item">
|
<div *ngFor="let dataLake of dataLakeList" class="checkbox-item">
|
||||||
<input
|
<input type="checkbox" [value]="dataLake.id" (change)="onBlendingLakeCheckboxChange($event, dataLake.id)"
|
||||||
type="checkbox"
|
|
||||||
[value]="dataLake.id"
|
|
||||||
(change)="onBlendingLakeCheckboxChange($event, dataLake.id)"
|
|
||||||
[checked]="isBlendingLakeSelected(dataLake.id)">
|
[checked]="isBlendingLakeSelected(dataLake.id)">
|
||||||
<label>{{ dataLake.name }}</label>
|
<label>{{ dataLake.name }}</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -1018,7 +1003,7 @@
|
|||||||
<clr-icon shape="close"></clr-icon>
|
<clr-icon shape="close"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-content">
|
<div class="panel-content">
|
||||||
<!-- Display keys for each blending lake -->
|
<!-- Display keys for each blending lake -->
|
||||||
<div class="keys-container" *ngFor="let keyData of blendingKeysData">
|
<div class="keys-container" *ngFor="let keyData of blendingKeysData">
|
||||||
@@ -1027,14 +1012,12 @@
|
|||||||
<span class="header-tag" *ngFor="let header of keyData.headers">{{ header }}</span>
|
<span class="header-tag" *ngFor="let header of keyData.headers">{{ header }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- SQL Query Editor -->
|
<!-- SQL Query Editor -->
|
||||||
<div class="sql-editor-container">
|
<div class="sql-editor-container">
|
||||||
<h4>SQL Query Builder</h4>
|
<h4>SQL Query Builder</h4>
|
||||||
<textarea class="clr-textarea sql-textarea"
|
<textarea class="clr-textarea sql-textarea" [(ngModel)]="sqlQueryText"
|
||||||
[(ngModel)]="sqlQueryText"
|
placeholder="Enter your SQL query here using the available headers..." rows="6"></textarea>
|
||||||
placeholder="Enter your SQL query here using the available headers..."
|
|
||||||
rows="6"></textarea>
|
|
||||||
<div class="editor-actions">
|
<div class="editor-actions">
|
||||||
<button class="btn btn-primary" (click)="updateSqlQuery()">Update SQL Query</button>
|
<button class="btn btn-primary" (click)="updateSqlQuery()">Update SQL Query</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -1059,15 +1042,14 @@
|
|||||||
<h5>Data Lake {{ keyData.lakeId }} - Table: {{ keyData.tableName }}</h5>
|
<h5>Data Lake {{ keyData.lakeId }} - Table: {{ keyData.tableName }}</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="headers-container">
|
<div class="headers-container">
|
||||||
<span class="header-tag" *ngFor="let header of keyData.headers"
|
<span class="header-tag" *ngFor="let header of keyData.headers" (click)="insertHeaderIntoQuery(header)">
|
||||||
(click)="insertHeaderIntoQuery(header)">
|
|
||||||
{{ header }}
|
{{ header }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- SQL Query Editor -->
|
<!-- SQL Query Editor -->
|
||||||
<div class="sql-editor-section">
|
<div class="sql-editor-section">
|
||||||
<h4 class="section-title">
|
<h4 class="section-title">
|
||||||
@@ -1075,12 +1057,12 @@
|
|||||||
SQL Query Builder
|
SQL Query Builder
|
||||||
</h4>
|
</h4>
|
||||||
<div class="sql-editor-container">
|
<div class="sql-editor-container">
|
||||||
<textarea class="clr-textarea sql-textarea"
|
<textarea class="clr-textarea sql-textarea" [(ngModel)]="sqlQueryText"
|
||||||
[(ngModel)]="sqlQueryText"
|
placeholder="Enter your SQL query here using the available headers. Click on header names above to insert them into your query."
|
||||||
placeholder="Enter your SQL query here using the available headers. Click on header names above to insert them into your query."
|
rows="8"></textarea>
|
||||||
rows="8"></textarea>
|
|
||||||
<div class="editor-hint">
|
<div class="editor-hint">
|
||||||
<small class="clr-subtext">Tip: Click on header names above to automatically insert them into your query</small>
|
<small class="clr-subtext">Tip: Click on header names above to automatically insert them into your
|
||||||
|
query</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1100,7 +1082,7 @@
|
|||||||
<div class="instructions">
|
<div class="instructions">
|
||||||
<p>Map original field names to new names. Leave mapping blank to exclude field from mapping.</p>
|
<p>Map original field names to new names. Leave mapping blank to exclude field from mapping.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mapping-table-container" *ngIf="fieldMappingData && fieldMappingData.length > 0">
|
<div class="mapping-table-container" *ngIf="fieldMappingData && fieldMappingData.length > 0">
|
||||||
<table class="table mapping-table">
|
<table class="table mapping-table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -1115,17 +1097,14 @@
|
|||||||
<span class="field-tag">{{ field.original }}</span>
|
<span class="field-tag">{{ field.original }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text"
|
<input type="text" class="clr-input mapping-input" [(ngModel)]="field.mapped"
|
||||||
class="clr-input mapping-input"
|
placeholder="Enter new field name" (ngModelChange)="updateFieldMapping(i, $event)">
|
||||||
[(ngModel)]="field.mapped"
|
|
||||||
placeholder="Enter new field name"
|
|
||||||
(ngModelChange)="updateFieldMapping(i, $event)">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="no-data-message" *ngIf="fieldMappingData && fieldMappingData.length === 0">
|
<div class="no-data-message" *ngIf="fieldMappingData && fieldMappingData.length === 0">
|
||||||
<p>No fields available for mapping. Please check the data source configuration.</p>
|
<p>No fields available for mapping. Please check the data source configuration.</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -1133,7 +1112,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-outline" (click)="closeFieldMappingModal()">Cancel</button>
|
<button type="button" class="btn btn-outline" (click)="closeFieldMappingModal()">Cancel</button>
|
||||||
<button type="button" class="btn btn-primary" (click)="updateFieldMappings()" [disabled]="!fieldMappingData || fieldMappingData.length === 0">Update Field Mappings</button>
|
<button type="button" class="btn btn-primary" (click)="updateFieldMappings()"
|
||||||
|
[disabled]="!fieldMappingData || fieldMappingData.length === 0">Update Field Mappings</button>
|
||||||
</div>
|
</div>
|
||||||
</clr-modal>
|
</clr-modal>
|
||||||
|
|
||||||
@@ -1145,7 +1125,7 @@
|
|||||||
<div class="data-lake-info">
|
<div class="data-lake-info">
|
||||||
<h4>Data Lake: {{ selectedSchedulerItem?.name }}</h4>
|
<h4>Data Lake: {{ selectedSchedulerItem?.name }}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Job Information -->
|
<!-- Job Information -->
|
||||||
<div class="job-info-section" *ngIf="schedulerJob">
|
<div class="job-info-section" *ngIf="schedulerJob">
|
||||||
<div class="job-header">
|
<div class="job-header">
|
||||||
@@ -1154,7 +1134,7 @@
|
|||||||
{{ schedulerJob.status }}
|
{{ schedulerJob.status }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="job-details">
|
<div class="job-details">
|
||||||
<div class="detail-row">
|
<div class="detail-row">
|
||||||
<label>Job Name:</label>
|
<label>Job Name:</label>
|
||||||
@@ -1169,7 +1149,7 @@
|
|||||||
<span>{{ schedulerJob.description }}</span>
|
<span>{{ schedulerJob.description }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Job Actions -->
|
<!-- Job Actions -->
|
||||||
<div class="job-actions">
|
<div class="job-actions">
|
||||||
<button class="btn btn-warning" (click)="pauseJob()" *ngIf="schedulerJob.status === 'RUNNING'">
|
<button class="btn btn-warning" (click)="pauseJob()" *ngIf="schedulerJob.status === 'RUNNING'">
|
||||||
@@ -1186,14 +1166,14 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- No Job Found -->
|
<!-- No Job Found -->
|
||||||
<div class="no-job-section" *ngIf="schedulerJob === null">
|
<div class="no-job-section" *ngIf="schedulerJob === null">
|
||||||
<div class="no-job-message">
|
<div class="no-job-message">
|
||||||
<p>No scheduled job found for this Data Lake.</p>
|
<p>No scheduled job found for this Data Lake.</p>
|
||||||
<p>Would you like to create a new job?</p>
|
<p>Would you like to create a new job?</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="create-job-actions">
|
<div class="create-job-actions">
|
||||||
<button class="btn btn-primary" (click)="createJob()">
|
<button class="btn btn-primary" (click)="createJob()">
|
||||||
<clr-icon shape="plus"></clr-icon> Create Job
|
<clr-icon shape="plus"></clr-icon> Create Job
|
||||||
@@ -1206,4 +1186,4 @@
|
|||||||
<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>
|
||||||
@@ -171,6 +171,12 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
webhook_url: [null] // Add webhook_url field
|
webhook_url: [null] // Add webhook_url field
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Set default SureConnect value after form initialization if list is already loaded
|
||||||
|
if (this.sureConnectList && this.sureConnectList.length > 0) {
|
||||||
|
const defaultSureConnectId = this.sureConnectList[0].id;
|
||||||
|
this.entryForm.get('sure_connect_id')?.setValue(defaultSureConnectId);
|
||||||
|
}
|
||||||
|
|
||||||
// form code start
|
// form code start
|
||||||
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@@ -262,6 +268,20 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
this.sureConnectService.getAll().subscribe((data: any[]) => {
|
this.sureConnectService.getAll().subscribe((data: any[]) => {
|
||||||
this.sureConnectList = data;
|
this.sureConnectList = data;
|
||||||
console.log('SureConnect List:', this.sureConnectList);
|
console.log('SureConnect List:', this.sureConnectList);
|
||||||
|
|
||||||
|
// Set default SureConnect value if list is not empty
|
||||||
|
if (this.sureConnectList && this.sureConnectList.length > 0) {
|
||||||
|
// Set the first SureConnect item as default
|
||||||
|
const defaultSureConnectId = this.sureConnectList[0].id;
|
||||||
|
|
||||||
|
// Set default for ADD form if it exists
|
||||||
|
if (this.entryForm && this.entryForm.get('sure_connect_id')) {
|
||||||
|
// Only set default if no value is already selected
|
||||||
|
if (!this.entryForm.get('sure_connect_id')?.value) {
|
||||||
|
this.entryForm.get('sure_connect_id')?.setValue(defaultSureConnectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.log('Error fetching SureConnect list:', error);
|
console.log('Error fetching SureConnect list:', error);
|
||||||
});
|
});
|
||||||
@@ -716,6 +736,12 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
// Set the selected SureConnect for edit form
|
// Set the selected SureConnect for edit form
|
||||||
this.selectedSureConnect = row.sure_connect_id || null;
|
this.selectedSureConnect = row.sure_connect_id || null;
|
||||||
|
|
||||||
|
// If no SureConnect is selected, set the first one as default
|
||||||
|
if (!this.rowSelected.sure_connect_id && this.sureConnectList && this.sureConnectList.length > 0) {
|
||||||
|
this.rowSelected.sure_connect_id = this.sureConnectList[0].id;
|
||||||
|
this.selectedSureConnect = this.sureConnectList[0].id;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize blending lake IDs for edit form from string
|
// Initialize blending lake IDs for edit form from string
|
||||||
if (row.blending_lakeids && typeof row.blending_lakeids === 'string') {
|
if (row.blending_lakeids && typeof row.blending_lakeids === 'string') {
|
||||||
this.editSelectedBlendingLakeIds = row.blending_lakeids.split(',').filter(id => id.trim() !== '');
|
this.editSelectedBlendingLakeIds = row.blending_lakeids.split(',').filter(id => id.trim() !== '');
|
||||||
@@ -889,6 +915,17 @@ export class Data_lakeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// Reset blending_lakeids to empty string
|
// Reset blending_lakeids to empty string
|
||||||
this.entryForm.get('blending_lakeids')?.setValue('');
|
this.entryForm.get('blending_lakeids')?.setValue('');
|
||||||
|
|
||||||
|
// Set default SureConnect value if available
|
||||||
|
if (this.sureConnectList && this.sureConnectList.length > 0) {
|
||||||
|
const defaultSureConnectId = this.sureConnectList[0].id;
|
||||||
|
// Only set default if no value is already selected
|
||||||
|
if (!this.entryForm.get('sure_connect_id')?.value) {
|
||||||
|
this.entryForm.get('sure_connect_id')?.setValue(defaultSureConnectId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.entryForm.get('sure_connect_id')?.setValue('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.modalAdd = true;
|
this.modalAdd = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
<gridster [options]="options" (drop)="onDrop($event)" style="background-color: transparent;">
|
<!-- Remove the (drop) event binding since it's already handled by gridster's emptyCellDropCallback -->
|
||||||
|
<gridster [options]="options" style="background-color: transparent;">
|
||||||
<gridster-item [item]="item" *ngFor="let item of dashboardArray">
|
<gridster-item [item]="item" *ngFor="let item of dashboardArray">
|
||||||
<!-- <ng-container *ngIf="addToDashboard && item.addToDashboard"> -->
|
<!-- <ng-container *ngIf="addToDashboard && item.addToDashboard"> -->
|
||||||
<button class="btn btn-icon btn-danger" style="margin-left: 10px; margin-top: 10px;" (click)="removeItem(item)" *ngIf="!fromRunner">
|
<button class="btn btn-icon btn-danger" style="margin-left: 10px; margin-top: 10px;" (click)="removeItem(item)" *ngIf="!fromRunner">
|
||||||
|
|||||||
@@ -66,18 +66,18 @@ export class EditnewdashComponent implements OnInit {
|
|||||||
name: 'Common Filter',
|
name: 'Common Filter',
|
||||||
identifier: 'common_filter'
|
identifier: 'common_filter'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: 'Radar Chart',
|
// name: 'Radar Chart',
|
||||||
identifier: 'radar_chart'
|
// identifier: 'radar_chart'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'Doughnut Chart',
|
// name: 'Doughnut Chart',
|
||||||
identifier: 'doughnut_chart'
|
// identifier: 'doughnut_chart'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'Line Chart',
|
// name: 'Line Chart',
|
||||||
identifier: 'line_chart'
|
// identifier: 'line_chart'
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// name: 'Bar Chart',
|
// name: 'Bar Chart',
|
||||||
// identifier: 'bar_chart'
|
// identifier: 'bar_chart'
|
||||||
@@ -98,22 +98,22 @@ export class EditnewdashComponent implements OnInit {
|
|||||||
// name: 'Scatter Chart',
|
// name: 'Scatter Chart',
|
||||||
// identifier: 'scatter_chart'
|
// identifier: 'scatter_chart'
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
name: 'Dynamic Chart',
|
// name: 'Dynamic Chart',
|
||||||
identifier: 'dynamic_chart'
|
// identifier: 'dynamic_chart'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'Financial Chart',
|
// name: 'Financial Chart',
|
||||||
identifier: 'financial_chart'
|
// identifier: 'financial_chart'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'To Do',
|
// name: 'To Do',
|
||||||
identifier: 'to_do_chart'
|
// identifier: 'to_do_chart'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'Grid View',
|
// name: 'Grid View',
|
||||||
identifier: 'grid_view'
|
// identifier: 'grid_view'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: 'Compact Filter',
|
name: 'Compact Filter',
|
||||||
identifier: 'compact_filter'
|
identifier: 'compact_filter'
|
||||||
@@ -1865,7 +1865,7 @@ export class EditnewdashComponent implements OnInit {
|
|||||||
|
|
||||||
// Add method to handle item resize events
|
// Add method to handle item resize events
|
||||||
itemResize(item: any, itemComponent: any) {
|
itemResize(item: any, itemComponent: any) {
|
||||||
console.log('Item resized:', item);
|
// console.log('Item resized:', item);
|
||||||
// Trigger a window resize event to notify charts to resize
|
// Trigger a window resize event to notify charts to resize
|
||||||
window.dispatchEvent(new Event('resize'));
|
window.dispatchEvent(new Event('resize'));
|
||||||
|
|
||||||
@@ -2110,6 +2110,9 @@ export class EditnewdashComponent implements OnInit {
|
|||||||
|
|
||||||
this.dashboardArray.push(chartItem);
|
this.dashboardArray.push(chartItem);
|
||||||
console.log(`Created dynamic chart:`, chartItem);
|
console.log(`Created dynamic chart:`, chartItem);
|
||||||
|
|
||||||
|
// Update the dashboard collection and trigger refresh
|
||||||
|
this.itemChange();
|
||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
console.error(`Error loading configuration for ${chartTypeName}:`, error);
|
console.error(`Error loading configuration for ${chartTypeName}:`, error);
|
||||||
@@ -2180,13 +2183,8 @@ export class EditnewdashComponent implements OnInit {
|
|||||||
this.dashboardArray.push(chartItem);
|
this.dashboardArray.push(chartItem);
|
||||||
console.log('Created default chart:', chartItem);
|
console.log('Created default chart:', chartItem);
|
||||||
|
|
||||||
// Update the dashboard collection
|
// Update the dashboard collection and trigger refresh
|
||||||
this.dashboardCollection.dashboard = this.dashboardArray.slice();
|
this.itemChange();
|
||||||
|
|
||||||
// Force gridster to refresh
|
|
||||||
if (this.options && this.options.api) {
|
|
||||||
this.options.api.optionsChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method to get display name for chart type - making it fully dynamic
|
// Helper method to get display name for chart type - making it fully dynamic
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
[labels]="chartLabels"
|
[labels]="chartLabels"
|
||||||
[options]="chartOptions"
|
[options]="chartOptions"
|
||||||
[legend]="chartLegend"
|
[legend]="chartLegend"
|
||||||
[chartType]="chartType || 'bar'"
|
[type]="chartType || 'bar'"
|
||||||
(chartClick)="chartClicked($event)"
|
(chartClick)="chartClicked($event)"
|
||||||
(chartHover)="chartHovered($event)">
|
(chartHover)="chartHovered($event)">
|
||||||
</canvas>
|
</canvas>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
[labels]="chartLabels"
|
[labels]="chartLabels"
|
||||||
[options]="chartOptions"
|
[options]="chartOptions"
|
||||||
[legend]="chartLegend"
|
[legend]="chartLegend"
|
||||||
[chartType]="'bar'"
|
[type]="'bar'"
|
||||||
(chartClick)="chartClicked($event)"
|
(chartClick)="chartClicked($event)"
|
||||||
(chartHover)="chartHovered($event)">
|
(chartHover)="chartHovered($event)">
|
||||||
</canvas>
|
</canvas>
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ export class UnifiedChartComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
// Check if filters are available
|
// Check if filters are available
|
||||||
hasFilters(): boolean {
|
hasFilters(): boolean {
|
||||||
const hasBaseFilters = this.baseFilters && this.baseFilters.length > 0;
|
const hasBaseFilters = this.baseFilters && this.baseFilters.length > 0;
|
||||||
console.log('Checking for filters - baseFilters:', this.baseFilters, 'hasBaseFilters:', hasBaseFilters);
|
// console.log('Checking for filters - baseFilters:', this.baseFilters, 'hasBaseFilters:', hasBaseFilters);
|
||||||
return hasBaseFilters;
|
return hasBaseFilters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -682,30 +682,30 @@ export class UnifiedChartComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (this.chartType) {
|
switch (this.chartType) {
|
||||||
case 'bar':
|
// case 'bar':
|
||||||
this.initializeBarChartOptions();
|
// this.initializeBarChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'line':
|
// case 'line':
|
||||||
this.initializeLineChartOptions();
|
// this.initializeLineChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'pie':
|
// case 'pie':
|
||||||
this.initializePieChartOptions();
|
// this.initializePieChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'doughnut':
|
// case 'doughnut':
|
||||||
this.initializeDoughnutChartOptions();
|
// this.initializeDoughnutChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'bubble':
|
// case 'bubble':
|
||||||
this.initializeBubbleChartOptions();
|
// this.initializeBubbleChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'radar':
|
// case 'radar':
|
||||||
this.initializeRadarChartOptions();
|
// this.initializeRadarChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'polar':
|
// case 'polar':
|
||||||
this.initializePolarChartOptions();
|
// this.initializePolarChartOptions();
|
||||||
break;
|
// break;
|
||||||
case 'scatter':
|
// case 'scatter':
|
||||||
this.initializeScatterChartOptions();
|
// this.initializeScatterChartOptions();
|
||||||
break;
|
// break;
|
||||||
default:
|
default:
|
||||||
this.initializeDefaultChartOptions();
|
this.initializeDefaultChartOptions();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,3 @@
|
|||||||
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';
|
||||||
@@ -60,10 +38,7 @@ 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';
|
||||||
@@ -109,13 +84,6 @@ 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';
|
||||||
@@ -127,10 +95,14 @@ 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' },
|
||||||
@@ -224,9 +196,14 @@ 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 },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// Shield Dashboard
|
// Shield Dashboard
|
||||||
{
|
{
|
||||||
path: 'shield-dashboard',
|
path: 'shield-dashboard',
|
||||||
@@ -331,178 +308,8 @@ 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,25 +1,3 @@
|
|||||||
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';
|
||||||
@@ -75,9 +53,6 @@ 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';
|
||||||
@@ -138,13 +113,7 @@ 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';
|
||||||
@@ -165,11 +134,34 @@ 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-manager/chart-config-manager.component';
|
import { ChartConfigManagerComponent } from './builder/dashboardnew/chart-config/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: [
|
||||||
@@ -189,6 +181,27 @@ import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manage
|
|||||||
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,
|
||||||
@@ -201,7 +214,7 @@ import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manage
|
|||||||
ApiregisterylineComponent,
|
ApiregisterylineComponent,
|
||||||
DatamanagementComponent, DatamananementworkflowComponent, BulkimportComponent, BulkimportallComponent, BulkimportaddComponent, BulkimporteditComponent, BulkimportlineComponent, BulkimporteditlineComponent, MappingruleComponent, MappingruleallComponent,
|
DatamanagementComponent, DatamananementworkflowComponent, BulkimportComponent, BulkimportallComponent, BulkimportaddComponent, BulkimporteditComponent, BulkimportlineComponent, BulkimporteditlineComponent, MappingruleComponent, MappingruleallComponent,
|
||||||
MappingruleaddComponent,
|
MappingruleaddComponent,
|
||||||
MappingruleeditComponent, Stepper_workflowComponent, Customer_informationComponent,
|
MappingruleeditComponent, Stepper_workflowComponent,
|
||||||
Data_lakeComponent,
|
Data_lakeComponent,
|
||||||
SureconnectComponent,
|
SureconnectComponent,
|
||||||
EditsureconnectComponent,
|
EditsureconnectComponent,
|
||||||
@@ -214,33 +227,9 @@ import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manage
|
|||||||
|
|
||||||
|
|
||||||
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,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -266,8 +255,10 @@ import { ChartTypePageComponent } from './builder/dashboardnew/chart-type-manage
|
|||||||
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, Subject } from 'rxjs';
|
import { Observable, BehaviorSubject } 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,70 +43,63 @@ 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({
|
.subscribe(jsonResp => {
|
||||||
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');
|
}
|
||||||
}
|
if (jsonResp !== undefined && jsonResp !== null && jsonResp.operationStatus === "SUCCESS"){
|
||||||
if (jsonResp !== undefined && jsonResp !== null && jsonResp.operationStatus === "SUCCESS"){
|
//Create a success object that we want to send back to login page
|
||||||
//Create a success object that we want to send back to login page
|
////"displayName": jsonResp.item.fullname,
|
||||||
////"displayName": jsonResp.item.fullname,
|
//"username" : jsonResp.item.username,
|
||||||
//"username" : jsonResp.item.username,
|
|
||||||
loginInfoReturn = {
|
|
||||||
"success" : true,
|
|
||||||
"message" : jsonResp.operationMessage,
|
|
||||||
"landingPage": this.landingPage,
|
|
||||||
"user" : {
|
|
||||||
"userId" : jsonResp.item.userId,
|
|
||||||
"email" : jsonResp.item.email,
|
|
||||||
"displayName": jsonResp.item.firstName,
|
|
||||||
"username" : jsonResp.item.username,
|
|
||||||
"roles" : jsonResp.item.roles,
|
|
||||||
"token" : jsonResp.item.token,
|
|
||||||
|
|
||||||
},
|
|
||||||
};
|
|
||||||
console.log(loginInfoReturn.user);
|
|
||||||
if(jsonResp !== undefined && jsonResp !== null && jsonResp.operationStatus === "SUCCESS"){
|
|
||||||
this.toastr.success(`Welcome To home Page!! your Role is ${jsonResp.item.roles}`);
|
|
||||||
}
|
|
||||||
// store username and jwt token in session storage to keep user logged in between page refreshes
|
|
||||||
this.userInfoService.storeUserInfo(JSON.stringify(loginInfoReturn.user));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//Create a failure object that we want to send back to login page
|
|
||||||
loginInfoReturn = {
|
|
||||||
"success":false,
|
|
||||||
"message":jsonResp.operationMessage,
|
|
||||||
"landingPage":"/login"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
loginDataSubject.next(loginInfoReturn);
|
|
||||||
loginDataSubject.complete(); // Complete the subject
|
|
||||||
},
|
|
||||||
error: (err) => {
|
|
||||||
console.log('login error ', err);
|
|
||||||
loginInfoReturn = {
|
loginInfoReturn = {
|
||||||
"success": false,
|
"success" : true,
|
||||||
"message": err.url + " >>> " + err.statusText + "[" + err.status +"]",
|
"message" : jsonResp.operationMessage,
|
||||||
"landingPage": "/login"
|
"landingPage": this.landingPage,
|
||||||
|
"user" : {
|
||||||
|
"userId" : jsonResp.item.userId,
|
||||||
|
"email" : jsonResp.item.email,
|
||||||
|
"displayName": jsonResp.item.firstName,
|
||||||
|
"username" : jsonResp.item.username,
|
||||||
|
"roles" : jsonResp.item.roles,
|
||||||
|
"token" : jsonResp.item.token,
|
||||||
|
|
||||||
|
},
|
||||||
};
|
};
|
||||||
if (err) {
|
console.log(loginInfoReturn.user);
|
||||||
this.toastr.error('Getting Server Error');
|
if(jsonResp !== undefined && jsonResp !== null && jsonResp.operationStatus === "SUCCESS"){
|
||||||
|
this.toastr.success(`Welcome To home Page!! your Role is ${jsonResp.item.roles}`);
|
||||||
}
|
}
|
||||||
loginDataSubject.next(loginInfoReturn); // Send the error response
|
// store username and jwt token in session storage to keep user logged in between page refreshes
|
||||||
loginDataSubject.complete(); // Complete the subject
|
this.userInfoService.storeUserInfo(JSON.stringify(loginInfoReturn.user));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//Create a faliure object that we want to send back to login page
|
||||||
|
loginInfoReturn = {
|
||||||
|
"success":false,
|
||||||
|
"message":jsonResp.operationMessage,
|
||||||
|
"landingPage":"/login"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
loginDataSubject.next(loginInfoReturn);
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
console.log('login error ', err);
|
||||||
|
loginInfoReturn = {
|
||||||
|
"success": false,
|
||||||
|
"message": err.url + " >>> " + err.statusText + "[" + err.status +"]",
|
||||||
|
"landingPage": "/login"
|
||||||
|
};
|
||||||
|
if (err) {
|
||||||
|
this.toastr.error('Getting Server Error');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return loginDataSubject;
|
return loginDataSubject;
|
||||||
}
|
}
|
||||||
|
|
||||||
logout(navigatetoLogout=true): void {
|
logout(navigatetoLogout=true): void {
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
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