mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: add Tab on the dashboard
This commit is contained in:
@@ -49,6 +49,34 @@ export const dashboardStore = defineStore({
|
||||
w: 24,
|
||||
h: 12,
|
||||
i: String(this.layout.length),
|
||||
type: "Widget",
|
||||
widget: {},
|
||||
graph: {},
|
||||
standard: {},
|
||||
};
|
||||
this.layout = this.layout.map((d: LayoutConfig) => {
|
||||
d.y = d.y + newWidget.h;
|
||||
return d;
|
||||
});
|
||||
this.layout.push(newWidget);
|
||||
},
|
||||
addTab() {
|
||||
const newWidget: LayoutConfig = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: 24,
|
||||
h: 12,
|
||||
i: String(this.layout.length),
|
||||
type: "Tab",
|
||||
children: [
|
||||
{
|
||||
name: "Tab1",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
widget: {},
|
||||
graph: {},
|
||||
standard: {},
|
||||
};
|
||||
this.layout = this.layout.map((d: LayoutConfig) => {
|
||||
d.y = d.y + newWidget.h;
|
||||
|
@@ -14,8 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { LayoutConfig } from "@/types/dashboard";
|
||||
export const ConfigData: LayoutConfig = {
|
||||
export const ConfigData = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: 8,
|
||||
@@ -23,7 +22,7 @@ export const ConfigData: LayoutConfig = {
|
||||
i: "0",
|
||||
metrics: ["service_resp_time"],
|
||||
queryMetricType: "readMetricsValues",
|
||||
chart: "Line",
|
||||
type: "Widget",
|
||||
widget: {
|
||||
title: "Title123",
|
||||
tips: "Tooltip123",
|
||||
@@ -31,6 +30,7 @@ export const ConfigData: LayoutConfig = {
|
||||
graph: {
|
||||
showBackground: true,
|
||||
barWidth: 30,
|
||||
type: "Line",
|
||||
},
|
||||
standard: {
|
||||
sortOrder: "DEC",
|
||||
|
Reference in New Issue
Block a user