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