2

Ive create a custom widget for my dashboard using the django-dashing framework. And i want to resize each widget so it can fill my whole page. Besides that i want to add slider to make my widget as slide show.

I search for the example and can't find any of them.

This is my widget example:-

dashboard.addWidget('upload_in_widget', 'Countdown', {
    getData: function () {
        $.get('http://localhost:8000/api/v1/file/?folder_id=1', function(data) {
            total_s1 = data.meta.total_count;
        });
        $.get('http://localhost:8000/api/v1/file/?folder_id=2', function(data) {
            total_s2 = data.meta.total_count;
        });
        $.get('http://localhost:8000/api/v1/file/?folder_id=3', function(data) {
            total_s3 = data.meta.total_count;
        });
        $.get('http://localhost:8000/api/v1/file/?folder_id=4', function(data) {
            total_s4 = data.meta.total_count;
        });
        total_in = total_s1+total_s2+total_s3+total_s4;
        $.extend(this.scope, {
            title: 'TOTAL SCANNED',
            value: total_in,
        });
    },
});
Iam Moon
  • 685
  • 2
  • 7
  • 11

0 Answers0