Better display
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
All notable changes to the "frog" extension will be documented in this file.
|
All notable changes to the "frog" extension will be documented in this file.
|
||||||
|
|
||||||
|
## 0.0.24
|
||||||
|
|
||||||
|
- Better display of result set and values
|
||||||
|
|
||||||
## 0.0.23
|
## 0.0.23
|
||||||
|
|
||||||
- Added commit and rollback buttons
|
- Added commit and rollback buttons
|
||||||
|
BIN
frog-runner.jar
BIN
frog-runner.jar
Binary file not shown.
@@ -2,7 +2,7 @@
|
|||||||
"name": "frog",
|
"name": "frog",
|
||||||
"displayName": "Frog",
|
"displayName": "Frog",
|
||||||
"description": "The Oracle SQL workbench for VSCode",
|
"description": "The Oracle SQL workbench for VSCode",
|
||||||
"version": "0.0.23",
|
"version": "0.0.24",
|
||||||
"publisher": "tmuerell",
|
"publisher": "tmuerell",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.17.0"
|
"vscode": "^1.17.0"
|
||||||
@@ -115,6 +115,11 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Set the java home to use for the runner."
|
"description": "Set the java home to use for the runner."
|
||||||
|
},
|
||||||
|
"frog.resultSetStyles": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "Set additional CSS styles for the result set viewer (Example: 'td { color: red; }')"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,12 +8,17 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr
|
|||||||
if (!this._data) return this.errorSnippet();
|
if (!this._data) return this.errorSnippet();
|
||||||
if (this._data['rows'].length == 0) return this.errorSnippet();
|
if (this._data['rows'].length == 0) return this.errorSnippet();
|
||||||
|
|
||||||
|
const configuration = vscode.workspace.getConfiguration('frog')
|
||||||
|
const additionalStyles = configuration.get("resultSetStyles", "")
|
||||||
|
|
||||||
let styles = `<style>
|
let styles = `<style>
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
table td, table th {
|
table td, table th {
|
||||||
padding: 3px;
|
padding: 2px;
|
||||||
|
font-size: 11px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
tr:hover {
|
tr:hover {
|
||||||
background-color: #aaaa66;
|
background-color: #aaaa66;
|
||||||
@@ -31,6 +36,9 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr
|
|||||||
.vscode-dark #limitBox a {
|
.vscode-dark #limitBox a {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
.vscode-dark table td.value-null {
|
||||||
|
background-color: #666600;
|
||||||
|
}
|
||||||
|
|
||||||
.vscode-light table {
|
.vscode-light table {
|
||||||
border: solid 1px black;
|
border: solid 1px black;
|
||||||
@@ -41,6 +49,11 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr
|
|||||||
.vscode-light #limitBox a {
|
.vscode-light #limitBox a {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
.vscode-light table td.value-null {
|
||||||
|
background-color: #cccc33;
|
||||||
|
}
|
||||||
|
|
||||||
|
${additionalStyles}
|
||||||
</style>`
|
</style>`
|
||||||
|
|
||||||
const choosableLimits = [2,10,50]
|
const choosableLimits = [2,10,50]
|
||||||
@@ -52,7 +65,7 @@ export class TextDocumentContentProvider implements vscode.TextDocumentContentPr
|
|||||||
text += this._data['columnDefinitions'].map((x) => `<th>${x['name']}</th>`).join('')
|
text += this._data['columnDefinitions'].map((x) => `<th>${x['name']}</th>`).join('')
|
||||||
text += '</tr>'
|
text += '</tr>'
|
||||||
text += this._data['rows'].map((r) =>
|
text += this._data['rows'].map((r) =>
|
||||||
'<tr>' + r['columns'].map((c) => '<td>' + c['value'] + '</td>').join('') + '</tr>'
|
'<tr>' + r['columns'].map((c) => '<td class="' + (c['value'] ? 'value-value' : 'value-null') + '">' + (c['value'] ? c['value'] : 'NULL') + '</td>').join('') + '</tr>'
|
||||||
).join('')
|
).join('')
|
||||||
text += '</table></body>'
|
text += '</table></body>'
|
||||||
return text;
|
return text;
|
||||||
|
Reference in New Issue
Block a user