Commit c4e7dafc authored by sourabh_roy's avatar sourabh_roy
Browse files

added user guide link

parent c303ec54
Pipeline #30598 passed with stages
in 3 minutes and 11 seconds
......@@ -13,6 +13,9 @@ export class CommonService {
EandOgroupEmailList=[];
workFlowNameList=[];
isUserGuide:boolean;
userGuideLink='';
filterByValue(array, string) {
return array.filter(o =>
Object.keys(o).some(k => String(o[k]).toLowerCase().includes(string.toLowerCase())));
......
......@@ -334,4 +334,17 @@ getWorkFlowList(): Observable<any> {
catchError(this.auth.errorHandler<any>('addProduct',errorData))
);
}
postWorkFlowCreate(data){
this.param = 'workflow';
let errorData={
'api':this.param,
}
return this.http.post<any>(this.workflow_endpoint_url+ this.workflow_host+ this.param,data, this.httpOptions).pipe(
map(this.extractData),
catchError(this.auth.errorHandler<any>('addProduct',errorData))
);
}
}
......@@ -131,4 +131,10 @@ p.tool-tip__info.tooltip_right:after {
top: -10px;
z-index: 2;
width: 233px !important;
}
.center-div{
margin: auto;
}
\ No newline at end of file
......@@ -71,7 +71,7 @@
</div>
<div class="col-sm-6 col-lg-6">
<!-- routerLink="/data-ingestion/workflow" -->
<div class="container1 cont_router1" >
<div class="container1 cont_router1">
<div class="card text-white bg-flat-color-1">
<div class="card-body pb-0">
<div class="text-light"><i class="fa fa-paper-plane" aria-hidden="true"></i>&nbsp; WorkFlow Service(Coming Soon!)
......@@ -142,6 +142,15 @@
</div>
</div>
</div>
<!-- <div class="center-div">
<div class="col-md-12">
<p><a style="
font-size: medium;
color: #e59034;" href="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide" target="_blank">Click here </a> for User Guide</p>
</div>
</div> -->
......
......@@ -28,13 +28,17 @@ export class DashboardMainComponent implements OnInit {
constructor(public restService:RestAPILayerService, public router: Router, public cmnSrc: CommonService, private cd: ChangeDetectorRef,private auth:AuthService) {
this.cmnSrc.sideNavLists=dashboardList[0]["sideValues"];
this.cmnSrc.SideNavHeader=dashboardList[0]["header"];
this.cmnSrc.isUserGuide=true;
this.cmnSrc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide";
// this.cmnSrc.sideNavLists = dashboardList;
}
ngOnInit(): void {
this.cmnSrc.isUserGuide=true;
this.cmnSrc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide";
//this.href=this.injector.get(Router);
if(this.auth.cloud_provider_name=="ibm"){
// window.location.reload(true);
......
table{
margin: 0 auto;
width: 100%;
}
td {
vertical-align: top;
}
\ No newline at end of file
<ngx-spinner bdColor = "rgba(0, 0, 0, 0.4)" size = "medium" color = "#fff" type = "ball-scale-multiple" ><p style="color: white" > Loading... </p></ngx-spinner>
<div class="modal-header" style=" padding: 4px 20px;" id="videoTitle">
<h4 class="modal-title" id="videoTitle1" style="width: 100%;">
Create Workflow
<button style="float: right;"
type="button"
(click)="closePopup()"
class="close"
data-dismiss="modal"
aria-label="Close"
>
&times;
</button>
</h4>
</div>
<div class="modal-body" style=" height: auto;">
<form #myForm id="myForm">
<table>
<tr>
<td>
<label>Workflow Name:&nbsp; </label>
</td>
<td>
<input type="text" placeholder="Workflow Name" [(ngModel)]="ngWorkflowName" name="ngWorkflowName">
</td>
</tr>
<!-- <tr>
<td>
<label>Dag Name: </label>
</td>
<td>
<input type="text" placeholder="Dag Name" [(ngModel)]="ngDagName" name="ngDagName">
</td>
</tr> -->
<tr>
<td>
<label>Description: </label>
</td>
<td>
<textarea placeholder="Description..." [(ngModel)]="ngDescription" value="" name="ngDescription"></textarea>
</td>
</tr>
</table>
</form>
<div style="text-align: center;">
<p *ngIf="isSuccess" style="color:green"> {{successMessge}}</p>
<p *ngIf="isError" style="color:red"> {{errorMessge}}</p>
</div>
<div class="row" style="justify-content: center;">
<button class="btn btn-success" form="login-form" type="submit"
style="width: 150px;" (click)="requestSubmit()" >
Create<i class="icon-material-outline-arrow-right-alt"></i>
</button>
</div>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CreateWorkflowComponent } from './create-workflow.component';
describe('CreateWorkflowComponent', () => {
let component: CreateWorkflowComponent;
let fixture: ComponentFixture<CreateWorkflowComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CreateWorkflowComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CreateWorkflowComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { NgxSpinnerService } from 'ngx-spinner';
import { AuthService } from 'src/app/common/Authentication/auth.service';
import { CommonService } from 'src/app/common/common.service';
import { RestAPILayerService } from 'src/app/common/rest-apilayer.service';
@Component({
selector: 'app-create-workflow',
templateUrl: './create-workflow.component.html',
styleUrls: ['./create-workflow.component.css']
})
export class CreateWorkflowComponent implements OnInit {
ngDagName='';
ngWorkflowName='';
ngDescription='';
isSuccess:boolean=false;
isError:boolean=false;
successMessge='';
errorMessge='';
constructor(private auth:AuthService,public activeModal: NgbActiveModal,public cmnSrvc: CommonService, private spinner: NgxSpinnerService,public restService:RestAPILayerService,) { }
ngOnInit(): void {
}
closePopup(){
this.activeModal.close();
}
requestSubmit() {
var resetForm = <HTMLFormElement>document.getElementById('myForm');
let timer = this.auth.refreshTokenTimer(this.auth.getIdToken());
if (timer <= 0) {
this.auth.subscribeRefreshToken();
}
const data = {
"workflowName": this.ngWorkflowName,
// "registrationInstructions": {
// "dagName": this.ngDagName,
// },
"description": this.ngDescription
}
this.spinner.show();
this.restService.postWorkFlowCreate(data).subscribe((result) => {
this.spinner.hide();
this.isSuccess = true;
this.isError = false;
this.successMessge = "You have successfully created " + this.ngWorkflowName + "."
resetForm.reset();
this.ngWorkflowName == '';
this.ngDagName = '';
this.ngDescription = '';
}, (err) => {
this.spinner.hide();
this.isError = true;
this.isSuccess = false;
this.errorMessge = err;
console.log(err);
});
}
}
......@@ -9,9 +9,10 @@ import { NgSelectModule } from '@ng-select/ng-select';
import { WorkFlowRunComponent } from './work-flow-run/work-flow-run.component';
import { WorkflowsComponent } from './workflows/workflows.component';
import { WfRunViewComponent } from './wf-run-view/wf-run-view.component';
import { CreateWorkflowComponent } from './create-workflow/create-workflow.component';
@NgModule({
declarations: [DataIngestionComponent, WorkFlowRunComponent, WorkflowsComponent, WfRunViewComponent],
declarations: [DataIngestionComponent, WorkFlowRunComponent, WorkflowsComponent, WfRunViewComponent, CreateWorkflowComponent],
imports: [
CommonModule,DataIngestionRoutingModule,NgxSpinnerModule,FormsModule,NgbModule,NgSelectModule
]
......
......@@ -28,15 +28,22 @@ export class WfRunViewComponent implements OnInit {
requestSubmit(){
this.spinner.show();
// const data={
// "status":this.ngWellRunStatus
// }
const data={
"status":this.ngWellRunStatus
}
"executionContext": {
"key":this.ngWellRunStatus
}
}
this.restService.updateWorkFlowRunStatus(this.runName,this.runID,data).subscribe((result) => {
this.spinner.hide();
console.log(result)
}, (err) => {
this.isError=true;
this.isSuccess=false;
this.errorMessge=err;
this.spinner.hide();
console.log(err);
......
......@@ -5,6 +5,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
import { AuthService } from 'src/app/common/Authentication/auth.service';
import { CommonService } from 'src/app/common/common.service';
import { RestAPILayerService } from 'src/app/common/rest-apilayer.service';
import { CreateWorkflowComponent} from '../create-workflow/create-workflow.component';
@Component({
selector: 'app-workflows',
......@@ -48,7 +49,13 @@ export class WorkflowsComponent implements OnInit {
}
openModalCreate(){
const modalRef = this.modalService.open(CreateWorkflowComponent);
let that=this;
modalRef.componentInstance.passEntryAdd.subscribe((result) => {
// that.UserList.push({"name":result.data.name,"description":result.data.description,"email":result.data.name})
})
}
searchFilter(search){
......
......@@ -53,10 +53,13 @@ export class DataPlatformComponent implements OnInit {
//"ResourceID","DefaultVerticalMeasurementID","FieldID","ResourceTypeID","ResourceSecurityClassification","HorizontalCRSID","WellID"]
headersList=[];
constructor(private auth:AuthService,private router:Router, public cmnSrvc: CommonService, private restService: RestAPILayerService,private spinner: NgxSpinnerService,) {
this.cmnSrvc.isUserGuide=true;
this.cmnSrvc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide-Search-for-Data.";
}
ngOnInit(): void {
this.cmnSrvc.isUserGuide=true;
this.cmnSrvc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide-Search-for-Data.";
this.getStorageKind();
}
......
......@@ -13,6 +13,8 @@ export class EntitlementComponent implements OnInit {
constructor(public cmnSrvc: CommonService, private restService: RestAPILayerService,) {
// this.cmnSrvc.sideNavLists=entitlementList;
this.cmnSrvc.isUserGuide=true;
this.cmnSrvc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide-Manage-Groups-and-Members";
this.cmnSrvc.sideNavLists=entitlementList[0]["sideValues"];
this.cmnSrvc.SideNavHeader=entitlementList[0]["header"];
}
......@@ -22,6 +24,8 @@ export class EntitlementComponent implements OnInit {
// const jsonFile = `assets/configuration/config.json`;
// this.cmnSrvc.sideNavLists=entitlementList;
this.cmnSrvc.isUserGuide=true;
this.cmnSrvc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide-Manage-Groups-and-Members";
this.cmnSrvc.sideNavLists=entitlementList[0]["sideValues"];
this.cmnSrvc.SideNavHeader=entitlementList[0]["header"];
//this.getEntitlements();
......
......@@ -45,4 +45,13 @@
<div *ngIf="UserList.length>0">
<ngb-pagination [collectionSize]="UserList.length" [(page)]="page" [maxSize]="5" [rotate]="true" [ellipses]="false" [boundaryLinks]="true"></ngb-pagination>
</div>
<!-- <div class="center-div">
<div class="col-md-12">
<p><a style="
font-size: medium;
color: #e59034;" href="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide" target="_blank">Click here </a> for User Guide</p>
</div>
</div> -->
</div>
\ No newline at end of file
......@@ -28,25 +28,46 @@
</div>
<p style="color: red;">{{error_Message_Div}}</p>
<div *ngIf="headers.length>0" style="margin-left: 1%;">
<table id="tblMemeberDetails" class="table table-striped">
<thead>
<th></th>
<th class="thHover" (click)="sort(name)" *ngFor="let name of headers">{{name}} <span style="float: right;" [ngClass]="istoggle ? 'fa fa-toggle-down' : 'fa fa-toggle-up'"></span></th>
</thead>
<tbody id="myTableUsers">
<tr *ngFor="let user of memberList | slice: (page-1) * pageSize : (page-1) * pageSize + pageSize">
<td (click)="deleteFunc(user.email)"><i class="fa fa-trash-o"></i></td>
<td>{{user.email}}</td>
<td>{{user.role}}</td>
</tr>
</tbody>
</table>
<div *ngIf="!isAWS">
<div *ngIf="headers.length>0" style="margin-left: 1%;">
<table id="tblMemeberDetails" class="table table-striped">
<thead>
<th></th>
<th class="thHover" (click)="sort(name)" *ngFor="let name of headers">{{name}} <span style="float: right;" [ngClass]="istoggle ? 'fa fa-toggle-down' : 'fa fa-toggle-up'"></span></th>
</thead>
<tbody id="myTableUsers">
<tr *ngFor="let user of memberList | slice: (page-1) * pageSize : (page-1) * pageSize + pageSize">
<td (click)="deleteFunc(user.email)"><i class="fa fa-trash-o"></i></td>
<td>{{user.email}}</td>
<td>{{user.role}}</td>
</tr>
</tbody>
</table>
</div>
<div *ngIf="memberList.length>10">
<ngb-pagination [collectionSize]="memberList.length" [(page)]="page" [maxSize]="5" [rotate]="true" [ellipses]="false" [boundaryLinks]="true"></ngb-pagination>
</div>
</div>
<div *ngIf="memberList.length>10">
<ngb-pagination [collectionSize]="memberList.length" [(page)]="page" [maxSize]="5" [rotate]="true" [ellipses]="false" [boundaryLinks]="true"></ngb-pagination>
<div *ngIf="isAWS">
<div *ngIf="memberList.length>0" style="margin-left: 1%;">
<table id="tblMemeberDetails" class="table table-striped">
<thead>
<th class="thHover" (click)="sort('name')">Member Id <span style="float: right;" [ngClass]="istoggle ? 'fa fa-toggle-down' : 'fa fa-toggle-up'"></span></th>
</thead>
<tbody id="myTableUsers">
<tr *ngFor="let user of memberList | slice: (page-1) * pageSize : (page-1) * pageSize + pageSize">
<td *ngIf="user!=''">{{user}}</td>
</tr>
</tbody>
</table>
</div>
<div *ngIf="memberList.length>10">
<ngb-pagination [collectionSize]="memberList.length" [(page)]="page" [maxSize]="5" [rotate]="true" [ellipses]="false" [boundaryLinks]="true"></ngb-pagination>
</div>
</div>
......@@ -54,3 +75,4 @@
......@@ -40,7 +40,7 @@ export class ManageUsersComponent implements OnInit {
memberList=[];
istoggle: boolean=false;
currentEmail='';
isAWS:boolean;
manageUsers_search_helptext=manageUsers_search_helptext;
......@@ -105,10 +105,12 @@ export class ManageUsersComponent implements OnInit {
this.spinner.hide();
this.error_Message_Div='';
if(this.auth.cloud_provider_name=='azure'){
this.memberList=[];
this.error_Message_Div="No data available";
this.isAWS=true;
this.memberList=result;
}
else{
this.isAWS=false;
if(result["members"] != undefined){
this.memberList=result["members"];
this.fullUserList=result["members"];
......
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { CommonService } from 'src/app/common/common.service';
@Component({
selector: 'app-externale-main',
......@@ -8,9 +9,14 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
})
export class ExternaleMainComponent implements OnInit {
constructor() { }
constructor(private cmnSrc:CommonService) {
this.cmnSrc.isUserGuide=false;
this.cmnSrc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide";
}
ngOnInit(): void {
this.cmnSrc.isUserGuide=false;
this.cmnSrc.userGuideLink="https://community.opengroup.org/osdu/ui/admin-ui/-/wikis/Admin-UI-User-Guide";
}
}
......@@ -90,11 +90,19 @@
<div class="col-sm-6">
<a id="menuToggle" class="menutoggle pull-left"><i class="fa fa fa-tasks"></i></a>
<div *ngIf="cmnSrv.isUserGuide" class="center-div" style="float: right;">
<p><a style=" text-align: center;
font-size: medium;
color: #e59034;" href="javascript:void(0);" (click)="navigateTouserguide()" target="_blank">Click here </a> for User Guide</p>
</div>
</div>
<div class="col-sm-6">
<div class="user-area dropdown float-right">
<h6 style="float: left;
margin-top: 7%;
font-weight: 600;">{{username}}</h6>
......
......@@ -17,11 +17,18 @@ export class HeaderComponent implements OnInit {
sideNavList=[];
username="";
entitlementList=entitlementList[0]["sideValues"];
constructor(public auth:AuthService, public router:Router,public cmnSrv:CommonService,private cd: ChangeDetectorRef) { }
isUserGuide:boolean;
userGuideLink;
constructor(public auth:AuthService, public router:Router,public cmnSrv:CommonService,private cd: ChangeDetectorRef) {
this.isUserGuide=this.cmnSrv.isUserGuide;
}
ngOnInit(): void {
console.log("inside header")
console.log(this.cmnSrv.sideNavLists)
this.isUserGuide=this.cmnSrv.isUserGuide;
this.userGuideLink=this.cmnSrv.userGuideLink
let decoded = jwt_decode(this.auth.getIdToken());
if(this.auth.cloud_provider_name=="gcp" || this.auth.cloud_provider_name=="ibm" || this.auth.cloud_provider_name=='azure'){
this.cmnSrv.username=decoded["name"];
......@@ -36,6 +43,11 @@ export class HeaderComponent implements OnInit {
this.href=this.router.url;
}
navigateTouserguide(){
let url="";
url=this.cmnSrv.userGuideLink;
window.open(url , "_blank");
}
logout(){
this.auth.logout();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment