Visual Studio Code
164.28k
stars
29.31k
forks
source link
the typescript language service died unexpectedly 5 times in the last 5 minutes #19648
Closed
alancejacob closed 7 years ago
\r\n\t\t\r\n\t\r\n\t\r\n\t<div
id=\"tabsAdmin-1\">\r\n\t\t<div id=\"wrapper\"><div class=\"styled-select
blue semi-square\"><select
id=\"ddlAdminCountry\">\r\n\t\t<div
id=\"TaskListAdminIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t<div id=\"Admin_Report_C\">No Data
Found.\r\n\t\t\r\n\t \r\n\t<div
id=\"tabsAdmin-2\">\r\n\t\t<div id=\"Admin_Report_S\">No Data
Found.\r\n\t \r\n\t<div id=\"tabsAdmin-3\">\r\n\t\t<div
id=\"Admin_Report_T\">No Data Found.\r\n\t
\r\n\r\n\r\n<div id=\"PCModal\" class=\"modal fade\"
role=\"dialog\">\r\n\t<div class=\"modal-dialog\">\r\n\t\t\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t\t<div
class=\"modal-header\">\r\n\t\t\t\t<h3 id=\"myModalLabel\">Select Your
Country\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-body\">\r\n\t\t\t\t <select
id=\"ddlCountry\">\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-footer\">\t\t\t\t\t\r\n\t\t\t\t<button id=\"submit_btn\"
class=\"btn btn-primary\">Save\r\n\t\t\t \t
\r\n\t\t\r\n\t\r\n\r\n\r\n\r\n<link
rel=\"stylesheet\" href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/css/jquery-ui.css\">\r\n <script
src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery-ui.min.js \"
type=\"text/javascript\">\r\n<link href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/My_Dash_CSS.css \"
rel=\"stylesheet\" type=\"text/css\"/>\r\n<script src=\"
https://code.highcharts.com/highcharts.js \">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/bootstrap.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.cookie.js.js \">\r\n\r\n<script
type=\"text/javascript\">\r\nfunction openBasicDialog(ID) {\r\n\t\tvar
options = {\r\n\t\turl: '
https://pathseattle.sharepoint.com/teams/AuditTracker/Lists/Audit%20Tracker/EditForm.aspx?ID ='
ID,\r\n\t\targs: ID,\r\n\t\ttitle: 'Task Details',\r\n\t\twidth:
1250,\r\n\t\theight: 1100,\r\n\t\tdialogReturnValueCallback:
dialogCallback,\r\n\t\t};\r\n SP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.showModalDialog', options);\r\n}\r\nfunction
dialogCallback(dialogResult, returnValue) {\r\n\tif (dialogResult ==
SP.UI.DialogResult.OK)
{\r\n\t\twindow.location.reload();\r\n\t}\r\n}\r\n$(document).ready(function
() {\r\n\t$( function()
{\r\n\t\t\r\n\t\tModule.GetTasks.LoadDDL(\"#ddlAdminCountry\");\r\n\t\tif(!localStorage.getItem(\"PATHATAFLocation\")){\r\n\t\t\t$('#PCModal').on('show.bs.modal',
function ()
{\t\t\t\t\r\n\t\t\t\tModule.GetTasks.LoadDDL(\"#ddlCountry\");\r\n\t\t\t})\r\n\t\t\t$('#PCModal').modal('show');\r\n\t\t}\r\n\t});\r\n\r\n\t$(function(){\r\n\t\t$(document).on(\"click\",
\"#submit_btn\",
function(event){\r\n\t\t\tlocalStorage.removeItem(\"PATHATAFLocation\");\r\n\t\t\tlocalStorage.setItem('PATHATAFLocation',$(\"#ddlCountry\").val());
\r\n\t\t\t$('#PCModal').modal('hide');\r\n\t\t\t\r\n\t\t});
\r\n\t});\r\n\t$(function(){\r\n\t\t$('[data-toggle=\"tooltip\"]').tooltip();\r\n\t\t$(
\"#tabs\"
).tabs();\r\n\t\tModule.GetTasks.init();\t\t\r\n\t});\r\n});\r\n/ Requires
jQuery /\r\n\r\nvar Module = {} || Module;\r\nModule.GetTasks = (function
() {\r\n var obj = {},\r\n _userId, //userID of
current user\r\n\t\t_userName,\r\n\t\t_clientContext,\t\t\r\n\t\t itemsarry
=[],\r\n\t\t itemsReports =[],\r\n\t\t itemsSubarry = 0,\r\n\t\t
_Query,\r\n\t\t itemsFinalarry = new Array(),\r\n\t\t _tasks = [],
//List of our tasks\r\n _options = {\r\n listName:
\"Audit Tracker\", //Name of list we want\r\n
containerOpen: \"#TaskListOpenIssues\", //id of html element we're
rendering our list of tasks in\r\n\t\t\tcontainerAdmin:
\"#TaskListAdminIssues\",\r\n\t\t\tReport_Chart:
\"Report_Chart\",\r\n\t\t\tAdmin_Report_C :
\"Admin_Report_C\",\r\n\t\t\tAdmin_Report_S :
\"Admin_Report_S\",\r\n\t\t\tAdmin_Report_T :
\"Admin_Report_T\",\r\n\t\t\tUserLocation :
localStorage.getItem(\"PATHATAFLocation\"),\r\n };\r\n\r\n
//Module Initializer\r\n obj.init = function
(){\r\n\t\tShowWaitDialog();\t\t\r\n\t\tSP.SOD.executeFunc('sp.js',
'SP.ClientContext', function(){\r\n\t\t\t_clientContext = new
SP.ClientContext.get_current();\r\n\t\t\t_userId =
_spPageContextInfo.userId;\r\n\t\t\t_userName =
_spPageContextInfo.userDisplayName;\t\t\t\r\n\t\t\tvar TabName =
null;\r\n\t\t\tisUserMemberOfGroup(_userId, 22, function
(isCurrentUserInGroup)
{\r\n\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t\r\n\t\t\t\t\tisUserMemberOfGroup(_userId,
26, function (isCurrentUserInGroup)
{\r\n\t\t\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:0});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-1\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-2\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-3\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\t\t\t\tdrawTable(_options.containerOpen,_options.Report_Chart,null,TabName);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(
\"#tabs\" ).tabs({ activate: function(event ,ui){ \r\n\t\t\t\tTabName
ui.newTab.attr('li',\"innerHTML\")[0].getElementsByTagName(\"a\")[0].innerHTML;\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\tdrawTable(_options.containerOpen,null,null,TabName);\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t}});\r\n\t\t\t\r\n\t\t\t$('#ddlAdminCountry').on('change',
function() {\r\n\t\t\t\titemsReports =
[];\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, $('#ddlAdminCountry').val(),TabName).then(function ()
{\r\n\t\t\t\t\tvar Country =
$('#ddlAdminCountry').val();\r\n\t\t\t\t\tdrawTable(_options.containerAdmin,_options.Admin_Report_C,Country,TabName);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t});\r\n
};\r\n\t\r\n\tobj.LoadDDL = function (ddlName) {\r\n\t\tvar listName =
\"Country\";\r\n\t\t$(ddlName).append($(\" \").attr(\"value\",0).text('Select
the country'));\r\n\t\tvar url = _spPageContextInfo.webAbsoluteUrl +
\"/_api/lists/getbytitle('\" + listName +
\"')/items?$select=Title&$orderby=Title
asc\";\r\n\t\t$.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype:
\"GET\",\r\n\t\t\tasync: false,\r\n\t\t\theaders: {\r\n\t\t\t\t\"accept\":
\"application/json;odata=verbose\",\r\n\t\t\t},\r\n\t\t\tsuccess: function
(results) { \r\n\t\t\t\tvar _title =
results.d.results;\r\n\t\t\t\t$.each(_title, function (index, data)
{\r\n\t\t\t\t\t$(ddlName).append($(\" \").attr(\"value\",data.Title).text(data.Title));\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\terror:
function (error) { \r\n\t\t\t\tconsole.log(\"Error in getting List: \" +
listName); \r\n\t\t\t\t$(_options.container).html(\"Error retrieving your
\" + listName +
\".\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\t\t\r\n\tfunction
drawTable(container,Report,Country,TabName) {\r\n\t\tvar totalData =
0;\r\n\t\tvar seriesarray = new Array();\r\n \tvar returnObj =
{};\r\n\t\tvar label = [];\r\n\t\tvar seriesitem ;\r\n\t\tvar title =
null;\r\n\t\tvar itemReport;\r\n\t\tif(TabName == 'Findings by
Theme'){\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(TabName == 'Findings by
Status'){\r\n\t\t\ttitle = 'Findings by Status';\r\n\t\t\t$.each(itemsarry,
function( key, value )
{\r\n\t\t\t\tlabel.push(value['Theme']);\r\n\t\t\t\titemReport.push(value['TaskStatus']);\r\n\t\t\t\t//
seriesitem = {\r\n\t\t\t\t\t\t// name: value['Theme'],\r\n\t\t\t\t\t\t//
data:[ value['TaskStatus'] ]\r\n\t\t\t\t\t// };\r\n\t\t\t\t//
seriesarray.push(seriesitem);\t\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t$.each(itemReport,
function(key,value) {\r\n\t\t\t\tvar numOccr = $.grep(itemReport, function
(elem) {\r\n\t\t\t\t\treturn elem ===
value;\r\n\t\t\t\t}).length;\r\n\t\t\t\t\treturnObj[value] =
numOccr\r\n\t\t\t});\t\t\t\r\n\t\t\t$.each(returnObj, function( key, value
) {\r\n\t\t\t\t\tseriesitem = {\r\n\t\t\t\t\t\tname:
key,\r\n\t\t\t\t\t\tdata:[ value
]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tseriesarray.push(seriesitem);\t\t\t\t\r\n\t\t\t});
\r\n\t\t\tbarChart(label,seriesarray,totalData,_options.Admin_Report_S,title);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$.each(itemsReports,
function(key,value) {\r\n\t\t\t\tvar numOccr = $.grep(itemsReports,
function (elem) {\r\n\t\t\t\t\treturn elem ===
value;\r\n\t\t\t\t}).length;\r\n\t\t\t\t\treturnObj[value] =
numOccr\r\n\t\t\t});\t\t\t\r\n\t\t\t$.each(returnObj, function( key, value
) {\r\n\t\t\t\t\tseriesitem = {\r\n\t\t\t\t\t\tname:
key,\r\n\t\t\t\t\t\tdata:[ value
]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tseriesarray.push(seriesitem);\t\t\t\t\r\n\t\t\t});
\r\n\t\t\tbarChart(label,seriesarray,totalData,Report,Country);\t\t\r\n\t\t}\t\t\t\r\n\t\tRequestEnded();\t\t\r\n
}\r\n\t\r\n\tfunction
barChart(label,seriesarray,totalData,Report_Chart,title){\r\n\t\t\r\n\t\t
Highcharts.chart(Report_Chart, {\r\n\t\t\tchart: {\r\n\t\t\t\ttype:
'column'\r\n\t\t\t},\r\n\t\t\ttitle: {\r\n\t\t\t\ttext: 'Total findings in
'+ title\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\txAxis: {\r\n\t\t\t\tcategories:
label,\r\n\t\t\t\tcrosshair: true\r\n\t\t\t},\r\n\t\t\tyAxis:
{\r\n\t\t\t\tmin: 0,\r\n\t\t\t\ttitle: {\r\n\t\t\t\t\ttext:
'Total'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\ttooltip:
{\r\n\t\t\t\theaderFormat: '<span
style=\"font-size:10px\">
',\r\n\t\t\t\tpointFormat: '<td
style=\"color:{series.color};padding:0\">{series.name}: '
+\r\n\t\t\t\t\t'<td
style=\"padding:0\">{point.y:.1f} ',\r\n\t\t\t\tfooterFormat:
'
',\r\n\t\t\t\tshared: true,\r\n\t\t\t\tuseHTML:
true\r\n\t\t\t},\r\n\t\t\tplotOptions: {\r\n\t\t\t\tcolumn:
{\r\n\t\t\t\t\tpointPadding: 0.2,\r\n\t\t\t\t\tborderWidth:
0\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tseries:
seriesarray\r\n\t\t});\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\tRetriveParentTaskArray
= function () {\r\n\t\tvar getParentTaskArray = function(ListName,_userId,
UserLocation, TabName){\r\n\t\t\tvar deferred =
$.Deferred();\t\r\n\t\t\tvar flag = false;\r\n\t\t\tvar list =
_clientContext.get_web().get_lists().getByTitle(ListName);\r\n\t\t\tvar
camlQuery = new SP.CamlQuery();\r\n\t\t\tif(TabName == 'Findings by
Theme'){\r\n\t\t\t\tvar query =
''+\t\t\t\r\n\t\t\t\t'<FieldRef Name=\'Country\'
/><Value Type=\'Text\'>'+ UserLocation +' '
+\r\n\t\t\t' ';\t\r\n\t\t\tflag =
true;\r\n\t\t\t}\r\n\t\t\telse if(TabName == 'Findings by
Status'){\r\n\t\t\t\tvar query =
' ';\t\t\t\t\r\n\t\t\t\tflag =
true;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tvar query =
''+\t\t\t\r\n\t\t\t\t'<FieldRef Name=\'Country\'
/><Value Type=\'Text\'>'+ UserLocation +' '
+\r\n\t\t\t' ';\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tcamlQuery.set_viewXml(query);\r\n\t\t\tlistItems
= list.getItems(camlQuery);\r\n\t\t\t//Only retrieve the \"ID\", \"Title\"
and \"Status\" fields.\r\n\t\t\t_clientContext.load(listItems,
'Include(ID,Title,Status,Theme,Country)');\r\n\t\t\t//Execute the listitem
query\r\n\t\t\t_clientContext.executeQueryAsync(\r\n\t\t\t\t\t\tFunction.createDelegate(this,
function () {deferred.resolve(onListItemsLoadSuccess(flag));
}),\r\n\t\t\t\t\t\tFunction.createDelegate(this, function (sender, args) {
deferred.reject(sender, args); })\r\n\t\t\t\t\t);\r\n\t\t\treturn
deferred.promise();\r\n\t\t\t};\r\n\t\treturn {\r\n\t\tgetParentTaskArray:
getParentTaskArray\r\n\t\t}\r\n\t}();\r\n\tfunction
onListItemsLoadSuccess(flag) {\r\n\t\tvar Theme = null;\r\n\t\titemsarry =
[];\r\n\t\tvar listEnumerator = listItems.getEnumerator();\r\n\t\tvar
itemCount =
listItems.get_count();\t\r\n\t\tif(itemCount>0){\t\t\t\t\r\n\t\t\twhile
(listEnumerator.moveNext()) { \r\n\t\t\t\tvar oListItem =
listEnumerator.get_current();\r\n\t\t\t\tvar AssignedTo =
[];\r\n\t\t\t\tvar Author = null;\r\n\t\t\t\tvar isCompleted =
[];\r\n\t\t\t\tTheme =
oListItem.get_item('Theme').get_lookupValue();\t\r\n\t\t\t\tif(flag
==true){\r\n\t\t\t\t\titemsarry.push({\r\n\t\t\t\t\t\t\"Title\":
oListItem.get_item('Title'),\r\n\t\t\t\t\t\t\"TaskStatus\" :
oListItem.get_item('Status'),\r\n\t\t\t\t\t\t\"Theme\" :
Theme,\r\n\t\t\t\t\t\t\"Country\" :
oListItem.get_item('Country').get_lookupValue()\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\titemsReports.push(Theme);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction
isUserMemberOfGroup(userId, groupId, success,error)
{\r\n\t\t//alert('inside1');\r\n\t\t var ctx =
SP.ClientContext.get_current(); \r\n\t\t var allGroups =
ctx.get_web().get_siteGroups();\r\n\t\t var group =
allGroups.getById(groupId);\r\n\t\t ctx.load(group,'Users');\r\n\r\n\t\t
ctx.executeQueryAsync(\r\n\t\t\tfunction(sender, args)
{//alert('inside2');\r\n\t\t\t\tvar userInGroup =
findUserById(group.get_users(),userId);\r\n\t\t\t\tsuccess(userInGroup);\r\n\t\t
},\r\n\t\t error); \r\n\r\n\t\t var findUserById =
function(users,id){\r\n\t\t // alert('inside find by user id');\r\n\t\t\t
var found = false;\r\n\t\t\t var e =
group.get_users().getEnumerator();\r\n\t\t\t while (e.moveNext())
{\r\n\t\t\t\t\tvar user = e.get_current();\r\n\t\t\t\t\tif (user.get_id()
== id) {\r\n\t\t\t\t\t\tfound =
true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t }
\r\n\t\t\t return found; \r\n\t\t };\r\n\t}\r\n\t\r\n\t// Error
Handling
......................................................\r\n\tfunction
CatchError(message,list) {\r\n\r\n\t\tvar oList =
_clientContext.get_web().get_lists().getByTitle('ErrorCatch
List');\t\t\t\r\n\t\tvar itemCreateInfo = new
SP.ListItemCreationInformation();\r\n\t\tthis.oListItem =
oList.addItem(itemCreateInfo);\t\t\t\r\n\t\toListItem.set_item('Title',
list);\r\n\t\toListItem.set_item('Error_x0020_Message',
message);\r\n\t\toListItem.update();\r\n\t\t_clientContext.load(oListItem);\t\t\t\r\n\t\t_clientContext.executeQueryAsync(Function.createDelegate(this.onCatchErrorQuerySucceeded),
Function.createDelegate(this.onCatchErrorQueryFailed));\r\n\t}\r\n\tfunction
onCatchErrorQuerySucceeded() {}\r\n\tfunction
onCatchErrorQueryFailed(sender, args) {}\r\n\t\r\n\tfunction
ShowWaitDialog() {\t\t\t\r\n\t\ttry {\r\n\t\t\t
SP.SOD.executeFunc('sp.ui.dialog.js',
'SP.UI.ModalDialog.showWaitScreenWithNoClose', function() \r\n\t\t\t{
\r\n\t\t\t\t//SP.UI.ModalDialog.showWaitScreenWithNoClose(SP.Res.dialogLoading15);\r\n\t\t\t\tSP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...','',
70, 260);\r\n\t\t\t}); \r\n\t\t}catch (ex) { }\r\n\t};\t\t\r\n\tfunction
RequestEnded(sender, args) {\r\n\t\ttry
{\r\n\t\t\tSP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.commonModalDialogClose');\r\n\t\t}catch (ex) {
}\r\n\t};\t\r\n\t\r\n\treturn obj;\r\n}());\r\n"
}
[Trace - 12:00:13 PM] Sending request: geterr (7). Response expected: no.
Current queue length: 0
Arguments: {
"delay": 0,
"files": [
"//pathseattle.sharepoint.com@SSL
/DavWWWRoot/teams/AuditTracker/SiteAssets/scripts/Reports.js"
]
}
[Error - 12:00:16 PM] TSServer exited with code: 3221226356
[Info - 12:00:16 PM] Using tsserver from location: c:\Program Files
(x86)\Microsoft VS Code
Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js
[Trace - 12:00:16 PM] Sending request: configure (8). Response expected:
yes. Current queue length: 0
Arguments: {
"hostInfo": "vscode"
}
[Trace - 12:00:16 PM] Response received: configure (8). Request took 234
ms. Success: true
[Trace - 12:00:16 PM] Sending request: compilerOptionsForInferredProjects
(9). Response expected: yes. Current queue length: 3
Arguments: {
"options": {
"module": "CommonJS",
"target": "ES6",
"allowSyntheticDefaultImports": true,
"allowNonTsExtensions": true,
"allowJs": true,
"jsx": "Preserve"
}
}
[Trace - 12:00:16 PM] Response received: compilerOptionsForInferredProjects
(9). Request took 235 ms. Success: true
Result: true
[Trace - 12:00:16 PM] Sending request: open (10). Response expected: no.
Current queue length: 2
Arguments: {
"file": "//pathseattle.sharepoint.com@SSL
/DavWWWRoot/teams/AuditTracker/SiteAssets/scripts/Reports.js",
"fileContent": "<div id=\"tabs\">\r\n \r\n <a
href=\"#tabsUser\">Findings by Country \r\n <a
href=\"#tabsAdmin-1\">Findings by Country \r\n\t<a
href=\"#tabsAdmin-2\">Findings by Status \r\n\t<a
href=\"#tabsAdmin-3\">Findings by Theme \r\n \r\n\t<div
id=\"tabsUser\">\r\n\t\t<div
id=\"TaskListOpenIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t\r\n\t\t\t<div
id=\"Report_Chart\">No Data
Found.
\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t<div
id=\"tabsAdmin-1\">\r\n\t\t<div id=\"wrapper\"><div class=\"styled-select
blue semi-square\"><select
id=\"ddlAdminCountry\">\r\n\t\t<div
id=\"TaskListAdminIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t<div id=\"Admin_Report_C\">No Data
Found.\r\n\t\t\r\n\t \r\n\t<div
id=\"tabsAdmin-2\">\r\n\t\t<div id=\"Admin_Report_S\">No Data
Found.\r\n\t \r\n\t<div id=\"tabsAdmin-3\">\r\n\t\t<div
id=\"Admin_Report_T\">No Data Found.\r\n\t
\r\n\r\n\r\n<div id=\"PCModal\" class=\"modal fade\"
role=\"dialog\">\r\n\t<div class=\"modal-dialog\">\r\n\t\t\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t\t<div
class=\"modal-header\">\r\n\t\t\t\t<h3 id=\"myModalLabel\">Select Your
Country\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-body\">\r\n\t\t\t\t <select
id=\"ddlCountry\">\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-footer\">\t\t\t\t\t\r\n\t\t\t\t<button id=\"submit_btn\"
class=\"btn btn-primary\">Save\r\n\t\t\t \t
\r\n\t\t\r\n\t\r\n\r\n\r\n\r\n<link
rel=\"stylesheet\" href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/css/jquery-ui.css\">\r\n <script
src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery-ui.min.js \"
type=\"text/javascript\">\r\n<link href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/My_Dash_CSS.css \"
rel=\"stylesheet\" type=\"text/css\"/>\r\n<script src=\"
https://code.highcharts.com/highcharts.js \">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/bootstrap.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.cookie.js.js \">\r\n\r\n<script
type=\"text/javascript\">\r\nfunction openBasicDialog(ID) {\r\n\t\tvar
options = {\r\n\t\turl: '
https://pathseattle.sharepoint.com/teams/AuditTracker/Lists/Audit%20Tracker/EditForm.aspx?ID ='
ID,\r\n\t\targs: ID,\r\n\t\ttitle: 'Task Details',\r\n\t\twidth:
1250,\r\n\t\theight: 1100,\r\n\t\tdialogReturnValueCallback:
dialogCallback,\r\n\t\t};\r\n SP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.showModalDialog', options);\r\n}\r\nfunction
dialogCallback(dialogResult, returnValue) {\r\n\tif (dialogResult ==
SP.UI.DialogResult.OK)
{\r\n\t\twindow.location.reload();\r\n\t}\r\n}\r\n$(document).ready(function
() {\r\n\t$( function()
{\r\n\t\t\r\n\t\tModule.GetTasks.LoadDDL(\"#ddlAdminCountry\");\r\n\t\tif(!localStorage.getItem(\"PATHATAFLocation\")){\r\n\t\t\t$('#PCModal').on('show.bs.modal',
function ()
{\t\t\t\t\r\n\t\t\t\tModule.GetTasks.LoadDDL(\"#ddlCountry\");\r\n\t\t\t})\r\n\t\t\t$('#PCModal').modal('show');\r\n\t\t}\r\n\t});\r\n\r\n\t$(function(){\r\n\t\t$(document).on(\"click\",
\"#submit_btn\",
function(event){\r\n\t\t\tlocalStorage.removeItem(\"PATHATAFLocation\");\r\n\t\t\tlocalStorage.setItem('PATHATAFLocation',$(\"#ddlCountry\").val());
\r\n\t\t\t$('#PCModal').modal('hide');\r\n\t\t\t\r\n\t\t});
\r\n\t});\r\n\t$(function(){\r\n\t\t$('[data-toggle=\"tooltip\"]').tooltip();\r\n\t\t$(
\"#tabs\"
).tabs();\r\n\t\tModule.GetTasks.init();\t\t\r\n\t});\r\n});\r\n/ Requires
jQuery /\r\n\r\nvar Module = {} || Module;\r\nModule.GetTasks = (function
() {\r\n var obj = {},\r\n _userId, //userID of
current user\r\n\t\t_userName,\r\n\t\t_clientContext,\t\t\r\n\t\t itemsarry
=[],\r\n\t\t itemsReports =[],\r\n\t\t itemsSubarry = 0,\r\n\t\t
_Query,\r\n\t\t itemsFinalarry = new Array(),\r\n\t\t _tasks = [],
//List of our tasks\r\n _options = {\r\n listName:
\"Audit Tracker\", //Name of list we want\r\n
containerOpen: \"#TaskListOpenIssues\", //id of html element we're
rendering our list of tasks in\r\n\t\t\tcontainerAdmin:
\"#TaskListAdminIssues\",\r\n\t\t\tReport_Chart:
\"Report_Chart\",\r\n\t\t\tAdmin_Report_C :
\"Admin_Report_C\",\r\n\t\t\tAdmin_Report_S :
\"Admin_Report_S\",\r\n\t\t\tAdmin_Report_T :
\"Admin_Report_T\",\r\n\t\t\tUserLocation :
localStorage.getItem(\"PATHATAFLocation\"),\r\n };\r\n\r\n
//Module Initializer\r\n obj.init = function
(){\r\n\t\tShowWaitDialog();\t\t\r\n\t\tSP.SOD.executeFunc('sp.js',
'SP.ClientContext', function(){\r\n\t\t\t_clientContext = new
SP.ClientContext.get_current();\r\n\t\t\t_userId =
_spPageContextInfo.userId;\r\n\t\t\t_userName =
_spPageContextInfo.userDisplayName;\t\t\t\r\n\t\t\tvar TabName =
null;\r\n\t\t\tisUserMemberOfGroup(_userId, 22, function
(isCurrentUserInGroup)
{\r\n\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t\r\n\t\t\t\t\tisUserMemberOfGroup(_userId,
26, function (isCurrentUserInGroup)
{\r\n\t\t\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:0});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-1\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-2\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-3\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\t\t\t\tdrawTable(_options.containerOpen,_options.Report_Chart,null,TabName);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(
\"#tabs\" ).tabs({ activate: function(event ,ui){ \r\n\t\t\t\tTabName
ui.newTab.attr('li',\"innerHTML\")[0].getElementsByTagName(\"a\")[0].innerHTML;\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\tdrawTable(_options.containerOpen,null,null,TabName);\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t}});\r\n\t\t\t\r\n\t\t\t$('#ddlAdminCountry').on('change',
function() {\r\n\t\t\t\titemsReports =
[];\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, $('#ddlAdminCountry').val(),TabName).then(function ()
{\r\n\t\t\t\t\tvar Country =
$('#ddlAdminCountry').val();\r\n\t\t\t\t\tdrawTable(_options.containerAdmin,_options.Admin_Report_C,Country,TabName);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t});\r\n
};\r\n\t\r\n\tobj.LoadDDL = function (ddlName) {\r\n\t\tvar listName =
\"Country\";\r\n\t\t$(ddlName).append($(\" \").attr(\"value\",0).text('Select
the country'));\r\n\t\tvar url = _spPageContextInfo.webAbsoluteUrl +
\"/_api/lists/getbytitle('\" + listName +
\"')/items?$select=Title&$orderby=Title
asc\";\r\n\t\t$.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype:
\"GET\",\r\n\t\t\tasync: false,\r\n\t\t\theaders: {\r\n\t\t\t\t\"accept\":
\"application/json;odata=verbose\",\r\n\t\t\t},\r\n\t\t\tsuccess: function
(results) { \r\n\t\t\t\tvar _title =
results.d.results;\r\n\t\t\t\t$.each(_title, function (index, data)
{\r\n\t\t\t\t\t$(ddlName).append($(\" \").attr(\"value\",data.Title).text(data.Title));\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\terror:
function (error) { \r\n\t\t\t\tconsole.log(\"Error in getting List: \" +
listName); \r\n\t\t\t\t$(_options.container).html(\"Error retrieving your
\" + listName +
\".\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\t\t\r\n\tfunction
drawTable(container,Report,Country,TabName) {\r\n\t\tvar totalData =
0;\r\n\t\tvar seriesarray = new Array();\r\n \tvar returnObj =
{};\r\n\t\tvar label = [];\r\n\t\tvar seriesitem ;\r\n\t\tvar title =
null;\r\n\t\tvar itemReport;\r\n\t\tif(TabName == 'Findings by
Theme'){\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(TabName == 'Findings by
Status'){\r\n\t\t\ttitle = 'Findings by Status';\r\n\t\t\t$.each(itemsarry,
function( key, value )
{\r\n\t\t\t\tlabel.push(value['Theme']);\r\n\t\t\t\titemReport.push(value['TaskStatus']);\r\n\t\t\t\t//
seriesitem = {\r\n\t\t\t\t\t\t// name: value['Theme'],\r\n\t\t\t\t\t\t//
data:[ value['TaskStatus'] ]\r\n\t\t\t\t\t// };\r\n\t\t\t\t//
seriesarray.push(seriesitem);\t\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t$.each(itemReport,
function(key,value) {\r\n\t\t\t\tvar numOccr = $.grep(itemReport, function
(elem) {\r\n\t\t\t\t\treturn elem ===
value;\r\n\t\t\t\t}).length;\r\n\t\t\t\t\treturnObj[value] =
numOccr\r\n\t\t\t});\t\t\t\r\n\t\t\t$.each(returnObj, function( key, value
) {\r\n\t\t\t\t\tseriesitem = {\r\n\t\t\t\t\t\tname:
key,\r\n\t\t\t\t\t\tdata:[ value
]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tseriesarray.push(seriesitem);\t\t\t\t\r\n\t\t\t});
\r\n\t\t\tbarChart(label,seriesarray,totalData,_options.Admin_Report_S,title);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$.each(itemsReports,
function(key,value) {\r\n\t\t\t\tvar numOccr = $.grep(itemsReports,
function (elem) {\r\n\t\t\t\t\treturn elem ===
value;\r\n\t\t\t\t}).length;\r\n\t\t\t\t\treturnObj[value] =
numOccr\r\n\t\t\t});\t\t\t\r\n\t\t\t$.each(returnObj, function( key, value
) {\r\n\t\t\t\t\tseriesitem = {\r\n\t\t\t\t\t\tname:
key,\r\n\t\t\t\t\t\tdata:[ value
]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tseriesarray.push(seriesitem);\t\t\t\t\r\n\t\t\t});
\r\n\t\t\tbarChart(label,seriesarray,totalData,Report,Country);\t\t\r\n\t\t}\t\t\t\r\n\t\tRequestEnded();\t\t\r\n
}\r\n\t\r\n\tfunction
barChart(label,seriesarray,totalData,Report_Chart,title){\r\n\t\t\r\n\t\t
Highcharts.chart(Report_Chart, {\r\n\t\t\tchart: {\r\n\t\t\t\ttype:
'column'\r\n\t\t\t},\r\n\t\t\ttitle: {\r\n\t\t\t\ttext: 'Total findings in
'+ title\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\txAxis: {\r\n\t\t\t\tcategories:
label,\r\n\t\t\t\tcrosshair: true\r\n\t\t\t},\r\n\t\t\tyAxis:
{\r\n\t\t\t\tmin: 0,\r\n\t\t\t\ttitle: {\r\n\t\t\t\t\ttext:
'Total'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\ttooltip:
{\r\n\t\t\t\theaderFormat: '<span
style=\"font-size:10px\">
',\r\n\t\t\t\tpointFormat: '<td
style=\"color:{series.color};padding:0\">{series.name}: '
+\r\n\t\t\t\t\t'<td
style=\"padding:0\">{point.y:.1f} ',\r\n\t\t\t\tfooterFormat:
'
',\r\n\t\t\t\tshared: true,\r\n\t\t\t\tuseHTML:
true\r\n\t\t\t},\r\n\t\t\tplotOptions: {\r\n\t\t\t\tcolumn:
{\r\n\t\t\t\t\tpointPadding: 0.2,\r\n\t\t\t\t\tborderWidth:
0\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tseries:
seriesarray\r\n\t\t});\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\tRetriveParentTaskArray
= function () {\r\n\t\tvar getParentTaskArray = function(ListName,_userId,
UserLocation, TabName){\r\n\t\t\tvar deferred =
$.Deferred();\t\r\n\t\t\tvar flag = false;\r\n\t\t\tvar list =
_clientContext.get_web().get_lists().getByTitle(ListName);\r\n\t\t\tvar
camlQuery = new SP.CamlQuery();\r\n\t\t\tif(TabName == 'Findings by
Theme'){\r\n\t\t\t\tvar query =
''+\t\t\t\r\n\t\t\t\t'<FieldRef Name=\'Country\'
/><Value Type=\'Text\'>'+ UserLocation +' '
+\r\n\t\t\t' ';\t\r\n\t\t\tflag =
true;\r\n\t\t\t}\r\n\t\t\telse if(TabName == 'Findings by
Status'){\r\n\t\t\t\tvar query =
' ';\t\t\t\t\r\n\t\t\t\tflag =
true;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tvar query =
''+\t\t\t\r\n\t\t\t\t'<FieldRef Name=\'Country\'
/><Value Type=\'Text\'>'+ UserLocation +' '
+\r\n\t\t\t' ';\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tcamlQuery.set_viewXml(query);\r\n\t\t\tlistItems
= list.getItems(camlQuery);\r\n\t\t\t//Only retrieve the \"ID\", \"Title\"
and \"Status\" fields.\r\n\t\t\t_clientContext.load(listItems,
'Include(ID,Title,Status,Theme,Country)');\r\n\t\t\t//Execute the listitem
query\r\n\t\t\t_clientContext.executeQueryAsync(\r\n\t\t\t\t\t\tFunction.createDelegate(this,
function () {deferred.resolve(onListItemsLoadSuccess(flag));
}),\r\n\t\t\t\t\t\tFunction.createDelegate(this, function (sender, args) {
deferred.reject(sender, args); })\r\n\t\t\t\t\t);\r\n\t\t\treturn
deferred.promise();\r\n\t\t\t};\r\n\t\treturn {\r\n\t\tgetParentTaskArray:
getParentTaskArray\r\n\t\t}\r\n\t}();\r\n\tfunction
onListItemsLoadSuccess(flag) {\r\n\t\tvar Theme = null;\r\n\t\titemsarry =
[];\r\n\t\tvar listEnumerator = listItems.getEnumerator();\r\n\t\tvar
itemCount =
listItems.get_count();\t\r\n\t\tif(itemCount>0){\t\t\t\t\r\n\t\t\twhile
(listEnumerator.moveNext()) { \r\n\t\t\t\tvar oListItem =
listEnumerator.get_current();\r\n\t\t\t\tvar AssignedTo =
[];\r\n\t\t\t\tvar Author = null;\r\n\t\t\t\tvar isCompleted =
[];\r\n\t\t\t\tTheme =
oListItem.get_item('Theme').get_lookupValue();\t\r\n\t\t\t\tif(flag
==true){\r\n\t\t\t\t\titemsarry.push({\r\n\t\t\t\t\t\t\"Title\":
oListItem.get_item('Title'),\r\n\t\t\t\t\t\t\"TaskStatus\" :
oListItem.get_item('Status'),\r\n\t\t\t\t\t\t\"Theme\" :
Theme,\r\n\t\t\t\t\t\t\"Country\" :
oListItem.get_item('Country').get_lookupValue()\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\titemsReports.push(Theme);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction
isUserMemberOfGroup(userId, groupId, success,error)
{\r\n\t\t//alert('inside1');\r\n\t\t var ctx =
SP.ClientContext.get_current(); \r\n\t\t var allGroups =
ctx.get_web().get_siteGroups();\r\n\t\t var group =
allGroups.getById(groupId);\r\n\t\t ctx.load(group,'Users');\r\n\r\n\t\t
ctx.executeQueryAsync(\r\n\t\t\tfunction(sender, args)
{//alert('inside2');\r\n\t\t\t\tvar userInGroup =
findUserById(group.get_users(),userId);\r\n\t\t\t\tsuccess(userInGroup);\r\n\t\t
},\r\n\t\t error); \r\n\r\n\t\t var findUserById =
function(users,id){\r\n\t\t // alert('inside find by user id');\r\n\t\t\t
var found = false;\r\n\t\t\t var e =
group.get_users().getEnumerator();\r\n\t\t\t while (e.moveNext())
{\r\n\t\t\t\t\tvar user = e.get_current();\r\n\t\t\t\t\tif (user.get_id()
== id) {\r\n\t\t\t\t\t\tfound =
true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t }
\r\n\t\t\t return found; \r\n\t\t };\r\n\t}\r\n\t\r\n\t// Error
Handling
......................................................\r\n\tfunction
CatchError(message,list) {\r\n\r\n\t\tvar oList =
_clientContext.get_web().get_lists().getByTitle('ErrorCatch
List');\t\t\t\r\n\t\tvar itemCreateInfo = new
SP.ListItemCreationInformation();\r\n\t\tthis.oListItem =
oList.addItem(itemCreateInfo);\t\t\t\r\n\t\toListItem.set_item('Title',
list);\r\n\t\toListItem.set_item('Error_x0020_Message',
message);\r\n\t\toListItem.update();\r\n\t\t_clientContext.load(oListItem);\t\t\t\r\n\t\t_clientContext.executeQueryAsync(Function.createDelegate(this.onCatchErrorQuerySucceeded),
Function.createDelegate(this.onCatchErrorQueryFailed));\r\n\t}\r\n\tfunction
onCatchErrorQuerySucceeded() {}\r\n\tfunction
onCatchErrorQueryFailed(sender, args) {}\r\n\t\r\n\tfunction
ShowWaitDialog() {\t\t\t\r\n\t\ttry {\r\n\t\t\t
SP.SOD.executeFunc('sp.ui.dialog.js',
'SP.UI.ModalDialog.showWaitScreenWithNoClose', function() \r\n\t\t\t{
\r\n\t\t\t\t//SP.UI.ModalDialog.showWaitScreenWithNoClose(SP.Res.dialogLoading15);\r\n\t\t\t\tSP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...','',
70, 260);\r\n\t\t\t}); \r\n\t\t}catch (ex) { }\r\n\t};\t\t\r\n\tfunction
RequestEnded(sender, args) {\r\n\t\ttry
{\r\n\t\t\tSP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.commonModalDialogClose');\r\n\t\t}catch (ex) {
}\r\n\t};\t\r\n\t\r\n\treturn obj;\r\n}());\r\n"
}
[Trace - 12:00:16 PM] Sending request: geterr (11). Response expected: no.
Current queue length: 1
Arguments: {
"delay": 0,
"files": []
}
[Trace - 12:00:16 PM] Sending request: geterr (12). Response expected: no.
Current queue length: 0
Arguments: {
"delay": 0,
"files": [
"//pathseattle.sharepoint.com@SSL
/DavWWWRoot/teams/AuditTracker/SiteAssets/scripts/Reports.js"
]
}
[Error - 12:00:16 PM] TSServer exited with code: 3221226356
[Info - 12:00:16 PM] Using tsserver from location: c:\Program Files
(x86)\Microsoft VS Code
Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js
[Trace - 12:00:16 PM] Sending request: configure (13). Response expected:
yes. Current queue length: 0
Arguments: {
"hostInfo": "vscode"
}
[Trace - 12:00:16 PM] Response received: configure (13). Request took 226
ms. Success: true
[Trace - 12:00:16 PM] Sending request: compilerOptionsForInferredProjects
(14). Response expected: yes. Current queue length: 3
Arguments: {
"options": {
"module": "CommonJS",
"target": "ES6",
"allowSyntheticDefaultImports": true,
"allowNonTsExtensions": true,
"allowJs": true,
"jsx": "Preserve"
}
}
[Trace - 12:00:16 PM] Response received: compilerOptionsForInferredProjects
(14). Request took 227 ms. Success: true
Result: true
[Trace - 12:00:16 PM] Sending request: open (15). Response expected: no.
Current queue length: 2
Arguments: {
"file": "//pathseattle.sharepoint.com@SSL
/DavWWWRoot/teams/AuditTracker/SiteAssets/scripts/Reports.js",
"fileContent": "<div id=\"tabs\">\r\n \r\n <a
href=\"#tabsUser\">Findings by Country \r\n <a
href=\"#tabsAdmin-1\">Findings by Country \r\n\t<a
href=\"#tabsAdmin-2\">Findings by Status \r\n\t<a
href=\"#tabsAdmin-3\">Findings by Theme \r\n \r\n\t<div
id=\"tabsUser\">\r\n\t\t<div
id=\"TaskListOpenIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t\r\n\t\t\t<div
id=\"Report_Chart\">No Data
Found.
\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t<div
id=\"tabsAdmin-1\">\r\n\t\t<div id=\"wrapper\"><div class=\"styled-select
blue semi-square\"><select
id=\"ddlAdminCountry\">\r\n\t\t<div
id=\"TaskListAdminIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t<div id=\"Admin_Report_C\">No Data
Found.\r\n\t\t\r\n\t \r\n\t<div
id=\"tabsAdmin-2\">\r\n\t\t<div id=\"Admin_Report_S\">No Data
Found.\r\n\t \r\n\t<div id=\"tabsAdmin-3\">\r\n\t\t<div
id=\"Admin_Report_T\">No Data Found.\r\n\t
\r\n\r\n\r\n<div id=\"PCModal\" class=\"modal fade\"
role=\"dialog\">\r\n\t<div class=\"modal-dialog\">\r\n\t\t\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t\t<div
class=\"modal-header\">\r\n\t\t\t\t<h3 id=\"myModalLabel\">Select Your
Country\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-body\">\r\n\t\t\t\t <select
id=\"ddlCountry\">\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-footer\">\t\t\t\t\t\r\n\t\t\t\t<button id=\"submit_btn\"
class=\"btn btn-primary\">Save\r\n\t\t\t \t
\r\n\t\t\r\n\t\r\n\r\n\r\n\r\n<link
rel=\"stylesheet\" href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/css/jquery-ui.css\">\r\n <script
src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery-ui.min.js \"
type=\"text/javascript\">\r\n<link href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/My_Dash_CSS.css \"
rel=\"stylesheet\" type=\"text/css\"/>\r\n<script src=\"
https://code.highcharts.com/highcharts.js \">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/bootstrap.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.cookie.js.js \">\r\n\r\n<script
type=\"text/javascript\">\r\nfunction openBasicDialog(ID) {\r\n\t\tvar
options = {\r\n\t\turl: '
https://pathseattle.sharepoint.com/teams/AuditTracker/Lists/Audit%20Tracker/EditForm.aspx?ID ='
ID,\r\n\t\targs: ID,\r\n\t\ttitle: 'Task Details',\r\n\t\twidth:
1250,\r\n\t\theight: 1100,\r\n\t\tdialogReturnValueCallback:
dialogCallback,\r\n\t\t};\r\n SP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.showModalDialog', options);\r\n}\r\nfunction
dialogCallback(dialogResult, returnValue) {\r\n\tif (dialogResult ==
SP.UI.DialogResult.OK)
{\r\n\t\twindow.location.reload();\r\n\t}\r\n}\r\n$(document).ready(function
() {\r\n\t$( function()
{\r\n\t\t\r\n\t\tModule.GetTasks.LoadDDL(\"#ddlAdminCountry\");\r\n\t\tif(!localStorage.getItem(\"PATHATAFLocation\")){\r\n\t\t\t$('#PCModal').on('show.bs.modal',
function ()
{\t\t\t\t\r\n\t\t\t\tModule.GetTasks.LoadDDL(\"#ddlCountry\");\r\n\t\t\t})\r\n\t\t\t$('#PCModal').modal('show');\r\n\t\t}\r\n\t});\r\n\r\n\t$(function(){\r\n\t\t$(document).on(\"click\",
\"#submit_btn\",
function(event){\r\n\t\t\tlocalStorage.removeItem(\"PATHATAFLocation\");\r\n\t\t\tlocalStorage.setItem('PATHATAFLocation',$(\"#ddlCountry\").val());
\r\n\t\t\t$('#PCModal').modal('hide');\r\n\t\t\t\r\n\t\t});
\r\n\t});\r\n\t$(function(){\r\n\t\t$('[data-toggle=\"tooltip\"]').tooltip();\r\n\t\t$(
\"#tabs\"
).tabs();\r\n\t\tModule.GetTasks.init();\t\t\r\n\t});\r\n});\r\n/ Requires
jQuery /\r\n\r\nvar Module = {} || Module;\r\nModule.GetTasks = (function
() {\r\n var obj = {},\r\n _userId, //userID of
current user\r\n\t\t_userName,\r\n\t\t_clientContext,\t\t\r\n\t\t itemsarry
=[],\r\n\t\t itemsReports =[],\r\n\t\t itemsSubarry = 0,\r\n\t\t
_Query,\r\n\t\t itemsFinalarry = new Array(),\r\n\t\t _tasks = [],
//List of our tasks\r\n _options = {\r\n listName:
\"Audit Tracker\", //Name of list we want\r\n
containerOpen: \"#TaskListOpenIssues\", //id of html element we're
rendering our list of tasks in\r\n\t\t\tcontainerAdmin:
\"#TaskListAdminIssues\",\r\n\t\t\tReport_Chart:
\"Report_Chart\",\r\n\t\t\tAdmin_Report_C :
\"Admin_Report_C\",\r\n\t\t\tAdmin_Report_S :
\"Admin_Report_S\",\r\n\t\t\tAdmin_Report_T :
\"Admin_Report_T\",\r\n\t\t\tUserLocation :
localStorage.getItem(\"PATHATAFLocation\"),\r\n };\r\n\r\n
//Module Initializer\r\n obj.init = function
(){\r\n\t\tShowWaitDialog();\t\t\r\n\t\tSP.SOD.executeFunc('sp.js',
'SP.ClientContext', function(){\r\n\t\t\t_clientContext = new
SP.ClientContext.get_current();\r\n\t\t\t_userId =
_spPageContextInfo.userId;\r\n\t\t\t_userName =
_spPageContextInfo.userDisplayName;\t\t\t\r\n\t\t\tvar TabName =
null;\r\n\t\t\tisUserMemberOfGroup(_userId, 22, function
(isCurrentUserInGroup)
{\r\n\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t\r\n\t\t\t\t\tisUserMemberOfGroup(_userId,
26, function (isCurrentUserInGroup)
{\r\n\t\t\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:0});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-1\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-2\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-3\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\t\t\t\tdrawTable(_options.containerOpen,_options.Report_Chart,null,TabName);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(
\"#tabs\" ).tabs({ activate: function(event ,ui){ \r\n\t\t\t\tTabName
ui.newTab.attr('li',\"innerHTML\")[0].getElementsByTagName(\"a\")[0].innerHTML;\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\tdrawTable(_options.containerOpen,null,null,TabName);\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t}});\r\n\t\t\t\r\n\t\t\t$('#ddlAdminCountry').on('change',
function() {\r\n\t\t\t\titemsReports =
[];\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, $('#ddlAdminCountry').val(),TabName).then(function ()
{\r\n\t\t\t\t\tvar Country =
$('#ddlAdminCountry').val();\r\n\t\t\t\t\tdrawTable(_options.containerAdmin,_options.Admin_Report_C,Country,TabName);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t});\r\n
};\r\n\t\r\n\tobj.LoadDDL = function (ddlName) {\r\n\t\tvar listName =
\"Country\";\r\n\t\t$(ddlName).append($(\" \").attr(\"value\",0).text('Select
the country'));\r\n\t\tvar url = _spPageContextInfo.webAbsoluteUrl +
\"/_api/lists/getbytitle('\" + listName +
\"')/items?$select=Title&$orderby=Title
asc\";\r\n\t\t$.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype:
\"GET\",\r\n\t\t\tasync: false,\r\n\t\t\theaders: {\r\n\t\t\t\t\"accept\":
\"application/json;odata=verbose\",\r\n\t\t\t},\r\n\t\t\tsuccess: function
(results) { \r\n\t\t\t\tvar _title =
results.d.results;\r\n\t\t\t\t$.each(_title, function (index, data)
{\r\n\t\t\t\t\t$(ddlName).append($(\" \").attr(\"value\",data.Title).text(data.Title));\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\terror:
function (error) { \r\n\t\t\t\tconsole.log(\"Error in getting List: \" +
listName); \r\n\t\t\t\t$(_options.container).html(\"Error retrieving your
\" + listName +
\".\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\t\t\r\n\tfunction
drawTable(container,Report,Country,TabName) {\r\n\t\tvar totalData =
0;\r\n\t\tvar seriesarray = new Array();\r\n \tvar returnObj =
{};\r\n\t\tvar label = [];\r\n\t\tvar seriesitem ;\r\n\t\tvar title =
null;\r\n\t\tvar itemReport;\r\n\t\tif(TabName == 'Findings by
Theme'){\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(TabName == 'Findings by
Status'){\r\n\t\t\ttitle = 'Findings by Status';\r\n\t\t\t$.each(itemsarry,
function( key, value )
{\r\n\t\t\t\tlabel.push(value['Theme']);\r\n\t\t\t\titemReport.push(value['TaskStatus']);\r\n\t\t\t\t//
seriesitem = {\r\n\t\t\t\t\t\t// name: value['Theme'],\r\n\t\t\t\t\t\t//
data:[ value['TaskStatus'] ]\r\n\t\t\t\t\t// };\r\n\t\t\t\t//
seriesarray.push(seriesitem);\t\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t$.each(itemReport,
function(key,value) {\r\n\t\t\t\tvar numOccr = $.grep(itemReport, function
(elem) {\r\n\t\t\t\t\treturn elem ===
value;\r\n\t\t\t\t}).length;\r\n\t\t\t\t\treturnObj[value] =
numOccr\r\n\t\t\t});\t\t\t\r\n\t\t\t$.each(returnObj, function( key, value
) {\r\n\t\t\t\t\tseriesitem = {\r\n\t\t\t\t\t\tname:
key,\r\n\t\t\t\t\t\tdata:[ value
]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tseriesarray.push(seriesitem);\t\t\t\t\r\n\t\t\t});
\r\n\t\t\tbarChart(label,seriesarray,totalData,_options.Admin_Report_S,title);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$.each(itemsReports,
function(key,value) {\r\n\t\t\t\tvar numOccr = $.grep(itemsReports,
function (elem) {\r\n\t\t\t\t\treturn elem ===
value;\r\n\t\t\t\t}).length;\r\n\t\t\t\t\treturnObj[value] =
numOccr\r\n\t\t\t});\t\t\t\r\n\t\t\t$.each(returnObj, function( key, value
) {\r\n\t\t\t\t\tseriesitem = {\r\n\t\t\t\t\t\tname:
key,\r\n\t\t\t\t\t\tdata:[ value
]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tseriesarray.push(seriesitem);\t\t\t\t\r\n\t\t\t});
\r\n\t\t\tbarChart(label,seriesarray,totalData,Report,Country);\t\t\r\n\t\t}\t\t\t\r\n\t\tRequestEnded();\t\t\r\n
}\r\n\t\r\n\tfunction
barChart(label,seriesarray,totalData,Report_Chart,title){\r\n\t\t\r\n\t\t
Highcharts.chart(Report_Chart, {\r\n\t\t\tchart: {\r\n\t\t\t\ttype:
'column'\r\n\t\t\t},\r\n\t\t\ttitle: {\r\n\t\t\t\ttext: 'Total findings in
'+ title\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\txAxis: {\r\n\t\t\t\tcategories:
label,\r\n\t\t\t\tcrosshair: true\r\n\t\t\t},\r\n\t\t\tyAxis:
{\r\n\t\t\t\tmin: 0,\r\n\t\t\t\ttitle: {\r\n\t\t\t\t\ttext:
'Total'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\ttooltip:
{\r\n\t\t\t\theaderFormat: '<span
style=\"font-size:10px\">
',\r\n\t\t\t\tpointFormat: '<td
style=\"color:{series.color};padding:0\">{series.name}: '
+\r\n\t\t\t\t\t'<td
style=\"padding:0\">{point.y:.1f} ',\r\n\t\t\t\tfooterFormat:
'
',\r\n\t\t\t\tshared: true,\r\n\t\t\t\tuseHTML:
true\r\n\t\t\t},\r\n\t\t\tplotOptions: {\r\n\t\t\t\tcolumn:
{\r\n\t\t\t\t\tpointPadding: 0.2,\r\n\t\t\t\t\tborderWidth:
0\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tseries:
seriesarray\r\n\t\t});\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\tRetriveParentTaskArray
= function () {\r\n\t\tvar getParentTaskArray = function(ListName,_userId,
UserLocation, TabName){\r\n\t\t\tvar deferred =
$.Deferred();\t\r\n\t\t\tvar flag = false;\r\n\t\t\tvar list =
_clientContext.get_web().get_lists().getByTitle(ListName);\r\n\t\t\tvar
camlQuery = new SP.CamlQuery();\r\n\t\t\tif(TabName == 'Findings by
Theme'){\r\n\t\t\t\tvar query =
''+\t\t\t\r\n\t\t\t\t'<FieldRef Name=\'Country\'
/><Value Type=\'Text\'>'+ UserLocation +' '
+\r\n\t\t\t' ';\t\r\n\t\t\tflag =
true;\r\n\t\t\t}\r\n\t\t\telse if(TabName == 'Findings by
Status'){\r\n\t\t\t\tvar query =
' ';\t\t\t\t\r\n\t\t\t\tflag =
true;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tvar query =
''+\t\t\t\r\n\t\t\t\t'<FieldRef Name=\'Country\'
/><Value Type=\'Text\'>'+ UserLocation +' '
+\r\n\t\t\t' ';\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tcamlQuery.set_viewXml(query);\r\n\t\t\tlistItems
= list.getItems(camlQuery);\r\n\t\t\t//Only retrieve the \"ID\", \"Title\"
and \"Status\" fields.\r\n\t\t\t_clientContext.load(listItems,
'Include(ID,Title,Status,Theme,Country)');\r\n\t\t\t//Execute the listitem
query\r\n\t\t\t_clientContext.executeQueryAsync(\r\n\t\t\t\t\t\tFunction.createDelegate(this,
function () {deferred.resolve(onListItemsLoadSuccess(flag));
}),\r\n\t\t\t\t\t\tFunction.createDelegate(this, function (sender, args) {
deferred.reject(sender, args); })\r\n\t\t\t\t\t);\r\n\t\t\treturn
deferred.promise();\r\n\t\t\t};\r\n\t\treturn {\r\n\t\tgetParentTaskArray:
getParentTaskArray\r\n\t\t}\r\n\t}();\r\n\tfunction
onListItemsLoadSuccess(flag) {\r\n\t\tvar Theme = null;\r\n\t\titemsarry =
[];\r\n\t\tvar listEnumerator = listItems.getEnumerator();\r\n\t\tvar
itemCount =
listItems.get_count();\t\r\n\t\tif(itemCount>0){\t\t\t\t\r\n\t\t\twhile
(listEnumerator.moveNext()) { \r\n\t\t\t\tvar oListItem =
listEnumerator.get_current();\r\n\t\t\t\tvar AssignedTo =
[];\r\n\t\t\t\tvar Author = null;\r\n\t\t\t\tvar isCompleted =
[];\r\n\t\t\t\tTheme =
oListItem.get_item('Theme').get_lookupValue();\t\r\n\t\t\t\tif(flag
==true){\r\n\t\t\t\t\titemsarry.push({\r\n\t\t\t\t\t\t\"Title\":
oListItem.get_item('Title'),\r\n\t\t\t\t\t\t\"TaskStatus\" :
oListItem.get_item('Status'),\r\n\t\t\t\t\t\t\"Theme\" :
Theme,\r\n\t\t\t\t\t\t\"Country\" :
oListItem.get_item('Country').get_lookupValue()\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\titemsReports.push(Theme);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction
isUserMemberOfGroup(userId, groupId, success,error)
{\r\n\t\t//alert('inside1');\r\n\t\t var ctx =
SP.ClientContext.get_current(); \r\n\t\t var allGroups =
ctx.get_web().get_siteGroups();\r\n\t\t var group =
allGroups.getById(groupId);\r\n\t\t ctx.load(group,'Users');\r\n\r\n\t\t
ctx.executeQueryAsync(\r\n\t\t\tfunction(sender, args)
{//alert('inside2');\r\n\t\t\t\tvar userInGroup =
findUserById(group.get_users(),userId);\r\n\t\t\t\tsuccess(userInGroup);\r\n\t\t
},\r\n\t\t error); \r\n\r\n\t\t var findUserById =
function(users,id){\r\n\t\t // alert('inside find by user id');\r\n\t\t\t
var found = false;\r\n\t\t\t var e =
group.get_users().getEnumerator();\r\n\t\t\t while (e.moveNext())
{\r\n\t\t\t\t\tvar user = e.get_current();\r\n\t\t\t\t\tif (user.get_id()
== id) {\r\n\t\t\t\t\t\tfound =
true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t }
\r\n\t\t\t return found; \r\n\t\t };\r\n\t}\r\n\t\r\n\t// Error
Handling
......................................................\r\n\tfunction
CatchError(message,list) {\r\n\r\n\t\tvar oList =
_clientContext.get_web().get_lists().getByTitle('ErrorCatch
List');\t\t\t\r\n\t\tvar itemCreateInfo = new
SP.ListItemCreationInformation();\r\n\t\tthis.oListItem =
oList.addItem(itemCreateInfo);\t\t\t\r\n\t\toListItem.set_item('Title',
list);\r\n\t\toListItem.set_item('Error_x0020_Message',
message);\r\n\t\toListItem.update();\r\n\t\t_clientContext.load(oListItem);\t\t\t\r\n\t\t_clientContext.executeQueryAsync(Function.createDelegate(this.onCatchErrorQuerySucceeded),
Function.createDelegate(this.onCatchErrorQueryFailed));\r\n\t}\r\n\tfunction
onCatchErrorQuerySucceeded() {}\r\n\tfunction
onCatchErrorQueryFailed(sender, args) {}\r\n\t\r\n\tfunction
ShowWaitDialog() {\t\t\t\r\n\t\ttry {\r\n\t\t\t
SP.SOD.executeFunc('sp.ui.dialog.js',
'SP.UI.ModalDialog.showWaitScreenWithNoClose', function() \r\n\t\t\t{
\r\n\t\t\t\t//SP.UI.ModalDialog.showWaitScreenWithNoClose(SP.Res.dialogLoading15);\r\n\t\t\t\tSP.UI.ModalDialog.showWaitScreenWithNoClose('Loading...','',
70, 260);\r\n\t\t\t}); \r\n\t\t}catch (ex) { }\r\n\t};\t\t\r\n\tfunction
RequestEnded(sender, args) {\r\n\t\ttry
{\r\n\t\t\tSP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.commonModalDialogClose');\r\n\t\t}catch (ex) {
}\r\n\t};\t\r\n\t\r\n\treturn obj;\r\n}());\r\n"
}
[Trace - 12:00:16 PM] Sending request: geterr (16). Response expected: no.
Current queue length: 1
Arguments: {
"delay": 0,
"files": []
}
[Trace - 12:00:16 PM] Sending request: geterr (17). Response expected: no.
Current queue length: 0
Arguments: {
"delay": 0,
"files": [
"//pathseattle.sharepoint.com@SSL
/DavWWWRoot/teams/AuditTracker/SiteAssets/scripts/Reports.js"
]
}
[Error - 12:00:17 PM] TSServer exited with code: 3221226356
[Info - 12:00:17 PM] Using tsserver from location: c:\Program Files
(x86)\Microsoft VS Code
Insiders\resources\app\extensions\typescript\node_modules\typescript\lib\tsserver.js
[Trace - 12:00:17 PM] Sending request: configure (18). Response expected:
yes. Current queue length: 0
Arguments: {
"hostInfo": "vscode"
}
[Trace - 12:00:17 PM] Response received: configure (18). Request took 231
ms. Success: true
[Trace - 12:00:17 PM] Sending request: compilerOptionsForInferredProjects
(19). Response expected: yes. Current queue length: 3
Arguments: {
"options": {
"module": "CommonJS",
"target": "ES6",
"allowSyntheticDefaultImports": true,
"allowNonTsExtensions": true,
"allowJs": true,
"jsx": "Preserve"
}
}
[Trace - 12:00:17 PM] Response received: compilerOptionsForInferredProjects
(19). Request took 232 ms. Success: true
Result: true
[Trace - 12:00:17 PM] Sending request: open (20). Response expected: no.
Current queue length: 2
Arguments: {
"file": "//pathseattle.sharepoint.com@SSL
/DavWWWRoot/teams/AuditTracker/SiteAssets/scripts/Reports.js",
"fileContent": "<div id=\"tabs\">\r\n \r\n <a
href=\"#tabsUser\">Findings by Country \r\n <a
href=\"#tabsAdmin-1\">Findings by Country \r\n\t<a
href=\"#tabsAdmin-2\">Findings by Status \r\n\t<a
href=\"#tabsAdmin-3\">Findings by Theme \r\n \r\n\t<div
id=\"tabsUser\">\r\n\t\t<div
id=\"TaskListOpenIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t\r\n\t\t\t<div
id=\"Report_Chart\">No Data
Found.
\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t\r\n\t<div
id=\"tabsAdmin-1\">\r\n\t\t<div id=\"wrapper\"><div class=\"styled-select
blue semi-square\"><select
id=\"ddlAdminCountry\">\r\n\t\t<div
id=\"TaskListAdminIssues\"> \r\n\t\t<div
class=\"chart-container\"> \r\n\t\t\t<div id=\"Admin_Report_C\">No Data
Found.\r\n\t\t\r\n\t \r\n\t<div
id=\"tabsAdmin-2\">\r\n\t\t<div id=\"Admin_Report_S\">No Data
Found.\r\n\t \r\n\t<div id=\"tabsAdmin-3\">\r\n\t\t<div
id=\"Admin_Report_T\">No Data Found.\r\n\t
\r\n\r\n\r\n<div id=\"PCModal\" class=\"modal fade\"
role=\"dialog\">\r\n\t<div class=\"modal-dialog\">\r\n\t\t\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t\t<div
class=\"modal-header\">\r\n\t\t\t\t<h3 id=\"myModalLabel\">Select Your
Country\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-body\">\r\n\t\t\t\t <select
id=\"ddlCountry\">\r\n\t\t\t \r\n\t\t\t <div
class=\"modal-footer\">\t\t\t\t\t\r\n\t\t\t\t<button id=\"submit_btn\"
class=\"btn btn-primary\">Save\r\n\t\t\t \t
\r\n\t\t\r\n\t\r\n\r\n\r\n\r\n<link
rel=\"stylesheet\" href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/css/jquery-ui.css\">\r\n <script
src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery-ui.min.js \"
type=\"text/javascript\">\r\n<link href=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/My_Dash_CSS.css \"
rel=\"stylesheet\" type=\"text/css\"/>\r\n<script src=\"
https://code.highcharts.com/highcharts.js \">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/bootstrap.min.js \"
type=\"text/javascript\">\r\n<script src=\"
https://pathseattle.sharepoint.com/teams/AuditTracker/SiteAssets/scripts/jquery.cookie.js.js \">\r\n\r\n<script
type=\"text/javascript\">\r\nfunction openBasicDialog(ID) {\r\n\t\tvar
options = {\r\n\t\turl: '
https://pathseattle.sharepoint.com/teams/AuditTracker/Lists/Audit%20Tracker/EditForm.aspx?ID ='
ID,\r\n\t\targs: ID,\r\n\t\ttitle: 'Task Details',\r\n\t\twidth:
1250,\r\n\t\theight: 1100,\r\n\t\tdialogReturnValueCallback:
dialogCallback,\r\n\t\t};\r\n SP.SOD.execute('sp.ui.dialog.js',
'SP.UI.ModalDialog.showModalDialog', options);\r\n}\r\nfunction
dialogCallback(dialogResult, returnValue) {\r\n\tif (dialogResult ==
SP.UI.DialogResult.OK)
{\r\n\t\twindow.location.reload();\r\n\t}\r\n}\r\n$(document).ready(function
() {\r\n\t$( function()
{\r\n\t\t\r\n\t\tModule.GetTasks.LoadDDL(\"#ddlAdminCountry\");\r\n\t\tif(!localStorage.getItem(\"PATHATAFLocation\")){\r\n\t\t\t$('#PCModal').on('show.bs.modal',
function ()
{\t\t\t\t\r\n\t\t\t\tModule.GetTasks.LoadDDL(\"#ddlCountry\");\r\n\t\t\t})\r\n\t\t\t$('#PCModal').modal('show');\r\n\t\t}\r\n\t});\r\n\r\n\t$(function(){\r\n\t\t$(document).on(\"click\",
\"#submit_btn\",
function(event){\r\n\t\t\tlocalStorage.removeItem(\"PATHATAFLocation\");\r\n\t\t\tlocalStorage.setItem('PATHATAFLocation',$(\"#ddlCountry\").val());
\r\n\t\t\t$('#PCModal').modal('hide');\r\n\t\t\t\r\n\t\t});
\r\n\t});\r\n\t$(function(){\r\n\t\t$('[data-toggle=\"tooltip\"]').tooltip();\r\n\t\t$(
\"#tabs\"
).tabs();\r\n\t\tModule.GetTasks.init();\t\t\r\n\t});\r\n});\r\n/ Requires
jQuery /\r\n\r\nvar Module = {} || Module;\r\nModule.GetTasks = (function
() {\r\n var obj = {},\r\n _userId, //userID of
current user\r\n\t\t_userName,\r\n\t\t_clientContext,\t\t\r\n\t\t itemsarry
=[],\r\n\t\t itemsReports =[],\r\n\t\t itemsSubarry = 0,\r\n\t\t
_Query,\r\n\t\t itemsFinalarry = new Array(),\r\n\t\t _tasks = [],
//List of our tasks\r\n _options = {\r\n listName:
\"Audit Tracker\", //Name of list we want\r\n
containerOpen: \"#TaskListOpenIssues\", //id of html element we're
rendering our list of tasks in\r\n\t\t\tcontainerAdmin:
\"#TaskListAdminIssues\",\r\n\t\t\tReport_Chart:
\"Report_Chart\",\r\n\t\t\tAdmin_Report_C :
\"Admin_Report_C\",\r\n\t\t\tAdmin_Report_S :
\"Admin_Report_S\",\r\n\t\t\tAdmin_Report_T :
\"Admin_Report_T\",\r\n\t\t\tUserLocation :
localStorage.getItem(\"PATHATAFLocation\"),\r\n };\r\n\r\n
//Module Initializer\r\n obj.init = function
(){\r\n\t\tShowWaitDialog();\t\t\r\n\t\tSP.SOD.executeFunc('sp.js',
'SP.ClientContext', function(){\r\n\t\t\t_clientContext = new
SP.ClientContext.get_current();\r\n\t\t\t_userId =
_spPageContextInfo.userId;\r\n\t\t\t_userName =
_spPageContextInfo.userDisplayName;\t\t\t\r\n\t\t\tvar TabName =
null;\r\n\t\t\tisUserMemberOfGroup(_userId, 22, function
(isCurrentUserInGroup)
{\r\n\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t\r\n\t\t\t\t\tisUserMemberOfGroup(_userId,
26, function (isCurrentUserInGroup)
{\r\n\t\t\t\t\t\tif(isCurrentUserInGroup){\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:1});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsUser\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRequestEnded();\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('#tabs').tabs({active:0});\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-1\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-2\"]').closest('li').hide();\r\n\t\t\t\t\t\t\t$('[href=\"#tabsAdmin-3\"]').closest('li').hide();\r\n\t\t\t\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\t\t\t\tdrawTable(_options.containerOpen,_options.Report_Chart,null,TabName);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$(
\"#tabs\" ).tabs({ activate: function(event ,ui){ \r\n\t\t\t\tTabName
ui.newTab.attr('li',\"innerHTML\")[0].getElementsByTagName(\"a\")[0].innerHTML;\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, _options.UserLocation,TabName).then(function ()
{\r\n\t\t\t\t\tdrawTable(_options.containerOpen,null,null,TabName);\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t}});\r\n\t\t\t\r\n\t\t\t$('#ddlAdminCountry').on('change',
function() {\r\n\t\t\t\titemsReports =
[];\r\n\t\t\t\tRetriveParentTaskArray.getParentTaskArray(_options.listName,
_userId, $('#ddlAdminCountry').val(
Steps to Reproduce:
1. 2.