Error when no pages found
This commit is contained in:
1 parent
402fadeb2f
commit
d705a391cc
2 files changed
+38
-18
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"topic": "Docs Commands Errors",
|
||||
"pageNumber": "17",
|
||||
"type": "No Matching Topic Or Tutorial Found",
|
||||
"definition": {
|
||||
"text": "The Topic or Tutorial you specified did not produce any match of pages within that Topic or Tutorial.",
|
||||
"updated": 1610398888306
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "No pages found. There are no Topics or Tutorials with the name provided.",
|
||||
"updated": 1610398925565
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Tip: Check that the name Topic or Tutorial name provided is correctly spelled.",
|
||||
"updated": 1610398957505
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Applies to"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Docs Repaginate Command",
|
||||
"updated": 1610398971728
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -550,27 +550,17 @@ function newSuperalgosDocsCommmandInterface() {
|
||||
query
|
||||
)
|
||||
|
||||
if (orderedArray.length = 0) {
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'No Matching Topic Or Tutorial Found')
|
||||
return
|
||||
}
|
||||
|
||||
let pageNumber = 1
|
||||
for (let i = 0; i < orderedArray.length; i++) {
|
||||
schemaDocument = orderedArray[i]
|
||||
switch (category) {
|
||||
case 'Topic': {
|
||||
if (schemaDocument.topic === query) {
|
||||
schemaDocument.pageNumber = pageNumber
|
||||
pageNumber++
|
||||
schemaDocument.updated = true
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'Tutorial': {
|
||||
if (schemaDocument.tutorial === query) {
|
||||
schemaDocument.pageNumber = pageNumber
|
||||
pageNumber++
|
||||
schemaDocument.updated = true
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
schemaDocument.pageNumber = pageNumber
|
||||
pageNumber++
|
||||
schemaDocument.updated = true
|
||||
}
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Repagination Succeed')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user