diff --git a/api/src/database/migrations/20210525A-add-insights.ts b/api/src/database/migrations/20210525A-add-insights.ts index a8efab41cf..be837c5716 100644 --- a/api/src/database/migrations/20210525A-add-insights.ts +++ b/api/src/database/migrations/20210525A-add-insights.ts @@ -3,8 +3,8 @@ import { Knex } from 'knex'; export async function up(knex: Knex): Promise { await knex.schema.createTable('directus_dashboards', (table) => { table.uuid('id').primary(); - table.string('name'); - table.string('icon', 30); + table.string('name').notNullable(); + table.string('icon', 30).notNullable().defaultTo('dashboard'); table.text('note'); table.timestamp('date_created').defaultTo(knex.fn.now()); table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL'); @@ -14,14 +14,15 @@ export async function up(knex: Knex): Promise { table.uuid('id').primary(); table.uuid('dashboard').notNullable().references('id').inTable('directus_dashboards').onDelete('CASCADE'); table.string('name'); - table.string('icon', 30); + table.string('icon', 30).defaultTo('insert_chart'); table.string('color', 10); + table.boolean('show_header').notNullable().defaultTo(true); table.text('note'); - table.string('type'); - table.integer('position_x'); - table.integer('position_y'); - table.integer('width'); - table.integer('height'); + table.string('type').notNullable(); + table.integer('position_x').notNullable(); + table.integer('position_y').notNullable(); + table.integer('width').notNullable(); + table.integer('height').notNullable(); table.json('options'); table.timestamp('date_created').defaultTo(knex.fn.now()); table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL'); diff --git a/app/src/components/v-list/v-list.vue b/app/src/components/v-list/v-list.vue index dc3d2c9ae6..74923e3b91 100644 --- a/app/src/components/v-list/v-list.vue +++ b/app/src/components/v-list/v-list.vue @@ -90,5 +90,9 @@ body { max-width: calc(100% - 16px); margin: 8px; } + + ::v-deep .v-button { + pointer-events: all; + } } diff --git a/app/src/lang/translations/en-US.yaml b/app/src/lang/translations/en-US.yaml index 0ac407fc76..00e23fa75a 100644 --- a/app/src/lang/translations/en-US.yaml +++ b/app/src/lang/translations/en-US.yaml @@ -545,6 +545,8 @@ dashboard: Dashboard panel: Panel no_dashboards: No Dashboards no_dashboards_copy: You don’t have any Dashboards yet. +create_dashboard: Create Dashboard +dashboard_name: Dashboard Name image_url: Image Url alt_text: Alternative Text media: Media diff --git a/app/src/modules/insights/components/create-dashboard-dialog.vue b/app/src/modules/insights/components/create-dashboard-dialog.vue new file mode 100644 index 0000000000..5f2320cd56 --- /dev/null +++ b/app/src/modules/insights/components/create-dashboard-dialog.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/app/src/modules/insights/components/navigation.vue b/app/src/modules/insights/components/navigation.vue new file mode 100644 index 0000000000..71bf1d3a01 --- /dev/null +++ b/app/src/modules/insights/components/navigation.vue @@ -0,0 +1,35 @@ + + + diff --git a/app/src/modules/insights/routes/dashboard.vue b/app/src/modules/insights/routes/dashboard.vue index 60c1540081..3ae406b6a2 100644 --- a/app/src/modules/insights/routes/dashboard.vue +++ b/app/src/modules/insights/routes/dashboard.vue @@ -1,5 +1,18 @@ + + diff --git a/app/src/modules/insights/routes/overview.vue b/app/src/modules/insights/routes/overview.vue index 5efb53b210..f39abec6e7 100644 --- a/app/src/modules/insights/routes/overview.vue +++ b/app/src/modules/insights/routes/overview.vue @@ -6,6 +6,26 @@ + + + +