From 0d2f0b7b84afa04626e61903558e266076c3954b Mon Sep 17 00:00:00 2001 From: Andy Stark <30621568+therealandeeee@users.noreply.github.com> Date: Thu, 12 Apr 2018 16:46:36 +0100 Subject: [PATCH] [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 --- docs/README.md | 6 ---- docs/content-services/README.md | 6 ---- docs/core/viewer.component.md | 14 ++++++++ .../start-process.component.md | 16 ++++++---- docs/undocStoplist.json | 3 +- lib/config/DocProcessor/reviewChecker.js | 26 +++++++++------ lib/config/DocProcessor/reviewChecker.ts | 32 +++++++++++++------ 7 files changed, 64 insertions(+), 39 deletions(-) diff --git a/docs/README.md b/docs/README.md index 3021893858..a482311678 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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) | diff --git a/docs/content-services/README.md b/docs/content-services/README.md index 5b0c036898..15eeb0a47c 100644 --- a/docs/content-services/README.md +++ b/docs/content-services/README.md @@ -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) | diff --git a/docs/core/viewer.component.md b/docs/core/viewer.component.md index 08e71740ec..e6b8b81f8a 100644 --- a/docs/core/viewer.component.md +++ b/docs/core/viewer.component.md @@ -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: ``` +Using with shared link: + +```html + + +``` + +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 | diff --git a/docs/process-services/start-process.component.md b/docs/process-services/start-process.component.md index 6d0836332d..7886126680 100644 --- a/docs/process-services/start-process.component.md +++ b/docs/process-services/start-process.component.md @@ -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: diff --git a/docs/undocStoplist.json b/docs/undocStoplist.json index f700abf495..82a04ef750 100644 --- a/docs/undocStoplist.json +++ b/docs/undocStoplist.json @@ -52,5 +52,6 @@ "people-search-", "people-selector", "sidenav-layout-", - "layout-container" + "layout-container", + "search-" ] \ No newline at end of file diff --git a/lib/config/DocProcessor/reviewChecker.js b/lib/config/DocProcessor/reviewChecker.js index 028ee3f15a..e129689a19 100644 --- a/lib/config/DocProcessor/reviewChecker.js +++ b/lib/config/DocProcessor/reviewChecker.js @@ -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; } diff --git a/lib/config/DocProcessor/reviewChecker.ts b/lib/config/DocProcessor/reviewChecker.ts index d15db187d2..cc0de7499a 100644 --- a/lib/config/DocProcessor/reviewChecker.ts +++ b/lib/config/DocProcessor/reviewChecker.ts @@ -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; } \ No newline at end of file