Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0595b3d7
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0595b3d7
编写于
4月 17, 2019
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve error handling when opening issue reporter
上级
a0a1bd8d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
17 deletion
+32
-17
src/vs/code/electron-browser/issue/issueReporterMain.ts
src/vs/code/electron-browser/issue/issueReporterMain.ts
+19
-10
src/vs/code/electron-browser/issue/issueReporterModel.ts
src/vs/code/electron-browser/issue/issueReporterModel.ts
+8
-3
src/vs/platform/diagnostics/common/diagnosticsService.ts
src/vs/platform/diagnostics/common/diagnosticsService.ts
+1
-1
src/vs/workbench/services/extensions/node/multiExtensionManagement.ts
...ench/services/extensions/node/multiExtensionManagement.ts
+4
-3
未找到文件。
src/vs/code/electron-browser/issue/issueReporterMain.ts
浏览文件 @
0595b3d7
...
...
@@ -40,7 +40,7 @@ import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
import
{
normalizeGitHubUrl
}
from
'
vs/code/electron-browser/issue/issueReporterUtil
'
;
import
{
Button
}
from
'
vs/base/browser/ui/button/button
'
;
import
{
withUndefinedAsNull
}
from
'
vs/base/common/types
'
;
import
{
SystemInfo
}
from
'
vs/platform/diagnostics/common/diagnosticsService
'
;
import
{
SystemInfo
,
isRemoteDiagnosticError
}
from
'
vs/platform/diagnostics/common/diagnosticsService
'
;
const
MAX_URL_LENGTH
=
platform
.
isWindows
?
2081
:
5400
;
...
...
@@ -938,15 +938,24 @@ export class IssueReporter extends Disposable {
</table>`
;
systemInfo
.
remoteData
.
forEach
(
remote
=>
{
renderedData
+=
`
<hr>
<table>
<tr><td>Remote</td><td>
${
remote
.
hostName
}
</td></tr>
<tr><td>OS</td><td>
${
remote
.
machineInfo
.
os
}
</td></tr>
<tr><td>CPUs</td><td>
${
remote
.
machineInfo
.
cpus
}
</td></tr>
<tr><td>Memory (System)</td><td>
${
remote
.
machineInfo
.
memory
}
</td></tr>
<tr><td>VM</td><td>
${
remote
.
machineInfo
.
vmHint
}
</td></tr>
</table>`
;
if
(
isRemoteDiagnosticError
(
remote
))
{
renderedData
+=
`
<hr>
<table>
<tr><td>Remote</td><td>
${
remote
.
hostName
}
</td></tr>
<tr><td></td><td>
${
remote
.
errorMessage
}
</td></tr>
</table>`
;
}
else
{
renderedData
+=
`
<hr>
<table>
<tr><td>Remote</td><td>
${
remote
.
hostName
}
</td></tr>
<tr><td>OS</td><td>
${
remote
.
machineInfo
.
os
}
</td></tr>
<tr><td>CPUs</td><td>
${
remote
.
machineInfo
.
cpus
}
</td></tr>
<tr><td>Memory (System)</td><td>
${
remote
.
machineInfo
.
memory
}
</td></tr>
<tr><td>VM</td><td>
${
remote
.
machineInfo
.
vmHint
}
</td></tr>
</table>`
;
}
});
target
.
innerHTML
=
renderedData
;
...
...
src/vs/code/electron-browser/issue/issueReporterModel.ts
浏览文件 @
0595b3d7
...
...
@@ -5,7 +5,7 @@
import
{
assign
}
from
'
vs/base/common/objects
'
;
import
{
IssueType
,
ISettingSearchResult
,
IssueReporterExtensionData
}
from
'
vs/platform/issue/common/issue
'
;
import
{
SystemInfo
}
from
'
vs/platform/diagnostics/common/diagnosticsService
'
;
import
{
SystemInfo
,
isRemoteDiagnosticError
}
from
'
vs/platform/diagnostics/common/diagnosticsService
'
;
export
interface
IssueReporterData
{
issueType
:
IssueType
;
...
...
@@ -75,7 +75,8 @@ ${this.getInfos()}
private
getRemoteOSes
():
string
{
if
(
this
.
_data
.
systemInfo
&&
this
.
_data
.
systemInfo
.
remoteData
.
length
)
{
return
this
.
_data
.
systemInfo
.
remoteData
.
map
(
remote
=>
`Remote OS version:
${
remote
.
machineInfo
.
os
}
`
).
join
(
'
\n
'
)
+
'
\n
'
;
return
this
.
_data
.
systemInfo
.
remoteData
.
map
(
remote
=>
isRemoteDiagnosticError
(
remote
)
?
remote
.
errorMessage
:
`Remote OS version:
${
remote
.
machineInfo
.
os
}
`
).
join
(
'
\n
'
)
+
'
\n
'
;
}
return
''
;
...
...
@@ -168,7 +169,10 @@ ${this.getInfos()}
|VM|
${
this
.
_data
.
systemInfo
.
vmHint
}
|`
;
this
.
_data
.
systemInfo
.
remoteData
.
forEach
(
remote
=>
{
md
+=
`
if
(
isRemoteDiagnosticError
(
remote
))
{
md
+=
`\n\n
${
remote
.
errorMessage
}
`
;
}
else
{
md
+=
`
|Item|Value|
|---|---|
...
...
@@ -177,6 +181,7 @@ ${this.getInfos()}
|CPUs|
${
remote
.
machineInfo
.
cpus
}
|
|Memory (System)|
${
remote
.
machineInfo
.
memory
}
|
|VM|
${
remote
.
machineInfo
.
vmHint
}
|`
;
}
});
}
...
...
src/vs/platform/diagnostics/common/diagnosticsService.ts
浏览文件 @
0595b3d7
...
...
@@ -22,7 +22,7 @@ export interface SystemInfo extends IMachineInfo {
processArgs
:
string
;
gpuStatus
:
any
;
screenReader
:
string
;
remoteData
:
IRemoteDiagnosticInfo
[];
remoteData
:
(
IRemoteDiagnosticInfo
|
IRemoteDiagnosticError
)
[];
load
?:
string
;
}
...
...
src/vs/workbench/services/extensions/node/multiExtensionManagement.ts
浏览文件 @
0595b3d7
...
...
@@ -8,7 +8,6 @@ import {
IExtensionManagementService
,
ILocalExtension
,
IGalleryExtension
,
InstallExtensionEvent
,
DidInstallExtensionEvent
,
IExtensionIdentifier
,
DidUninstallExtensionEvent
,
IReportedExtension
,
IGalleryMetadata
,
IExtensionManagementServerService
,
IExtensionManagementServer
,
IExtensionGalleryService
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
flatten
}
from
'
vs/base/common/arrays
'
;
import
{
ExtensionType
,
IExtensionManifest
,
isLanguagePackExtension
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -46,8 +45,10 @@ export class MultiExtensionManagementService extends Disposable implements IExte
}
getInstalled
(
type
?:
ExtensionType
):
Promise
<
ILocalExtension
[]
>
{
return
Promise
.
all
(
this
.
servers
.
map
(({
extensionManagementService
})
=>
extensionManagementService
.
getInstalled
(
type
)))
.
then
(
result
=>
flatten
(
result
));
const
installedExtensions
:
ILocalExtension
[]
=
[];
return
Promise
.
all
(
this
.
servers
.
map
(({
extensionManagementService
})
=>
extensionManagementService
.
getInstalled
(
type
).
then
(
extensions
=>
installedExtensions
.
push
(...
extensions
))))
.
then
(
_
=>
installedExtensions
)
.
catch
(
e
=>
installedExtensions
);
}
async
uninstall
(
extension
:
ILocalExtension
,
force
?:
boolean
):
Promise
<
void
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录