mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
name unify for setting import
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.12",
|
||||||
"ng2-activiti-processlist": "file:../",
|
"ng2-activiti-processlist": "file:../",
|
||||||
"alfresco-js-api": "^0.1.0",
|
"alfresco-js-api": "^0.2.0",
|
||||||
"material-design-icons": "^2.2.3",
|
"material-design-icons": "^2.2.3",
|
||||||
"material-design-lite": "^1.1.3"
|
"material-design-lite": "^1.1.3"
|
||||||
},
|
},
|
||||||
|
@@ -25,27 +25,45 @@ import {
|
|||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
ALFRESCO_CORE_PROVIDERS
|
ALFRESCO_CORE_PROVIDERS
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
import { HTTP_PROVIDERS, BrowserXhr } from '@angular/http';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `<activiti-processlist></activiti-processlist>`,
|
template: `label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
||||||
|
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="bpmHost"><br><br>
|
||||||
|
<div *ngIf="!authenticated" style="color:#FF2323">
|
||||||
|
Authentication failed to ip {{ bpmHost }} with user: admin, admin, you can still try to add a valid token to perform
|
||||||
|
operations.
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<label for="token"><b>Insert a scriptPath</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="scriptPath"><br>
|
||||||
|
<label for="token"><b>Insert a contextRoot</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="contextRoot"><br>
|
||||||
|
<label for="token"><b>Insert a servicePath</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
||||||
|
<div class="container" *ngIf="authenticated">
|
||||||
|
<activiti-processlist></activiti-processlist>
|
||||||
|
</div>`,
|
||||||
providers: [ACTIVITI_PROCESSLIST_PROVIDERS],
|
providers: [ACTIVITI_PROCESSLIST_PROVIDERS],
|
||||||
directives: [ACTIVITI_PROCESSLIST_DIRECTIVES]
|
directives: [ACTIVITI_PROCESSLIST_DIRECTIVES]
|
||||||
})
|
})
|
||||||
class MyDemoApp implements OnInit {
|
class MyDemoApp implements OnInit {
|
||||||
|
|
||||||
authenticated: boolean;
|
authenticated: boolean;
|
||||||
ecmHost: string = 'http://127.0.0.1:9999';
|
ecmHost: string = 'http://127.0.0.1:9999';
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private authService: AlfrescoAuthenticationService,
|
private authService: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService
|
private settingsService: AlfrescoSettingsService
|
||||||
) {
|
) {
|
||||||
console.log('constructor');
|
console.log('constructor');
|
||||||
|
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.setProviders('BPM');
|
||||||
|
settingsService.bpmHost = this.bpmHost;
|
||||||
|
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicket()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicket();
|
||||||
}
|
}
|
||||||
@@ -60,12 +78,12 @@ class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
login() {
|
login() {
|
||||||
this.authService.login('admin@app.activiti.com', 'admin', ['BPM']).subscribe(
|
this.authService.login('admin', 'admin').subscribe(
|
||||||
token => {
|
token => {
|
||||||
console.log(token);
|
console.log(token);
|
||||||
this.token = token;
|
this.token = token;
|
||||||
@@ -78,18 +96,6 @@ class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class CustomBrowserXhr extends BrowserXhr {
|
|
||||||
constructor() {}
|
|
||||||
build(): any {
|
|
||||||
let xhr = super.build();
|
|
||||||
xhr.withCredentials = true;
|
|
||||||
return <any>(xhr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bootstrap(MyDemoApp, [
|
bootstrap(MyDemoApp, [
|
||||||
ALFRESCO_CORE_PROVIDERS,
|
ALFRESCO_CORE_PROVIDERS
|
||||||
HTTP_PROVIDERS,
|
|
||||||
provide(BrowserXhr, { useClass: CustomBrowserXhr })
|
|
||||||
]);
|
]);
|
||||||
|
@@ -63,7 +63,8 @@
|
|||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.12",
|
||||||
"ng2-translate": "2.2.2",
|
"ng2-translate": "2.2.2",
|
||||||
"ng2-alfresco-core": "0.2.0",
|
"ng2-alfresco-core": "0.2.0",
|
||||||
"ng2-alfresco-datatable": "0.2.0"
|
"ng2-alfresco-datatable": "0.2.0",
|
||||||
|
"alfresco-js-api": "^0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"angular-cli": "1.0.0-beta.9",
|
"angular-cli": "1.0.0-beta.9",
|
||||||
|
@@ -27,7 +27,7 @@ import 'rxjs/add/operator/catch';
|
|||||||
export class ActivitiProcessService {
|
export class ActivitiProcessService {
|
||||||
|
|
||||||
|
|
||||||
constructor(private alfrescoSettingsService: AlfrescoSettingsService, private http: Http) {
|
constructor(private settingsService: AlfrescoSettingsService, private http: Http) {
|
||||||
}
|
}
|
||||||
|
|
||||||
getProcesses(): Observable<ProcessInstance[]> {
|
getProcesses(): Observable<ProcessInstance[]> {
|
||||||
@@ -35,7 +35,7 @@ export class ActivitiProcessService {
|
|||||||
headers.append('Content-Type', 'application/json');
|
headers.append('Content-Type', 'application/json');
|
||||||
// headers.append('Authorization', 'Basic ' + btoa('admin@app.activiti.com:admin'));
|
// headers.append('Authorization', 'Basic ' + btoa('admin@app.activiti.com:admin'));
|
||||||
return this.http.post(
|
return this.http.post(
|
||||||
this.alfrescoSettingsService.bpmHost + '/activiti-app/api/enterprise/process-instances/query',
|
this.settingsService.bpmHost + '/activiti-app/api/enterprise/process-instances/query',
|
||||||
'{"page":0,"sort":"created-desc","state":"all"}',
|
'{"page":0,"sort":"created-desc","state":"all"}',
|
||||||
new RequestOptions({
|
new RequestOptions({
|
||||||
headers: headers
|
headers: headers
|
||||||
|
@@ -33,11 +33,10 @@
|
|||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.12",
|
||||||
"license-check": "1.1.5",
|
"license-check": "1.1.5",
|
||||||
|
|
||||||
"material-design-icons": "2.2.3",
|
"material-design-icons": "2.2.3",
|
||||||
"material-design-lite": "1.1.3",
|
"material-design-lite": "1.1.3",
|
||||||
"ng2-translate": "2.2.2",
|
"ng2-translate": "2.2.2",
|
||||||
|
"alfresco-js-api": "^0.2.0",
|
||||||
"ng2-alfresco-datatable": "^0.1.12",
|
"ng2-alfresco-datatable": "^0.1.12",
|
||||||
"ng2-alfresco-core": "^0.1.36"
|
"ng2-alfresco-core": "^0.1.36"
|
||||||
},
|
},
|
||||||
|
@@ -15,36 +15,60 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
import {ALFRESCO_CORE_PROVIDERS, AlfrescoAuthenticationService, AlfrescoSettingsService} from 'ng2-alfresco-core';
|
||||||
import { ALFRESCO_CORE_PROVIDERS, AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import {ActivitiTaskList} from 'ng2-activiti-tasklist';
|
||||||
import { ActivitiTaskList } from 'ng2-activiti-tasklist';
|
import {ObjectDataTableAdapter, ObjectDataColumn} from 'ng2-alfresco-datatable';
|
||||||
import { ObjectDataTableAdapter, ObjectDataColumn } from 'ng2-alfresco-datatable';
|
import {HTTP_PROVIDERS} from '@angular/http';
|
||||||
|
|
||||||
declare let AlfrescoApi: any;
|
declare let AlfrescoApi: any;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'activiti-tasklist-demo',
|
selector: 'activiti-tasklist-demo',
|
||||||
template: `
|
template: `label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
||||||
<activiti-tasklist [data]="data"></activiti-tasklist>
|
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
||||||
`,
|
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="bpmHost"><br><br>
|
||||||
|
<div *ngIf="!authenticated" style="color:#FF2323">
|
||||||
|
Authentication failed to ip {{ bpmHost }} with user: admin, admin, you can still try to add a valid token to perform
|
||||||
|
operations.
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<label for="token"><b>Insert a scriptPath</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="scriptPath"><br>
|
||||||
|
<label for="token"><b>Insert a contextRoot</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="contextRoot"><br>
|
||||||
|
<label for="token"><b>Insert a servicePath</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
||||||
|
<div class="container" *ngIf="authenticated">
|
||||||
|
<activiti-tasklist></activiti-tasklist>
|
||||||
|
</div>`,
|
||||||
styles: [
|
styles: [
|
||||||
':host > .container {padding: 10px}',
|
':host > .container {padding: 10px}',
|
||||||
'.p-10 { padding: 10px; }'
|
'.p-10 { padding: 10px; }'
|
||||||
],
|
],
|
||||||
directives: [ActivitiTaskList],
|
directives: [ActivitiTaskList]
|
||||||
providers: [AlfrescoAuthenticationService]
|
|
||||||
})
|
})
|
||||||
class ActivitiTaskListDemo implements OnInit {
|
class ActivitiTaskListDemo implements OnInit {
|
||||||
|
|
||||||
|
bpmHost: string = 'http://127.0.0.1:9999';
|
||||||
|
|
||||||
|
token: string;
|
||||||
|
|
||||||
data: ObjectDataTableAdapter;
|
data: ObjectDataTableAdapter;
|
||||||
|
|
||||||
constructor(private setting: AlfrescoSettingsService) {
|
authenticated: boolean;
|
||||||
this.setting.setProviders(['BPM']);
|
|
||||||
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
|
private settingsService: AlfrescoSettingsService) {
|
||||||
|
this.settingsService.setProviders('BPM');
|
||||||
this.data = new ObjectDataTableAdapter([], []);
|
this.data = new ObjectDataTableAdapter([], []);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.login();
|
||||||
|
|
||||||
let schema = [
|
let schema = [
|
||||||
{type: 'text', key: 'id', title: 'Id'},
|
{type: 'text', key: 'id', title: 'Id'},
|
||||||
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
|
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
|
||||||
@@ -56,9 +80,21 @@ class ActivitiTaskListDemo implements OnInit {
|
|||||||
this.data.setColumns(columns);
|
this.data.setColumns(columns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
login() {
|
||||||
|
this.authService.login('admin', 'admin').subscribe(
|
||||||
|
token => {
|
||||||
|
console.log(token);
|
||||||
|
this.token = token;
|
||||||
|
this.authenticated = true;
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.log(error);
|
||||||
|
this.authenticated = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(ActivitiTaskListDemo, [
|
bootstrap(ActivitiTaskListDemo, [
|
||||||
HTTP_PROVIDERS,
|
HTTP_PROVIDERS,
|
||||||
ALFRESCO_CORE_PROVIDERS]
|
ALFRESCO_CORE_PROVIDERS]
|
||||||
);
|
);
|
||||||
|
@@ -68,9 +68,9 @@
|
|||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.12",
|
||||||
"ng2-translate": "2.2.2",
|
"ng2-translate": "2.2.2",
|
||||||
"ng2-alfresco-core": "0.2.0",
|
"ng2-alfresco-core": "0.2.0",
|
||||||
"ng2-alfresco-datatable": "0.2.0",
|
"ng2-alfresco-datatable": "0.2.0",
|
||||||
"ng2-activiti-form": "0.2.0",
|
"ng2-activiti-form": "0.2.0",
|
||||||
"alfresco-js-api": "0.2.0"
|
"alfresco-js-api": "^0.2.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"material-design-icons": "^2.2.3",
|
"material-design-icons": "^2.2.3",
|
||||||
|
@@ -149,11 +149,11 @@ class DocumentListDemo implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private authService: AlfrescoAuthenticationService,
|
private authService: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
translation: AlfrescoTranslationService,
|
translation: AlfrescoTranslationService,
|
||||||
private documentActions: DocumentActionsService) {
|
private documentActions: DocumentActionsService) {
|
||||||
|
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicket()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicket();
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ class DocumentListDemo implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,12 +65,12 @@ export class AppComponent {
|
|||||||
public providers: string = 'ECM';
|
public providers: string = 'ECM';
|
||||||
|
|
||||||
constructor(public auth: AlfrescoAuthenticationService,
|
constructor(public auth: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService) {
|
private settingsService: AlfrescoSettingsService) {
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
mySuccessMethod($event) {
|
mySuccessMethod($event) {
|
||||||
|
@@ -69,12 +69,12 @@ export class AlfrescoLoginComponent {
|
|||||||
* Constructor
|
* Constructor
|
||||||
* @param _fb
|
* @param _fb
|
||||||
* @param authService
|
* @param authService
|
||||||
* @param settingService
|
* @param settingsService
|
||||||
* @param translate
|
* @param translate
|
||||||
*/
|
*/
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
public authService: AlfrescoAuthenticationService,
|
public authService: AlfrescoAuthenticationService,
|
||||||
public settingService: AlfrescoSettingsService,
|
public settingsService: AlfrescoSettingsService,
|
||||||
private translate: AlfrescoTranslationService) {
|
private translate: AlfrescoTranslationService) {
|
||||||
|
|
||||||
this.formError = {
|
this.formError = {
|
||||||
@@ -113,7 +113,7 @@ export class AlfrescoLoginComponent {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.settingService.setProviders(this.providers);
|
this.settingsService.setProviders(this.providers);
|
||||||
|
|
||||||
this.authService.login(value.username, value.password)
|
this.authService.login(value.username, value.password)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
|
@@ -63,16 +63,16 @@ class SearchDemo implements OnInit {
|
|||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
translation: AlfrescoTranslationService) {
|
translation: AlfrescoTranslationService) {
|
||||||
|
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
|
|
||||||
translation.addTranslationFolder();
|
translation.addTranslationFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -80,8 +80,8 @@ export class MyDemoApp implements OnInit {
|
|||||||
|
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService, private alfrescoSettingsService: AlfrescoSettingsService) {
|
constructor(private authService: AlfrescoAuthenticationService, private settingsService: AlfrescoSettingsService) {
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
|
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicket()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicket();
|
||||||
@@ -93,7 +93,7 @@ export class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -57,9 +57,9 @@ class MyDemoApp {
|
|||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService) {
|
private settingsService: AlfrescoSettingsService) {
|
||||||
|
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicket()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicket();
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ class MyDemoApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,9 +34,9 @@ import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
|
|||||||
<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
||||||
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="host"><br><br>
|
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="ecmHost"><br><br>
|
||||||
<div *ngIf="!authenticated" style="color:#FF2323">
|
<div *ngIf="!authenticated" style="color:#FF2323">
|
||||||
Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid token to perform
|
Authentication failed to ip {{ ecmHost }} with user: admin, admin, you can still try to add a valid token to perform
|
||||||
operations.
|
operations.
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -76,10 +76,10 @@ class WebscriptDemo implements OnInit {
|
|||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService) {
|
private settingsService: AlfrescoSettingsService) {
|
||||||
|
|
||||||
alfrescoSettingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
alfrescoSettingsService.setProviders('ECM');
|
settingsService.setProviders('ECM');
|
||||||
|
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicket()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicket();
|
||||||
@@ -91,7 +91,7 @@ class WebscriptDemo implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.ecmHost = this.ecmHost;
|
this.settingsService.ecmHost = this.ecmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user