[ADF-2670] Updated doc indexes for 2.3 (#3183)

* [ADF-2670] Updated doc indexes for 2.3

* [ADF-2670] Clarified explanation of sharedLinkId property in Viewer

* [ADF-2670] Updated review checker for new doc folder structure
This commit is contained in:
Andy Stark
2018-04-12 16:46:36 +01:00
committed by Eugenio Romano
parent 014f2ab26c
commit 0d2f0b7b84
7 changed files with 64 additions and 39 deletions

View File

@@ -212,11 +212,6 @@ for more information about installing and using the source code.
| [Version list component](content-services/version-list.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component | [Source](../lib/content-services/version-manager/version-list.component.ts) |
| [Version manager component](content-services/version-manager.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node with the ability to upload a new version. | [Source](../lib/content-services/version-manager/version-manager.component.ts) |
| [Webscript component](content-services/webscript.component.md) | Provides access to Webscript features. | [Source](../lib/content-services/webscript/webscript.component.ts) |
| _Search fields component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-fields/search-fields.component.ts) |
| _Search radio component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-radio/search-radio.component.ts) |
| _Search scope locations component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-scope-locations/search-scope-locations.component.ts) |
| _Search text component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-text/search-text.component.ts) |
| _Search widget container component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-widget-container/search-widget-container.component.ts) |
## Directives
@@ -249,7 +244,6 @@ for more information about installing and using the source code.
| [Node permission service](content-services/node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../lib/content-services/permission-manager/services/node-permission.service.ts) |
| [Rating service](content-services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/social/services/rating.service.ts) |
| [Tag service](content-services/tag.service.md) | Manages tags in Content Services. | [Source](../lib/content-services/tag/services/tag.service.ts) |
| _Search query builder service_ | _Not currently documented_ | [Source](../lib/content-services/search/search-query-builder.service.ts) |
<!--content-services end-->

View File

@@ -36,11 +36,6 @@ for more information about installing and using the source code.
| [Version list component](version-list.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component | [Source](../../lib/content-services/version-manager/version-list.component.ts) |
| [Version manager component](version-manager.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | Displays the version history of a node with the ability to upload a new version. | [Source](../../lib/content-services/version-manager/version-manager.component.ts) |
| [Webscript component](webscript.component.md) | Provides access to Webscript features. | [Source](../../lib/content-services/webscript/webscript.component.ts) |
| _Search fields component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-fields/search-fields.component.ts) |
| _Search radio component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-radio/search-radio.component.ts) |
| _Search scope locations component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-scope-locations/search-scope-locations.component.ts) |
| _Search text component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-text/search-text.component.ts) |
| _Search widget container component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-widget-container/search-widget-container.component.ts) |
## Directives
@@ -73,6 +68,5 @@ for more information about installing and using the source code.
| [Node permission service](node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../../lib/content-services/permission-manager/services/node-permission.service.ts) |
| [Rating service](rating.service.md) | Manages ratings for items in Content Services. | [Source](../../lib/content-services/social/services/rating.service.ts) |
| [Tag service](tag.service.md) | Manages tags in Content Services. | [Source](../../lib/content-services/tag/services/tag.service.ts) |
| _Search query builder service_ | _Not currently documented_ | [Source](../../lib/content-services/search/search-query-builder.service.ts) |
<!--content-services end-->

View File

@@ -3,6 +3,7 @@ Added: v2.0.0
Status: Active
Last reviewed: 2018-03-07
---
# Viewer component
Displays content from an ACS repository.
@@ -55,6 +56,19 @@ Using with file url:
</adf-viewer>
```
Using with shared link:
```html
<adf-viewer
[overlayMode]="true"
[sharedLinkId]="'WWDg_afiTU6lHEgr4fAbQA'">
</adf-viewer>
```
Note that if you have a URL which contains a shared link ID, you should extract the
ID portion and use it with the `sharedLinkId` property rather than using the whole
URL with `urlFile`.
### Properties
| Name | Type | Default value | Description |

View File

@@ -95,13 +95,15 @@ name is _alfresco_ then you would set the `alfrescoRepositoryName` property in`a
to _alfresco-1002_ as follows:
```json
{
name: 'Alfresco ADF Application'
},
ecmHost: 'http://{hostname}{:port}/ecm',
bpmHost: 'http://{hostname}{:port}/bpm',
logLevel: 'silent',
alfrescoRepositoryName : 'alfresco-1002'
{
application: {
name: 'Alfresco ADF Application'
},
ecmHost: 'http://{hostname}{:port}/ecm',
bpmHost: 'http://{hostname}{:port}/bpm',
logLevel: 'silent',
alfrescoRepositoryName : 'alfresco-1002'
}
```
You then need to pass the node as the input `values` object with the other properties:

