Results 1 to 7 of 7

Thread: Use Sencha Cmd to generate the Admin Dashboard example

  1. #1
    Sencha Premium User
    Join Date
    Mar 2011
    Location
    Philadelphia
    Posts
    44

    Default Use Sencha Cmd to generate the Admin Dashboard example

    I just downloaded the EA of Ext 6.2 and I'm trying to use Sencha Cmd in order to generate a starter app that's the Admin Dashboard (http://examples.sencha.com/extjs/6.2...min-dashboard/) they showcase in the examples.

    I could have swore there was a way to do this but now I can't figure it out. Does anyone know?

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    900
    Answers
    105

    Default

    WORKING WITH SENCHA APP TEMPLATES: BOILERPLATE EXT JS 6 CODE

    Code:
    //navigate to the ext js 6 folder
    sencha package upgrade
    sencha generate app -s templates/admin-dashboard/ Dashboard ../my-folder

  3. #3
    Ext JS Premium Member syscobra's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    146

    Default

    Hi.

    I have made the admin dashboard app work like a template and we can create a new Application (with the new name and all) from it.

    If anyone wants to try it out go to the github page:
    https://github.com/syscobra/extjs-ad...board-template

    Regards
    Javier Rincón aka SysCobra

  4. #4
    Sencha Premium User
    Join Date
    Oct 2016
    Posts
    26
    Answers
    1

    Default

    no longer working on cmd 6.5.x

  5. #5
    Sencha User
    Join Date
    Sep 2009
    Posts
    43

    Default

    Quote Originally Posted by mattia.pagliasso View Post
    no longer working on cmd 6.5.x
    Yeah I've been getting this for a while now. Had a good opportunity

    • I received a brand new win7 laptop today.
    • Installed cmd 6.5 (for some reason, it didn't update my PATH var).
    • I then installed the 6.0.1 gpl fresh.
    • Quick test of
      Code:
      sencha generate app -s templates/admin-dashboard/ Dashboard ../my-folder
    • App generates successfully, with two warnings


    wHtob2Q.jpg

    X1oQ44Z.jpg


    • Start sencha app watch
    • Head to localhost:1841
    • Website previews as such:


    U5m2m1O.jpg

    The last time I worked around this, I had to step back to cmd 6.2.1.29. I'm not sure if there are additional steps, sencha app build, refresh, watch, etc., doesn't seem to fix this display issue. Any advice on this issue would be greatly appreciated.

  6. #6
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    253
    Answers
    22

    Default

    It's using the wrong paths for your purpose, causing a HTTP 404 error on the CSS files. Change the output section of app.json from this:
    Code:
    "output": {
        "base": "${ext.dir}/build/examples/admin-dashboard/${build.id}",
        "page": "../index.html",
        "manifest": "../${build.id}.json",
        "appCache": {
            "enable": false
        }
    },

    to this (the default for a newly generated starter app):
    Code:
    "output": {
        "base": "${workspace.build.dir}/${build.environment}/${app.name}",
        "page": "index.html",
        "manifest": "${build.id}.json",
        "js": "${build.id}/app.js",
        "appCache": {
            "enable": false
        },
        "resources": {
            "path": "${build.id}/resources",
            "shared": "resources"
        }
    },

  7. #7
    Sencha User
    Join Date
    Sep 2009
    Posts
    43

    Default

    Quote Originally Posted by richardvd View Post
    It's using the wrong paths for your purpose, causing a HTTP 404 error on the CSS files.
    Thanks for the response.

    Would you be able to explain why, by default, the simplest 3 commands do not generate a working app? Is there a "best practices" for literally starting fresh?

    It seems errors based on various CMD versions are different, and despite my best efforts, I can not find one single source or document that indicates how to "step 1, step 2, step 3" boom get a working site, including the "getting started" documentation for various versions of extjs.

    Following this site will not produce a working app using the following steps

    https://docs.sencha.com/cmd/guides/extjs/cmd_app.html

    (uninstall all previous versions, trash every folder structure in existence, install / copy fresh, ground up)

    Install CMD 6.5
    (i again have to create my user PATH env var)
    Fresh copy 6.0.1 gpl
    Code:
    sencha which
    (version ok)
    Code:
    sencha -sdk C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1 generate app MyApp C:\Users\xxxxxxx\bin\Sencha\sites\
    Code:
    [INF] XTemplate Error: "frameworkIsV65" is not defined.
    classic:
    Code:
    [WRN] Use of 'require()' will be deprecated: C:/Users/xxxxxxx/bin/Sencha/sites/ext/classic/theme-neutral/sass/etc/mixins/font-icon.scss:1
    [WRN] Use @import instead
    modern:
    Code:
    [WRN] Use of 'require()' will be deprecated: C:/Users/xxxxxxx/bin/Sencha/sites/ext/modern/theme-base/sass/etc/mixins/font-icon.scss:5
    [WRN] Use @import instead
    sencha app build
    [code]
    Code:
    [WRN] Use of 'require()' will be deprecated: C:/Users/xxxxxxx/bin/Sencha/sites/ext/classic/theme-neutral/sass/etc/mixins/font-icon.scss:1
    [WRN] Use @import instead
    [LOG] Fashion build starting for C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\production\MyApp\slicer-temp\MyApp-example.scss
    [LOG] Fashion build complete for C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\production\MyApp\slicer-temp\MyApp-example.scss
    [LOG] Fashion build completed in 2.128 sec.
    [INF] Capturing theme image
    [ERR] loading page file:///C%3A/Users/xxxxxxx/bin/Sencha/Cmd/6.5.0.180/ant/build/slicer/theme.html?_baseDir=file%3A%2F%2F%2FC%3A%2FUsers%2FE069113%2Fb
    in%2FSencha%2Fsites%2Fbuild%2Ftemp%2Fproduction%2FMyApp%2Fslicer-temp
    setting base href to : file:///C:/Users/xxxxxxx/bin/Sencha/sites/build/temp/production/MyApp/slicer-temp/
    == Unhandled Error ==
    TypeError: undefined is not a constructor (evaluating '''Ext.define''')
    
      file:///C:/Users/xxxxxxx/bin/Sencha/sites/ext/classic/theme-neptune/overrides/Component.js:1 in global code
    
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    [ERR]   at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvo
    [ERR] ker.java:175)
    [ERR]
    [ERR] Total time: 20 seconds
    [ERR] The following error occurred while executing this line:
    C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\build-impl.xml:340: The following error occurred while executing this line:
    C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\slice-impl.xml:366: The following error occurred while executing this line:
    C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\slice-impl.xml:367: The following error occurred while executing this line:
    C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\slice-impl.xml:208: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    Ooook, go back to beginning. Trash /sites/ dir.

    Code:
    C:\Users\xxxxxxx\bin>sencha generate app -ext MyApp C:\Users\xxxxxxx\bin\Sencha\sites\
    Sencha Cmd v6.5.0.180
    [INF] Downloading package "[email protected]"
    [INF] Downloading : ....................
    [INF] Extracting package "[email protected]"
    [INF] Package is already local: ext/6.0.0.640
    In addition, also receive the XTemplate and require() warnings. Why the old version?

    sencha app build

    Same warnings, but sucessful. Basic site loads at local host. Ok, let's trash \sites\ and try now with the templates.

    sencha generate app -ext -s C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1\templates\admin-dashboard Admin C:\Users\xxxxxxx\bin\Sencha\admin

    Code:
    [ERR] Failed to resolve dependency Ext.panel.Panel for file Admin.view.profile.Social
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel.Panel
    [ERR]   at org.apache.tools.ant.Task.perform(Task.java:34
    [ERR] 8)
    [ERR]
    [ERR] Total time: 2 seconds
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
    [ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\build-impl.xml:381: The following error occurred while executing this line:
    [ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel
    .Panel
    [ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\build-impl.xml:381: The following error occurred while executing this line:
    [ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel
    .Panel
    [ERR]   at org.apache.tools.ant
    [ERR] .Target.performTasks(Target.java:413)
    [ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel
    .Panel
    [ERR]
    [ERR] Total time: 36 seconds
    [ERR] The following error occurred while executing this line:
    C:\Users\xxxxxxx\bin\Sencha\Cmd\6.5.0.180\plugins\ext\current\plugin.xml:156: com.sencha.exceptions.BasicException: The following error occurred while
     executing this line:
    C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\build-impl.xml:381: The following error occurred while executing this line:
    C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel.Panel
    
    [ERR]
    [ERR] The package was last modified by an older version of Sencha Cmd (6.0.0.202).
    [ERR] Running "sencha package upgrade" may resolve the error described above.
    [ERR]
    Hard fail. This also produced a ${ext.dir} dir within my \bin\Sencha folder. K let's try dropping the -ext flag.

    sencha generate app -s C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1\templates\admin-dashboard Admin C:\Users\xxxxxxx\bin\Sencha\admin

    Code:
    Sencha Cmd v6.5.0.180
    [ERR] Unable to locate 'framework.dir' property from sencha.cfg and no framework directory specified
    [ERR] Please ensure this command was executed from a valid framework directory
    [ERR] No Framework specified
    Ookk maybe it wants me to be in the main directory.

    cd C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1

    App builds, same XTemp and requires warning as above.

    cd to \sites\

    sencha app build

    Successful, with same warnings.

    sencha app watch

    Waiting for changes... (with warnings)

    IBnl7TN.jpg

    So in addition to an hour of manipulation, wild gesticulations, and two cups of coffee, I would *still* need to modify js code within app.json to get a basic, default app to display properly? Alright, let's make the change to app.json. sencha app watch is currently running, just waiting for the chance...

    What happens next, and happens frequently with sencha app watch, is what I can only describe as a mental breakdown / adolescent tired - the app goes into a downward spiral of constantly refreshing, detecting the same changes over and over for minutes (hours, in one case when i was particularly curious and was more interested in pruning my plants outside). Sencha mem climbs and climbs and climbs. Thank god this new laptop has 16gb ram, because my last laptop with 4gb quickly goes into oh sh*t mode and runs out of available ram.

    elJd4nZ.png

    Code:
    INF] -----------------------
    INF] Waiting for changes...
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\packages\charts\src\chart\axis\Numeric3D.js
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\theme-triton\package.json
    INF] Loading Build Environment
    INF] Loading compiler context
    INF] -----------------------
    INF] Application available at http://localhost:1841
    INF] Application available at http://localhost:1841
    INF] Loading app json manifest...
    INF] Appending content to C:\Users\xxxxxxx\bin\Sencha\sites\bootstrap.js
    INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\classic.json
    INF] merging 254 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
    INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
    INF] merging 80 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
    INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
    INF] Copying shared resources to C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin...
    INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.json
    INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.js
    INF] writing sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
    INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
    INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
    INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
    INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
    INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
    INF] Running sass build.
    INF] Fashion build starting for ..\..\build\temp\development\Admin\sass\Admin-all.scss
    INF] Fashion build complete for ..\..\build\temp\development\Admin\sass\Admin-all.scss
    INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
    INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
    INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
    INF] Running sass build.
    INF] Fashion build starting for ..\..\build\temp\development\Admin\sass\Admin-all.scss
    INF] Fashion build complete for ..\..\build\temp\development\Admin\sass\Admin-all.scss
    INF] Application available at http://localhost:1841
    INF] Appending content to C:\Users\xxxxxxx\bin\Sencha\sites\bootstrap.js
    INF] Writing content to C:\Users\E069113\bin\Sencha\sites\classic.json
    INF] Refresh complete in 15 sec. at 12:40:48 PM
    INF] -----------------------
    INF] Waiting for changes...
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\classic\src\picker\Month.js
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\classic\src\selection\RowModel.js
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\packages\charts\src\chart\axis\Numeric3D.js
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\packages\charts\src\chart\series\sprite\Scatter.js
    INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\theme-triton\package.json
    INF] Loading Build Environment
    INF] Loading compiler context
    INF] -----------------------
    INF] Application available at http://localhost:1841
    INF] Application available at http://localhost:1841
    INF] Loading app json manifest...
    INF] Appending content to C:\Users\xxxxxxx\bin\Sencha\sites\bootstrap.js
    INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\classic.json
    INF] merging 254 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
    INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
    INF] merging 80 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
    INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
    INF] Copying shared resources to C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin...
    INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.json
    INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.js
    INF] writing sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
    INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
    INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
    This is a very common occurrence, whereby I decide to use web start / refresh to keep updates going, unless I run into the unfortunate instance I need to update .scss and need watch to push those updates.

    K lets kill sencha app watch, and restart it.

    Waiting for changes...

    It worked. By jove, I think we've done it.

    Is that all really necessary? I have to be doing something wrong. Besides the constant app watch issues. Despite the cryptic cmd errors that require debug > output.txt reviews. Despite the ever-increasing ram usage while even default sites are running. I love ExtJs. But jesus, that is a long walk to get to a solution.

Similar Threads

  1. Admin dashboard scrolling bug
    By mankz in forum Ext JS 6.x Bugs
    Replies: 5
    Last Post: 28 Jun 2017, 3:29 PM
  2. SenchaDash - Admin Dashboard source
    By wemerson.januario in forum Ext JS 6.x Q&A
    Replies: 2
    Last Post: 24 Jun 2016, 4:09 AM
  3. Err when trying to start Admin Dashboard app
    By prog1dev in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 8 Mar 2016, 10:12 AM
  4. admin-dashboard: app.json
    By ClausThaler in forum Ext JS 6.x Bugs
    Replies: 0
    Last Post: 26 Feb 2016, 8:39 AM
  5. Create new app same as admin dashboard template
    By mohit.saxena in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 21 Nov 2015, 3:40 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •