Update client dependency for dashboards get all
parent
fbd313456a
commit
4d5624fc81
|
@ -985,9 +985,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@influxdata/influx": {
|
"@influxdata/influx": {
|
||||||
"version": "0.2.56",
|
"version": "0.2.59",
|
||||||
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.56.tgz",
|
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.59.tgz",
|
||||||
"integrity": "sha512-T3kHMi+i/3hu7arS8V7FoFWzExjZsm8Vsy2Clo4puczM+1zHNYLP/zaC/eFyD5VaVsfQmJ3FgbLPUcYiFLPUbg==",
|
"integrity": "sha512-ow3iqzryF5a17kBbWLxCRjrLqAVAuMsVa2wSeaWikL7SgWDK3+oEi5T5StvM9SreB6+3Q0RIyct5TC+7T1QPiA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"axios": "^0.18.0"
|
"axios": "^0.18.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@influxdata/clockface": "0.0.8",
|
"@influxdata/clockface": "0.0.8",
|
||||||
"@influxdata/influx": "0.2.56",
|
"@influxdata/influx": "0.2.59",
|
||||||
"@influxdata/react-custom-scrollbars": "4.3.8",
|
"@influxdata/react-custom-scrollbars": "4.3.8",
|
||||||
"@influxdata/vis": "^0.2.3",
|
"@influxdata/vis": "^0.2.3",
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
import {Permission, PermissionResource, Authorization} from '@influxdata/influx'
|
import {
|
||||||
|
Permission,
|
||||||
|
PermissionResource,
|
||||||
|
Authorization,
|
||||||
|
AuthorizationUpdateRequest,
|
||||||
|
} from '@influxdata/influx'
|
||||||
|
|
||||||
const {TypeEnum} = PermissionResource
|
const {TypeEnum} = PermissionResource
|
||||||
const {ActionEnum} = Permission
|
const {ActionEnum} = Permission
|
||||||
const {StatusEnum} = Authorization
|
const {StatusEnum} = AuthorizationUpdateRequest
|
||||||
|
|
||||||
export const authorization: Authorization = {
|
export const authorization: Authorization = {
|
||||||
links: {
|
links: {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {IndexList, ComponentSpacer, ConfirmationButton} from 'src/clockface'
|
||||||
import EditableName from 'src/shared/components/EditableName'
|
import EditableName from 'src/shared/components/EditableName'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import {Authorization} from '@influxdata/influx'
|
import {Authorization, AuthorizationUpdateRequest} from '@influxdata/influx'
|
||||||
|
|
||||||
interface OwnProps {
|
interface OwnProps {
|
||||||
auth: Authorization
|
auth: Authorization
|
||||||
|
@ -65,15 +65,15 @@ class TokenRow extends PureComponent<Props> {
|
||||||
|
|
||||||
private get isTokenEnbled(): boolean {
|
private get isTokenEnbled(): boolean {
|
||||||
const {auth} = this.props
|
const {auth} = this.props
|
||||||
return auth.status === Authorization.StatusEnum.Active
|
return auth.status === AuthorizationUpdateRequest.StatusEnum.Active
|
||||||
}
|
}
|
||||||
|
|
||||||
private changeToggle = () => {
|
private changeToggle = () => {
|
||||||
const {auth, onUpdate} = this.props
|
const {auth, onUpdate} = this.props
|
||||||
if (auth.status === Authorization.StatusEnum.Active) {
|
if (auth.status === AuthorizationUpdateRequest.StatusEnum.Active) {
|
||||||
auth.status = Authorization.StatusEnum.Inactive
|
auth.status = AuthorizationUpdateRequest.StatusEnum.Inactive
|
||||||
} else {
|
} else {
|
||||||
auth.status = Authorization.StatusEnum.Active
|
auth.status = AuthorizationUpdateRequest.StatusEnum.Active
|
||||||
}
|
}
|
||||||
onUpdate(auth)
|
onUpdate(auth)
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ export const addDashboardIDToCells = (
|
||||||
|
|
||||||
// TODO(desa): what to do about getting dashboards from another v2 source
|
// TODO(desa): what to do about getting dashboards from another v2 source
|
||||||
export const getDashboards = async (orgID: string): Promise<Dashboard[]> => {
|
export const getDashboards = async (orgID: string): Promise<Dashboard[]> => {
|
||||||
const dashboards = await client.dashboards.getAllByOrgID(orgID)
|
const dashboards = await client.dashboards.getAll(orgID)
|
||||||
|
|
||||||
return dashboards.map(d => ({
|
return dashboards.map(d => ({
|
||||||
...d,
|
...d,
|
||||||
|
@ -41,7 +41,7 @@ export const getDashboard = async (id: string): Promise<Dashboard> => {
|
||||||
export const getDashboardsByOrgID = async (
|
export const getDashboardsByOrgID = async (
|
||||||
orgID: string
|
orgID: string
|
||||||
): Promise<Dashboard[]> => {
|
): Promise<Dashboard[]> => {
|
||||||
const dashboards = await client.dashboards.getAllByOrgID(orgID)
|
const dashboards = await client.dashboards.getAll(orgID)
|
||||||
|
|
||||||
return dashboards.map(d => ({
|
return dashboards.map(d => ({
|
||||||
...d,
|
...d,
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const getDashboards = async (): Promise<Dashboard[]> => {
|
||||||
export const getDashboardsByOrgID = async (
|
export const getDashboardsByOrgID = async (
|
||||||
orgID: string
|
orgID: string
|
||||||
): Promise<Dashboard[]> => {
|
): Promise<Dashboard[]> => {
|
||||||
const dashboards = await client.dashboards.getAllByOrgID(orgID)
|
const dashboards = await client.dashboards.getAll(orgID)
|
||||||
|
|
||||||
return dashboards.map(d => ({
|
return dashboards.map(d => ({
|
||||||
...d,
|
...d,
|
||||||
|
|
Loading…
Reference in New Issue