View File

@@ -52,5 +52,6 @@
"people-search-",
"people-selector",
"sidenav-layout-",
"layout-container"
"layout-container",
"search-"
]

View File

@@ -20,6 +20,7 @@ var angFilePattern = /(component)|(directive)|(model)|(pipe)|(service)|(widget)/
var srcData = {};
var stoplist = new stoplist_1.Stoplist(stoplistFilePath);
var docsFolderPath = path.resolve("..", "docs");
var libFolders = ["core", "content-services", "process-services", "insights"];
libsearch(srcData, path.resolve(rootFolder));
/*
let keys = Object.keys(srcData);
@@ -35,7 +36,7 @@ var client = new graphql_request_1.GraphQLClient('https://api.github.com/graphql
}
});
var query = "query commitHistory($path: String) {\n repository(name: \"alfresco-ng2-components\", owner: \"alfresco\") {\n ref(qualifiedName: \"development\") {\n target {\n ... on Commit {\n history(first: 15, path: $path) {\n nodes {\n pushedDate\n message\n }\n }\n }\n }\n }\n }\n}";
var docFiles = getDocFileNames(docsFolderPath);
var docFiles = getDocFilePaths(docsFolderPath);
var docNames = Rx_1.Observable.from(docFiles);
console.log("'Name','Review date','Commits since review','Score'");
docNames.subscribe(function (x) {
@@ -47,7 +48,7 @@ docNames.subscribe(function (x) {
};
client.request(query, vars).then(function (data) {
var nodes = data["repository"].ref.target.history.nodes;
var lastReviewDate = getDocReviewDate(key + ".md");
var lastReviewDate = getDocReviewDate(x); //(key + ".md");
var numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist);
var dateString = lastReviewDate.format("YYYY-MM-DD");
var score = priorityScore(lastReviewDate, numUsefulCommits).toPrecision(3);
@@ -84,12 +85,19 @@ function extractCommitInfo(commitNodes, cutOffDate, stoplist) {
});
return numUsefulCommits;
}
function getDocFileNames(folderPath) {
var files = fs.readdirSync(folderPath);
files = files.filter(function (filename) {
return (path.extname(filename) === ".md") &&
(filename !== "README.md") &&
(filename.match(angFilePattern));
function getDocFilePaths(folderPath) {
var result = [];
libFolders.forEach(function (element) {
var libPath = path.resolve(folderPath, element);
var files = fs.readdirSync(libPath);
files = files.filter(function (filename) {
return (path.extname(filename) === ".md") &&
(filename !== "README.md") &&
(filename.match(angFilePattern));
});
files.forEach(function (element) {
result.push(path.join(libPath, element));
});
});
return files;
return result;
}

View File

@@ -29,6 +29,8 @@ let stoplist = new Stoplist(stoplistFilePath);
let docsFolderPath = path.resolve("..", "docs");
let libFolders = ["core", "content-services", "process-services", "insights"];
libsearch(srcData, path.resolve(rootFolder));
/*
@@ -64,7 +66,7 @@ const query = `query commitHistory($path: String) {
}
}`;
let docFiles = getDocFileNames(docsFolderPath);
let docFiles = getDocFilePaths(docsFolderPath);
let docNames = Observable.from(docFiles);
@@ -83,7 +85,7 @@ docNames.subscribe(x => {
client.request(query, vars).then(data => {
let nodes = data["repository"].ref.target.history.nodes;
let lastReviewDate = getDocReviewDate(key + ".md");
let lastReviewDate = getDocReviewDate(x);//(key + ".md");
let numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist);
let dateString = lastReviewDate.format("YYYY-MM-DD");
@@ -139,14 +141,24 @@ function extractCommitInfo(commitNodes, cutOffDate, stoplist) {
}
function getDocFileNames(folderPath) {
let files = fs.readdirSync(folderPath);
function getDocFilePaths(folderPath) {
let result = [];
files = files.filter(filename =>
(path.extname(filename) === ".md") &&
(filename !== "README.md") &&
(filename.match(angFilePattern))
);
libFolders.forEach(element => {
let libPath = path.resolve(folderPath, element);
let files = fs.readdirSync(libPath);
return files;
files = files.filter(filename =>
(path.extname(filename) === ".md") &&
(filename !== "README.md") &&
(filename.match(angFilePattern))
);
files.forEach(element => {
result.push(path.join(libPath, element));
});
});
return result;
}