• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    Widget - Execute Operating System commands

    Scheduled Pinned Locked Moved Dashboard
    2 Posts 2 Posters 675 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jkandasaJ Offline
      jkandasa
      last edited by jkandasa

      Now it is possible to execute Operating System commands from MyController dashboard. This request created based on the input from https://github.com/mycontroller-org/mycontroller/issues/450

      Add OS Reboot and Date button on the dashboard.

      image

      Select OS Commands from widget list,
      image

      Update button details as follows,
      image

      If we enabled confirmation for a button, will be displayed as follows, Here it is reboot button
      image

      Button JSON content:

      [
        {
          "name": "<i class='fa fa-power-off'></i>",
          "os": "linux",
          "command": "reboot",
          "btnType": "danger",
          "confirmation": true
        },
        {
          "name": "Date",
          "os": "linux",
          "command": "date"
        }
      ]
      
      Supported fields:
      • name - (Mandatory) Name of the button. can be in the form of HTML also. HTML or icons(recommended: font awesome icons)
      • os - (Optional) Operating System, supports, linux and common. If we leave, will be considered as common.
      • btnType - (Optional) can be any one of value in the list [default, primary, success, info, warning, danger] when we leave this field field as blank, default will be selected. Each value give
      • confirmation - (Optional) If you want to confirm before execute this command. Will be good to add on reboot, poweroff commands. Default: false.
      1 Reply Last reply Reply Quote 0
      • skywatchS Offline
        skywatch
        last edited by

        This is excellent news - now even more control from within myc !!!

        There are so many uses for this flexibility - I only asked for a reboot/shutdown button as it would eliminate an ssh connection each time I need to work on the pi - but this is just way better than that!

        Thank you sooooo much 🙂

        1 Reply Last reply Reply Quote 1
        • First post
          Last post

        0

        Online

        587

        Users

        529

        Topics

        3.4k

        Posts
        Copyright © 2015-2025 MyController.org | Contributors | Localization