Merge pull request #13128 from influxdata/update-client-dash-getall

Update client dependency for dashboards get all
pull/13094/head
Iris Scholten 2019-04-03 14:15:33 -07:00 committed by GitHub
commit b1f2872c75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 14 deletions

6
ui/package-lock.json generated
View File

@ -985,9 +985,9 @@
}
},
"@influxdata/influx": {
"version": "0.2.56",
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.56.tgz",
"integrity": "sha512-T3kHMi+i/3hu7arS8V7FoFWzExjZsm8Vsy2Clo4puczM+1zHNYLP/zaC/eFyD5VaVsfQmJ3FgbLPUcYiFLPUbg==",
"version": "0.2.59",
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.59.tgz",
"integrity": "sha512-ow3iqzryF5a17kBbWLxCRjrLqAVAuMsVa2wSeaWikL7SgWDK3+oEi5T5StvM9SreB6+3Q0RIyct5TC+7T1QPiA==",
"requires": {
"axios": "^0.18.0"
}

View File

@ -137,7 +137,7 @@
},
"dependencies": {
"@influxdata/clockface": "0.0.8",
"@influxdata/influx": "0.2.56",
"@influxdata/influx": "0.2.59",
"@influxdata/react-custom-scrollbars": "4.3.8",
"@influxdata/vis": "^0.2.3",
"axios": "^0.18.0",

View File

@ -1,8 +1,13 @@
import {Permission, PermissionResource, Authorization} from '@influxdata/influx'
import {
Permission,
PermissionResource,
Authorization,
AuthorizationUpdateRequest,
} from '@influxdata/influx'
const {TypeEnum} = PermissionResource
const {ActionEnum} = Permission
const {StatusEnum} = Authorization
const {StatusEnum} = AuthorizationUpdateRequest
export const authorization: Authorization = {
links: {

View File

@ -14,7 +14,7 @@ import {IndexList, ComponentSpacer, ConfirmationButton} from 'src/clockface'
import EditableName from 'src/shared/components/EditableName'
// Types
import {Authorization} from '@influxdata/influx'
import {Authorization, AuthorizationUpdateRequest} from '@influxdata/influx'
interface OwnProps {
auth: Authorization
@ -65,15 +65,15 @@ class TokenRow extends PureComponent<Props> {
private get isTokenEnbled(): boolean {
const {auth} = this.props
return auth.status === Authorization.StatusEnum.Active
return auth.status === AuthorizationUpdateRequest.StatusEnum.Active
}
private changeToggle = () => {
const {auth, onUpdate} = this.props
if (auth.status === Authorization.StatusEnum.Active) {
auth.status = Authorization.StatusEnum.Inactive
if (auth.status === AuthorizationUpdateRequest.StatusEnum.Active) {
auth.status = AuthorizationUpdateRequest.StatusEnum.Inactive
} else {
auth.status = Authorization.StatusEnum.Active
auth.status = AuthorizationUpdateRequest.StatusEnum.Active
}
onUpdate(auth)
}

View File

@ -21,7 +21,7 @@ export const addDashboardIDToCells = (
// TODO(desa): what to do about getting dashboards from another v2 source
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 => ({
...d,
@ -41,7 +41,7 @@ export const getDashboard = async (id: string): Promise<Dashboard> => {
export const getDashboardsByOrgID = async (
orgID: string
): Promise<Dashboard[]> => {
const dashboards = await client.dashboards.getAllByOrgID(orgID)
const dashboards = await client.dashboards.getAll(orgID)
return dashboards.map(d => ({
...d,

View File

@ -32,7 +32,7 @@ export const getDashboards = async (): Promise<Dashboard[]> => {
export const getDashboardsByOrgID = async (
orgID: string
): Promise<Dashboard[]> => {
const dashboards = await client.dashboards.getAllByOrgID(orgID)
const dashboards = await client.dashboards.getAll(orgID)
return dashboards.map(d => ({
...d,