export default {
  namespaced: true,
  state: {
    metrics: {},
    apiServer: {},
    scheduler: {},
    nodesList: [],
    apiServerMonitor: { },
    physicalMonitor: { },
    schedulerMonitor: {},
    applicationMonitor: {}

  },
  mutations: {
    updateMetrics (state, param) {
      state.metrics = param
    },
    updateApiServer (state, param) {
      state.apiServer = param
    },
    updateScheduler (state, param) {
      state.scheduler = param
    },
    updateNodesList (state, param) {
      state.nodesList = param
    },
    updatePhysicalMonitor (state, param) {
      state.physicalMonitor = param
    },
    updateApiServerMonitor (state, param) {
      state.apiServerMonitor = param
    },
    updateSchedulerMonitor (state, param) {
      state.schedulerMonitor = param
    },
    updateApplicationMonitor (state, param) {
      state.applicationMonitor = param
    }
  },
  actions: {
    setMetrics (context, param) {
      context.commit('updateMetrics', param)
    },
    setApiServer (context, param) {
      context.commit('updateApiServer', param)
    },
    setScheduler (context, param) {
      context.commit('updateScheduler', param)
    },
    setNodesList (context, param) {
      context.commit('updateNodesList', param)
    },
    setPhysicalMonitor (context, param) {
      context.commit('updatePhysicalMonitor', param)
    },
    setApiServerMonitor (context, param) {
      context.commit('updateApiServerMonitor', param)
    },
    setSchedulerMonitor (context, param) {
      context.commit('updateSchedulerMonitor', param)
    },
    setApplicationMonitor (context, param) {
      context.commit('updateApplicationMonitor', param)
    }
  }

}
