mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 20:45:24 +00:00
feat: update topology
This commit is contained in:
parent
1a6ab74be8
commit
491bf88063
@ -23,6 +23,7 @@ const msg = {
|
|||||||
infrastructure: "基础结构",
|
infrastructure: "基础结构",
|
||||||
virtualMachine: "虚拟机",
|
virtualMachine: "虚拟机",
|
||||||
kubernetes: "Kubernetes",
|
kubernetes: "Kubernetes",
|
||||||
|
dashboardNew: "新建仪表板",
|
||||||
dashboardHome: "仪表盘首页",
|
dashboardHome: "仪表盘首页",
|
||||||
dashboardList: "仪表盘列表",
|
dashboardList: "仪表盘列表",
|
||||||
log: "日志",
|
log: "日志",
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
const requireComponent = require.context("../../assets", false, /\.png$/);
|
const requireComponent = require.context("./tool", false, /\.png$/);
|
||||||
|
|
||||||
const result: { [key: string]: string } = {};
|
const result: { [key: string]: string } = {};
|
||||||
function capitalizeFirstLetter(str: string) {
|
function capitalizeFirstLetter(str: string) {
|
||||||
|
@ -14,26 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
const requireComponent = require.context("./tool", false, /\.png$/);
|
import icons from "./icons";
|
||||||
const icons: { [key: string]: string } = {};
|
|
||||||
|
|
||||||
function capitalizeFirstLetter(str: string) {
|
|
||||||
return str.toUpperCase();
|
|
||||||
}
|
|
||||||
function validateFileName(str: string): string | undefined {
|
|
||||||
if (/^\S+\.png$/.test(str)) {
|
|
||||||
return str.replace(/^\S+\/(\w+)\.png$/, (rs, $1) =>
|
|
||||||
capitalizeFirstLetter($1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
requireComponent.keys().forEach((filePath: string) => {
|
|
||||||
const componentConfig = requireComponent(filePath);
|
|
||||||
const fileName = validateFileName(filePath);
|
|
||||||
if (fileName) {
|
|
||||||
icons[fileName] = componentConfig;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const Hexagon = (side: number, r: number, cx: number, cy: number) => {
|
const Hexagon = (side: number, r: number, cx: number, cy: number) => {
|
||||||
let path = "";
|
let path = "";
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
|
"noImplicitThis": false,
|
||||||
"types": [
|
"types": [
|
||||||
"webpack-env",
|
"webpack-env",
|
||||||
"jest"
|
"jest"
|
||||||
|
Loading…
Reference in New Issue
Block a user