mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-11 15:15:15 +00:00
refactor
This commit is contained in:
parent
af0b3ab17b
commit
209f3e38f2
@ -75,6 +75,28 @@ limitations under the License. -->
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
const color: string[] = chartColors();
|
const color: string[] = chartColors();
|
||||||
|
const legend =
|
||||||
|
appStore.theme === Themes.Dark
|
||||||
|
? {
|
||||||
|
pageIconColor: "#ccc",
|
||||||
|
pageIconInactiveColor: "#444",
|
||||||
|
backgroundColor: "#333",
|
||||||
|
borderColor: "#fff",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
color: "#eee",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
pageIconColor: "#666",
|
||||||
|
pageIconInactiveColor: "#ccc",
|
||||||
|
backgroundColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
|
||||||
|
borderColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
color: "#333",
|
||||||
|
},
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
color,
|
color,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -94,12 +116,7 @@ limitations under the License. -->
|
|||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
itemWidth: 12,
|
itemWidth: 12,
|
||||||
backgroundColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
|
...legend,
|
||||||
borderColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 12,
|
|
||||||
color: appStore.theme === Themes.Dark ? "#eee" : "#333",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: keys.length === 1 ? 15 : 40,
|
top: keys.length === 1 ? 15 : 40,
|
||||||
|
@ -123,7 +123,24 @@ limitations under the License. -->
|
|||||||
color: appStore.theme === Themes.Dark ? "#eee" : "#333",
|
color: appStore.theme === Themes.Dark ? "#eee" : "#333",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
const legend =
|
||||||
|
appStore.theme === Themes.Dark
|
||||||
|
? {
|
||||||
|
pageIconColor: "#ccc",
|
||||||
|
pageIconInactiveColor: "#444",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
color: "#eee",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
pageIconColor: "#666",
|
||||||
|
pageIconInactiveColor: "#ccc",
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
color: "#333",
|
||||||
|
},
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
color,
|
color,
|
||||||
tooltip: props.config.smallTips ? tips : tooltip,
|
tooltip: props.config.smallTips ? tips : tooltip,
|
||||||
@ -134,11 +151,7 @@ limitations under the License. -->
|
|||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
itemWidth: 12,
|
itemWidth: 12,
|
||||||
pageIconColor: appStore.theme === Themes.Dark ? "#ccc" : "#666",
|
...legend,
|
||||||
pageIconInactiveColor: appStore.theme === Themes.Dark ? "#444" : "#ccc",
|
|
||||||
textStyle: {
|
|
||||||
color: appStore.theme === Themes.Dark ? "#fff" : "#333",
|
|
||||||
},
|
|
||||||
selector: [
|
selector: [
|
||||||
{
|
{
|
||||||
type: "all",
|
type: "all",
|
||||||
|
Loading…
Reference in New Issue
Block a user