Compare commits
34 Commits
v0.7.17-be
...
v0.7.19-be
Author | SHA1 | Date | |
---|---|---|---|
3e739bcaa2 | |||
debc1da289 | |||
3c2e2be40f | |||
581ec6a25d | |||
d30a978cd6 | |||
0015f2e860 | |||
389e6624d8 | |||
275344eb8b | |||
cf24adf99e | |||
2eae580e18 | |||
e4eb27d503 | |||
580973fd04 | |||
215ab783ab | |||
72148e991c | |||
6e4c16741a | |||
9f9c63bfcc | |||
c0dcf30e73 | |||
ddd290c903 | |||
267c017921 | |||
b3b698b3a2 | |||
71ac3a5164 | |||
6fc4418c02 | |||
b37781df84 | |||
9c66fd51cb | |||
98c1f43a4d | |||
12825c69d4 | |||
198ff0103b | |||
94ce615fc8 | |||
354928e302 | |||
6dceaf09be | |||
b321e64b83 | |||
7e36260cdb | |||
894087e196 | |||
922f56f69b |
60
CHANGELOG.md
@@ -2,6 +2,66 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [0.7.19-beta.2](https://github.com/antares-sql/antares/compare/v0.7.19-beta.1...v0.7.19-beta.2) (2023-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* ssh tunnel keep-alive not working properly ([debc1da](https://github.com/antares-sql/antares/commit/debc1da289d5e35d59adf69d094b329cf93af536))
|
||||||
|
|
||||||
|
### [0.7.19-beta.1](https://github.com/antares-sql/antares/compare/v0.7.19-beta.0...v0.7.19-beta.1) (2023-10-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **MySQL:** RLIKE and NOT RLIKE regular expression filters, closes [#688](https://github.com/antares-sql/antares/issues/688) ([e4eb27d](https://github.com/antares-sql/antares/commit/e4eb27d503e8f912178359c01c62a9b523d17848))
|
||||||
|
|
||||||
|
### [0.7.19-beta.0](https://github.com/antares-sql/antares/compare/v0.7.18...v0.7.19-beta.0) (2023-10-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* "now" and "random" options added in datetime related data in insert rows tool, closes [#402](https://github.com/antares-sql/antares/issues/402) ([9f9c63b](https://github.com/antares-sql/antares/commit/9f9c63bfcc3423bfeef143cd835f48c62900a799))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* IN and NOT IN filters not working properly, fixes [#687](https://github.com/antares-sql/antares/issues/687) ([c0dcf30](https://github.com/antares-sql/antares/commit/c0dcf30e73a69b25b01ba31d21b27c1983ed2db6))
|
||||||
|
* timeout issue on long time sql import ([ddd290c](https://github.com/antares-sql/antares/commit/ddd290c90344241eaa70cb528552e942fd7edec0))
|
||||||
|
|
||||||
|
### [0.7.18](https://github.com/antares-sql/antares/compare/v0.7.17...v0.7.18) (2023-10-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* hotfix for Microsoft Store unauthorized process ([b3b698b](https://github.com/antares-sql/antares/commit/b3b698b3a23a3c848921ab40fc0fec5d8178ef0e))
|
||||||
|
|
||||||
|
### [0.7.17](https://github.com/antares-sql/antares/compare/v0.7.17-beta.2...v0.7.17) (2023-09-30)
|
||||||
|
|
||||||
|
### [0.7.17-beta.2](https://github.com/antares-sql/antares/compare/v0.7.17-beta.1...v0.7.17-beta.2) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add NOT LIKE to table filters, closes [#672](https://github.com/antares-sql/antares/issues/672) ([9c66fd5](https://github.com/antares-sql/antares/commit/9c66fd51cbbe6f21a1fa6a34cc962496d3db7a98))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* nsis updater not working ([198ff01](https://github.com/antares-sql/antares/commit/198ff0103bfa95e3491296d352c944165f31b87e))
|
||||||
|
* **UI:** small icons in foreign key modal ([b37781d](https://github.com/antares-sql/antares/commit/b37781df84cf7ee99a69ecaa54480d662d79c4aa))
|
||||||
|
|
||||||
|
### [0.7.17-beta.1](https://github.com/antares-sql/antares/compare/v0.7.17-beta.0...v0.7.17-beta.1) (2023-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* flip not working on BaseIcon component ([922f56f](https://github.com/antares-sql/antares/commit/922f56f69b168302a9d1ff86565d3f09400d6a7c))
|
||||||
|
* **SQLite:** field length lost when editing a table, fixes [#664](https://github.com/antares-sql/antares/issues/664) ([b321e64](https://github.com/antares-sql/antares/commit/b321e64b835e0b39da116c4a77bac50247f240f3))
|
||||||
|
* **SQLite:** table content not refresh after an update, fixes [#665](https://github.com/antares-sql/antares/issues/665) ([6dceaf0](https://github.com/antares-sql/antares/commit/6dceaf09be7bd46f1915721abd03253ffc517256))
|
||||||
|
* table filter not working when search string on integer field, [#671](https://github.com/antares-sql/antares/issues/671) ([7e36260](https://github.com/antares-sql/antares/commit/7e36260cdb0438197152b5c6ac61db8ae8a9791a))
|
||||||
|
* **UI:** small icons in sidebar elements with long name ([354928e](https://github.com/antares-sql/antares/commit/354928e302437d608903d1434d99d68eb79aa6e9))
|
||||||
|
|
||||||
### [0.7.17-beta.0](https://github.com/antares-sql/antares/compare/v0.7.16...v0.7.17-beta.0) (2023-09-17)
|
### [0.7.17-beta.0](https://github.com/antares-sql/antares/compare/v0.7.16...v0.7.17-beta.0) (2023-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ representative at an online or offline event.
|
|||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
reported to the community leaders responsible for enforcement at
|
reported to the community leaders responsible for enforcement at
|
||||||
fabio286@gmail.com.
|
info@fabiodistasio.it.
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
14959
package-lock.json
generated
22
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"productName": "Antares",
|
"productName": "Antares",
|
||||||
"version": "0.7.17-beta.0",
|
"version": "0.7.19-beta.2",
|
||||||
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "https://github.com/antares-sql/antares.git",
|
"repository": "https://github.com/antares-sql/antares.git",
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"contributors:add": "all-contributors add",
|
"contributors:add": "all-contributors add",
|
||||||
"contributors:generate": "all-contributors generate"
|
"contributors:generate": "all-contributors generate"
|
||||||
},
|
},
|
||||||
"author": "Fabio Di Stasio <fabio286@gmail.com>",
|
"author": "Fabio Di Stasio <info@fabiodistasio.it>",
|
||||||
"main": "./dist/main.js",
|
"main": "./dist/main.js",
|
||||||
"antares": {
|
"antares": {
|
||||||
"devtoolsId": "nhdogjmejiglipccpnnnanhbledajbpd"
|
"devtoolsId": "nhdogjmejiglipccpnnnanhbledajbpd"
|
||||||
@@ -121,7 +121,6 @@
|
|||||||
"@electron/remote": "~2.0.1",
|
"@electron/remote": "~2.0.1",
|
||||||
"@faker-js/faker": "~6.1.2",
|
"@faker-js/faker": "~6.1.2",
|
||||||
"@jamescoyle/vue-icon": "~0.1.2",
|
"@jamescoyle/vue-icon": "~0.1.2",
|
||||||
"@mdi/font": "~7.2.96",
|
|
||||||
"@mdi/js": "~7.2.96",
|
"@mdi/js": "~7.2.96",
|
||||||
"@turf/helpers": "~6.5.0",
|
"@turf/helpers": "~6.5.0",
|
||||||
"@vueuse/core": "~10.4.1",
|
"@vueuse/core": "~10.4.1",
|
||||||
@@ -147,7 +146,7 @@
|
|||||||
"source-map-support": "~0.5.20",
|
"source-map-support": "~0.5.20",
|
||||||
"spectre.css": "~0.5.9",
|
"spectre.css": "~0.5.9",
|
||||||
"sql-formatter": "~13.0.0",
|
"sql-formatter": "~13.0.0",
|
||||||
"ssh2-promise": "~1.0.2",
|
"@fabio286/ssh2-promise": "~1.0.4-b",
|
||||||
"v-mask": "~2.3.0",
|
"v-mask": "~2.3.0",
|
||||||
"vue": "~3.3.4",
|
"vue": "~3.3.4",
|
||||||
"vue-i18n": "~9.2.2",
|
"vue-i18n": "~9.2.2",
|
||||||
@@ -172,7 +171,7 @@
|
|||||||
"chalk": "~4.1.2",
|
"chalk": "~4.1.2",
|
||||||
"cross-env": "~7.0.2",
|
"cross-env": "~7.0.2",
|
||||||
"css-loader": "~6.5.0",
|
"css-loader": "~6.5.0",
|
||||||
"electron": "~22.3.23",
|
"electron": "~22.3.27",
|
||||||
"electron-builder": "~22.10.3",
|
"electron-builder": "~22.10.3",
|
||||||
"eslint": "~7.32.0",
|
"eslint": "~7.32.0",
|
||||||
"eslint-config-standard": "~16.0.3",
|
"eslint-config-standard": "~16.0.3",
|
||||||
@@ -194,10 +193,10 @@
|
|||||||
"sass-loader": "~12.3.0",
|
"sass-loader": "~12.3.0",
|
||||||
"standard-version": "~9.3.1",
|
"standard-version": "~9.3.1",
|
||||||
"style-loader": "~3.3.1",
|
"style-loader": "~3.3.1",
|
||||||
"stylelint": "~14.9.1",
|
"stylelint": "^15.11.0",
|
||||||
"stylelint-config-recommended-vue": "~1.4.0",
|
"stylelint-config-recommended-vue": "~1.5.0",
|
||||||
"stylelint-config-standard": "~26.0.0",
|
"stylelint-config-standard": "~34.0.0",
|
||||||
"stylelint-scss": "~4.3.0",
|
"stylelint-scss": "~5.3.0",
|
||||||
"tree-kill": "~1.2.2",
|
"tree-kill": "~1.2.2",
|
||||||
"ts-loader": "~9.2.8",
|
"ts-loader": "~9.2.8",
|
||||||
"ts-node": "~10.9.1",
|
"ts-node": "~10.9.1",
|
||||||
@@ -209,10 +208,5 @@
|
|||||||
"webpack-cli": "~4.9.1",
|
"webpack-cli": "~4.9.1",
|
||||||
"webpack-dev-server": "~4.11.1",
|
"webpack-dev-server": "~4.11.1",
|
||||||
"xvfb-maybe": "~0.2.1"
|
"xvfb-maybe": "~0.2.1"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"ssh2-promise": {
|
|
||||||
"ssh2": "github:Fabio286/ssh2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,6 +51,7 @@ export default class {
|
|||||||
{ name: 'collation', group: 'database', types: ['string'] },
|
{ name: 'collation', group: 'database', types: ['string'] },
|
||||||
{ name: 'engine', group: 'database', types: ['string'] },
|
{ name: 'engine', group: 'database', types: ['string'] },
|
||||||
|
|
||||||
|
{ name: 'now', group: 'date', types: ['string', 'datetime'] },
|
||||||
{ name: 'past', group: 'date', types: ['string', 'datetime'] },
|
{ name: 'past', group: 'date', types: ['string', 'datetime'] },
|
||||||
{ name: 'future', group: 'date', types: ['string', 'datetime'] },
|
{ name: 'future', group: 'date', types: ['string', 'datetime'] },
|
||||||
// { name: 'between', group: 'date', types: ['string'] },
|
// { name: 'between', group: 'date', types: ['string'] },
|
||||||
@@ -161,7 +162,9 @@ export default class {
|
|||||||
{ name: 'filePath', group: 'system', types: ['string'] },
|
{ name: 'filePath', group: 'system', types: ['string'] },
|
||||||
{ name: 'semver', group: 'system', types: ['string'] },
|
{ name: 'semver', group: 'system', types: ['string'] },
|
||||||
|
|
||||||
|
{ name: 'now', group: 'time', types: ['string', 'time'] },
|
||||||
{ name: 'recent', group: 'time', types: ['string', 'time'] },
|
{ name: 'recent', group: 'time', types: ['string', 'time'] },
|
||||||
|
{ name: 'random', group: 'time', types: ['string', 'time'] },
|
||||||
|
|
||||||
{ name: 'vehicle', group: 'vehicle', types: ['string'] },
|
{ name: 'vehicle', group: 'vehicle', types: ['string'] },
|
||||||
{ name: 'manufacturer', group: 'vehicle', types: ['string'] },
|
{ name: 'manufacturer', group: 'vehicle', types: ['string'] },
|
||||||
|
@@ -9,6 +9,7 @@ export const defaults: Customizations = {
|
|||||||
dataTypes: [],
|
dataTypes: [],
|
||||||
indexTypes: [],
|
indexTypes: [],
|
||||||
foreignActions: [],
|
foreignActions: [],
|
||||||
|
operators: ['=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE', 'BETWEEN', 'IS NULL', 'IS NOT NULL'],
|
||||||
// Core
|
// Core
|
||||||
database: false,
|
database: false,
|
||||||
collations: false,
|
collations: false,
|
||||||
|
@@ -9,6 +9,7 @@ export const customizations: Customizations = {
|
|||||||
defaultUser: 'root',
|
defaultUser: 'root',
|
||||||
defaultDatabase: null,
|
defaultDatabase: null,
|
||||||
dataTypes: mysqlTypes,
|
dataTypes: mysqlTypes,
|
||||||
|
operators: ['=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE', 'RLIKE', 'NOT RLIKE', 'BETWEEN', 'IS NULL', 'IS NOT NULL'],
|
||||||
indexTypes: [
|
indexTypes: [
|
||||||
'PRIMARY',
|
'PRIMARY',
|
||||||
'INDEX',
|
'INDEX',
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import * as mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import { FirebirdSQLClient } from 'src/main/libs/clients/FirebirdSQLClient';
|
import { FirebirdSQLClient } from 'src/main/libs/clients/FirebirdSQLClient';
|
||||||
@@ -5,7 +6,6 @@ import MysqlExporter from 'src/main/libs/exporters/sql/MysqlExporter';
|
|||||||
import PostgreSQLExporter from 'src/main/libs/exporters/sql/PostgreSQLExporter';
|
import PostgreSQLExporter from 'src/main/libs/exporters/sql/PostgreSQLExporter';
|
||||||
import MySQLImporter from 'src/main/libs/importers/sql/MySQLlImporter';
|
import MySQLImporter from 'src/main/libs/importers/sql/MySQLlImporter';
|
||||||
import PostgreSQLImporter from 'src/main/libs/importers/sql/PostgreSQLImporter';
|
import PostgreSQLImporter from 'src/main/libs/importers/sql/PostgreSQLImporter';
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
|
|
||||||
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
|
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
|
||||||
import { PostgreSQLClient } from '../../main/libs/clients/PostgreSQLClient';
|
import { PostgreSQLClient } from '../../main/libs/clients/PostgreSQLClient';
|
||||||
@@ -363,8 +363,7 @@ export interface QueryBuilderObject {
|
|||||||
offset: number;
|
offset: number;
|
||||||
join: string[];
|
join: string[];
|
||||||
update: string[];
|
update: string[];
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
insert: {[key: string]: string | boolean | number }[];
|
||||||
insert: {[key: string]: any}[];
|
|
||||||
delete: boolean;
|
delete: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { TypesGroup } from './antares';
|
import { TypesGroup } from './antares';
|
||||||
|
import { TableFilterOperator } from './tableApis';
|
||||||
|
|
||||||
export interface Customizations {
|
export interface Customizations {
|
||||||
// Defaults
|
// Defaults
|
||||||
@@ -8,6 +9,7 @@ export interface Customizations {
|
|||||||
dataTypes?: TypesGroup[];
|
dataTypes?: TypesGroup[];
|
||||||
indexTypes?: string[];
|
indexTypes?: string[];
|
||||||
foreignActions?: string[];
|
foreignActions?: string[];
|
||||||
|
operators?: TableFilterOperator[];
|
||||||
// Core
|
// Core
|
||||||
database?: boolean;
|
database?: boolean;
|
||||||
collations?: boolean;
|
collations?: boolean;
|
||||||
|
@@ -21,10 +21,12 @@ export interface TableDeleteParams {
|
|||||||
rows: {[key: string]: any};
|
rows: {[key: string]: any};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type TableFilterOperator = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'IN' | 'NOT IN' | 'LIKE' | 'NOT LIKE' | 'RLIKE' | 'NOT RLIKE' | 'BETWEEN' | 'IS NULL' | 'IS NOT NULL'
|
||||||
|
|
||||||
export interface TableFilterClausole {
|
export interface TableFilterClausole {
|
||||||
active: boolean;
|
active: boolean;
|
||||||
field: string;
|
field: string;
|
||||||
op: '=' | '!=' | '>' | '<' | '>=' | '<=' | 'IN' | 'NOT IN' | 'LIKE' | 'BETWEEN' | 'IS NULL' | 'IS NOT NULL';
|
op:TableFilterOperator;
|
||||||
value: '';
|
value: '';
|
||||||
value2: '';
|
value2: '';
|
||||||
}
|
}
|
||||||
|
17
src/common/libs/fakerCustom.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { faker } from '@faker-js/faker';
|
||||||
|
import * as moment from 'moment';
|
||||||
|
|
||||||
|
export const fakerCustom = {
|
||||||
|
seed: faker.seed,
|
||||||
|
setLocale: faker.setLocale,
|
||||||
|
...faker,
|
||||||
|
date: {
|
||||||
|
now: () => moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
...faker.date
|
||||||
|
},
|
||||||
|
time: {
|
||||||
|
now: () => moment().format('HH:mm:ss'),
|
||||||
|
random: () => moment(faker.date.recent()).format('HH:mm:ss'),
|
||||||
|
...faker.time
|
||||||
|
}
|
||||||
|
};
|
@@ -55,7 +55,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
port: conn.sshPort ? conn.sshPort : 22,
|
port: conn.sshPort ? conn.sshPort : 22,
|
||||||
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
||||||
passphrase: conn.sshPassphrase,
|
passphrase: conn.sshPassphrase,
|
||||||
keepaliveInterval: conn.sshKeepAliveInterval ?? conn.sshKeepAliveInterval*1000
|
keepaliveInterval: conn.sshKeepAliveInterval ? conn.sshKeepAliveInterval*1000 : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
port: conn.sshPort ? conn.sshPort : 22,
|
port: conn.sshPort ? conn.sshPort : 22,
|
||||||
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
privateKey: conn.sshKey ? fs.readFileSync(conn.sshKey).toString() : null,
|
||||||
passphrase: conn.sshPassphrase,
|
passphrase: conn.sshPassphrase,
|
||||||
keepaliveInterval: conn.sshKeepAliveInterval ?? conn.sshKeepAliveInterval*1000
|
keepaliveInterval: conn.sshKeepAliveInterval ? conn.sshKeepAliveInterval*1000 : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { faker } from '@faker-js/faker';
|
|
||||||
import customizations from 'common/customizations';
|
import customizations from 'common/customizations';
|
||||||
import { ARRAY, BIT, BLOB, BOOLEAN, DATE, DATETIME, FLOAT, LONG_TEXT, NUMBER, TEXT, TEXT_SEARCH } from 'common/fieldTypes';
|
import { ARRAY, BIT, BLOB, BOOLEAN, DATE, DATETIME, FLOAT, LONG_TEXT, NUMBER, TEXT, TEXT_SEARCH } from 'common/fieldTypes';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import { InsertRowsParams } from 'common/interfaces/tableApis';
|
import { InsertRowsParams } from 'common/interfaces/tableApis';
|
||||||
|
import { fakerCustom } from 'common/libs/fakerCustom';
|
||||||
import { sqlEscaper } from 'common/libs/sqlUtils';
|
import { sqlEscaper } from 'common/libs/sqlUtils';
|
||||||
import { ipcMain } from 'electron';
|
import { ipcMain } from 'electron';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
@@ -371,19 +371,19 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
let fakeValue;
|
let fakeValue;
|
||||||
|
|
||||||
if (params.locale)
|
if (params.locale)
|
||||||
faker.locale = params.locale;
|
fakerCustom.locale = params.locale;
|
||||||
|
|
||||||
if (Object.keys(params.row[key].params).length) {
|
if (Object.keys(params.row[key].params).length) {
|
||||||
Object.keys(params.row[key].params).forEach(param => {
|
Object.keys(params.row[key].params).forEach(param => {
|
||||||
if (!isNaN(params.row[key].params[param]))
|
if (!isNaN(params.row[key].params[param]))// Converts string numerics params to number
|
||||||
parsedParams[param] = +params.row[key].params[param];
|
parsedParams[param] = Number(params.row[key].params[param]);
|
||||||
});
|
});
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
fakeValue = (faker as any)[params.row[key].group][params.row[key].method](parsedParams);
|
fakeValue = (fakerCustom as any)[params.row[key].group][params.row[key].method](parsedParams);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
fakeValue = (faker as any)[params.row[key].group][params.row[key].method]();
|
fakeValue = (fakerCustom as any)[params.row[key].group][params.row[key].method]();
|
||||||
|
|
||||||
if (typeof fakeValue === 'string') {
|
if (typeof fakeValue === 'string') {
|
||||||
if (params.row[key].length)
|
if (params.row[key].length)
|
||||||
|
@@ -2,8 +2,6 @@ import { ipcMain } from 'electron';
|
|||||||
import * as Store from 'electron-store';
|
import * as Store from 'electron-store';
|
||||||
import { autoUpdater } from 'electron-updater';
|
import { autoUpdater } from 'electron-updater';
|
||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
|
||||||
|
|
||||||
const persistentStore = new Store({
|
const persistentStore = new Store({
|
||||||
name: 'settings',
|
name: 'settings',
|
||||||
clearInvalidConfig: true,
|
clearInvalidConfig: true,
|
||||||
@@ -20,8 +18,6 @@ autoUpdater.allowPrerelease = persistentStore.get('allow_prerelease', false) as
|
|||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
ipcMain.on('check-for-updates', event => {
|
ipcMain.on('check-for-updates', event => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
|
|
||||||
mainWindow = event;
|
mainWindow = event;
|
||||||
if (process.windowsStore || (process.platform === 'linux' && !process.env.APPIMAGE))
|
if (process.windowsStore || (process.platform === 'linux' && !process.env.APPIMAGE))
|
||||||
mainWindow.reply('no-auto-update');
|
mainWindow.reply('no-auto-update');
|
||||||
@@ -35,38 +31,31 @@ export default () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on('restart-to-update', (event) => {
|
ipcMain.on('restart-to-update', () => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
});
|
});
|
||||||
|
|
||||||
// auto-updater events
|
// auto-updater events
|
||||||
autoUpdater.on('checking-for-update', (event) => {
|
autoUpdater.on('checking-for-update', () => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
mainWindow.reply('checking-for-update');
|
mainWindow.reply('checking-for-update');
|
||||||
});
|
});
|
||||||
|
|
||||||
autoUpdater.on('update-available', (event) => {
|
autoUpdater.on('update-available', () => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
|
|
||||||
if (isMacOS)
|
if (isMacOS)
|
||||||
mainWindow.reply('link-to-download');
|
mainWindow.reply('link-to-download');
|
||||||
else
|
else
|
||||||
mainWindow.reply('update-available');
|
mainWindow.reply('update-available');
|
||||||
});
|
});
|
||||||
|
|
||||||
autoUpdater.on('update-not-available', (event) => {
|
autoUpdater.on('update-not-available', () => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
mainWindow.reply('update-not-available');
|
mainWindow.reply('update-not-available');
|
||||||
});
|
});
|
||||||
|
|
||||||
autoUpdater.on('download-progress', event => {
|
autoUpdater.on('download-progress', event => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
mainWindow.reply('download-progress', event);
|
mainWindow.reply('download-progress', event);
|
||||||
});
|
});
|
||||||
|
|
||||||
autoUpdater.on('update-downloaded', (event) => {
|
autoUpdater.on('update-downloaded', () => {
|
||||||
if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' };
|
|
||||||
mainWindow.reply('update-downloaded');
|
mainWindow.reply('update-downloaded');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import mysql from 'mysql2/promise';
|
import mysql from 'mysql2/promise';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import SSH2Promise from 'ssh2-promise';
|
import SSH2Promise = require('@fabio286/ssh2-promise');
|
||||||
|
|
||||||
const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
||||||
// Remove comments, newlines and multiple spaces
|
// Remove comments, newlines and multiple spaces
|
||||||
@@ -16,7 +16,7 @@ const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
|||||||
/**
|
/**
|
||||||
* As Simple As Possible Query Builder Core
|
* As Simple As Possible Query Builder Core
|
||||||
*/
|
*/
|
||||||
export abstract class AntaresCore {
|
export abstract class BaseClient {
|
||||||
_client: antares.ClientCode;
|
_client: antares.ClientCode;
|
||||||
protected _cUid: string
|
protected _cUid: string
|
||||||
protected _params: mysql.ConnectionOptions | pg.ClientConfig | { databasePath: string; readonly: boolean};
|
protected _params: mysql.ConnectionOptions | pg.ClientConfig | { databasePath: string; readonly: boolean};
|
@@ -4,9 +4,9 @@ import * as antares from 'common/interfaces/antares';
|
|||||||
import * as firebird from 'node-firebird';
|
import * as firebird from 'node-firebird';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { BaseClient } from './BaseClient';
|
||||||
|
|
||||||
export class FirebirdSQLClient extends AntaresCore {
|
export class FirebirdSQLClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
private _connectionsToCommit: Map<string, firebird.Transaction>;
|
private _connectionsToCommit: Map<string, firebird.Transaction>;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
|
import SSH2Promise = require('@fabio286/ssh2-promise');
|
||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import dataTypes from 'common/data-types/mysql';
|
import dataTypes from 'common/data-types/mysql';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { BaseClient } from './BaseClient';
|
||||||
import SSH2Promise = require('ssh2-promise');
|
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
|
|
||||||
export class MySQLClient extends AntaresCore {
|
export class MySQLClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
private _connectionsToCommit: Map<string, mysql.Connection | mysql.PoolConnection>;
|
private _connectionsToCommit: Map<string, mysql.Connection | mysql.PoolConnection>;
|
||||||
@@ -168,7 +168,10 @@ export class MySQLClient extends AntaresCore {
|
|||||||
dbConfig.port = tunnel.localPort;
|
dbConfig.port = tunnel.localPort;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -187,7 +190,10 @@ export class MySQLClient extends AntaresCore {
|
|||||||
this._connection.end();
|
this._connection.end();
|
||||||
clearInterval(this._keepaliveTimer);
|
clearInterval(this._keepaliveTimer);
|
||||||
this._keepaliveTimer = undefined;
|
this._keepaliveTimer = undefined;
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getConnection () {
|
async getConnection () {
|
||||||
@@ -256,10 +262,13 @@ export class MySQLClient extends AntaresCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async keepAlive () {
|
private async keepAlive () {
|
||||||
|
try {
|
||||||
const connection = await (this._connection as mysql.Pool).getConnection();
|
const connection = await (this._connection as mysql.Pool).getConnection();
|
||||||
await connection.ping();
|
await connection.ping();
|
||||||
connection.release();
|
connection.release();
|
||||||
}
|
}
|
||||||
|
catch (_) {}
|
||||||
|
}
|
||||||
|
|
||||||
use (schema: string) {
|
use (schema: string) {
|
||||||
this._schema = schema;
|
this._schema = schema;
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
|
import SSH2Promise = require('@fabio286/ssh2-promise');
|
||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import dataTypes from 'common/data-types/postgresql';
|
import dataTypes from 'common/data-types/postgresql';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import * as pgAst from 'pgsql-ast-parser';
|
import * as pgAst from 'pgsql-ast-parser';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
|
||||||
import SSH2Promise = require('ssh2-promise');
|
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
import { ConnectionOptions } from 'tls';
|
import { ConnectionOptions } from 'tls';
|
||||||
|
|
||||||
|
import { BaseClient } from './BaseClient';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function pgToString (value: any) {
|
function pgToString (value: any) {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
@@ -81,7 +81,7 @@ type builtinsTypes =
|
|||||||
'JSONB' |
|
'JSONB' |
|
||||||
'REGNAMESPACE' |
|
'REGNAMESPACE' |
|
||||||
'REGROLE';
|
'REGROLE';
|
||||||
export class PostgreSQLClient extends AntaresCore {
|
export class PostgreSQLClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
private _connectionsToCommit: Map<string, pg.Client | pg.PoolClient>;
|
private _connectionsToCommit: Map<string, pg.Client | pg.PoolClient>;
|
||||||
@@ -180,7 +180,10 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
dbConfig.port = tunnel.localPort;
|
dbConfig.port = tunnel.localPort;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,14 +239,20 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
this._connection.end();
|
this._connection.end();
|
||||||
clearInterval(this._keepaliveTimer);
|
clearInterval(this._keepaliveTimer);
|
||||||
this._keepaliveTimer = undefined;
|
this._keepaliveTimer = undefined;
|
||||||
if (this._ssh) this._ssh.close();
|
if (this._ssh) {
|
||||||
|
this._ssh.close();
|
||||||
|
this._ssh.closeTunnel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async keepAlive () {
|
private async keepAlive () {
|
||||||
|
try {
|
||||||
const connection = await this._connection.connect() as pg.PoolClient;
|
const connection = await this._connection.connect() as pg.PoolClient;
|
||||||
await connection.query('SELECT 1+1');
|
await connection.query('SELECT 1+1');
|
||||||
connection.release();
|
connection.release();
|
||||||
}
|
}
|
||||||
|
catch (_) {}
|
||||||
|
}
|
||||||
|
|
||||||
use (schema: string, connection?: pg.Client | pg.PoolClient) {
|
use (schema: string, connection?: pg.Client | pg.PoolClient) {
|
||||||
this._schema = schema;
|
this._schema = schema;
|
||||||
|
@@ -3,9 +3,9 @@ import dataTypes from 'common/data-types/sqlite';
|
|||||||
import { DATETIME, FLOAT, NUMBER, TIME } from 'common/fieldTypes';
|
import { DATETIME, FLOAT, NUMBER, TIME } from 'common/fieldTypes';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { BaseClient } from './BaseClient';
|
||||||
|
|
||||||
export class SQLiteClient extends AntaresCore {
|
export class SQLiteClient extends BaseClient {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _connectionsToCommit: Map<string, sqlite.Database>;
|
private _connectionsToCommit: Map<string, sqlite.Database>;
|
||||||
protected _connection?: sqlite.Database;
|
protected _connection?: sqlite.Database;
|
||||||
@@ -296,7 +296,13 @@ export class SQLiteClient extends AntaresCore {
|
|||||||
// ADD FIELDS
|
// ADD FIELDS
|
||||||
fields.forEach(field => {
|
fields.forEach(field => {
|
||||||
const typeInfo = this.getTypeInfo(field.type);
|
const typeInfo = this.getTypeInfo(field.type);
|
||||||
const length = typeInfo?.length ? field.enumValues || field.numLength || field.charLength || field.datePrecision : false;
|
const length = typeInfo?.length
|
||||||
|
? field.enumValues ||
|
||||||
|
field.numLength ||
|
||||||
|
field.numPrecision ||
|
||||||
|
field.charLength ||
|
||||||
|
field.datePrecision
|
||||||
|
: false;
|
||||||
|
|
||||||
newColumns.push(`"${field.name}"
|
newColumns.push(`"${field.name}"
|
||||||
${field.type.toUpperCase()}${length ? `(${length})` : ''}
|
${field.type.toUpperCase()}${length ? `(${length})` : ''}
|
||||||
|
@@ -6,6 +6,7 @@ const isWindows = process.platform === 'win32';
|
|||||||
const indexPath = path.resolve(__dirname, 'index.html').split(path.sep).join('/');
|
const indexPath = path.resolve(__dirname, 'index.html').split(path.sep).join('/');
|
||||||
|
|
||||||
export function validateSender (frame: WebFrameMain) {
|
export function validateSender (frame: WebFrameMain) {
|
||||||
|
if (process.windowsStore) return true; // TEMP HOTFIX
|
||||||
const frameUrl = new URL(frame.url);
|
const frameUrl = new URL(frame.url);
|
||||||
const prefix = isWindows ? 'file:///' : 'file://';
|
const prefix = isWindows ? 'file:///' : 'file://';
|
||||||
const framePath = frameUrl.href.replace(prefix, '');
|
const framePath = frameUrl.href.replace(prefix, '');
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
|
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import { ImportOptions } from 'common/interfaces/importer';
|
import { ImportOptions } from 'common/interfaces/importer';
|
||||||
import * as mysql from 'mysql2';
|
import * as mysql from 'mysql2';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
|
||||||
|
|
||||||
import { MySQLClient } from '../libs/clients/MySQLClient';
|
import { MySQLClient } from '../libs/clients/MySQLClient';
|
||||||
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
|
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
:type="type"
|
:type="type"
|
||||||
:path="iconPath"
|
:path="iconPath"
|
||||||
:size="size"
|
:size="size"
|
||||||
:flip="flip"
|
|
||||||
:rotate="rotate"
|
:rotate="rotate"
|
||||||
|
:class="iconFlip"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,4 +39,24 @@ const props = defineProps({
|
|||||||
const iconPath = computed(() => {
|
const iconPath = computed(() => {
|
||||||
return (Icons as {[k:string]: string})[props.iconName];
|
return (Icons as {[k:string]: string})[props.iconName];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const iconFlip = computed(() => {
|
||||||
|
if (['horizontal', 'vertical', 'both'].includes(props.flip))
|
||||||
|
return `flip-${props.flip}`;
|
||||||
|
else return '';
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.flip-horizontal {
|
||||||
|
transform: scaleX(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.flip-vertical {
|
||||||
|
transform: scaleY(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.flip-both {
|
||||||
|
transform: scale(-1, -1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@@ -136,9 +136,4 @@ onMounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_.mdi {
|
|
||||||
display: inline-block;
|
|
||||||
width: 17px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@@ -403,11 +403,6 @@ defineExpose({ editor });
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_.mdi {
|
|
||||||
display: inline-block;
|
|
||||||
width: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ace_gutter-cell.ace_breakpoint {
|
.ace_gutter-cell.ace_breakpoint {
|
||||||
&::before {
|
&::before {
|
||||||
content: '\F0403';
|
content: '\F0403';
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
class="table-icon mr-1"
|
class="table-icon mr-1"
|
||||||
:icon-name="table.type === 'view' ? 'mdiTableEye' : 'mdiTable'"
|
:icon-name="table.type === 'view' ? 'mdiTableEye' : 'mdiTable'"
|
||||||
:size="18"
|
:size="18"
|
||||||
|
:style="`min-width: 18px`"
|
||||||
/>
|
/>
|
||||||
<span v-html="highlightWord(table.name)" />
|
<span v-html="highlightWord(table.name)" />
|
||||||
</a>
|
</a>
|
||||||
@@ -99,6 +100,7 @@
|
|||||||
class="table-icon mr-1"
|
class="table-icon mr-1"
|
||||||
icon-name="mdiTableCog"
|
icon-name="mdiTableCog"
|
||||||
:size="18"
|
:size="18"
|
||||||
|
:style="`min-width: 18px`"
|
||||||
/>
|
/>
|
||||||
<span v-html="highlightWord(trigger.name)" />
|
<span v-html="highlightWord(trigger.name)" />
|
||||||
</a>
|
</a>
|
||||||
@@ -151,6 +153,7 @@
|
|||||||
class="table-icon mr-1"
|
class="table-icon mr-1"
|
||||||
icon-name="mdiSyncCircle"
|
icon-name="mdiSyncCircle"
|
||||||
:size="18"
|
:size="18"
|
||||||
|
:style="`min-width: 18px`"
|
||||||
/>
|
/>
|
||||||
<span v-html="highlightWord(routine.name)" />
|
<span v-html="highlightWord(routine.name)" />
|
||||||
</a>
|
</a>
|
||||||
@@ -172,6 +175,7 @@
|
|||||||
class="misc-icon mr-1"
|
class="misc-icon mr-1"
|
||||||
icon-name="mdiFolderRefresh"
|
icon-name="mdiFolderRefresh"
|
||||||
:size="18"
|
:size="18"
|
||||||
|
:style="`min-width: 18px`"
|
||||||
/>
|
/>
|
||||||
{{ t('database.triggerFunction', 2) }}
|
{{ t('database.triggerFunction', 2) }}
|
||||||
</summary>
|
</summary>
|
||||||
@@ -233,6 +237,7 @@
|
|||||||
class="misc-icon mr-1"
|
class="misc-icon mr-1"
|
||||||
icon-name="mdiArrowRightBoldBox"
|
icon-name="mdiArrowRightBoldBox"
|
||||||
:size="18"
|
:size="18"
|
||||||
|
:style="`min-width: 18px`"
|
||||||
/>
|
/>
|
||||||
<span v-html="highlightWord(func.name)" />
|
<span v-html="highlightWord(func.name)" />
|
||||||
</a>
|
</a>
|
||||||
@@ -275,6 +280,7 @@
|
|||||||
class="misc-icon mr-1"
|
class="misc-icon mr-1"
|
||||||
icon-name="mdiCalendarClock"
|
icon-name="mdiCalendarClock"
|
||||||
:size="18"
|
:size="18"
|
||||||
|
:style="`min-width: 18px`"
|
||||||
/>
|
/>
|
||||||
<span v-html="highlightWord(scheduler.name)" />
|
<span v-html="highlightWord(scheduler.name)" />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
<div class="tile-icon">
|
<div class="tile-icon">
|
||||||
<div>
|
<div>
|
||||||
<BaseIcon
|
<BaseIcon
|
||||||
class="mr-1"
|
class="mr-1 mt-1"
|
||||||
icon-name="mdiKeyLink"
|
icon-name="mdiKeyLink"
|
||||||
:size="24"
|
:size="24"
|
||||||
/>
|
/>
|
||||||
@@ -78,6 +78,7 @@
|
|||||||
class="mr-1"
|
class="mr-1"
|
||||||
icon-name="mdiTable"
|
icon-name="mdiTable"
|
||||||
:size="14"
|
:size="14"
|
||||||
|
:style="'min-width:14px'"
|
||||||
/>
|
/>
|
||||||
<span>{{ foreign.table }}.{{ foreign.field }}</span>
|
<span>{{ foreign.table }}.{{ foreign.field }}</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
class="mr-1"
|
class="mr-1"
|
||||||
icon-name="mdiTable"
|
icon-name="mdiTable"
|
||||||
:size="14"
|
:size="14"
|
||||||
|
:style="'min-width:14px'"
|
||||||
/>
|
/>
|
||||||
<span>{{ foreign.refTable }}.{{ foreign.refField }}</span>
|
<span>{{ foreign.refTable }}.{{ foreign.refField }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
@@ -27,11 +27,7 @@
|
|||||||
:title="t('general.cancel')"
|
:title="t('general.cancel')"
|
||||||
@click="killTabQuery()"
|
@click="killTabQuery()"
|
||||||
>
|
>
|
||||||
<BaseIcon
|
<BaseIcon icon-name="mdiWindowClose" :size="24" />
|
||||||
class="mr-1"
|
|
||||||
icon-name="mdiWindowCLose"
|
|
||||||
:size="24"
|
|
||||||
/>
|
|
||||||
<span class="d-invisible pr-1">{{ t('general.run') }}</span>
|
<span class="d-invisible pr-1">{{ t('general.run') }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
@@ -235,7 +235,10 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="column col-7">
|
<div class="column col-7">
|
||||||
<label class="form-switch d-inline-block" @click.prevent="csvExportOptions.header = !csvExportOptions.header">
|
<label
|
||||||
|
class="form-switch d-inline-block"
|
||||||
|
@click.prevent="csvExportOptions.header = !csvExportOptions.header"
|
||||||
|
>
|
||||||
<input type="checkbox" :checked="csvExportOptions.header">
|
<input type="checkbox" :checked="csvExportOptions.header">
|
||||||
<i class="form-icon" />
|
<i class="form-icon" />
|
||||||
</label>
|
</label>
|
||||||
@@ -249,10 +252,10 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import faker from '@faker-js/faker';
|
|
||||||
import { BLOB, DATE, DATETIME, LONG_TEXT, TEXT, TIME } from 'common/fieldTypes';
|
import { BLOB, DATE, DATETIME, LONG_TEXT, TEXT, TIME } from 'common/fieldTypes';
|
||||||
import { QueryResult, TableField } from 'common/interfaces/antares';
|
import { QueryResult, TableField } from 'common/interfaces/antares';
|
||||||
import { TableUpdateParams } from 'common/interfaces/tableApis';
|
import { TableUpdateParams } from 'common/interfaces/tableApis';
|
||||||
|
import { fakerCustom } from 'common/libs/fakerCustom';
|
||||||
import { jsonToSqlInsert } from 'common/libs/sqlUtils';
|
import { jsonToSqlInsert } from 'common/libs/sqlUtils';
|
||||||
import { uidGen } from 'common/libs/uidGen';
|
import { uidGen } from 'common/libs/uidGen';
|
||||||
import * as json2php from 'json2php';
|
import * as json2php from 'json2php';
|
||||||
@@ -670,16 +673,7 @@ const fillCell = (event: { name: string; group: string; type: string }) => {
|
|||||||
datePrecision += i === 0 ? '.S' : 'S';
|
datePrecision += i === 0 ? '.S' : 'S';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.group === 'custom') {
|
fakeValue = (fakerCustom as any)[event.group][event.name]();
|
||||||
if (event.type === 'time' && event.name === 'now')
|
|
||||||
fakeValue = moment().format(`HH:mm:ss${datePrecision}`);
|
|
||||||
else if (event.type === 'time' && event.name === 'random')
|
|
||||||
fakeValue = moment(faker.date.recent()).format(`HH:mm:ss${datePrecision}`);
|
|
||||||
else if (event.type === 'datetime' && event.name === 'now')
|
|
||||||
fakeValue = moment().format(`YYYY-MM-DD HH:mm:ss${datePrecision}`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fakeValue = (faker as any)[event.group][event.name]();
|
|
||||||
if (['string', 'number'].includes(typeof fakeValue)) {
|
if (['string', 'number'].includes(typeof fakeValue)) {
|
||||||
if (typeof fakeValue === 'number')
|
if (typeof fakeValue === 'number')
|
||||||
fakeValue = String(fakeValue);
|
fakeValue = String(fakeValue);
|
||||||
@@ -691,7 +685,6 @@ const fillCell = (event: { name: string; group: string; type: string }) => {
|
|||||||
fakeValue = moment(fakeValue).format(`YYYY-MM-DD HH:mm:ss${datePrecision}`);
|
fakeValue = moment(fakeValue).format(`YYYY-MM-DD HH:mm:ss${datePrecision}`);
|
||||||
else if (TIME.includes(selectedCell.value.type))
|
else if (TIME.includes(selectedCell.value.type))
|
||||||
fakeValue = moment(fakeValue).format(`HH:mm:ss${datePrecision}`);
|
fakeValue = moment(fakeValue).format(`HH:mm:ss${datePrecision}`);
|
||||||
}
|
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
primary: primaryField.value?.name,
|
primary: primaryField.value?.name,
|
||||||
@@ -1055,6 +1048,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.column-resizable {
|
.column-resizable {
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:active {
|
&:active {
|
||||||
resize: horizontal;
|
resize: horizontal;
|
||||||
|
@@ -197,13 +197,13 @@ const fakerMethods = {
|
|||||||
{ name: 'amount', group: 'finance' }
|
{ name: 'amount', group: 'finance' }
|
||||||
],
|
],
|
||||||
datetime: [
|
datetime: [
|
||||||
{ name: 'now', group: 'custom' },
|
{ name: 'now', group: 'date' },
|
||||||
{ name: 'past', group: 'date' },
|
{ name: 'past', group: 'date' },
|
||||||
{ name: 'future', group: 'date' }
|
{ name: 'future', group: 'date' }
|
||||||
],
|
],
|
||||||
time: [
|
time: [
|
||||||
{ name: 'now', group: 'custom' },
|
{ name: 'now', group: 'time' },
|
||||||
{ name: 'random', group: 'custom' }
|
{ name: 'random', group: 'time' }
|
||||||
],
|
],
|
||||||
uuid: [
|
uuid: [
|
||||||
{ name: 'uuid', group: 'random' }
|
{ name: 'uuid', group: 'random' }
|
||||||
|
@@ -183,6 +183,7 @@
|
|||||||
<WorkspaceTabTableFilters
|
<WorkspaceTabTableFilters
|
||||||
v-if="isSearch"
|
v-if="isSearch"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
|
:is-quering="isQuering"
|
||||||
:conn-client="connection.client"
|
:conn-client="connection.client"
|
||||||
@filter="updateFilters"
|
@filter="updateFilters"
|
||||||
@filter-change="onFilterChange"
|
@filter-change="onFilterChange"
|
||||||
@@ -231,7 +232,7 @@ import { ConnectionParams } from 'common/interfaces/antares';
|
|||||||
import { TableFilterClausole } from 'common/interfaces/tableApis';
|
import { TableFilterClausole } from 'common/interfaces/tableApis';
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { computed, onBeforeUnmount, Prop, Ref, ref, watch } from 'vue';
|
import { computed, nextTick, onBeforeUnmount, Prop, Ref, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import BaseIcon from '@/components/BaseIcon.vue';
|
import BaseIcon from '@/components/BaseIcon.vue';
|
||||||
@@ -258,7 +259,10 @@ const props = defineProps({
|
|||||||
elementType: String
|
elementType: String
|
||||||
});
|
});
|
||||||
|
|
||||||
const reloadTable = () => getTableData();
|
const reloadTable = async () => {
|
||||||
|
await nextTick();
|
||||||
|
getTableData();
|
||||||
|
};
|
||||||
|
|
||||||
const {
|
const {
|
||||||
queryTable,
|
queryTable,
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
<input
|
<input
|
||||||
v-model="row.active"
|
v-model="row.active"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
:disabled="isQuering"
|
||||||
@change="doFilter"
|
@change="doFilter"
|
||||||
><i class="form-icon" />
|
><i class="form-icon" />
|
||||||
</label>
|
</label>
|
||||||
@@ -18,11 +19,13 @@
|
|||||||
:options="fields"
|
:options="fields"
|
||||||
option-track-by="name"
|
option-track-by="name"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
:disabled="isQuering"
|
||||||
/>
|
/>
|
||||||
<BaseSelect
|
<BaseSelect
|
||||||
v-model="row.op"
|
v-model="row.op"
|
||||||
class="form-select ml-2 col-auto select-sm"
|
class="form-select ml-2 col-auto select-sm"
|
||||||
:options="operators"
|
:options="operators"
|
||||||
|
:disabled="isQuering"
|
||||||
/>
|
/>
|
||||||
<div class="workspace-table-filters-row-value ml-2">
|
<div class="workspace-table-filters-row-value ml-2">
|
||||||
<input
|
<input
|
||||||
@@ -30,12 +33,14 @@
|
|||||||
v-model="row.value"
|
v-model="row.value"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-input input-sm"
|
class="form-input input-sm"
|
||||||
|
:disabled="isQuering"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
v-if="row.op === 'BETWEEN'"
|
v-if="row.op === 'BETWEEN'"
|
||||||
v-model="row.value2"
|
v-model="row.value2"
|
||||||
type="text"
|
type="text"
|
||||||
class="form-input ml-2 input-sm"
|
class="form-input ml-2 input-sm"
|
||||||
|
:disabled="isQuering"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
@@ -76,7 +81,7 @@
|
|||||||
import customizations from 'common/customizations';
|
import customizations from 'common/customizations';
|
||||||
import { FLOAT, NUMBER } from 'common/fieldTypes';
|
import { FLOAT, NUMBER } from 'common/fieldTypes';
|
||||||
import { ClientCode, TableField } from 'common/interfaces/antares';
|
import { ClientCode, TableField } from 'common/interfaces/antares';
|
||||||
import { TableFilterClausole } from 'common/interfaces/tableApis';
|
import { TableFilterClausole, TableFilterOperator } from 'common/interfaces/tableApis';
|
||||||
import { computed, Prop, ref } from 'vue';
|
import { computed, Prop, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
@@ -87,15 +92,14 @@ const { t } = useI18n();
|
|||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fields: Array as Prop<TableField[]>,
|
fields: Array as Prop<TableField[]>,
|
||||||
connClient: String as Prop<ClientCode>
|
connClient: String as Prop<ClientCode>,
|
||||||
|
isQuering: Boolean
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['filter-change', 'filter']);
|
const emit = defineEmits(['filter-change', 'filter']);
|
||||||
|
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
const operators = ref([
|
const operators: TableFilterOperator[] = customizations[props.connClient].operators;
|
||||||
'=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'BETWEEN', 'IS NULL', 'IS NOT NULL'
|
|
||||||
]);
|
|
||||||
|
|
||||||
const clientCustomizations = computed(() => customizations[props.connClient]);
|
const clientCustomizations = computed(() => customizations[props.connClient]);
|
||||||
|
|
||||||
@@ -122,6 +126,13 @@ const createClausole = (filter: TableFilterClausole) => {
|
|||||||
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
|
const { elementsWrapper: ew, stringsWrapper: sw } = clientCustomizations.value;
|
||||||
let value;
|
let value;
|
||||||
|
|
||||||
|
if (isNumeric && !['IN', 'NOT IN', 'RLIKE', 'NOT RLIKE'].includes(filter.op)) {
|
||||||
|
if (isNaN(Number(filter.value)))
|
||||||
|
filter.value = '';
|
||||||
|
if (isNaN(Number(filter.value2)))
|
||||||
|
filter.value2 = '';
|
||||||
|
}
|
||||||
|
|
||||||
switch (filter.op) {
|
switch (filter.op) {
|
||||||
case '=':
|
case '=':
|
||||||
case '!=':
|
case '!=':
|
||||||
@@ -138,13 +149,14 @@ const createClausole = (filter: TableFilterClausole) => {
|
|||||||
val = val.trim();
|
val = val.trim();
|
||||||
return isNumeric ? val : `${sw}${val}${sw}`;
|
return isNumeric ? val : `${sw}${val}${sw}`;
|
||||||
}).join(',');
|
}).join(',');
|
||||||
value = `(${filter.value})`;
|
value = `(${value})`;
|
||||||
break;
|
break;
|
||||||
case 'IS NULL':
|
case 'IS NULL':
|
||||||
case 'IS NOT NULL':
|
case 'IS NOT NULL':
|
||||||
value = '';
|
value = '';
|
||||||
break;
|
break;
|
||||||
case 'LIKE':
|
case 'LIKE':
|
||||||
|
case 'NOT LIKE':
|
||||||
value = `${sw}%${filter.value}%${sw}`;
|
value = `${sw}%${filter.value}%${sw}`;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
1
src/renderer/images/svg/alphabetical-variant.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 7A2 2 0 0 0 1 9V17H3V13H5V17H7V9A2 2 0 0 0 5 7H3M3 9H5V11H3M15 10.5V9A2 2 0 0 0 13 7H9V17H13A2 2 0 0 0 15 15V13.5A1.54 1.54 0 0 0 13.5 12A1.54 1.54 0 0 0 15 10.5M13 15H11V13H13V15M13 11H11V9H13M19 7A2 2 0 0 0 17 9V15A2 2 0 0 0 19 17H21A2 2 0 0 0 23 15V14H21V15H19V9H21V10H23V9A2 2 0 0 0 21 7Z" /></svg>
|
After Width: | Height: | Size: 374 B |
1
src/renderer/images/svg/arrow-right-bold-box.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3,19V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19M17,12L12,7V10H8V14H12V17L17,12Z" /></svg>
|
After Width: | Height: | Size: 186 B |
1
src/renderer/images/svg/calendar-clock.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z" /></svg>
|
After Width: | Height: | Size: 501 B |
1
src/renderer/images/svg/circle.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></svg>
|
After Width: | Height: | Size: 155 B |
1
src/renderer/images/svg/code-braces.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z" /></svg>
|
After Width: | Height: | Size: 339 B |
1
src/renderer/images/svg/cube.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L6.04,7.5L12,10.85L17.96,7.5L12,4.15Z" /></svg>
|
After Width: | Height: | Size: 412 B |
1
src/renderer/images/svg/rhombus-split-outline.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C11.5 2 11 2.19 10.59 2.59L2.59 10.59C1.8 11.37 1.8 12.63 2.59 13.41L10.59 21.41C11.37 22.2 12.63 22.2 13.41 21.41L21.41 13.41C22.2 12.63 22.2 11.37 21.41 10.59L13.41 2.59C13 2.19 12.5 2 12 2M12 4L15.29 7.29L12 10.59L8.71 7.29L12 4M7.29 8.71L10.59 12L7.29 15.29L4 12L7.29 8.71M16.71 8.71L20 12L16.71 15.29L13.41 12L16.71 8.71M12 13.41L15.29 16.71L12 20L8.71 16.71L12 13.41Z" /></svg>
|
After Width: | Height: | Size: 457 B |
1
src/renderer/images/svg/sync-circle.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2 12A10 10 0 1 0 12 2A10 10 0 0 0 2 12M15.6 13.72A4 4 0 0 0 16 12A4 4 0 0 0 12 8V10L8.88 7L12 4V6A6 6 0 0 1 18 12A5.9 5.9 0 0 1 17.07 15.19M6 12A5.9 5.9 0 0 1 6.93 8.81L8.4 10.28A4 4 0 0 0 8 12A4 4 0 0 0 12 16V14L15 17L12 20V18A6 6 0 0 1 6 12Z" /></svg>
|
After Width: | Height: | Size: 323 B |
1
src/renderer/images/svg/table-cog.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3H17C18.11 3 19 3.9 19 5V12.08C17.45 11.82 15.92 12.18 14.68 13H11V17H12.08C11.97 17.68 11.97 18.35 12.08 19H3C1.9 19 1 18.11 1 17V5C1 3.9 1.9 3 3 3M3 7V11H9V7H3M11 7V11H17V7H11M3 13V17H9V13H3M22.78 19.32L21.71 18.5C21.73 18.33 21.75 18.17 21.75 18S21.74 17.67 21.71 17.5L22.77 16.68C22.86 16.6 22.89 16.47 22.83 16.36L21.83 14.63C21.77 14.5 21.64 14.5 21.5 14.5L20.28 15C20 14.82 19.74 14.65 19.43 14.53L19.24 13.21C19.23 13.09 19.12 13 19 13H17C16.88 13 16.77 13.09 16.75 13.21L16.56 14.53C16.26 14.66 15.97 14.82 15.71 15L14.47 14.5C14.36 14.5 14.23 14.5 14.16 14.63L13.16 16.36C13.1 16.47 13.12 16.6 13.22 16.68L14.28 17.5C14.26 17.67 14.25 17.83 14.25 18S14.26 18.33 14.28 18.5L13.22 19.32C13.13 19.4 13.1 19.53 13.16 19.64L14.16 21.37C14.22 21.5 14.35 21.5 14.47 21.5L15.71 21C15.97 21.18 16.25 21.35 16.56 21.47L16.75 22.79C16.77 22.91 16.87 23 17 23H19C19.12 23 19.23 22.91 19.25 22.79L19.44 21.47C19.74 21.34 20 21.18 20.28 21L21.5 21.5C21.64 21.5 21.77 21.5 21.84 21.37L22.84 19.64C22.9 19.53 22.87 19.4 22.78 19.32M18 19.5C17.17 19.5 16.5 18.83 16.5 18S17.18 16.5 18 16.5 19.5 17.17 19.5 18 18.84 19.5 18 19.5Z" /></svg>
|
After Width: | Height: | Size: 1.2 KiB |
1
src/renderer/images/svg/table-eye.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 16.88C17.56 16.88 18 17.32 18 17.88S17.56 18.88 17 18.88 16 18.43 16 17.88 16.44 16.88 17 16.88M17 13.88C19.73 13.88 22.06 15.54 23 17.88C22.06 20.22 19.73 21.88 17 21.88S11.94 20.22 11 17.88C11.94 15.54 14.27 13.88 17 13.88M17 15.38C15.62 15.38 14.5 16.5 14.5 17.88S15.62 20.38 17 20.38 19.5 19.26 19.5 17.88 18.38 15.38 17 15.38M18 3H4C2.9 3 2 3.9 2 5V17C2 18.1 2.9 19 4 19H9.42C9.26 18.68 9.12 18.34 9 18C9.12 17.66 9.26 17.32 9.42 17H4V13H10V15.97C10.55 15.11 11.23 14.37 12 13.76V13H13.15C14.31 12.36 15.62 12 17 12C18.06 12 19.07 12.21 20 12.59V5C20 3.9 19.1 3 18 3M10 11H4V7H10V11M18 11H12V7H18V11Z" /></svg>
|
After Width: | Height: | Size: 688 B |
1
src/renderer/images/svg/table.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5,4H19A2,2 0 0,1 21,6V18A2,2 0 0,1 19,20H5A2,2 0 0,1 3,18V6A2,2 0 0,1 5,4M5,8V12H11V8H5M13,8V12H19V8H13M5,14V18H11V14H5M13,14V18H19V14H13Z" /></svg>
|
After Width: | Height: | Size: 218 B |
@@ -1,5 +1,4 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import '@mdi/font/css/materialdesignicons.css';
|
|
||||||
import 'floating-vue/dist/style.css';
|
import 'floating-vue/dist/style.css';
|
||||||
import 'leaflet/dist/leaflet.css';
|
import 'leaflet/dist/leaflet.css';
|
||||||
import '@/scss/main.scss';
|
import '@/scss/main.scss';
|
||||||
|
@@ -1227,42 +1227,42 @@ ace.define('ace/autocomplete/popup', ['require', 'exports', 'module', 'ace/virtu
|
|||||||
|
|
||||||
switch (meta) {
|
switch (meta) {
|
||||||
case 'table':
|
case 'table':
|
||||||
iconClass = 'mdi-table';
|
iconClass = 'editor-icon-table';
|
||||||
break;
|
break;
|
||||||
case 'column':
|
case 'column':
|
||||||
iconClass = 'mdi-rhombus-split-outline';
|
iconClass = 'editor-icon-rhombus-split-outline';
|
||||||
break;
|
break;
|
||||||
case 'view':
|
case 'view':
|
||||||
iconClass = 'mdi-table-eye';
|
iconClass = 'editor-icon-table-eye';
|
||||||
break;
|
break;
|
||||||
case 'trigger':
|
case 'trigger':
|
||||||
iconClass = 'mdi-table-cog';
|
iconClass = 'editor-icon-table-cog';
|
||||||
break;
|
break;
|
||||||
case 'routine':
|
case 'routine':
|
||||||
iconClass = 'mdi-sync-circle';
|
iconClass = 'editor-icon-sync-circle';
|
||||||
break;
|
break;
|
||||||
case 'function':
|
case 'function':
|
||||||
iconClass = 'mdi-arrow-right-bold-box';
|
iconClass = 'editor-icon-arrow-right-bold-box';
|
||||||
break;
|
break;
|
||||||
case 'scheduler':
|
case 'scheduler':
|
||||||
iconClass = 'mdi-calendar-clock';
|
iconClass = 'editor-icon-calendar-clock';
|
||||||
break;
|
break;
|
||||||
case 'keyword':
|
case 'keyword':
|
||||||
iconClass = 'mdi-cube';
|
iconClass = 'editor-icon-cube';
|
||||||
break;
|
break;
|
||||||
case 'snippet':
|
case 'snippet':
|
||||||
iconClass = 'mdi-code-braces';
|
iconClass = 'editor-icon-code-braces';
|
||||||
break;
|
break;
|
||||||
case 'local':
|
case 'local':
|
||||||
iconClass = 'mdi-alphabetical-variant';
|
iconClass = 'editor-icon-alphabetical-variant';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
iconClass = 'mdi-circle';
|
iconClass = 'editor-icon-circle';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
iconClass && tokens.push({
|
iconClass && tokens.push({
|
||||||
type: ` mdi ${iconClass}`,
|
type: ` editor-icon ${iconClass}`,
|
||||||
value: ' '
|
value: ' '
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
67
src/renderer/scss/_editor-icons.scss
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/* stylelint-disable selector-class-pattern */
|
||||||
|
|
||||||
|
/* Only used in ext-language_tools.js */
|
||||||
|
.editor-icon {
|
||||||
|
display: inline-block;
|
||||||
|
width: 17px;
|
||||||
|
height: 17px;
|
||||||
|
background-size: cover;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
margin-right: 1px;
|
||||||
|
opacity: 0.7;
|
||||||
|
|
||||||
|
&.editor-icon-table {
|
||||||
|
background-image: url("../images/svg/table.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-rhombus-split-outline {
|
||||||
|
background-image: url("../images/svg/rhombus-split-outline.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-table-eye {
|
||||||
|
background-image: url("../images/svg/table-eye.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-table-cog {
|
||||||
|
background-image: url("../images/svg/table-cog.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-sync-circle {
|
||||||
|
background-image: url("../images/svg/sync-circle.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-arrow-right-bold-box {
|
||||||
|
background-image: url("../images/svg/arrow-right-bold-box.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-calendar-clock {
|
||||||
|
background-image: url("../images/svg/calendar-clock.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-cube {
|
||||||
|
background-image: url("../images/svg/cube.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-code-braces {
|
||||||
|
background-image: url("../images/svg/code-braces.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-alphabetical-variant {
|
||||||
|
background-image: url("../images/svg/alphabetical-variant.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editor-icon-circle {
|
||||||
|
background-image: url("../images/svg/circle.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ace_dark {
|
||||||
|
.editor-icon {
|
||||||
|
filter: invert(100%);
|
||||||
|
}
|
||||||
|
}
|
@@ -1,9 +0,0 @@
|
|||||||
.mdi {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -5,7 +5,7 @@
|
|||||||
@import "data-types";
|
@import "data-types";
|
||||||
@import "table-keys";
|
@import "table-keys";
|
||||||
@import "fake-tables";
|
@import "fake-tables";
|
||||||
@import "mdi-additions";
|
@import "editor-icons";
|
||||||
@import "db-icons";
|
@import "db-icons";
|
||||||
@import "themes/dark-theme";
|
@import "themes/dark-theme";
|
||||||
@import "themes/light-theme";
|
@import "themes/light-theme";
|
||||||
|